public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	steev@kali.org, johan+linaro@kernel.org,
	quic_bjorande@quicinc.com
Subject: Re: [PATCH] ASoC: qcom: common: add default jack dapm pins
Date: Thu, 22 Jun 2023 08:52:35 +0200	[thread overview]
Message-ID: <ZJPvs05sb-aCr3CQ@hovoldconsulting.com> (raw)
In-Reply-To: <20230302120327.10823-1-srinivas.kandagatla@linaro.org>

On Thu, Mar 02, 2023 at 12:03:27PM +0000, Srinivas Kandagatla wrote:
> If the soundcard does not specify the dapm pins, let the common
> code add these pins for jack.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---

Looks like this one was lost somewhere.

Any chance we can get this into 6.5 as it's needed for audio on the
Lenovo ThinkPad X13s?

Tested-by: Johan Hovold <johan+linaro@kernel.org>

Johan

>  sound/soc/qcom/common.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
> index c1f24af17506..555feb845c41 100644
> --- a/sound/soc/qcom/common.c
> +++ b/sound/soc/qcom/common.c
> @@ -8,6 +8,11 @@
>  #include "qdsp6/q6afe.h"
>  #include "common.h"
>  
> +static const struct snd_soc_dapm_widget qcom_jack_snd_widgets[] = {
> +	SND_SOC_DAPM_HP("Headphone Jack", NULL),
> +	SND_SOC_DAPM_MIC("Mic Jack", NULL),
> +};
> +
>  int qcom_snd_parse_of(struct snd_soc_card *card)
>  {
>  	struct device_node *np;
> @@ -169,6 +174,11 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
>  		of_node_put(platform);
>  	}
>  
> +	if (!card->dapm_widgets) {
> +		card->dapm_widgets = qcom_jack_snd_widgets;
> +		card->num_dapm_widgets = ARRAY_SIZE(qcom_jack_snd_widgets);
> +	}
> +
>  	return 0;
>  err:
>  	of_node_put(cpu);

  reply	other threads:[~2023-06-22  6:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 12:03 [PATCH] ASoC: qcom: common: add default jack dapm pins Srinivas Kandagatla
2023-06-22  6:52 ` Johan Hovold [this message]
2023-06-22 22:33 ` Mark Brown

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=ZJPvs05sb-aCr3CQ@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=quic_bjorande@quicinc.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=steev@kali.org \
    --cc=tiwai@suse.com \
    /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