summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2014-03-14 17:34:46 +0000
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-03-14 17:34:46 +0000
commit559a2e5e4a4f3ea83af2d853a47d8119179edc41 (patch)
tree14c0dc0c840242de463953a964aae0b99b7f4c50
parent258bac4c94b3465b35dc12946907e2ddb45f3470 (diff)
parent1a52fb65c446c907b4ddbd73675dd410b9eb58ac (diff)
downloaddevice_samsung_i9300-559a2e5e4a4f3ea83af2d853a47d8119179edc41.zip
device_samsung_i9300-559a2e5e4a4f3ea83af2d853a47d8119179edc41.tar.gz
device_samsung_i9300-559a2e5e4a4f3ea83af2d853a47d8119179edc41.tar.bz2
Merge "i9300: audio: hal update" into cm-11.0
-rwxr-xr-xaudio/audio_hw.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 1928d8e..efe72c0 100755
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -322,26 +322,30 @@ void select_devices(struct m0_audio_device *adev)
/* Turn on new devices first so we don't glitch due to powerdown... */
for (i = 0; i < adev->num_dev_cfgs; i++)
if ((adev->out_device & adev->dev_cfgs[i].mask) &&
- !(adev->active_out_device & adev->dev_cfgs[i].mask))
+ !(adev->active_out_device & adev->dev_cfgs[i].mask) &&
+ !(adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN))
set_route_by_array(adev->mixer, adev->dev_cfgs[i].on,
adev->dev_cfgs[i].on_len);
for (i = 0; i < adev->num_dev_cfgs; i++)
if ((adev->in_device & adev->dev_cfgs[i].mask) &&
- !(adev->active_in_device & adev->dev_cfgs[i].mask))
+ !(adev->active_in_device & adev->dev_cfgs[i].mask) &&
+ (adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN))
set_route_by_array(adev->mixer, adev->dev_cfgs[i].on,
adev->dev_cfgs[i].on_len);
/* ...then disable old ones. */
for (i = 0; i < adev->num_dev_cfgs; i++)
if (!(adev->out_device & adev->dev_cfgs[i].mask) &&
- (adev->active_out_device & adev->dev_cfgs[i].mask))
+ (adev->active_out_device & adev->dev_cfgs[i].mask) &&
+ !(adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN))
set_route_by_array(adev->mixer, adev->dev_cfgs[i].off,
adev->dev_cfgs[i].off_len);
for (i = 0; i < adev->num_dev_cfgs; i++)
if (!(adev->in_device & adev->dev_cfgs[i].mask) &&
- (adev->active_in_device & adev->dev_cfgs[i].mask))
+ (adev->active_in_device & adev->dev_cfgs[i].mask) &&
+ (adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN))
set_route_by_array(adev->mixer, adev->dev_cfgs[i].off,
adev->dev_cfgs[i].off_len);