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
commit2cbfd06d4970a05ce26cb39cecffbf0cb3b66436 (patch)
treefe309d23d04375a74a746f34103e2e7094bf7999 /audio
parent25003bbdef4eebc5c369d4e76e63f77364bc6bee (diff)
downloaddevice_samsung_tuna-2cbfd06d4970a05ce26cb39cecffbf0cb3b66436.zip
device_samsung_tuna-2cbfd06d4970a05ce26cb39cecffbf0cb3b66436.tar.gz
device_samsung_tuna-2cbfd06d4970a05ce26cb39cecffbf0cb3b66436.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]) {