]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: soc-dapm: add snd_soc_dapm_set_idle_bias()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 4 Sep 2025 05:21:45 +0000 (05:21 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 18 Sep 2025 21:24:18 +0000 (22:24 +0100)
Because struct snd_soc_dapm_context is soc-dapm framework specific, user
driver don't need to access its member directly, we would like to hide
them. struct snd_soc_dapm_context will be removed from header in the
future.

Many drivers are directly setting dapm->idle_bias, but it will be
impossible soon. adds snd_soc_dapm_set_idle_bias() for them.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87zfbavllj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-dapm.h
sound/soc/soc-dapm.c

index e978be4010b8415f74491c9f6b4f6284c7ada69e..75941324886be35a4334e17751dc79e099820646 100644 (file)
@@ -663,6 +663,7 @@ struct snd_soc_card *snd_soc_dapm_to_card(struct snd_soc_dapm_context *dapm);
 struct snd_soc_component *snd_soc_dapm_to_component(struct snd_soc_dapm_context *dapm);
 
 bool snd_soc_dapm_get_idle_bias(struct snd_soc_dapm_context *dapm);
+void snd_soc_dapm_set_idle_bias(struct snd_soc_dapm_context *dapm, bool on);
 
 /* dapm path setup */
 int snd_soc_dapm_new_widgets(struct snd_soc_card *card);
index 209da43bc023b92dd5316a79dedcf064476daa7d..51fb09d56c5a1774c2e560020a2484bcb9ffc772 100644 (file)
@@ -2195,6 +2195,12 @@ bool snd_soc_dapm_get_idle_bias(struct snd_soc_dapm_context *dapm)
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_get_idle_bias);
 
+void snd_soc_dapm_set_idle_bias(struct snd_soc_dapm_context *dapm, bool on)
+{
+       dapm->idle_bias = on;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_set_idle_bias);
+
 /*
  * Scan each dapm widget for complete audio path.
  * A complete path is a route that has valid endpoints i.e.:-