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
This commit is contained in:
Kuowei Li
2021-07-12 14:32:48 +08:00
committed by Mikhail Naganov
parent 8bff1f0d11
commit de829572f9

View File

@@ -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;
}