]> www.infradead.org Git - nvme.git/commit
ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Wed, 12 Jun 2024 12:12:03 +0000 (15:12 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 12 Jun 2024 17:26:30 +0000 (18:26 +0100)
commit6f2a43e3d14f6e31a3b041a1043195d02c54d615
treecf720560cea6c1545768deb3be4d4705a2d4b843
parent37a2c94c68ce543bc7e2105d5ab178b03bafc797
ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback

If the ipc_prepare() callback fails for a module instance, on error rewind
we must skip the ipc_unprepare() call for ones that has positive use count.

The positive use count means that the module instance is in active use, it
cannot be unprepared.

The issue affects capture direction paths with branches (single dai with
multiple PCMs), the affected widgets are in the shared part of the paths.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-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>
Link: https://lore.kernel.org/r/20240612121203.15468-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/sof-audio.c