public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: qcom: common: add default jack dapm pins
@ 2023-03-02 12:03 Srinivas Kandagatla
  2023-06-22  6:52 ` Johan Hovold
  2023-06-22 22:33 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2023-03-02 12:03 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel, steev,
	johan+linaro, quic_bjorande, Srinivas Kandagatla

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>
---
 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);
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: qcom: common: add default jack dapm pins
  2023-03-02 12:03 [PATCH] ASoC: qcom: common: add default jack dapm pins Srinivas Kandagatla
@ 2023-06-22  6:52 ` Johan Hovold
  2023-06-22 22:33 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2023-06-22  6:52 UTC (permalink / raw)
  To: Srinivas Kandagatla, Mark Brown
  Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel, steev,
	johan+linaro, quic_bjorande

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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: qcom: common: add default jack dapm pins
  2023-03-02 12:03 [PATCH] ASoC: qcom: common: add default jack dapm pins Srinivas Kandagatla
  2023-06-22  6:52 ` Johan Hovold
@ 2023-06-22 22:33 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2023-06-22 22:33 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel, steev,
	johan+linaro, quic_bjorande

On Thu, 02 Mar 2023 12:03:27 +0000, Srinivas Kandagatla wrote:
> If the soundcard does not specify the dapm pins, let the common
> code add these pins for jack.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: qcom: common: add default jack dapm pins
      commit: 82f76ac26c601c5b0c0db7f69500efc42f2ee7ed

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-22 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-02 12:03 [PATCH] ASoC: qcom: common: add default jack dapm pins Srinivas Kandagatla
2023-06-22  6:52 ` Johan Hovold
2023-06-22 22:33 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox