From de829572f9773a1aae1b7f8e048b134ce2304a98 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 --- .../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; }