Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: da7213: Avoid setting PLL when closing audio stream

When audio stream is closing, audio frequency is set to 0 by ALSA but
codec driver DA7213 does not handle properly in this case. This patch
adds checking of 0Hz frequency to da7213_set_component_sysclk() and avoid
unnecessary PLL settings.

Signed-off-by: Hao Bui <hao.bui.yg@renesas.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Link: https://patch.msgid.link/20241106081826.1211088-26-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hao Bui and committed by
Mark Brown
1e1a2ef9 431e0400

+4
+4
sound/soc/codecs/da7213.c
··· 1555 1555 if ((da7213->clk_src == clk_id) && (da7213->mclk_rate == freq)) 1556 1556 return 0; 1557 1557 1558 + /* Maybe audio stream is closing. */ 1559 + if (freq == 0) 1560 + return 0; 1561 + 1558 1562 if (((freq < 5000000) && (freq != 32768)) || (freq > 54000000)) { 1559 1563 dev_err(component->dev, "Unsupported MCLK value %d\n", 1560 1564 freq);