]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: dapm: Correct DAPM handling of active widgets during shutdown
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 28 Feb 2020 15:31:45 +0000 (15:31 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 28 Feb 2020 17:06:08 +0000 (17:06 +0000)
commit292f234eb016b2e43c249b37ebaebc0c07be5b6d
treef76cf01772c68286a9bc39f73a3e312357601da8
parentc13cb212d66eecaf2804a052d80466cfb0d51bad
ASoC: dapm: Correct DAPM handling of active widgets during shutdown

commit 4a93290f70b6 ("ASoC: Fix widget powerdown on shutdown") added a
set of the power state during snd_soc_dapm_shutdown to ensure the
widgets powered off. However, when commit 885e41ea9d30
("ASoC: dapm: Delay w->power update until the changes are written")
added the new_power member of the widget structure, to differentiate
between the current power state and the target power state, it did not
update the shutdown to use the new_power member.

As new_power has not updated it will be left in the state set by the
last DAPM sequence, ie. 1 for active widgets. So as the DAPM sequence
for the shutdown proceeds it will turn the widgets on (despite them
already being on) rather than turning them off.

Fixes: 885e41ea9d30 ("ASoC: dapm: Delay w->power update until the changes are written")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200228153145.21013-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c