summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2012-05-31 11:52:09 -0700
committerSimon Wilson <simonwilson@google.com>2012-05-31 13:49:02 -0700
commit8e05ba7fab4f30d77edc500ce7b32e1e91967e25 (patch)
treeac78b5336752d08dd94077c10c51b504f28ff724 /audio
parent5958ced70c2ddda502e1553b00c7cdeb5ef76d4d (diff)
audio: swap L/R channels of speaker when only that is active
When only the speaker is active, swap the L/R channels. If the headphone is active, do not swap the channels. In order to do this properly, the mixer controls in the headphone path must be applied in preference to the speaker path. Fixes bug: 6558120 Change-Id: Ica8d1fd31b3b1a98392c57db08c8374a4bf631e5
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 2b91529..67d6b5d 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -160,10 +160,10 @@ static void select_devices(struct audio_device *adev)
reset_mixer_state(adev->ar);
- if (headphone_on)
- audio_route_apply_path(adev->ar, "headphone");
if (speaker_on)
audio_route_apply_path(adev->ar, "speaker");
+ if (headphone_on)
+ audio_route_apply_path(adev->ar, "headphone");
if (main_mic_on) {
if (adev->orientation == ORIENTATION_LANDSCAPE)
audio_route_apply_path(adev->ar, "main-mic-left");