OSDN Git Service

ASoC: tas2770: Fix handling of mute/unmute
authorMartin Povišer <povik+lin@cutebit.org>
Mon, 8 Aug 2022 14:12:46 +0000 (16:12 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 8 Aug 2022 19:44:42 +0000 (20:44 +0100)
commit1e5907bcb3a3b569be0a03ebe668bba2ed320a50
tree0dc0dc81791b19d6f2495c08f75962ede757d206
parent482c23fbc7e9bf5a7a74defd0735d5346215db58
ASoC: tas2770: Fix handling of 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 can mute an ongoing stream
by toggling a speaker pin control.

Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220808141246.5749-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2770.c
sound/soc/codecs/tas2770.h