From 6e680315ca93f883c39e5c5a46d8775eb335fe9b Mon Sep 17 00:00:00 2001 From: Daniel Hillenbrand Date: Wed, 1 Aug 2012 13:34:50 +0200 Subject: audio: enable +30db boost for headset mic --- audio/audio_hw.c | 5 ++++- audio/audio_hw.h | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'audio') diff --git a/audio/audio_hw.c b/audio/audio_hw.c index b17ff1f..b79b199 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -386,8 +386,9 @@ static void end_call(struct m0_audio_device *adev) adev->pcm_modem_dl = NULL; adev->pcm_modem_ul = NULL; - /* re-enable +30db boost on mic */ + /* re-enable +30db boost on mics */ mixer_ctl_set_value(adev->mixer_ctls.mixinl_in1l_volume, 0, 1); + mixer_ctl_set_value(adev->mixer_ctls.mixinl_in2l_volume, 0, 1); } static void set_eq_filter(struct m0_audio_device *adev) @@ -2982,7 +2983,9 @@ static int adev_open(const hw_module_t* module, const char* name, return -EINVAL; } + /* +30db boost for mics */ adev->mixer_ctls.mixinl_in1l_volume = mixer_get_ctl_by_name(adev->mixer, "MIXINL IN1L Volume"); + adev->mixer_ctls.mixinl_in2l_volume = mixer_get_ctl_by_name(adev->mixer, "MIXINL IN2L Volume"); ret = adev_config_parse(adev); if (ret != 0) diff --git a/audio/audio_hw.h b/audio/audio_hw.h index 213d850..b01ab33 100644 --- a/audio/audio_hw.h +++ b/audio/audio_hw.h @@ -107,6 +107,7 @@ enum tty_modes { struct mixer_ctls { struct mixer_ctl *mixinl_in1l_volume; + struct mixer_ctl *mixinl_in2l_volume; }; struct route_setting @@ -164,15 +165,15 @@ struct route_setting headset_input[] = { { .ctl_name = "MIXINL IN1L Switch", .intval = 0, }, { .ctl_name = "MIXINR IN1R Switch", .intval = 0, }, { .ctl_name = "Headset Mic Switch", .intval = 1, }, - { .ctl_name = "AIF1ADCL Source", .intval = 0, }, - { .ctl_name = "AIF1ADCR Source", .intval = 0, }, - { .ctl_name = "AIF2ADCL Source", .intval = 0, }, + { .ctl_name = "IN2L Volume", .intval = 18, }, { .ctl_name = "MIXINL IN2L Switch", .intval = 1, }, + { .ctl_name = "MIXINL IN2L Volume", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 1, }, { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 1, }, - { .ctl_name = "IN2L Volume", .intval = 18, }, - { .ctl_name = "MIXINL IN2L Volume", .intval = 0, }, { .ctl_name = "AIF1ADC1 Volume", .intval = 96, }, + { .ctl_name = "AIF1ADCL Source", .intval = 0, }, + { .ctl_name = "AIF1ADCR Source", .intval = 0, }, + { .ctl_name = "AIF2ADCL Source", .intval = 0, }, { .ctl_name = NULL, }, }; -- cgit v1.1