alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Richard Leitner <dev@g0hl1n.net>
To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: eric@nelint.com, clemens.gruber@pqgruber.com, tiwai@suse.com,
	perex@perex.cz, broonie@kernel.org, lgirdwood@gmail.com,
	Richard Leitner <dev@g0hl1n.net>
Subject: [PATCH] ASoC: sgtl5000: add headphone and LINEOUT mute controls
Date: Tue, 30 Aug 2016 22:25:01 +0200	[thread overview]
Message-ID: <20160830202501.19323-1-dev@g0hl1n.net> (raw)

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>
---
 sound/soc/codecs/sgtl5000.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 527b759..a6af65d 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -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, 0),
 	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, 0),
 };
 
 /* mute the codec used by alsa core */
-- 
2.9.3

             reply	other threads:[~2016-08-30 20:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30 20:25 Richard Leitner [this message]
2016-08-31  7:26 ` [PATCH v2] ASoC: sgtl5000: add headphone and LINEOUT mute controls Richard Leitner
2016-09-09  7:46   ` Richard Leitner
2016-09-09 10:17     ` Mark Brown
2016-10-10 12:52       ` Richard Leitner
2016-10-10 14:24         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160830202501.19323-1-dev@g0hl1n.net \
    --to=dev@g0hl1n.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=clemens.gruber@pqgruber.com \
    --cc=eric@nelint.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).