diff options
-rwxr-xr-x | audio/audio_hw.c | 5 | ||||
-rw-r--r-- | audio/audio_hw.h | 11 | ||||
-rw-r--r-- | configs/tiny_hw.xml | 14 |
3 files changed, 17 insertions, 13 deletions
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, }, }; diff --git a/configs/tiny_hw.xml b/configs/tiny_hw.xml index be138b9..7948164 100644 --- a/configs/tiny_hw.xml +++ b/configs/tiny_hw.xml @@ -300,23 +300,23 @@ We are able to have most of our routing static so do that <ctl name="MIXINL IN1L Switch" val="0"/> <ctl name="MIXINR IN1R Switch" val="0"/> <ctl name="Headset Mic Switch" val="1"/> - <ctl name="AIF1ADCL Source" val="0"/> - <ctl name="AIF1ADCR Source" val="0"/> - <ctl name="AIF2ADCL Source" val="0"/> + <ctl name="IN2L Volume" val="22"/> <ctl name="MIXINL IN2L Switch" val="1"/> + <ctl name="MIXINL IN2L Volume" val="1"/> <ctl name="AIF1ADC1 HPF Mode" val="1"/> <ctl name="AIF1ADC1 HPF Switch" val="1"/> - <ctl name="IN2L Volume" val="18"/> - <ctl name="MIXINL IN2L Volume" val="0"/> <ctl name="AIF1ADC1 Volume" val="96"/> + <ctl name="AIF1ADCL Source" val="0"/> + <ctl name="AIF1ADCR Source" val="0"/> + <ctl name="AIF2ADCL Source" val="0"/> </path> <path name="off"> <ctl name="Headset Mic Switch" val="0"/> + <ctl name="IN2L Volume" val="10"/> <ctl name="MIXINL IN2L Switch" val="0"/> + <ctl name="MIXINL IN2L Volume" val="0"/> <ctl name="AIF1ADC1 HPF Mode" val="0"/> <ctl name="AIF1ADC1 HPF Switch" val="0"/> - <ctl name="IN2L Volume" val="11"/> - <ctl name="MIXINL IN2L Volume" val="0"/> <ctl name="AIF1ADC1 Volume" val="96"/> </path> </device> |