Limit the numer of output and inout streams open
Out current HAL implementaion does support mixing
output or duplicating inout. Our sound card supports
only one stream per direction.
Bug: 238645248
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I120c3a3e4d544b3f34b913f9dbd2b405887dfcc9
(cherry picked from commit 5aaf432a5c526b455333719e61c1ffc03d250c23)
Merged-In: I120c3a3e4d544b3f34b913f9dbd2b405887dfcc9
diff --git a/audio/policy/primary_audio_policy_configuration.xml b/audio/policy/primary_audio_policy_configuration.xml
index 9307816..601453f 100644
--- a/audio/policy/primary_audio_policy_configuration.xml
+++ b/audio/policy/primary_audio_policy_configuration.xml
@@ -10,12 +10,12 @@
</attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
- <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
+ <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY" maxOpenCount="1" maxActiveCount="1">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 16000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
- <mixPort name="primary input" role="sink">
+ <mixPort name="primary input" role="sink" maxOpenCount="1" maxActiveCount="1">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 16000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_STEREO"/>