if (!rollback) {
snd_soc_runtime_deactivate(rtd, substream->stream);
- /* clear the corresponding DAIs parameters when going to be inactive */
+
+ /* Make sure DAI parameters cleared if the DAI becomes inactive */
- for_each_rtd_dais(rtd, i, dai)
+ for_each_rtd_dais(rtd, i, dai) {
- if (snd_soc_dai_active(dai) == 0)
+ if (snd_soc_dai_active(dai) == 0 &&
+ (dai->rate || dai->channels || dai->sample_bits))
soc_pcm_set_dai_params(dai, NULL);
+
+ if (snd_soc_dai_stream_active(dai, substream->stream) == 0) {
+ if (dai->driver->ops && !dai->driver->ops->mute_unmute_on_trigger)
+ snd_soc_dai_digital_mute(dai, 1, substream->stream);
+ }
+ }
}
for_each_rtd_dais(rtd, i, dai)