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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:20 +0000 (11:40 +0200)
commit18b5a57e7d9689a6688eab91161f8ad08bff266a
tree19947a450a00861080133a46884deba11718180f
parent8eab21065492dbb6ad4b96121c7ddea8f2be35da
ASoC: tas2770: Fix handling of mute/unmute

commit 1e5907bcb3a3b569be0a03ebe668bba2ed320a50 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/tas2770.c
sound/soc/codecs/tas2770.h