diff options
author | Andy Hung <hunga@google.com> | 2015-04-20 12:06:38 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2015-04-21 15:28:48 -0700 |
commit | 73e62e2ea12e46825958eba718bd8d5e23064ec5 (patch) | |
tree | db5c4e3ffa06df9196ebbc4e5d3dff90e3c81b6a /services/audioflinger | |
parent | 7184bab920699d49718e8fc3cf8a23d3c9d8d54a (diff) | |
download | frameworks_av-73e62e2ea12e46825958eba718bd8d5e23064ec5.zip frameworks_av-73e62e2ea12e46825958eba718bd8d5e23064ec5.tar.gz frameworks_av-73e62e2ea12e46825958eba718bd8d5e23064ec5.tar.bz2 |
Fix single channel playback that does not use AUDIO_CHANNEL_OUT_MONO
Mono channel playback without resampling and not using
AUDIO_CHANNEL_OUT_MONO can show low frequency garbling.
Bug: 20463456
Change-Id: I0c1bbf957ea439bb8d8da57b9e78938e1acb4793
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/AudioMixer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index c2c791f..f28c625 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -319,7 +319,7 @@ status_t AudioMixer::track_t::prepareForDownmix() // discard the previous downmixer if there was one unprepareForDownmix(); - // Only remix (upmix or downmix) if the track and mixer/device channel masks + // MONO_HACK Only remix (upmix or downmix) if the track and mixer/device channel masks // are not the same and not handled internally, as mono -> stereo currently is. if (channelMask == mMixerChannelMask || (channelMask == AUDIO_CHANNEL_OUT_MONO @@ -914,7 +914,8 @@ void AudioMixer::process__validate(state_t* state, int64_t pts) } else { if ((n & NEEDS_CHANNEL_COUNT__MASK) == NEEDS_CHANNEL_1){ t.hook = getTrackHook( - t.mMixerChannelCount == 2 // TODO: MONO_HACK. + (t.mMixerChannelMask == AUDIO_CHANNEL_OUT_STEREO // TODO: MONO_HACK + && t.channelMask == AUDIO_CHANNEL_OUT_MONO) ? TRACKTYPE_NORESAMPLEMONO : TRACKTYPE_NORESAMPLE, t.mMixerChannelCount, t.mMixerInFormat, t.mMixerFormat); |