Skip to contentSkip to conversation

ASoC: intel: sof_sdw: Prepare for configuration without a jack

PATCH Superseded Maciej Strozek 2 participants 3 messages Apr 2 – Apr 3

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: intel: sof_sdw: Prepare for configuration without a jack

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.

---
 sound/soc/sdw_utils/soc_sdw_cs42l43.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/sdw_utils/soc_sdw_cs42l43.c +6 -0
index 2685ff4f0932..9ac779f51130 100644
@@ -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");
Signature · 1 line
2.48.1
maintainer
#1 lore raw

sound/soc/sdw_utils/soc_sdw_cs42l43.c int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so · line 143

Quoted 10 lines · Maciej Strozek
sound/soc/sdw_utils/soc_sdw_cs42l43.c +5 -0
@@ -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.

#2 lore raw

W dniu czw, 02.04.2026 o godzinie 16∶25 +0100, użytkownik Mark Brown

Quoted 12 lines · napisał:
Quoted 10 lines · Maciej Strozek
(quoted diff) +0 -0
@@ -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)

Quoted 8 lines
Quoted 3 lines

+ 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.

Signature · 2 lines
Regards,
Maciej