summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-03-26 19:02:43 -0700
committerEric Laurent <elaurent@google.com>2012-04-02 19:31:54 -0700
commit915f5d0ce32cd3ba27b8daebfff379cba42a3e05 (patch)
tree443c56ba8424f7e28f585fbc4de3787f8bce3e20 /audio
parent2e879fc6c103fd3eb343be3bf62628d435ce67af (diff)
downloaddevice_samsung_tuna-915f5d0ce32cd3ba27b8daebfff379cba42a3e05.zip
device_samsung_tuna-915f5d0ce32cd3ba27b8daebfff379cba42a3e05.tar.gz
device_samsung_tuna-915f5d0ce32cd3ba27b8daebfff379cba42a3e05.tar.bz2
audio: fix audio drop when speaker is selected 2.
Commit 78a7609d fixed audio drop at the start of ringtone. This commit fixes another similar issue with camera shutter sound being dropped while in call over headset. There was a workaround for this second issue in audio policy manager but this was not satisfactory as it was impacting all devices for a problem that is Prime specific. Change-Id: I42b37c7da4a232323b520a8a55ac5b3086b5a230
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index b4138a6..a26ea14 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -1431,7 +1431,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
(adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
(adev->devices & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
- (val == AUDIO_DEVICE_OUT_SPEAKER))
+ ((val & AUDIO_DEVICE_OUT_SPEAKER) ^
+ (adev->devices & AUDIO_DEVICE_OUT_SPEAKER)))
do_output_standby(out);
}
adev->devices &= ~AUDIO_DEVICE_OUT_ALL;