diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-09-04 05:21:29 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-09-18 22:24:14 +0100 |
| commit | 3bc0a92cb2062fce54ddd97ad68ad6fe358c3ff0 (patch) | |
| tree | a7922409b3d9b2d27dcfd6039b6d469d42a38e80 | |
| parent | e38a80c5c24f3058bd5da6f2910e2b672493f4f2 (diff) | |
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>
| -rw-r--r-- | include/sound/soc-dapm.h | 1 | ||||
| -rw-r--r-- | sound/soc/soc-dapm.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index c6470d391eef..498f8af79cfa 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -585,7 +585,6 @@ struct snd_soc_dapm_context { /* bit field */ unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ - unsigned int suspend_bias_off:1; /* Use BIAS_OFF in suspend if the DAPM is idle */ struct device *dev; /* from parent - for debug */ /* REMOVE ME */ struct snd_soc_component *component; /* parent component */ diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 4550bf33add2..b90d0adb7713 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2182,13 +2182,16 @@ end: static bool dapm_idle_bias_off(struct snd_soc_dapm_context *dapm) { + struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); if (dapm->idle_bias_off) return true; switch (snd_power_get_state(dapm->card->snd_card)) { case SNDRV_CTL_POWER_D3hot: case SNDRV_CTL_POWER_D3cold: - return dapm->suspend_bias_off; + if (component) + return component->driver->suspend_bias_off; + fallthrough; default: break; } @@ -4823,7 +4826,6 @@ void snd_soc_dapm_init(struct snd_soc_dapm_context *dapm, if (component) { dapm->dev = component->dev; dapm->idle_bias_off = !component->driver->idle_bias_on; - dapm->suspend_bias_off = component->driver->suspend_bias_off; } else { dapm->dev = card->dev; } |
