aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorandi34 <skate4life@gmx.de>2014-07-31 22:40:21 +0200
committerGerrit Code Review <gerrit@cyanogenmod.org>2014-10-19 18:39:03 +0000
commitf9d7d79a96a1c477a56ae28231a3644e708374c8 (patch)
tree442a70012abc9efebb75e92fbdbb4827b5c12caf /audio
parent298deed8f0d6dddfa5b51e92261780f5bde0546b (diff)
downloaddevice_samsung_espresso3g-f9d7d79a96a1c477a56ae28231a3644e708374c8.zip
device_samsung_espresso3g-f9d7d79a96a1c477a56ae28231a3644e708374c8.tar.gz
device_samsung_espresso3g-f9d7d79a96a1c477a56ae28231a3644e708374c8.tar.bz2
Add missing part from docksupport, add "refine incall audio settings"
Change-Id: Ie2a92bffc0fc893211e864618bb912f679c41dea
Diffstat (limited to 'audio')
-rwxr-xr-xaudio/audio_hw.c15
-rw-r--r--audio/audio_hw.h34
2 files changed, 29 insertions, 20 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 280da90..9b92b59 100755
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -676,10 +676,10 @@ static void select_output_device(struct espresso_audio_device *adev)
}
if (headset_on || headphone_on || speaker_on || earpiece_on) {
- ALOGD("%s: set voicecall: voicecall_default", __func__);
+ ALOGD("%s: set voicecall route: voicecall_default", __func__);
set_bigroute_by_array(adev->mixer, voicecall_default, 1);
} else {
- ALOGD("%s: set voicecall: voicecall_default_disable", __func__);
+ ALOGD("%s: set voicecall route: voicecall_default_disable", __func__);
set_bigroute_by_array(adev->mixer, voicecall_default_disable, 1);
}
@@ -691,18 +691,21 @@ static void select_output_device(struct espresso_audio_device *adev)
set_bigroute_by_array(adev->mixer, default_input_disable, 1);
}
- if (headset_on || headphone_on) {
- ALOGD("%s: set voicecall: headset_input", __func__);
+ if (headset_on) {
+ ALOGD("%s: set voicecall route: headset_input", __func__);
set_bigroute_by_array(adev->mixer, headset_input, 1);
+ } else {
+ ALOGD("%s: set voicecall route: headset_input_disable", __func__);
+ set_bigroute_by_array(adev->mixer, headset_input_disable, 1);
}
if (bt_on) {
// bt uses a different port (PORT_BT) for playback, reopen the pcms
end_call(adev);
start_call(adev);
- ALOGD("%s: set voicecall: bt_input", __func__);
+ ALOGD("%s: set voicecall route: bt_input", __func__);
set_bigroute_by_array(adev->mixer, bt_input, 1);
- ALOGD("%s: set voicecall: bt_output", __func__);
+ ALOGD("%s: set voicecall route: bt_output", __func__);
set_bigroute_by_array(adev->mixer, bt_output, 1);
}
set_incall_device(adev);
diff --git a/audio/audio_hw.h b/audio/audio_hw.h
index 3ef0e65..65a6443 100644
--- a/audio/audio_hw.h
+++ b/audio/audio_hw.h
@@ -137,14 +137,20 @@ struct route_setting voicecall_default_disable[] = {
struct route_setting default_input[] = {
{ .ctl_name = "Main Mic Switch", .intval = 1, },
{ .ctl_name = "IN1L Volume", .intval = 30, },
+ { .ctl_name = "MIXINL IN1L Switch", .intval = 1, },
{ .ctl_name = "MIXINL IN1L Volume", .intval = 0, },
{ .ctl_name = "AIF1ADC1 HPF Mode", .intval = 1, },
{ .ctl_name = "AIF1ADC1 HPF Switch", .intval = 1, },
+ { .ctl_name = "AIF2DAC2L Mixer Left Sidetone Switch", .intval = 1, },
+ { .ctl_name = "AIF2DAC2L Mixer Right Sidetone Switch", .intval = 0, },
+ { .ctl_name = "AIF2DAC2R Mixer Left Sidetone Switch", .intval = 1, },
+ { .ctl_name = "AIF2DAC2R Mixer Right Sidetone Switch", .intval = 0, },
{ .ctl_name = NULL, },
};
struct route_setting default_input_disable[] = {
{ .ctl_name = "Main Mic Switch", .intval = 0, },
+ { .ctl_name = "MIXINL IN1L Switch", .intval = 0, },
{ .ctl_name = "AIF1ADC1 HPF Mode", .intval = 0, },
{ .ctl_name = "AIF1ADC1 HPF Switch", .intval = 0, },
{ .ctl_name = NULL, },
@@ -152,19 +158,17 @@ struct route_setting default_input_disable[] = {
struct route_setting headset_input[] = {
{ .ctl_name = "Headset Mic Switch", .intval = 1, },
- { .ctl_name = "IN1R Volume", .intval = 9, },
- { .ctl_name = "MIXINL IN1L Switch", .intval = 0, },
- { .ctl_name = "MIXINL IN1L Volume", .intval = 1, },
{ .ctl_name = "MIXINR IN1R Switch", .intval = 1, },
- { .ctl_name = "MIXINR IN1R Volume", .intval = 1, },
- { .ctl_name = "MIXINR IN1RP Volume", .intval = 1, },
- { .ctl_name = "DAC2 Right Sidetone Volume", .intval = 12, },
- { .ctl_name = "DAC2 Volume", .intval = 96, },
- { .ctl_name = "AIF2ADC Volume", .intval = 96, },
- { .ctl_name = "AIF1ADCL Source", .intval = 1, },
- { .ctl_name = "AIF1ADCR Source", .intval = 1, },
- { .ctl_name = "AIF2ADCL Source", .intval = 1, },
- { .ctl_name = "AIF2ADCR Source", .intval = 1, },
+ { .ctl_name = "AIF2DAC2L Mixer Left Sidetone Switch", .intval = 0, },
+ { .ctl_name = "AIF2DAC2L Mixer Right Sidetone Switch", .intval = 1, },
+ { .ctl_name = "AIF2DAC2R Mixer Left Sidetone Switch", .intval = 0, },
+ { .ctl_name = "AIF2DAC2R Mixer Right Sidetone Switch", .intval = 1, },
+ { .ctl_name = NULL, },
+};
+
+struct route_setting headset_input_disable[] = {
+ { .ctl_name = "Headset Mic Switch", .intval = 0, },
+ { .ctl_name = "MIXINR IN1R Switch", .intval = 0, },
{ .ctl_name = NULL, },
};
@@ -185,8 +189,10 @@ struct route_setting bt_input[] = {
{ .ctl_name = "DAC1R Mixer AIF2 Switch", .intval = 1, },
{ .ctl_name = "AIF1ADC1R Mixer AIF2 Switch", .intval = 0, },
{ .ctl_name = "AIF1ADC1L Mixer AIF2 Switch", .intval = 0, },
- { .ctl_name = "AIF2DAC2R Mixer Right Sidetone Switch", .intval = 0, },
- { .ctl_name = "AIF2DAC2R Mixer Left Sidetone Switch", .intval = 1, },
+ { .ctl_name = "AIF2DAC2L Mixer Left Sidetone Switch", .intval = 1, },
+ { .ctl_name = "AIF2DAC2L Mixer Right Sidetone Switch", .intval = 0, },
+ { .ctl_name = "AIF2DAC2R Mixer Left Sidetone Switch", .intval = 0, },
+ { .ctl_name = "AIF2DAC2R Mixer Right Sidetone Switch", .intval = 1, },
{ .ctl_name = "AIF1ADC1R Mixer AIF2 Switch", .intval = 0, },
{ .ctl_name = "AIF1ADC1L Mixer AIF2 Switch", .intval = 0, },
{ .ctl_name = "MIXINL IN1L Switch", .intval = 0, },