summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkcs <mcampbellsmith@gmail.com>2014-02-27 14:55:34 +0530
committerJanson Kang <temasek71@gmail.com>2014-03-14 16:08:37 +0800
commit1a52fb65c446c907b4ddbd73675dd410b9eb58ac (patch)
tree757fb1966b03071591507a23fb511bcedbc64750
parent6be233e3ee30d42ed55fe4f00640fb61957ab44b (diff)
downloaddevice_samsung_i9300-1a52fb65c446c907b4ddbd73675dd410b9eb58ac.zip
device_samsung_i9300-1a52fb65c446c907b4ddbd73675dd410b9eb58ac.tar.gz
device_samsung_i9300-1a52fb65c446c907b4ddbd73675dd410b9eb58ac.tar.bz2
i9300: audio: hal update
fix issue where audio would stop working in or after call. Change-Id: I1ad44e2621a30a01f1ebc63bd87eefdb695ff33c
-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 3b269f9..682a936 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);