|
|
|
@ -312,6 +312,7 @@ static const char * const device_table[SND_DEVICE_MAX] = { |
|
|
|
|
[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", |
|
|
|
@ -329,6 +330,7 @@ static const char * const device_table[SND_DEVICE_MAX] = { |
|
|
|
|
[SND_DEVICE_IN_VOICE_HEADSET_MIC_WB] = "voice-headset-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", |
|
|
|
@ -531,6 +533,8 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic |
|
|
|
|
if (devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE || |
|
|
|
|
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; |
|
|
|
|
} else if (devices & AUDIO_DEVICE_OUT_SPEAKER) { |
|
|
|
|
snd_device = SND_DEVICE_OUT_VOICE_SPEAKER; |
|
|
|
|
} else if (devices & AUDIO_DEVICE_OUT_EARPIECE) { |
|
|
|
@ -541,6 +545,8 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic |
|
|
|
|
if (devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE || |
|
|
|
|
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; |
|
|
|
|
} else if (devices & AUDIO_DEVICE_OUT_SPEAKER) { |
|
|
|
|
snd_device = SND_DEVICE_OUT_VOICE_SPEAKER_WB; |
|
|
|
|
} else if (devices & AUDIO_DEVICE_OUT_EARPIECE) { |
|
|
|
@ -548,10 +554,6 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (devices & AUDIO_DEVICE_OUT_ALL_SCO) { |
|
|
|
|
snd_device = SND_DEVICE_OUT_BT_SCO; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (snd_device != SND_DEVICE_NONE) { |
|
|
|
|
goto exit; |
|
|
|
|
} |
|
|
|
@ -660,7 +662,11 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device |
|
|
|
|
snd_device = SND_DEVICE_IN_VOICE_MIC; |
|
|
|
|
|
|
|
|
|
if (out_device & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET) { |
|
|
|
|
snd_device = SND_DEVICE_IN_BT_SCO_MIC; |
|
|
|
|
if (voice_session_uses_wideband(adev->voice.session)) { |
|
|
|
|
snd_device = SND_DEVICE_IN_BT_SCO_MIC_WB; |
|
|
|
|
} else { |
|
|
|
|
snd_device = SND_DEVICE_IN_BT_SCO_MIC; |
|
|
|
|
} |
|
|
|
|
} else if (voice_session_uses_twomic(adev->voice.session)) { |
|
|
|
|
snd_device = SND_DEVICE_IN_VOICE_EARPIECE_MIC; |
|
|
|
|
} |
|
|
|
|