From 9faa583bf37d6e3fbf50890a86eab2b2185a32a9 Mon Sep 17 00:00:00 2001 From: Kuowei Li Date: Mon, 12 Jul 2021 14:32:48 +0800 Subject: [PATCH] audio: Allow SetAudioProperties to not be supported The parameter of sample rate, channel mask and format is not mandatory to support by Audio HAL. At meantime, there is no corresponding handle in framework. Hence, SetAudioProperties should allow reporting not supported. Bug: 194368657 Test: run vts -m VtsHalAudioV7_0Target Change-Id: Id0505bfb5d4812dd4c5d31a6e9d72c4c9c0cffa2 Merged-In: Id0505bfb5d4812dd4c5d31a6e9d72c4c9c0cffa2 --- .../core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h index aa7fd8e857..340903a4ea 100644 --- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h +++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h @@ -1390,6 +1390,9 @@ static void testSetAudioProperties(IStream* stream) { config.channelMask.value(channelMask); auto ret = stream->setAudioProperties(config); EXPECT_TRUE(ret.isOk()); + if (ret == Result::NOT_SUPPORTED) { + GTEST_SKIP() << "setAudioProperties is not supported"; + } EXPECT_EQ(Result::OK, ret) << profile.format << "; " << sampleRate << "; " << channelMask; }