Skip to content

Commit cb3c715

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-dapm: add snd_soc_dapm_set_idle_bias()
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>
1 parent 2e7f0a8 commit cb3c715

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/sound/soc-dapm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ struct snd_soc_card *snd_soc_dapm_to_card(struct snd_soc_dapm_context *dapm);
663663
struct snd_soc_component *snd_soc_dapm_to_component(struct snd_soc_dapm_context *dapm);
664664

665665
bool snd_soc_dapm_get_idle_bias(struct snd_soc_dapm_context *dapm);
666+
void snd_soc_dapm_set_idle_bias(struct snd_soc_dapm_context *dapm, bool on);
666667

667668
/* dapm path setup */
668669
int snd_soc_dapm_new_widgets(struct snd_soc_card *card);

sound/soc/soc-dapm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,12 @@ bool snd_soc_dapm_get_idle_bias(struct snd_soc_dapm_context *dapm)
21952195
}
21962196
EXPORT_SYMBOL_GPL(snd_soc_dapm_get_idle_bias);
21972197

2198+
void snd_soc_dapm_set_idle_bias(struct snd_soc_dapm_context *dapm, bool on)
2199+
{
2200+
dapm->idle_bias = on;
2201+
}
2202+
EXPORT_SYMBOL_GPL(snd_soc_dapm_set_idle_bias);
2203+
21982204
/*
21992205
* Scan each dapm widget for complete audio path.
22002206
* A complete path is a route that has valid endpoints i.e.:-

0 commit comments

Comments
 (0)