diff options
Diffstat (limited to 'audio/audio_hw.c')
-rwxr-xr-x | audio/audio_hw.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 2dde2eb..2fcd739 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -476,7 +476,7 @@ void audio_set_wb_amr_callback(void *data, int enable) /* reopen the modem PCMs at the new rate */ if (adev->in_call) { end_call(adev); - set_eq_filter(adev); + select_output_device(adev); start_call(adev); } } @@ -2584,6 +2584,21 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) adev->screen_off = true; } + ret = str_parms_get_str(parms, "noise_suppression", value, sizeof(value)); + if (ret >= 0) { + if (strcmp(value, "true") == 0) { + ALOGE("%s: enabling two mic control", __func__); + ril_set_two_mic_control(&adev->ril, AUDIENCE, TWO_MIC_SOLUTION_ON); + /* sub mic */ + set_bigroute_by_array(adev->mixer, noise_suppression, 1); + } else { + ALOGE("%s: disabling two mic control", __func__); + ril_set_two_mic_control(&adev->ril, AUDIENCE, TWO_MIC_SOLUTION_OFF); + /* sub mic */ + set_bigroute_by_array(adev->mixer, noise_suppression_disable, 1); + } + } + str_parms_destroy(parms); return ret; } @@ -2808,6 +2823,7 @@ static const struct { { AUDIO_DEVICE_OUT_ALL_SCO, "sco-out" }, { AUDIO_DEVICE_IN_BUILTIN_MIC, "builtin-mic" }, + { AUDIO_DEVICE_IN_BACK_MIC, "back-mic" }, { AUDIO_DEVICE_IN_WIRED_HEADSET, "headset-in" }, { AUDIO_DEVICE_IN_ALL_SCO, "sco-in" }, }; |