ASoC: sgtl5000: add headphone and LINEOUT mute controls
authorRichard Leitner <dev@g0hl1n.net>
Wed, 31 Aug 2016 07:26:31 +0000 (09:26 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 1 Sep 2016 19:52:53 +0000 (20:52 +0100)
These controls mute/unmute the LINEOUT and headphone outputs of SGTL5000
using its CHIP_ANA_CTRL register.

Signed-off-by: Richard Leitner <dev@g0hl1n.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/sgtl5000.c

index 527b759c1562dab6229f1d4c345d1ac21530c62b..0187851c0f68132162e781f7b1d9a76f2bfd6ac3 100644 (file)
@@ -411,6 +411,8 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
                        0, 8,
                        0x7f, 1,
                        headphone_volume),
+       SOC_SINGLE("Headphone Playback Switch", SGTL5000_CHIP_ANA_CTRL,
+                       4, 1, 1),
        SOC_SINGLE("Headphone Playback ZC Switch", SGTL5000_CHIP_ANA_CTRL,
                        5, 1, 0),
 
@@ -423,6 +425,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
                        SGTL5000_LINE_OUT_VOL_RIGHT_SHIFT,
                        0x1f, 1,
                        lineout_volume),
+       SOC_SINGLE("Lineout Playback Switch", SGTL5000_CHIP_ANA_CTRL, 8, 1, 1),
 };
 
 /* mute the codec used by alsa core */