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

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