summaryrefslogtreecommitdiff
path: root/sound/soc/soc-dai.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-10-27 22:33:15 +0100
committerMark Brown <broonie@kernel.org>2023-10-27 22:33:15 +0100
commitbdb7e1922052b1e7fcce63e2cfa195958ff97e05 (patch)
treec879f48a63f2680d6d09390e549c3c072be0ed43 /sound/soc/soc-dai.c
parent0262a8a079896440fab98844124a951d85b63166 (diff)
parent805ce81826c896dd3c351a32814b28557f9edf54 (diff)
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.c7
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 */