diff options
author | Eric Laurent <elaurent@google.com> | 2012-03-16 19:27:23 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-03-16 19:27:23 -0700 |
commit | 467c02b65bb127d18b5004734c42a61fb27c0dc2 (patch) | |
tree | ee0d260adc245123a4d70e08031d3691f0bedbbf | |
parent | 33658da78b32358b425a7663e5b6bddfb86c6650 (diff) | |
parent | 78a7609d251802da4db864dbbee37967be84514f (diff) | |
download | device_samsung_tuna-467c02b65bb127d18b5004734c42a61fb27c0dc2.zip device_samsung_tuna-467c02b65bb127d18b5004734c42a61fb27c0dc2.tar.gz device_samsung_tuna-467c02b65bb127d18b5004734c42a61fb27c0dc2.tar.bz2 |
am 78a7609d: audio: fix audio drop when speaker is selected
* commit '78a7609d251802da4db864dbbee37967be84514f':
audio: fix audio drop when speaker is selected
-rwxr-xr-x | audio/audio_hw.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index bbd849a..850a1b1 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -1415,12 +1415,24 @@ 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 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 + * the root cause in audio HAL, driver or ABE. if (((val & AUDIO_DEVICE_OUT_AUX_DIGITAL) ^ (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)) || ((val & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) ^ (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) || (adev->devices & (AUDIO_DEVICE_OUT_AUX_DIGITAL | AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET))) + */ + if (((val & AUDIO_DEVICE_OUT_AUX_DIGITAL) ^ + (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)) || + ((val & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) ^ + (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)) do_output_standby(out); } adev->devices &= ~AUDIO_DEVICE_OUT_ALL; |