audio: Split BT SCO media/incall paths

Change-Id: I23a621855e8b96edcd92d8740dfec270ff7e7407
tirimbino
Christopher N. Hesse 8 years ago
parent 51bd12c20d
commit 56caa269d2
  1. 14
      audio/audio_hw.c
  2. 6
      audio/audio_hw.h
  3. 22
      audio/mixer_paths_0.xml.template

@ -309,10 +309,11 @@ static const char * const device_table[SND_DEVICE_MAX] = {
[SND_DEVICE_OUT_VOICE_SPEAKER_WB] = "voice-speaker-wb",
[SND_DEVICE_OUT_VOICE_HEADPHONES] = "voice-headphones",
[SND_DEVICE_OUT_VOICE_HEADPHONES_WB] = "voice-headphones-wb",
[SND_DEVICE_OUT_VOICE_BT_SCO] = "voice-bt-sco-headset",
[SND_DEVICE_OUT_VOICE_BT_SCO_WB] = "voice-bt-sco-headset-wb",
[SND_DEVICE_OUT_HDMI] = "hdmi",
[SND_DEVICE_OUT_SPEAKER_AND_HDMI] = "speaker-and-hdmi",
[SND_DEVICE_OUT_BT_SCO] = "bt-sco-headset",
[SND_DEVICE_OUT_BT_SCO_WB] = "bt-sco-headset-wb",
/* Capture sound devices */
[SND_DEVICE_IN_EARPIECE_MIC] = "earpiece-mic",
@ -328,9 +329,10 @@ static const char * const device_table[SND_DEVICE_MAX] = {
[SND_DEVICE_IN_VOICE_SPEAKER_MIC_WB] = "voice-speaker-mic-wb",
[SND_DEVICE_IN_VOICE_HEADSET_MIC] = "voice-headset-mic",
[SND_DEVICE_IN_VOICE_HEADSET_MIC_WB] = "voice-headset-mic-wb",
[SND_DEVICE_IN_VOICE_BT_SCO_MIC] = "voice-bt-sco-mic",
[SND_DEVICE_IN_VOICE_BT_SCO_MIC_WB] = "voice-bt-sco-mic-wb",
[SND_DEVICE_IN_HDMI_MIC] = "hdmi-mic",
[SND_DEVICE_IN_BT_SCO_MIC] = "bt-sco-mic",
[SND_DEVICE_IN_BT_SCO_MIC_WB] = "bt-sco-mic-wb",
[SND_DEVICE_IN_CAMCORDER_MIC] = "camcorder-mic",
[SND_DEVICE_IN_VOICE_REC_HEADSET_MIC] = "voice-rec-headset-mic",
[SND_DEVICE_IN_VOICE_REC_MIC] = "voice-rec-mic",
@ -534,7 +536,7 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic
devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) {
snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES;
} else if (devices & AUDIO_DEVICE_OUT_ALL_SCO) {
snd_device = SND_DEVICE_OUT_BT_SCO;
snd_device = SND_DEVICE_OUT_VOICE_BT_SCO;
} else if (devices & AUDIO_DEVICE_OUT_SPEAKER) {
snd_device = SND_DEVICE_OUT_VOICE_SPEAKER;
} else if (devices & AUDIO_DEVICE_OUT_EARPIECE) {
@ -546,7 +548,7 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic
devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) {
snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES_WB;
} else if (devices & AUDIO_DEVICE_OUT_ALL_SCO) {
snd_device = SND_DEVICE_OUT_BT_SCO_WB;
snd_device = SND_DEVICE_OUT_VOICE_BT_SCO_WB;
} else if (devices & AUDIO_DEVICE_OUT_SPEAKER) {
snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_WB;
} else if (devices & AUDIO_DEVICE_OUT_EARPIECE) {
@ -663,9 +665,9 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device
if (out_device & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET) {
if (voice_session_uses_wideband(adev->voice.session)) {
snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB;
snd_device = SND_DEVICE_IN_VOICE_BT_SCO_MIC_WB;
} else {
snd_device = SND_DEVICE_IN_BT_SCO_MIC;
snd_device = SND_DEVICE_IN_VOICE_BT_SCO_MIC;
}
} else if (voice_session_uses_twomic(adev->voice.session)) {
snd_device = SND_DEVICE_IN_VOICE_EARPIECE_MIC;

@ -73,10 +73,11 @@ enum {
SND_DEVICE_OUT_VOICE_SPEAKER_WB,
SND_DEVICE_OUT_VOICE_HEADPHONES,
SND_DEVICE_OUT_VOICE_HEADPHONES_WB,
SND_DEVICE_OUT_VOICE_BT_SCO,
SND_DEVICE_OUT_VOICE_BT_SCO_WB,
SND_DEVICE_OUT_HDMI,
SND_DEVICE_OUT_SPEAKER_AND_HDMI,
SND_DEVICE_OUT_BT_SCO,
SND_DEVICE_OUT_BT_SCO_WB,
SND_DEVICE_OUT_END,
/*
@ -98,9 +99,10 @@ enum {
SND_DEVICE_IN_VOICE_SPEAKER_MIC_WB,
SND_DEVICE_IN_VOICE_HEADSET_MIC,
SND_DEVICE_IN_VOICE_HEADSET_MIC_WB,
SND_DEVICE_IN_VOICE_BT_SCO_MIC,
SND_DEVICE_IN_VOICE_BT_SCO_MIC_WB,
SND_DEVICE_IN_HDMI_MIC,
SND_DEVICE_IN_BT_SCO_MIC,
SND_DEVICE_IN_BT_SCO_MIC_WB,
SND_DEVICE_IN_CAMCORDER_MIC,
SND_DEVICE_IN_VOICE_REC_HEADSET_MIC,
SND_DEVICE_IN_VOICE_REC_MIC,

@ -56,19 +56,23 @@
<!-- Empty path -->
</path>
<path name="hdmi">
<path name="voice-bt-sco-headset">
<!-- Empty path -->
</path>
<path name="speaker-and-hdmi">
<path name="voice-bt-sco-headset-wb">
<!-- Empty path -->
</path>
<path name="bt-sco-headset">
<path name="hdmi">
<!-- Empty path -->
</path>
<path name="speaker-and-hdmi">
<!-- Empty path -->
</path>
<path name="bt-sco-headset-wb">
<path name="bt-sco-headset">
<!-- Empty path -->
</path>
@ -120,15 +124,19 @@
<!-- Empty path -->
</path>
<path name="hdmi-mic">
<path name="voice-bt-sco-mic">
<!-- Empty path -->
</path>
<path name="bt-sco-mic">
<path name="voice-bt-sco-mic-wb">
<!-- Empty path -->
</path>
<path name="hdmi-mic">
<!-- Empty path -->
</path>
<path name="bt-sco-mic-wb">
<path name="bt-sco-mic">
<!-- Empty path -->
</path>

Loading…
Cancel
Save