summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);