From 37c2eb9eff96b330f5668f53255f4f71aa18ed9e Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 26 Mar 2012 19:02:43 -0700 Subject: 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 --- audio/audio_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio') 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; -- cgit v1.1