Revert "Temporary disable tests failing tests for O"
This commit was never intended to be merged in master but it could not
be avoided due to an automerger limitation.
This reverts commit fd297c6f8e722ac834706844fec058ff7b1335c0.
Test: Run VTS
Bug: 36311550
Change-Id: I6ee23a6282c29b125e53cced0cfcc6b697754ce0
diff --git a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
index 90fec01..27479ff 100644
--- a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
+++ b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
@@ -743,15 +743,11 @@
"Check that the stream frame count == the one it was opened with",
ASSERT_EQ(audioConfig.frameCount, extract(stream->getFrameCount())))
-TEST_IO_STREAM(
- GetSampleRate,
- "Check that the stream sample rate == the one it was opened with",
- stream->getSampleRate())
+TEST_IO_STREAM(GetSampleRate, "Check that the stream sample rate == the one it was opened with",
+ ASSERT_EQ(audioConfig.sampleRateHz, extract(stream->getSampleRate())))
-TEST_IO_STREAM(
- GetChannelMask,
- "Check that the stream channel mask == the one it was opened with",
- stream->getChannelMask())
+TEST_IO_STREAM(GetChannelMask, "Check that the stream channel mask == the one it was opened with",
+ ASSERT_EQ(audioConfig.channelMask, extract(stream->getChannelMask())))
TEST_IO_STREAM(GetFormat,
"Check that the stream format == the one it was opened with",
@@ -853,17 +849,23 @@
areAudioPatchesSupported() ? doc::partialTest("Audio patches are supported")
: testSetDevice(stream.get(), address))
-static void testGetAudioProperties(IStream* stream) {
+static void testGetAudioProperties(IStream* stream, AudioConfig expectedConfig) {
uint32_t sampleRateHz;
AudioChannelMask mask;
AudioFormat format;
+
stream->getAudioProperties(returnIn(sampleRateHz, mask, format));
+
+ // FIXME: the qcom hal it does not currently negotiate the sampleRate &
+ // channel mask
+ EXPECT_EQ(expectedConfig.sampleRateHz, sampleRateHz);
+ EXPECT_EQ(expectedConfig.channelMask, mask);
+ EXPECT_EQ(expectedConfig.format, format);
}
-TEST_IO_STREAM(
- GetAudioProperties,
- "Check that the stream audio properties == the ones it was opened with",
- testGetAudioProperties(stream.get()))
+TEST_IO_STREAM(GetAudioProperties,
+ "Check that the stream audio properties == the ones it was opened with",
+ testGetAudioProperties(stream.get(), audioConfig))
static void testConnectedState(IStream* stream) {
DeviceAddress address = {};