audio: Cleanup VTS tests

Remove getSupported*AudioConfig methods as they were always
returning empty vector, and for V6 test parameter generation
has been changed.

Test: atest VtsHalAudioV5_0TargetTest
Change-Id: Ib6f53c52b3ee2769cb02730d02decd97390fe091
This commit is contained in:
Mikhail Naganov
2019-11-20 21:56:36 -08:00
parent a4b693f5da
commit 13b99b4cf4
2 changed files with 2 additions and 31 deletions

View File

@@ -717,12 +717,6 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(ConfigHelper::getRequiredSupportCaptureAudioConfig()),
::testing::Values(AudioInputFlag::NONE)),
&DeviceConfigParameterToString);
INSTANTIATE_TEST_CASE_P(
SupportedInputBufferSize, RequiredInputBufferSizeTest,
::testing::Combine(::testing::ValuesIn(getDeviceParameters()),
::testing::ValuesIn(ConfigHelper::getSupportedCaptureAudioConfig()),
::testing::Values(AudioInputFlag::NONE)),
&DeviceConfigParameterToString);
INSTANTIATE_TEST_CASE_P(
RecommendedCaptureAudioConfigSupport, OptionalInputBufferSizeTest,
::testing::Combine(
@@ -930,12 +924,6 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(ConfigHelper::getRequiredSupportPlaybackAudioConfig()),
::testing::Values(AudioOutputFlag::NONE)),
&DeviceConfigParameterToString);
INSTANTIATE_TEST_CASE_P(
SupportedOutputStreamConfig, OutputStreamTest,
::testing::Combine(::testing::ValuesIn(getDeviceParameters()),
::testing::ValuesIn(ConfigHelper::getSupportedPlaybackAudioConfig()),
::testing::Values(AudioOutputFlag::NONE)),
&DeviceConfigParameterToString);
INSTANTIATE_TEST_CASE_P(
RecommendedOutputStreamConfigSupport, OutputStreamTest,
::testing::Combine(
@@ -946,7 +934,7 @@ INSTANTIATE_TEST_CASE_P(
#elif MAJOR_VERSION >= 6
// For V6 and above test according to the audio policy manager configuration.
// This is more correct as CDD is written from the apps perspective.
// Audio system provides necessary format conversions for the missing configurations.
// Audio system provides necessary format conversions for missing configurations.
INSTANTIATE_TEST_CASE_P(DeclaredOutputStreamConfigSupport, OutputStreamTest,
::testing::ValuesIn(getOutputDeviceConfigParameters()),
&DeviceConfigParameterToString);
@@ -991,12 +979,6 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(ConfigHelper::getRequiredSupportCaptureAudioConfig()),
::testing::Values(AudioInputFlag::NONE)),
&DeviceConfigParameterToString);
INSTANTIATE_TEST_CASE_P(
SupportedInputStreamConfig, InputStreamTest,
::testing::Combine(::testing::ValuesIn(getDeviceParameters()),
::testing::ValuesIn(ConfigHelper::getSupportedCaptureAudioConfig()),
::testing::Values(AudioInputFlag::NONE)),
&DeviceConfigParameterToString);
INSTANTIATE_TEST_CASE_P(
RecommendedInputStreamConfigSupport, InputStreamTest,
::testing::Combine(
@@ -1007,7 +989,7 @@ INSTANTIATE_TEST_CASE_P(
#elif MAJOR_VERSION >= 6
// For V6 and above test according to the audio policy manager configuration.
// This is more correct as CDD is written from the apps perspective.
// Audio system provides necessary format conversions for the missing configurations.
// Audio system provides necessary format conversions for missing configurations.
INSTANTIATE_TEST_CASE_P(DeclaredInputStreamConfigSupport, InputStreamTest,
::testing::ValuesIn(getInputDeviceConfigParameters()),
&DeviceConfigParameterToString);

View File

@@ -57,12 +57,6 @@ struct ConfigHelper {
{24000, 48000}, {AudioFormat::PCM_16_BIT});
}
static const vector<AudioConfig> getSupportedPlaybackAudioConfig() {
// TODO: retrieve audio config supported by the platform
// as declared in the policy configuration
return {};
}
static const vector<AudioConfig> getRequiredSupportCaptureAudioConfig() {
if (!primaryHasMic()) return {};
return combineAudioConfig({AudioChannelMask::IN_MONO}, {8000, 11025, 16000, 44100},
@@ -73,11 +67,6 @@ struct ConfigHelper {
return combineAudioConfig({AudioChannelMask::IN_STEREO}, {22050, 48000},
{AudioFormat::PCM_16_BIT});
}
static const vector<AudioConfig> getSupportedCaptureAudioConfig() {
// TODO: retrieve audio config supported by the platform
// as declared in the policy configuration
return {};
}
static vector<AudioConfig> combineAudioConfig(vector<audio_channel_mask_t> channelMasks,
vector<uint32_t> sampleRates,