Skip to content

Commit 1473841

Browse files
committed
FIXME: ASoC: qcom: msm8916: enable jack detection kctls
msm8916 (apq8016) can detect the Headphones and External Mic presence but userspace needs kctls to make use of that (e.g. with ucm configurations) Make those kctls available. Signed-off-by: Nikita Travkin <[email protected]>
1 parent 165735d commit 1473841

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

sound/soc/qcom/apq8016_sbc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
105105
snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
106106
snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
107107
snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
108+
109+
snd_jack_add_new_kctl(jack, "Headphone", SND_JACK_HEADPHONE);
110+
snd_jack_add_new_kctl(jack, "Headset Mic", SND_JACK_MICROPHONE);
108111
pdata->jack_setup = true;
109112
}
110113

sound/soc/qcom/msm8916-qdsp6.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ static int msm8916_qdsp6_dai_init(struct snd_soc_pcm_runtime *rtd)
114114
snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
115115
snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
116116
snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
117+
118+
snd_jack_add_new_kctl(jack, "Headphone", SND_JACK_HEADPHONE);
119+
snd_jack_add_new_kctl(jack, "Headset Mic", SND_JACK_MICROPHONE);
120+
117121
pdata->jack_setup = true;
118122
}
119123

0 commit comments

Comments
 (0)