]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: core: unregister clients and machine drivers in .shutdown
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 16 Feb 2022 13:32:41 +0000 (15:32 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 16 Feb 2022 16:34:22 +0000 (16:34 +0000)
commit8c199f29e6c1039bec1f14f8f08642be13742588
treecab7735d8465ec0ba68b072e82203afd9709f2c6
parent8e5bf0aa0bc989ddf82da24ef55850a71e706750
ASoC: SOF: core: unregister clients and machine drivers in .shutdown

On a platform shutdown, the expectation for most drivers is that
userspace tasks will release all resources. When those sequences do
not complete, it can be the case that PCM devices exposed by ALSA
cards are used *after* the DSP shutdown completes, leading to a
platform hang.

When the clients and machine drivers provide an _unregister callback,
let's invoke it in the shutdown sequence.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220216133241.3990281-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/core.c