Skip to content

Commit

Permalink
frameworks/base: Fix for LPA volume change with headset
Browse files Browse the repository at this point in the history
- LPA volume is set without checking the output type
- Set LPA volume only when the output is LPA.

CRs-Fixed: 373975
Change-Id: I471646bd0d1152e9768544d2db8e47293bbf147a
  • Loading branch information
Karthik Reddy Katta authored and Linux Build Service Account committed Jul 18, 2012
1 parent 5c02ff5 commit 9ef83a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/audioflinger/AudioFlinger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@ status_t AudioFlinger::setStreamVolume(int stream, float value, int output)
AutoMutex lock(mLock);

if( (mLPAOutput != NULL) &&
(mLPAStreamType == stream) ) {
(mLPAStreamType == stream) &&
(mLPAHandle == (audio_io_handle_t)output) ) {
mLPAOutput->stream->set_volume(mLPAOutput->stream,mLPALeftVol*value,
mLPARightVol*value);
mStreamTypes[stream].volume = value;
Expand Down

0 comments on commit 9ef83a9

Please sign in to comment.