From d3287cfad7ddb2a6f18a704db69ca3cd927768eb Mon Sep 17 00:00:00 2001 From: codeworkx Date: Sun, 29 Jul 2012 15:15:46 +0200 Subject: audio: reset mixer states when bluetooth was in use for incall Change-Id: Idb09b68b2405b68dde253eecc37d5c03b69d6ff1 --- audio/audio_hw.c | 4 ++++ audio/audio_hw.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 9d9342d..55f497e 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -612,7 +612,11 @@ static void select_output_device(struct m0_audio_device *adev) set_bigroute_by_array(adev->mixer, bt_input, 1); LOGD("%s: set voicecall route: bt_output", __func__); set_bigroute_by_array(adev->mixer, bt_output, 1); + } else { + ALOGD("%s: set voicecall route: bt_disable", __func__); + set_bigroute_by_array(adev->mixer, bt_disable, 1); } + set_incall_device(adev); } LOGD("%s: X", __func__); diff --git a/audio/audio_hw.h b/audio/audio_hw.h index b9030de..0947bd5 100644 --- a/audio/audio_hw.h +++ b/audio/audio_hw.h @@ -170,3 +170,17 @@ struct route_setting bt_input[] = { { .ctl_name = "AIF2DAC Volume", .intval = 96, }, { .ctl_name = NULL, }, }; + +struct route_setting bt_disable[] = { + { .ctl_name = "AIF2ADC Mux", .intval = 0, }, + { .ctl_name = "MIXINL IN2L Volume", .intval = 0, }, + { .ctl_name = "LINEOUT1N Switch", .intval = 1, }, + { .ctl_name = "LINEOUT1P Switch", .intval = 1, }, + { .ctl_name = "AIF2ADC HPF Mode", .intval = 0, }, + { .ctl_name = "AIF2ADC HPF Switch", .intval = 0, }, + { .ctl_name = "AIF2DAC2R Mixer AIF2 Switch", .intval = 0, }, + { .ctl_name = "AIF2DAC2L Mixer AIF2 Switch", .intval = 0, }, + { .ctl_name = "AIF1ADC1R Mixer AIF2 Switch", .intval = 0, }, + { .ctl_name = "AIF1ADC1L Mixer AIF2 Switch", .intval = 0, }, + { .ctl_name = NULL, }, +}; -- cgit v1.1