diff options
author | codeworkx <codeworkx@cyanogenmod.com> | 2012-11-17 22:57:33 +0100 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.com> | 2012-11-18 18:51:29 +0100 |
commit | d437bdc0c727eb10dfb9db1c979e6f4d3034cb6e (patch) | |
tree | ee6b002e29424be8551897a5f27fa72fd05d2216 /audio/audio_hw.c | |
parent | 126dab8a417b32dc85436bac97d6ddcee3b39e67 (diff) | |
download | device_samsung_i9300-d437bdc0c727eb10dfb9db1c979e6f4d3034cb6e.zip device_samsung_i9300-d437bdc0c727eb10dfb9db1c979e6f4d3034cb6e.tar.gz device_samsung_i9300-d437bdc0c727eb10dfb9db1c979e6f4d3034cb6e.tar.bz2 |
i9300: implement noise suppression for calls
Change-Id: Iadf1c59ae5d94364bccad97ca2f49d6a68c80244
Diffstat (limited to 'audio/audio_hw.c')
-rwxr-xr-x | audio/audio_hw.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 42c6122..e0e306c 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -2504,6 +2504,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; } |