diff options
author | Dheeraj CVR <cvr.dheeraj@gmail.com> | 2014-08-02 11:04:57 +0530 |
---|---|---|
committer | forkbomb <keepcalm444@gmail.com> | 2015-11-25 08:07:32 +1100 |
commit | 2778a86eb13bf85b0818dcaf75fccb6a0846d12f (patch) | |
tree | 436ab3ff1057c93934d18ed82facd762bdf03f43 /audio/audio_hw.c | |
parent | c07fd11027cd1cb4e22facc1ed97e97e0a74765b (diff) | |
download | device_samsung_i9300-2778a86eb13bf85b0818dcaf75fccb6a0846d12f.zip device_samsung_i9300-2778a86eb13bf85b0818dcaf75fccb6a0846d12f.tar.gz device_samsung_i9300-2778a86eb13bf85b0818dcaf75fccb6a0846d12f.tar.bz2 |
audio: fix noise supression and update mixer ctls
Change-Id: I5b76be2d7d5d9754974295fce81b26498ccee391
Diffstat (limited to 'audio/audio_hw.c')
-rw-r--r-- | audio/audio_hw.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index e33a1b3..e32acf0 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -103,7 +103,6 @@ struct m0_audio_device { struct m0_stream_in *active_input; struct m0_stream_out *outputs[OUTPUT_TOTAL]; bool mic_mute; - int tty_mode; struct echo_reference_itfe *echo_reference; bool bluetooth_nrec; int wb_amr; @@ -532,15 +531,6 @@ static void set_incall_device(struct m0_audio_device *adev) ril_set_call_audio_path(&adev->ril, device_type); } -static void set_input_volumes(struct m0_audio_device *adev, int main_mic_on, - int headset_mic_on, int sub_mic_on) -{ -} - -static void set_output_volumes(struct m0_audio_device *adev, bool tty_volume) -{ -} - static void force_all_standby(struct m0_audio_device *adev) { struct m0_stream_in *in; @@ -624,7 +614,6 @@ static void select_output_device(struct m0_audio_device *adev) int speaker_on; int earpiece_on; int bt_on; - bool tty_volume = false; unsigned int channel; headset_on = adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET; @@ -671,29 +660,6 @@ static void select_output_device(struct m0_audio_device *adev) set_eq_filter(adev); if (adev->mode == AUDIO_MODE_IN_CALL) { - if (!bt_on) { - /* force tx path according to TTY mode when in call */ - switch(adev->tty_mode) { - case TTY_MODE_FULL: - case TTY_MODE_HCO: - /* tx path from headset mic */ - headphone_on = 0; - headset_on = 1; - speaker_on = 0; - earpiece_on = 0; - break; - case TTY_MODE_VCO: - /* tx path from device sub mic */ - headphone_on = 0; - headset_on = 0; - speaker_on = 1; - earpiece_on = 0; - break; - case TTY_MODE_OFF: - default: - break; - } - } if (headset_on || headphone_on || speaker_on || earpiece_on) { ALOGD("%s: set voicecall route: voicecall_default", __func__); @@ -2559,30 +2525,6 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) int ret; parms = str_parms_create_str(kvpairs); - ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_TTY_MODE, value, sizeof(value)); - if (ret >= 0) { - int tty_mode; - - if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_OFF) == 0) - tty_mode = TTY_MODE_OFF; - else if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_VCO) == 0) - tty_mode = TTY_MODE_VCO; - else if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_HCO) == 0) - tty_mode = TTY_MODE_HCO; - else if (strcmp(value, AUDIO_PARAMETER_VALUE_TTY_FULL) == 0) - tty_mode = TTY_MODE_FULL; - else - return -EINVAL; - - pthread_mutex_lock(&adev->lock); - if (tty_mode != adev->tty_mode) { - adev->tty_mode = tty_mode; - if (adev->mode == AUDIO_MODE_IN_CALL) - select_output_device(adev); - } - pthread_mutex_unlock(&adev->lock); - } - ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_BT_NREC, value, sizeof(value)); if (ret >= 0) { if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0) @@ -2604,13 +2546,9 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) if (strcmp(value, "on") == 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); } } @@ -3102,7 +3040,6 @@ static int adev_open(const hw_module_t* module, const char* name, adev->pcm_bt_dl = NULL; adev->pcm_bt_ul = NULL; adev->voice_volume = 1.0f; - adev->tty_mode = TTY_MODE_OFF; adev->bluetooth_nrec = true; adev->wb_amr = 0; |