mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: intel: sof_sdw: Prepare for configuration without a jack
@ 2026-04-02 10:59 Maciej Strozek
  2026-04-02 15:25 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Strozek @ 2026-04-02 10:59 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai
  Cc: yung-chuan.liao, patches, linux-sound, linux-kernel, Maciej Strozek

In certain setups of cs42l43 UAJ function may be removed from ACPI and
physically unconnected. Prepare a driver for that configuration by
setting a system clock in the speaker path too.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
 sound/soc/sdw_utils/soc_sdw_cs42l43.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/sdw_utils/soc_sdw_cs42l43.c b/sound/soc/sdw_utils/soc_sdw_cs42l43.c
index 2685ff4f0932..9ac779f51130 100644
--- a/sound/soc/sdw_utils/soc_sdw_cs42l43.c
+++ b/sound/soc/sdw_utils/soc_sdw_cs42l43.c
@@ -107,6 +107,7 @@ EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_hs_rtd_init, "SND_SOC_SDW_UTILS");
 
 int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
 {
+	struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
 	struct snd_soc_card *card = rtd->card;
 	struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
 	struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
@@ -134,6 +135,11 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so
 	if (ret)
 		dev_err(card->dev, "cs42l43 speaker map addition failed: %d\n", ret);
 
+	ret = snd_soc_component_set_sysclk(component, CS42L43_SYSCLK, CS42L43_SYSCLK_SDW,
+					   0, SND_SOC_CLOCK_IN);
+	if (ret)
+		dev_err(card->dev, "Failed to set sysclk: %d\n", ret);
+
 	return ret;
 }
 EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_spk_rtd_init, "SND_SOC_SDW_UTILS");
-- 
2.48.1


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

* Re: [PATCH] ASoC: intel: sof_sdw: Prepare for configuration without a jack
  2026-04-02 10:59 [PATCH] ASoC: intel: sof_sdw: Prepare for configuration without a jack Maciej Strozek
@ 2026-04-02 15:25 ` Mark Brown
  2026-04-03  8:24   ` Maciej Strozek
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2026-04-02 15:25 UTC (permalink / raw)
  To: Maciej Strozek
  Cc: lgirdwood, perex, tiwai, yung-chuan.liao, patches, linux-sound,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

On Thu, Apr 02, 2026 at 11:59:43AM +0100, Maciej Strozek wrote:

> @@ -134,6 +135,11 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so
>  	if (ret)
>  		dev_err(card->dev, "cs42l43 speaker map addition failed: %d\n", ret);
>  
> +	ret = snd_soc_component_set_sysclk(component, CS42L43_SYSCLK, CS42L43_SYSCLK_SDW,
> +					   0, SND_SOC_CLOCK_IN);
> +	if (ret)
> +		dev_err(card->dev, "Failed to set sysclk: %d\n", ret);
> +
>  	return ret;

This means that instead of returning the error from the speaker map
addition to the caller we now overwite it with whatever the attempt to
set the sysclk does.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: intel: sof_sdw: Prepare for configuration without a jack
  2026-04-02 15:25 ` Mark Brown
@ 2026-04-03  8:24   ` Maciej Strozek
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej Strozek @ 2026-04-03  8:24 UTC (permalink / raw)
  To: Mark Brown
  Cc: lgirdwood, perex, tiwai, yung-chuan.liao, patches, linux-sound,
	linux-kernel

W dniu czw, 02.04.2026 o godzinie 16∶25 +0100, użytkownik Mark Brown
napisał:
> On Thu, Apr 02, 2026 at 11:59:43AM +0100, Maciej Strozek wrote:
> 
> > @@ -134,6 +135,11 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct
> > snd_soc_pcm_runtime *rtd, struct snd_so
> >   if (ret)
> >   dev_err(card->dev, "cs42l43 speaker map addition failed: %d\n",
> > ret);
> >  
> > + ret = snd_soc_component_set_sysclk(component, CS42L43_SYSCLK,
> > CS42L43_SYSCLK_SDW,
> > +    0, SND_SOC_CLOCK_IN);
> > + if (ret)
> > + dev_err(card->dev, "Failed to set sysclk: %d\n", ret);
> > +
> >   return ret;
> 
> This means that instead of returning the error from the speaker map
> addition to the caller we now overwite it with whatever the attempt
> to
> set the sysclk does.

Thank you, fixed in v2.

-- 
Regards,
Maciej

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

end of thread, other threads:[~2026-04-03  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-02 10:59 [PATCH] ASoC: intel: sof_sdw: Prepare for configuration without a jack Maciej Strozek
2026-04-02 15:25 ` Mark Brown
2026-04-03  8:24   ` Maciej Strozek

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

all inboxes | Powered by JetHome®