summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2012-04-05 11:44:49 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2012-04-05 12:17:01 -0700
commit9f1f9b509c930830f6f32e9ef6c2c8a03d6fa96e (patch)
treed4e8dcecce103541d839b6978a28c4e8a6933d2c /audio
parent70c236c9290732782d5267935af1475b8d5ae602 (diff)
downloadhardware_libhardware_legacy-9f1f9b509c930830f6f32e9ef6c2c8a03d6fa96e.tar.gz
hardware_libhardware_legacy-9f1f9b509c930830f6f32e9ef6c2c8a03d6fa96e.tar.bz2
hardware_libhardware_legacy-9f1f9b509c930830f6f32e9ef6c2c8a03d6fa96e.zip
Allow non-direct output of any channel mask
Because of the downmix capability of the mixer, do not prevent a non-direct output to be retrieved based on channel mask. Change-Id: I911f95f4055c2134298c233d14f2f5d586091fd4
Diffstat (limited to 'audio')
-rw-r--r--audio/AudioPolicyManagerBase.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 23acc44..6c1e424 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -505,7 +505,7 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str
&outputDesc->mLatency,
outputDesc->mFlags);
- // only accept an output with the requeted parameters
+ // only accept an output with the requested parameters
if (output == 0 ||
(samplingRate != 0 && samplingRate != outputDesc->mSamplingRate) ||
(format != 0 && format != outputDesc->mFormat) ||
@@ -522,10 +522,8 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str
return output;
}
- if (channelMask != 0 && channelMask != AudioSystem::CHANNEL_OUT_MONO &&
- channelMask != AudioSystem::CHANNEL_OUT_STEREO) {
- return 0;
- }
+ // ignoring channel mask due to downmix capability in mixer
+
// open a non direct output
// get which output is suitable for the specified stream. The actual routing change will happen