]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: loader: release_firmware() on load failure to avoid batching
authorMarc Herbert <marc.herbert@intel.com>
Thu, 16 Sep 2021 08:50:08 +0000 (11:50 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 16 Sep 2021 13:01:54 +0000 (14:01 +0100)
commitc0ad620e5a099b103be61803e4ea35054194aa4a
tree0f5085c9930ce432bc6550d72dee09ed04cc81dc
parent49bf7596aca344af8fb57237aa63554e15315305
ASoC: SOF: loader: release_firmware() on load failure to avoid batching

Invoke release_firmware() when the firmware fails to boot in
sof_probe_continue().

The request_firmware() framework must be informed of failures in
sof_probe_continue() otherwise its internal "batching"
feature (different from caching) cached the firmware image
forever. Attempts to correct the file in /lib/firmware/ were then
silently and confusingly ignored until the next reboot. Unloading the
drivers did not help because from their disconnected perspective the
firmware had failed so there was nothing to release.

Also leverage the new snd_sof_fw_unload() function to simplify the
snd_sof_device_remove() function.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210916085008.28929-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/core.c
sound/soc/sof/loader.c