summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-06-18 11:46:41 -0700
committerEric Laurent <elaurent@google.com>2012-06-18 11:46:41 -0700
commita94467b5916b745f817689de2a742d8ca570867b (patch)
tree00e11c0e1bbfca8e88567b95df7d315faee3d937 /audio
parent90f9ef8da03e85d9e9c2cf5933fc2b9c3b2f263b (diff)
downloaddevice_samsung_tuna-a94467b5916b745f817689de2a742d8ca570867b.zip
device_samsung_tuna-a94467b5916b745f817689de2a742d8ca570867b.tar.gz
device_samsung_tuna-a94467b5916b745f817689de2a742d8ca570867b.tar.bz2
audio: fix in call audio path switch issue
Switching from BT SCO to earpiece does not seem to work when in call and an output stream is active. This change modifies out_set_parameters() to force the output stream into standby when a new audio path is selected while in call. Bug 6676684. Change-Id: I2817f80ea3fa3a0e00e9705fdb6d9a7e3183549b
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 85cfc7b..74f2383 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -1797,6 +1797,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
}
/* force standby if moving to/from HDMI/SPDIF or if the output
* device changes when in HDMI/SPDIF mode */
+ /* FIXME also force standby when in call as some audio path switches do not work
+ * while in call and an output stream is active (e.g BT SCO => earpiece) */
/* FIXME workaround for audio being dropped when switching path without forcing standby
* (several hundred ms of audio can be lost: e.g beginning of a ringtone. We must understand
@@ -1815,7 +1817,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
(adev->devices & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
((val & AUDIO_DEVICE_OUT_SPEAKER) ^
- (adev->devices & AUDIO_DEVICE_OUT_SPEAKER)))
+ (adev->devices & AUDIO_DEVICE_OUT_SPEAKER)) ||
+ (adev->mode == AUDIO_MODE_IN_CALL))
do_output_standby(out);
}
if (out != adev->outputs[OUTPUT_HDMI]) {