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
commit37c2eb9eff96b330f5668f53255f4f71aa18ed9e (patch)
tree9dab613ca8010de221aadc81786cb7e5a0247397 /audio
parentb80056726bbcc1dc247cb28bd276d65bf50329f6 (diff)
downloaddevice_samsung_tuna-37c2eb9eff96b330f5668f53255f4f71aa18ed9e.zip
device_samsung_tuna-37c2eb9eff96b330f5668f53255f4f71aa18ed9e.tar.gz
device_samsung_tuna-37c2eb9eff96b330f5668f53255f4f71aa18ed9e.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;