mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 15:19:38 +02:00
ASoC: atmel: mchp-pdmc: Skip ALSA restoration if substream runtime is uninitialized
[ Upstream commit09cfc6a532
] Update the driver to prevent alsa-restore.service from failing when reading data from /var/lib/alsa/asound.state at boot. Ensure that the restoration of ALSA mixer configurations is skipped if substream->runtime is NULL. Fixes:50291652af
("ASoC: atmel: mchp-pdmc: add PDMC driver") Signed-off-by: Andrei Simion <andrei.simion@microchip.com> Link: https://patch.msgid.link/20240924081237.50046-1-andrei.simion@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
28234f8ab6
commit
0152c81f61
|
@ -285,6 +285,9 @@ static int mchp_pdmc_chmap_ctl_put(struct snd_kcontrol *kcontrol,
|
|||
if (!substream)
|
||||
return -ENODEV;
|
||||
|
||||
if (!substream->runtime)
|
||||
return 0; /* just for avoiding error from alsactl restore */
|
||||
|
||||
map = mchp_pdmc_chmap_get(substream, info);
|
||||
if (!map)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user