diff options
author | Mark Brown <broonie@kernel.org> | 2023-10-27 23:33:15 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-10-27 23:33:15 +0200 |
commit | bdb7e1922052b1e7fcce63e2cfa195958ff97e05 (patch) | |
tree | c879f48a63f2680d6d09390e549c3c072be0ed43 /sound/soc/soc-dai.c | |
parent | ASoC: Intel: avs: Add support for rt5514 codec (diff) | |
parent | ASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag (diff) | |
download | linux-bdb7e1922052b1e7fcce63e2cfa195958ff97e05.tar.xz linux-bdb7e1922052b1e7fcce63e2cfa195958ff97e05.zip |
ASoC: Merge up workaround for CODECs that play noise on stopped stream
This was sent too late to actually make it for v6.6 but was sent against
v6.6 so merge it up here.
Diffstat (limited to 'sound/soc/soc-dai.c')
-rw-r--r-- | sound/soc/soc-dai.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index 3fe1271204fc..6f8773a8fc05 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -658,6 +658,10 @@ int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, ret = soc_dai_trigger(dai, substream, cmd); if (ret < 0) break; + + if (dai->driver->ops && dai->driver->ops->mute_unmute_on_trigger) + snd_soc_dai_digital_mute(dai, 0, substream->stream); + soc_dai_mark_push(dai, substream, trigger); } break; @@ -668,6 +672,9 @@ int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, if (rollback && !soc_dai_mark_match(dai, substream, trigger)) continue; + if (dai->driver->ops && dai->driver->ops->mute_unmute_on_trigger) + snd_soc_dai_digital_mute(dai, 1, substream->stream); + r = soc_dai_trigger(dai, substream, cmd); if (r < 0) ret = r; /* use last ret */ |