Skip to content

Commit

Permalink
FIXME: ASoC: qcom: msm8916: enable jack detection kctls
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
TravMurav committed Aug 23, 2021
1 parent 165735d commit 1473841
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/qcom/apq8016_sbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);

snd_jack_add_new_kctl(jack, "Headphone", SND_JACK_HEADPHONE);
snd_jack_add_new_kctl(jack, "Headset Mic", SND_JACK_MICROPHONE);
pdata->jack_setup = true;
}

Expand Down
4 changes: 4 additions & 0 deletions sound/soc/qcom/msm8916-qdsp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ static int msm8916_qdsp6_dai_init(struct snd_soc_pcm_runtime *rtd)
snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);

snd_jack_add_new_kctl(jack, "Headphone", SND_JACK_HEADPHONE);
snd_jack_add_new_kctl(jack, "Headset Mic", SND_JACK_MICROPHONE);

pdata->jack_setup = true;
}

Expand Down

0 comments on commit 1473841

Please sign in to comment.