From: Caleb Connolly <caleb@connolly.tech>
To: Dylan Van Assche <me@dylanvanassche.be>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Banajit Goswami <bgoswami@quicinc.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>
Cc: ~postmarketos/upstreaming@lists.sr.ht,
linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org
Subject: Re: [PATCH] sound: soc: codecs: wcd-mbhc-v2: expose ALSA control for jack
Date: Sat, 17 Sep 2022 15:14:53 +0000 [thread overview]
Message-ID: <86ad4891-4544-9e53-5b92-e24758e97f88@connolly.tech> (raw)
In-Reply-To: <20220917144436.7802-1-me@dylanvanassche.be>
On 17/09/2022 15:44, Dylan Van Assche wrote:
> Jack detection is currently fully functional via the input
> interface together with multimedia buttons, but is not exposed
> as an ALSA control. Therefore, ALSA clients such as PulseAudio
> do not pick up the jack detection events as they only support
> one of the possible interface (ALSA control or input interface,
> but not both). Expose the jack events as an ALSA control and input
> interface to provide ALSA clients both interfaces.
>
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> ---
> sound/soc/codecs/wcd-mbhc-v2.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c
> index 98baef594bf3..e741b522cf10 100644
> --- a/sound/soc/codecs/wcd-mbhc-v2.c
> +++ b/sound/soc/codecs/wcd-mbhc-v2.c
> @@ -724,6 +724,10 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc)
>
> mutex_lock(&mbhc->lock);
>
> + ret = snd_jack_add_new_kctl (mbhc->jack->jack, "Headset Jack", WCD_MBHC_JACK_MASK);
> + if (ret)
> + dev_warn(component->dev, "failed creating Headset Jack kctl with err: %d\n", ret);
> +
> /* enable HS detection */
> if (mbhc->mbhc_cb->hph_pull_up_control_v2)
> mbhc->mbhc_cb->hph_pull_up_control_v2(component,
> --
> 2.37.3
>
prev parent reply other threads:[~2022-09-17 15:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 14:44 [PATCH] sound: soc: codecs: wcd-mbhc-v2: expose ALSA control for jack Dylan Van Assche
2022-09-17 15:14 ` Caleb Connolly [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ad4891-4544-9e53-5b92-e24758e97f88@connolly.tech \
--to=caleb@connolly.tech \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=me@dylanvanassche.be \
--cc=perex@perex.cz \
--cc=phone-devel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox