Skip to content

Commit ea77b94

Browse files
Jarkko Nikulabroonie
authored andcommitted
ASoC: Fix power down for widgetless per-card DAPM context case
Commit 52ba67b ("ASoC: Force all DAPM contexts into the same bias state") powers up all the DAPM contexts in a card if any DAPM context becomes active. Unfortunately power down newer happens if per-card DAPM context doesn't have any widgets. Reason for this is that power state of per-card DAPM context without widgets is never cleared and thus all the DAPM contexts remain permanently active. Test for widgetless calling DAPM context in dapm_power_widgets() doesn't work for per-card DAPM context since power change is never originating from widgetless per-card DAPM context. Fix this by pre-clearing power state flag of non-codec DAPM context at the beginning of power sequence. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 979f486 commit ea77b94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/soc-dapm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
11101110
trace_snd_soc_dapm_start(card);
11111111

11121112
list_for_each_entry(d, &card->dapm_list, list)
1113-
if (d->n_widgets)
1113+
if (d->n_widgets || d->codec == NULL)
11141114
d->dev_power = 0;
11151115

11161116
/* Check which widgets we need to power and store them in

0 commit comments

Comments
 (0)