OSDN Git Service

ASoC: tas2562: Fix mute/unmute
authorMartin Povišer <povik+lin@cutebit.org>
Thu, 25 Aug 2022 14:22:26 +0000 (16:22 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 5 Sep 2022 12:09:10 +0000 (13:09 +0100)
commit2848d34c3ba1fc6f1ece0736a4faa16c6277f4d3
treedadf318dbb22c99bc7886cb0460c1d4be970c4d0
parentb6b55b232564ade5cd91e9b9e2228b49f230d67f
ASoC: tas2562: Fix mute/unmute

Because the PWR_CTRL field is modeled as the power state of the DAC
widget, and at the same time it is used to implement mute/unmute, we
need some additional book-keeping to have the right end result no matter
the sequence of calls. Without this fix, one permanently mutes an
ongoing stream by toggling the associated speaker pin control.

(This mirrors commit 1e5907bcb3a3 ("ASoC: tas2770: Fix handling of
mute/unmute") which was a fix to the tas2770 driver.)

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825142226.80929-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2562.c