diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_hw.c | 42 | ||||
-rw-r--r-- | audio/audio_hw.h | 7 |
2 files changed, 0 insertions, 49 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 16013ef..d728776 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -2606,52 +2606,10 @@ static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode) static int adev_set_mic_mute(struct audio_hw_device *dev, bool state) { - int headset_on; - int headphone_on; - int speaker_on; - int earpiece_on; - int bt_on; - struct m0_audio_device *adev = (struct m0_audio_device *)dev; - headset_on = adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET; - headphone_on = adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE; - speaker_on = adev->out_device & AUDIO_DEVICE_OUT_SPEAKER; - earpiece_on = adev->out_device & AUDIO_DEVICE_OUT_EARPIECE; - bt_on = adev->out_device & AUDIO_DEVICE_OUT_ALL_SCO; - adev->mic_mute = state; - if (adev->mode == AUDIO_MODE_IN_CALL) { - if (state) { - if (speaker_on || earpiece_on || headphone_on) { - ALOGD("%s: set voicecall route: default_input_disable", __func__); - set_bigroute_by_array(adev->mixer, default_input_disable, 1); - } - if (headset_on) { - ALOGD("%s: set voicecall route: headset_input_disable", __func__); - set_bigroute_by_array(adev->mixer, headset_input_disable, 1); - } - if (bt_on) { - ALOGD("%s: set voicecall route: bt_input_disable", __func__); - set_bigroute_by_array(adev->mixer, bt_input_disable, 1); - } - } else { - if (speaker_on || earpiece_on || headphone_on) { - ALOGD("%s: set voicecall route: default_input", __func__); - set_bigroute_by_array(adev->mixer, default_input, 1); - } - if (headset_on) { - ALOGD("%s: set voicecall route: headset_input", __func__); - set_bigroute_by_array(adev->mixer, headset_input, 1); - } - if (bt_on) { - ALOGD("%s: set voicecall route: bt_input", __func__); - set_bigroute_by_array(adev->mixer, bt_input, 1); - } - } - } - return 0; } diff --git a/audio/audio_hw.h b/audio/audio_hw.h index 3481501..5ba0e9e 100644 --- a/audio/audio_hw.h +++ b/audio/audio_hw.h @@ -237,13 +237,6 @@ struct route_setting bt_input[] = { { .ctl_name = NULL, }, }; -struct route_setting bt_input_disable[] = { - { .ctl_name = "AIF2ADC Mux", .intval = 0, }, - { .ctl_name = "AIF1ADC1R Mixer AIF2 Switch", .intval = 0, }, - { .ctl_name = "AIF1ADC1L Mixer AIF2 Switch", .intval = 0, }, - { .ctl_name = NULL, }, -}; - struct route_setting bt_disable[] = { { .ctl_name = "AIF1DAC1 Volume", .intval = 96, }, { .ctl_name = "AIF1 Boost Volume", .intval = 0, }, |