]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: Merge up workaround for CODECs that play noise on stopped stream
authorMark Brown <broonie@kernel.org>
Fri, 27 Oct 2023 21:33:15 +0000 (22:33 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 27 Oct 2023 21:33:15 +0000 (22:33 +0100)
This was sent too late to actually make it for v6.6 but was sent against
v6.6 so merge it up here.

1  2 
sound/soc/soc-dai.c
sound/soc/soc-pcm.c
sound/soc/sof/sof-pci-dev.c

Simple merge
index 8c168dc553f65931d0bce4893d866822e1ea6521,d3bc545971ccddda8c1f550d0344cf92d7c30353..323e4d7b6adfe12162a8c1ac43bbb4caa2d5cdd2
@@@ -698,12 -698,16 +698,18 @@@ static int soc_pcm_clean(struct snd_soc
  
        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)
Simple merge