diff options
author | Simon Wilson <simonwilson@google.com> | 2011-10-31 12:57:18 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-10-31 12:59:51 -0700 |
commit | 221d483f2f4296d8ab7b42f93229fe8c0ae8ba53 (patch) | |
tree | b1a748d1c80888db18deb2620aed5e09a20f57db /audio | |
parent | d2e01a70a16f6b5719239bb1f8ca305b48de9628 (diff) | |
download | device_samsung_tuna-221d483f2f4296d8ab7b42f93229fe8c0ae8ba53.zip device_samsung_tuna-221d483f2f4296d8ab7b42f93229fe8c0ae8ba53.tar.gz device_samsung_tuna-221d483f2f4296d8ab7b42f93229fe8c0ae8ba53.tar.bz2 |
audio: force speaker route for call when docked
As we did for the HDMI audio case, force the speaker route for
calls when in a digital dock because we cannot directly route
the modem audio output through the S/PDIF output because it is
a McASP device.
Fixes bug 5434090
Change-Id: I52ff7877a8be778b9e74eebb3ad2c9f13b634bca
Diffstat (limited to 'audio')
-rwxr-xr-x | audio/audio_hw.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 2a58f4f..55d221d 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -697,6 +697,7 @@ static void set_incall_device(struct tuna_audio_device *adev) break; case AUDIO_DEVICE_OUT_SPEAKER: case AUDIO_DEVICE_OUT_AUX_DIGITAL: + case AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET: device_type = SOUND_AUDIO_PATH_SPEAKER; break; case AUDIO_DEVICE_OUT_WIRED_HEADSET: @@ -951,9 +952,11 @@ static void select_output_device(struct tuna_audio_device *adev) break; case TTY_MODE_OFF: default: - /* force speaker on when in call and HDMI is selected as voice DL audio - * cannot be routed to HDMI by ABE */ - if (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) + /* force speaker on when in call and HDMI or S/PDIF is selected + * as voice DL audio cannot be routed there by ABE */ + if (adev->devices & + (AUDIO_DEVICE_OUT_AUX_DIGITAL | + AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) speaker_on = 1; break; } |