]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: da7213: Use component driver suspend/resume
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tue, 4 Nov 2025 11:49:14 +0000 (13:49 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 4 Nov 2025 13:53:26 +0000 (13:53 +0000)
commit249d96b492efb7a773296ab2c62179918301c146
tree11366f35fb3bfdc6a1213ccb9944841ffe71f299
parent8da0efc3da9312b65f5cbf06e57d284f69222b2e
ASoC: da7213: Use component driver suspend/resume

Since snd_soc_suspend() is invoked through snd_soc_pm_ops->suspend(),
and snd_soc_pm_ops is associated with the soc_driver (defined in
sound/soc/soc-core.c), and there is no parent-child relationship between
the soc_driver and the DA7213 codec driver, the power management subsystem
does not enforce a specific suspend/resume order between the DA7213 driver
and the soc_driver.

Because of this, the different codec component functionalities, called from
snd_soc_resume() to reconfigure various functions, can race with the
DA7213 struct dev_pm_ops::resume function, leading to misapplied
configuration. This occasionally results in clipped sound.

Fix this by dropping the struct dev_pm_ops::{suspend, resume} and use
instead struct snd_soc_component_driver::{suspend, resume}. This ensures
the proper configuration sequence is handled by the ASoC subsystem.

Cc: stable@vger.kernel.org
Fixes: 431e040065c8 ("ASoC: da7213: Add suspend to RAM support")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20251104114914.2060603-1-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/da7213.c
sound/soc/codecs/da7213.h