Audio HAL: Allow setters to not be implemented
setSampleRate, setChannelMask, setFormat
may not be implemented by the HAL, although this is not documented in
the HAL API.
Currently the VTS test requires their implementation if the respective
getSupported{SampleRate,ChannelMask,Format} are supported.
Relax this requirement as the framework never calls those setters.
Note that the optionality of those functions will be documented
in the next HAL API version.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 69811500
Change-Id: I3a390ae925cabd99e7f1ed4a627e71ad87b1b437
Merged-In: I3a390ae925cabd99e7f1ed4a627e71ad87b1b437
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 3bcba14c36
)
This commit is contained in:
parent
96b6fcdc4f
commit
5b21eaa608
1 changed files with 7 additions and 1 deletions
|
@ -795,7 +795,13 @@ static void testCapabilityGetter(const string& name, IStream* stream,
|
|||
|
||||
// Check that all declared supported values are indeed supported
|
||||
for (auto capability : capabilities) {
|
||||
ASSERT_OK((stream->*setter)(capability));
|
||||
auto ret = (stream->*setter)(capability);
|
||||
ASSERT_TRUE(ret.isOk());
|
||||
if (ret == Result::NOT_SUPPORTED) {
|
||||
doc::partialTest("Setter is not supported");
|
||||
return;
|
||||
}
|
||||
ASSERT_OK(ret);
|
||||
ASSERT_EQ(capability, extract((stream->*getter)()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue