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

ASoC: soc-pcm: tidyup soc_pcm_hw_clean() - step2

DAI active count is not exchanged during for_each_rtd_dais()
loops. We don't need to keep snd_soc_dai_stream_active() as
"active" on soc_pcm_hw_clean(). This patch avoid verbose code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ilxvt7e6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
86e4aef6 121966d0

+1 -3
+1 -3
sound/soc/soc-pcm.c
··· 879 879 880 880 /* clear the corresponding DAIs parameters when going to be inactive */ 881 881 for_each_rtd_dais(rtd, i, dai) { 882 - int active = snd_soc_dai_stream_active(dai, substream->stream); 883 - 884 882 if (snd_soc_dai_active(dai) == 1) 885 883 soc_pcm_set_dai_params(dai, NULL); 886 884 887 - if (active == 1) 885 + if (snd_soc_dai_stream_active(dai, substream->stream) == 1) 888 886 snd_soc_dai_digital_mute(dai, 1, substream->stream); 889 887 } 890 888