int i;
for_each_prop_dai_cpu(props, i, dai) {
- if (props->mclk_fs && !dai->clk_fixed)
- snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, i),
+ struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, i);
+
+ if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(cpu_dai))
+ snd_soc_dai_set_sysclk(cpu_dai,
0, 0, SND_SOC_CLOCK_IN);
asoc_simple_clk_disable(dai);
}
for_each_prop_dai_codec(props, i, dai) {
- if (props->mclk_fs && !dai->clk_fixed)
- snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, i),
+ struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, i);
+
+ if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(codec_dai))
+ snd_soc_dai_set_sysclk(codec_dai,
0, 0, SND_SOC_CLOCK_IN);
asoc_simple_clk_disable(dai);