aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-02 18:56:07 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-02 18:59:21 +0200
commit85f9dded2571102ad1118a3f3b419c2b952c6989 (patch)
tree687697a075f074b232b0fba4ab00b2ed9234617c /audio
parent3053f00537a8551462ea009a2c10440b961e6de3 (diff)
downloaddevice_samsung_espresso3g-85f9dded2571102ad1118a3f3b419c2b952c6989.zip
device_samsung_espresso3g-85f9dded2571102ad1118a3f3b419c2b952c6989.tar.gz
device_samsung_espresso3g-85f9dded2571102ad1118a3f3b419c2b952c6989.tar.bz2
audio: some incall fixes
Change-Id: Id826e0eda1f9d2bcc2b26b3d016f8e2d4aacbb8d
Diffstat (limited to 'audio')
-rwxr-xr-xaudio/audio_hw.c30
-rw-r--r--audio/audio_hw.h18
2 files changed, 36 insertions, 12 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index e861fc6..18fa2bd 100755
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -438,7 +438,7 @@ static void set_incall_device(struct espresso_audio_device *adev)
}
break;
default:
- device_type = SOUND_AUDIO_PATH_HANDSET;
+ device_type = SOUND_AUDIO_PATH_SPEAKER;
break;
}
@@ -592,15 +592,23 @@ static void select_output_device(struct espresso_audio_device *adev)
}
if (headset_on || headphone_on || speaker_on || earpiece_on) {
- ALOGD("%s: set bigroute: voicecall_input_default", __func__);
+ ALOGD("%s: set voicecall: voicecall_default", __func__);
set_bigroute_by_array(adev->mixer, voicecall_default, 1);
} else {
- ALOGD("%s: set bigroute: voicecall_input_default_disable", __func__);
+ ALOGD("%s: set voicecall: voicecall_default_disable", __func__);
set_bigroute_by_array(adev->mixer, voicecall_default_disable, 1);
}
+ if (speaker_on || earpiece_on || headphone_on) {
+ ALOGD("%s: set voicecall route: default_input", __func__);
+ set_bigroute_by_array(adev->mixer, default_input, 1);
+ } else {
+ ALOGD("%s: set voicecall route: default_input_disable", __func__);
+ set_bigroute_by_array(adev->mixer, default_input_disable, 1);
+ }
+
if (headset_on || headphone_on) {
- ALOGD("%s: set bigroute: headset_input", __func__);
+ ALOGD("%s: set voicecall: headset_input", __func__);
set_bigroute_by_array(adev->mixer, headset_input, 1);
}
@@ -608,9 +616,9 @@ static void select_output_device(struct espresso_audio_device *adev)
// bt uses a different port (PORT_BT) for playback, reopen the pcms
end_call(adev);
start_call(adev);
- ALOGD("%s: set bigroute: bt_input", __func__);
+ ALOGD("%s: set voicecall: bt_input", __func__);
set_bigroute_by_array(adev->mixer, bt_input, 1);
- ALOGD("%s: set bigroute: bt_output", __func__);
+ ALOGD("%s: set voicecall: bt_output", __func__);
set_bigroute_by_array(adev->mixer, bt_output, 1);
}
set_incall_device(adev);
@@ -623,16 +631,14 @@ static void select_input_device(struct espresso_audio_device *adev)
case AUDIO_DEVICE_IN_BUILTIN_MIC:
ALOGD("%s: AUDIO_DEVICE_IN_BUILTIN_MIC", __func__);
break;
- case AUDIO_DEVICE_IN_BACK_MIC:
- ALOGD("%s: AUDIO_DEVICE_IN_BACK_MIC", __func__);
- break;
- case AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET:
- ALOGD("%s: AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET", __func__);
- break;
case AUDIO_DEVICE_IN_WIRED_HEADSET:
ALOGD("%s: AUDIO_DEVICE_IN_WIRED_HEADSET", __func__);
break;
+ case AUDIO_DEVICE_IN_ALL_SCO:
+ ALOGD("%s: AUDIO_DEVICE_IN_ALL_SCO", __func__);
+ break;
default:
+ ALOGD("%s: AUDIO_DEVICE_IN_DEFAULT", __func__);
break;
}
diff --git a/audio/audio_hw.h b/audio/audio_hw.h
index 7f773c6..e8014fc 100644
--- a/audio/audio_hw.h
+++ b/audio/audio_hw.h
@@ -134,6 +134,22 @@ struct route_setting voicecall_default_disable[] = {
{ .ctl_name = NULL, },
};
+struct route_setting default_input[] = {
+ { .ctl_name = "Main Mic Switch", .intval = 1, },
+ { .ctl_name = "IN1L Volume", .intval = 30, },
+ { .ctl_name = "MIXINL IN1L Volume", .intval = 0, },
+ { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 1, },
+ { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 1, },
+ { .ctl_name = NULL, },
+};
+
+struct route_setting default_input_disable[] = {
+ { .ctl_name = "Main Mic Switch", .intval = 0, },
+ { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 0, },
+ { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 0, },
+ { .ctl_name = NULL, },
+};
+
struct route_setting headset_input[] = {
{ .ctl_name = "AIF2DAC2L Mixer AIF2 Switch", .intval = 0, },
{ .ctl_name = "AIF2DAC2R Mixer AIF2 Switch", .intval = 0, },
@@ -157,5 +173,7 @@ struct route_setting bt_output[] = {
};
struct route_setting bt_input[] = {
+ { .ctl_name = "AIF1ADC1R Mixer AIF2 Switch", .intval = 1, },
+ { .ctl_name = "AIF1ADC1L Mixer AIF2 Switch", .intval = 1, },
{ .ctl_name = NULL, },
};