summaryrefslogtreecommitdiff
path: root/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
diff options
context:
space:
mode:
authorJosh Wu <joshwu@google.com>2022-02-15 09:37:29 -0800
committerJosh Wu <joshwu@google.com>2022-02-15 09:37:29 -0800
commit8a1be763b6ee3d590b1eaa10a02274557e3b9f33 (patch)
tree793bddca427811667d693ade9f8e20673c951234 /bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
parentfd4d63ff511445552cde21b2a9cd32ba890acdbe (diff)
BtAudio: Handle dataInterval in LeAudioSW VTS
Test: atest VtsHalBluetoothAudioTargetTest Bug: 203490261 Change-Id: I447d0e74b6b1af2959cc133437e0dd7216814369
Diffstat (limited to 'bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp')
-rw-r--r--bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
index 307403b451..38a6b0d6a6 100644
--- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
@@ -983,7 +983,8 @@ TEST_P(BluetoothAudioProviderLeAudioOutputSoftwareAidl,
.channelMode = channel_mode,
.dataIntervalUs = data_interval_us,
};
- bool is_codec_config_valid = IsPcmConfigSupported(pcm_config);
+ bool is_codec_config_valid =
+ IsPcmConfigSupported(pcm_config) && pcm_config.dataIntervalUs > 0;
DataMQDesc mq_desc;
auto aidl_retval = audio_provider_->startSession(
audio_port_, AudioConfiguration(pcm_config), &mq_desc);
@@ -1054,7 +1055,8 @@ TEST_P(BluetoothAudioProviderLeAudioInputSoftwareAidl,
.channelMode = channel_mode,
.dataIntervalUs = data_interval_us,
};
- bool is_codec_config_valid = IsPcmConfigSupported(pcm_config);
+ bool is_codec_config_valid =
+ IsPcmConfigSupported(pcm_config) && pcm_config.dataIntervalUs > 0;
DataMQDesc mq_desc;
auto aidl_retval = audio_provider_->startSession(
audio_port_, AudioConfiguration(pcm_config), &mq_desc);
@@ -1395,7 +1397,8 @@ TEST_P(BluetoothAudioProviderLeAudioBroadcastSoftwareAidl,
.channelMode = channel_mode,
.dataIntervalUs = data_interval_us,
};
- bool is_codec_config_valid = IsPcmConfigSupported(pcm_config);
+ bool is_codec_config_valid =
+ IsPcmConfigSupported(pcm_config) && pcm_config.dataIntervalUs > 0;
DataMQDesc mq_desc;
auto aidl_retval = audio_provider_->startSession(
audio_port_, AudioConfiguration(pcm_config), &mq_desc);