From 563e6d41543e422812c0cf7a3823b0a22341b28a Mon Sep 17 00:00:00 2001 From: detule Date: Wed, 17 Apr 2013 22:10:42 -0400 Subject: Revert "audioflinger: apply volume on direct track when track is active" Causes issues with MortPlayer (LPA). Track starts/resumes playing, but volume is forced to zero, until a track-change occurs. 4-17 21:41:51.492 D/ALSADevice( 256): setHardwareParams: reqBuffSize 262144 channels 2 sampleRate 44100 04-17 21:41:51.492 D/ALSADevice( 256): setHardwareParams: buffer_size 1048576, period_size 262144, period_cnt 4 04-17 21:41:51.492 W/AudioFlinger( 256): There was no effectChain created for the sessionId(283) 04-17 21:41:51.512 E/AudioFlinger( 256): setting observer mOutputDesc track 0x40c598a0, obv 0x40c598b0 04-17 21:41:51.512 D/AudioSessionOutALSA( 256): setLpaVolume(0) 04-17 21:41:51.512 D/AudioSessionOutALSA( 256): Setting LPA volume to 0 (available range is 0 to 100) 04-17 21:41:51.512 D/ALSADevice( 256): setMixerControl:: name LPA RX Volume value 0 index 0 04-17 21:41:51.512 D/AudioSessionOutALSA( 256): setLpaVolume(0) 04-17 21:41:51.512 D/AudioSessionOutALSA( 256): Setting LPA volume to 0 (available range is 0 to 100) Change-Id: I6e0ee8cd7c2f577ca5b4cb834c7a83703db4b167 --- services/audioflinger/AudioFlinger.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index ed221ed..3c04c1c 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -6295,13 +6295,11 @@ void AudioFlinger::DirectAudioTrack::mute(bool muted) { void AudioFlinger::DirectAudioTrack::setVolume(float left, float right) { ALOGV("DirectAudioTrack::setVolume left: %f, right: %f", left, right); - if(mOutputDesc && mOutputDesc->mActive) { - mOutputDesc->mVolumeLeft = left; - mOutputDesc->mVolumeRight = right; - mOutputDesc->stream->set_volume(mOutputDesc->stream, - left * mOutputDesc->mVolumeScale, - right* mOutputDesc->mVolumeScale); - } + mOutputDesc->mVolumeLeft = left; + mOutputDesc->mVolumeRight = right; + mOutputDesc->stream->set_volume(mOutputDesc->stream, + left * mOutputDesc->mVolumeScale, + right* mOutputDesc->mVolumeScale); } int64_t AudioFlinger::DirectAudioTrack::getTimeStamp() { -- cgit v1.1