sound/soc/sdw_utils/soc_sdw_cs42l43.c | 6 ++++++ 1 file changed, 6 insertions(+)
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
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.
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
© 2016 - 2026 Red Hat, Inc.