Skip to content

Commit 3bc0a92

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-dapm: remove suspend_bias_off from snd_soc_dapm_context
We can directly use suspend_bias_off via snd_soc_component, no need to keep it on dapm. Remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/875xdyx06e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e38a80c commit 3bc0a92

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

include/sound/soc-dapm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ struct snd_soc_dapm_context {
585585

586586
/* bit field */
587587
unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
588-
unsigned int suspend_bias_off:1; /* Use BIAS_OFF in suspend if the DAPM is idle */
589588

590589
struct device *dev; /* from parent - for debug */ /* REMOVE ME */
591590
struct snd_soc_component *component; /* parent component */

sound/soc/soc-dapm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,13 +2182,16 @@ static void dapm_power_one_widget(struct snd_soc_dapm_widget *w,
21822182

21832183
static bool dapm_idle_bias_off(struct snd_soc_dapm_context *dapm)
21842184
{
2185+
struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
21852186
if (dapm->idle_bias_off)
21862187
return true;
21872188

21882189
switch (snd_power_get_state(dapm->card->snd_card)) {
21892190
case SNDRV_CTL_POWER_D3hot:
21902191
case SNDRV_CTL_POWER_D3cold:
2191-
return dapm->suspend_bias_off;
2192+
if (component)
2193+
return component->driver->suspend_bias_off;
2194+
fallthrough;
21922195
default:
21932196
break;
21942197
}
@@ -4823,7 +4826,6 @@ void snd_soc_dapm_init(struct snd_soc_dapm_context *dapm,
48234826
if (component) {
48244827
dapm->dev = component->dev;
48254828
dapm->idle_bias_off = !component->driver->idle_bias_on;
4826-
dapm->suspend_bias_off = component->driver->suspend_bias_off;
48274829
} else {
48284830
dapm->dev = card->dev;
48294831
}

0 commit comments

Comments
 (0)