diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2018-10-12 22:43:02 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-10-12 22:43:02 +0000 |
| commit | 1ed46ba142a9e03e0e2b3c9c184ccf10e9d3db8c (patch) | |
| tree | 23ed8389e921e3a84a71266b22a37538d168c55c | |
| parent | 41fae321200cb5a2a53ee5e891dfa844e776da49 (diff) | |
| parent | 9536e67b0335b64bddb0b1fcbaa9c8c615ba59ef (diff) | |
| download | android_hardware_qcom_audio-1ed46ba142a9e03e0e2b3c9c184ccf10e9d3db8c.tar.gz android_hardware_qcom_audio-1ed46ba142a9e03e0e2b3c9c184ccf10e9d3db8c.tar.bz2 android_hardware_qcom_audio-1ed46ba142a9e03e0e2b3c9c184ccf10e9d3db8c.zip | |
Snap for 5066295 from 9536e67b0335b64bddb0b1fcbaa9c8c615ba59ef to pi-qpr2-release
Change-Id: I354e079d6f1485f637863ccc6fbdaf83e7a75f66
| -rw-r--r-- | hal/msm8916/platform.c | 5 | ||||
| -rw-r--r-- | hal/msm8916/platform.h | 1 | ||||
| -rw-r--r-- | hal/msm8960/platform.c | 4 | ||||
| -rw-r--r-- | hal/msm8960/platform.h | 1 | ||||
| -rw-r--r-- | hal/msm8974/platform.c | 6 | ||||
| -rw-r--r-- | hal/msm8974/platform.h | 1 | ||||
| -rw-r--r-- | hal/voice.c | 1 |
7 files changed, 19 insertions, 0 deletions
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c index f6508c31..750d4e5e 100644 --- a/hal/msm8916/platform.c +++ b/hal/msm8916/platform.c @@ -220,6 +220,7 @@ static const char * const device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_VOICE_SPEAKER] = "voice-speaker", [SND_DEVICE_OUT_VOICE_SPEAKER_HFP] = "voice-speaker-hfp", [SND_DEVICE_OUT_VOICE_HEADPHONES] = "voice-headphones", + [SND_DEVICE_OUT_VOICE_HEADSET] = "voice-headphones", [SND_DEVICE_OUT_VOICE_LINE] = "voice-line", [SND_DEVICE_OUT_HDMI] = "hdmi", [SND_DEVICE_OUT_SPEAKER_AND_HDMI] = "speaker-and-hdmi", @@ -316,6 +317,7 @@ static int acdb_device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_VOICE_LINE] = 10, [SND_DEVICE_OUT_VOICE_SPEAKER] = 14, [SND_DEVICE_OUT_VOICE_HEADPHONES] = 10, + [SND_DEVICE_OUT_VOICE_HEADSET] = 10, [SND_DEVICE_OUT_HDMI] = 18, [SND_DEVICE_OUT_SPEAKER_AND_HDMI] = 14, [SND_DEVICE_OUT_BT_SCO] = 22, @@ -417,6 +419,7 @@ static struct name_to_index snd_device_name_index[SND_DEVICE_MAX] = { {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER)}, {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER_HFP)}, {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_HEADPHONES)}, + {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_HEADSET)}, {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_LINE)}, {TO_NAME_INDEX(SND_DEVICE_OUT_HDMI)}, {TO_NAME_INDEX(SND_DEVICE_OUT_SPEAKER_AND_HDMI)}, @@ -1845,6 +1848,8 @@ snd_device_t platform_get_output_snd_device(void *platform, audio_devices_t devi } } else if (devices & AUDIO_DEVICE_OUT_LINE) { snd_device = SND_DEVICE_OUT_VOICE_LINE; + } else if (devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) { + snd_device = SND_DEVICE_OUT_VOICE_HEADSET; } else { snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES; } diff --git a/hal/msm8916/platform.h b/hal/msm8916/platform.h index 5b4004f7..9913322f 100644 --- a/hal/msm8916/platform.h +++ b/hal/msm8916/platform.h @@ -66,6 +66,7 @@ enum { SND_DEVICE_OUT_VOICE_SPEAKER, SND_DEVICE_OUT_VOICE_SPEAKER_HFP, SND_DEVICE_OUT_VOICE_HEADPHONES, + SND_DEVICE_OUT_VOICE_HEADSET, SND_DEVICE_OUT_VOICE_LINE, SND_DEVICE_OUT_HDMI, SND_DEVICE_OUT_SPEAKER_AND_HDMI, diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c index 9e06a0c3..bd8c41ce 100644 --- a/hal/msm8960/platform.c +++ b/hal/msm8960/platform.c @@ -123,6 +123,7 @@ static const char * const device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES] = "speaker-and-headphones", [SND_DEVICE_OUT_VOICE_SPEAKER] = "voice-speaker", [SND_DEVICE_OUT_VOICE_HEADPHONES] = "voice-headphones", + [SND_DEVICE_OUT_VOICE_HEADSET] = "voice-headphones", [SND_DEVICE_OUT_HDMI] = "hdmi", [SND_DEVICE_OUT_SPEAKER_AND_HDMI] = "speaker-and-hdmi", [SND_DEVICE_OUT_BT_SCO] = "bt-sco-headset", @@ -178,6 +179,7 @@ static const int acdb_device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES] = 10, [SND_DEVICE_OUT_VOICE_SPEAKER] = 14, [SND_DEVICE_OUT_VOICE_HEADPHONES] = 10, + [SND_DEVICE_OUT_VOICE_HEADSET] = 10, [SND_DEVICE_OUT_HDMI] = 18, [SND_DEVICE_OUT_SPEAKER_AND_HDMI] = 14, [SND_DEVICE_OUT_BT_SCO] = 22, @@ -648,6 +650,8 @@ snd_device_t platform_get_output_snd_device(void *platform, audio_devices_t devi snd_device = SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES; else if (adev->voice.tty_mode == TTY_MODE_HCO) snd_device = SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET; + else if (devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) + snd_device = SND_DEVICE_OUT_VOICE_HEADSET; else snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES; } else if (devices & AUDIO_DEVICE_OUT_ALL_SCO) { diff --git a/hal/msm8960/platform.h b/hal/msm8960/platform.h index b0bd98a1..d2bcd0cd 100644 --- a/hal/msm8960/platform.h +++ b/hal/msm8960/platform.h @@ -44,6 +44,7 @@ enum { SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, SND_DEVICE_OUT_VOICE_SPEAKER, SND_DEVICE_OUT_VOICE_HEADPHONES, + SND_DEVICE_OUT_VOICE_HEADSET, SND_DEVICE_OUT_HDMI, SND_DEVICE_OUT_SPEAKER_AND_HDMI, SND_DEVICE_OUT_BT_SCO, diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 4956d4a5..87aba23d 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -256,6 +256,7 @@ static const char * const device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_VOICE_HAC_HANDSET] = "voice-hac-handset", [SND_DEVICE_OUT_VOICE_SPEAKER] = "voice-speaker", [SND_DEVICE_OUT_VOICE_HEADPHONES] = "voice-headphones", + [SND_DEVICE_OUT_VOICE_HEADSET] = "voice-headphones", [SND_DEVICE_OUT_VOICE_LINE] = "voice-line", [SND_DEVICE_OUT_HDMI] = "hdmi", [SND_DEVICE_OUT_SPEAKER_AND_HDMI] = "speaker-and-hdmi", @@ -377,6 +378,7 @@ static int acdb_device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_VOICE_SPEAKER] = ACDB_ID_VOICE_SPEAKER, [SND_DEVICE_OUT_VOICE_HAC_HANDSET] = 53, [SND_DEVICE_OUT_VOICE_HEADPHONES] = 10, + [SND_DEVICE_OUT_VOICE_HEADSET] = 10, [SND_DEVICE_OUT_VOICE_LINE] = 77, [SND_DEVICE_OUT_HDMI] = 18, [SND_DEVICE_OUT_SPEAKER_AND_HDMI] = 15, @@ -504,6 +506,7 @@ static const struct name_to_index snd_device_name_index[SND_DEVICE_MAX] = { {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER)}, {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER_HFP)}, {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_HEADPHONES)}, + {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_HEADSET)}, {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_LINE)}, {TO_NAME_INDEX(SND_DEVICE_OUT_HDMI)}, {TO_NAME_INDEX(SND_DEVICE_OUT_SPEAKER_AND_HDMI)}, @@ -1242,6 +1245,7 @@ static void set_platform_defaults(struct platform_data * my_data) hw_interface_table[SND_DEVICE_OUT_VOICE_HAC_HANDSET] = strdup("SLIMBUS_0_RX"); hw_interface_table[SND_DEVICE_OUT_VOICE_SPEAKER] = strdup("SLIMBUS_0_RX"); hw_interface_table[SND_DEVICE_OUT_VOICE_HEADPHONES] = strdup("SLIMBUS_0_RX"); + hw_interface_table[SND_DEVICE_OUT_VOICE_HEADSET] = strdup("SLIMBUS_0_RX"); hw_interface_table[SND_DEVICE_OUT_VOICE_MUSIC_TX] = strdup("VOICE_PLAYBACK_TX"); hw_interface_table[SND_DEVICE_OUT_VOICE_LINE] = strdup("SLIMBUS_0_RX"); hw_interface_table[SND_DEVICE_OUT_HDMI] = strdup("HDMI_RX"); @@ -2717,6 +2721,8 @@ snd_device_t platform_get_output_snd_device(void *platform, audio_devices_t devi else { if (devices & AUDIO_DEVICE_OUT_LINE) snd_device = SND_DEVICE_OUT_VOICE_LINE; + else if (devices & AUDIO_DEVICE_OUT_WIRED_HEADSET) + snd_device = SND_DEVICE_OUT_VOICE_HEADSET; else snd_device = SND_DEVICE_OUT_VOICE_HEADPHONES; } diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h index 8661fad7..2a9646c7 100644 --- a/hal/msm8974/platform.h +++ b/hal/msm8974/platform.h @@ -73,6 +73,7 @@ enum { SND_DEVICE_OUT_VOICE_HANDSET, SND_DEVICE_OUT_VOICE_SPEAKER, SND_DEVICE_OUT_VOICE_HEADPHONES, + SND_DEVICE_OUT_VOICE_HEADSET, SND_DEVICE_OUT_VOICE_LINE, SND_DEVICE_OUT_HDMI, SND_DEVICE_OUT_SPEAKER_AND_HDMI, diff --git a/hal/voice.c b/hal/voice.c index f456ce17..09cb926f 100644 --- a/hal/voice.c +++ b/hal/voice.c @@ -66,6 +66,7 @@ static bool voice_is_sidetone_device(snd_device_t out_device, strlcpy(mixer_path, "sidetone-handset", MIXER_PATH_MAX_LENGTH); break; case SND_DEVICE_OUT_VOICE_HEADPHONES: + case SND_DEVICE_OUT_VOICE_HEADSET: strlcpy(mixer_path, "sidetone-headphones", MIXER_PATH_MAX_LENGTH); break; case SND_DEVICE_OUT_VOICE_USB_HEADSET: |
