summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-01 13:34:50 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-01 13:34:50 +0200
commit6e680315ca93f883c39e5c5a46d8775eb335fe9b (patch)
treef351ec86ddeeb40991aa1b3c520d20d48d257ca3 /audio
parentdcd02929bdd97300d96944c6f9683b2f3043a470 (diff)
downloaddevice_samsung_i9300-6e680315ca93f883c39e5c5a46d8775eb335fe9b.zip
device_samsung_i9300-6e680315ca93f883c39e5c5a46d8775eb335fe9b.tar.gz
device_samsung_i9300-6e680315ca93f883c39e5c5a46d8775eb335fe9b.tar.bz2
audio: enable +30db boost for headset mic
Diffstat (limited to 'audio')
-rwxr-xr-xaudio/audio_hw.c5
-rw-r--r--audio/audio_hw.h11
2 files changed, 10 insertions, 6 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, },
};