diff options
Diffstat (limited to 'audio/audio_hw.c')
-rw-r--r-- | audio/audio_hw.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 5f590e0..bc4ff1a 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -477,15 +477,19 @@ static void select_output_device(struct tuna_audio_device *adev) otherwise microphone does not function */ end_call(adev); set_route_by_array(adev->mixer, headset_vx, 1); + if (adev->out_device & AUDIO_DEVICE_OUT_EARPIECE) + set_route_by_array(adev->mixer, earpiece_switch, 1); + else + set_route_by_array(adev->mixer, earpiece_switch, 0); start_call(adev); - } else + } else { set_route_by_array(adev->mixer, headset_mm, 1); + if (adev->out_device & AUDIO_DEVICE_OUT_EARPIECE) + set_route_by_array(adev->mixer, earpiece_switch, 1); + else + set_route_by_array(adev->mixer, earpiece_switch, 0); + } } - - if (adev->out_device & AUDIO_DEVICE_OUT_EARPIECE) - set_route_by_array(adev->mixer, earpiece_switch, 1); - else - set_route_by_array(adev->mixer, earpiece_switch, 0); } static uint32_t out_get_sample_rate(const struct audio_stream *stream) |