summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorRamanan Rajeswaran <ramanan@google.com>2012-09-10 09:50:37 -0700
committerRamanan Rajeswaran <ramanan@google.com>2012-09-10 09:50:37 -0700
commit83b278014bbee14cfbb0ed66f7f0366cf84ae4ce (patch)
tree491427543e07ce5d379e2e6f3616a3d09e9b59cc /audio
parentb7beae8d66bfafcaa29d4adf25c3e7d636777733 (diff)
Audio: fix incorrect routing path.
Check output device is speaker first and then check if dock is plugged in. Change-Id: I7723f6de90bf0548320423c465e8950593df9e46
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 7018e6a..dd8769d 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -191,10 +191,12 @@ static void select_devices(struct audio_device *adev)
reset_mixer_state(adev->ar);
- if (speaker_on && !is_dock_in())
- audio_route_apply_path(adev->ar, "speaker");
- else
+ if (speaker_on) {
+ if(is_dock_in())
audio_route_apply_path(adev->ar, "dock");
+ else
+ audio_route_apply_path(adev->ar, "speaker");
+ }
if (headphone_on)
audio_route_apply_path(adev->ar, "headphone");
if (main_mic_on) {