diff options
author | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-30 15:46:05 +0200 |
---|---|---|
committer | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-31 09:54:30 +0200 |
commit | 589f15acb94506732a01085a607ec72ef1b453e7 (patch) | |
tree | 5ee0b003d72057fd93efd48eb9b43e48c88a88f5 /audio/audio_hw.c | |
parent | 4b1439c9e049a23b29a3a92adc00596a385e4750 (diff) | |
download | device_samsung_i9300-589f15acb94506732a01085a607ec72ef1b453e7.zip device_samsung_i9300-589f15acb94506732a01085a607ec72ef1b453e7.tar.gz device_samsung_i9300-589f15acb94506732a01085a607ec72ef1b453e7.tar.bz2 |
audio: finetuning and cleanup
Change-Id: Ibf95d161c60f8dbee8a8c9b13999c90fd6f460c3
Diffstat (limited to 'audio/audio_hw.c')
-rwxr-xr-x | audio/audio_hw.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index a8bedf2..b17ff1f 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -88,8 +88,9 @@ struct m0_audio_device { struct m0_dev_cfg *dev_cfgs; int num_dev_cfgs; struct mixer *mixer; + struct mixer_ctls mixer_ctls; audio_mode_t mode; - int active_devices; + int active_devices; int devices; struct pcm *pcm_modem_dl; struct pcm *pcm_modem_ul; @@ -378,13 +379,15 @@ err_open_dl: static void end_call(struct m0_audio_device *adev) { ALOGE("Closing modem PCMs"); - pcm_stop(adev->pcm_modem_dl); pcm_stop(adev->pcm_modem_ul); pcm_close(adev->pcm_modem_dl); pcm_close(adev->pcm_modem_ul); adev->pcm_modem_dl = NULL; adev->pcm_modem_ul = NULL; + + /* re-enable +30db boost on mic */ + mixer_ctl_set_value(adev->mixer_ctls.mixinl_in1l_volume, 0, 1); } static void set_eq_filter(struct m0_audio_device *adev) @@ -564,7 +567,7 @@ static void select_output_device(struct m0_audio_device *adev) select_devices(adev); - set_eq_filter(adev); + set_eq_filter(adev); if (adev->mode == AUDIO_MODE_IN_CALL) { if (!bt_on) { @@ -2979,9 +2982,11 @@ static int adev_open(const hw_module_t* module, const char* name, return -EINVAL; } - ret = adev_config_parse(adev); - if (ret != 0) - goto err_mixer; + adev->mixer_ctls.mixinl_in1l_volume = mixer_get_ctl_by_name(adev->mixer, "MIXINL IN1L Volume"); + + ret = adev_config_parse(adev); + if (ret != 0) + goto err_mixer; /* Set the default route before the PCM stream is opened */ pthread_mutex_lock(&adev->lock); |