From patchwork Tue Aug 30 20:25:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Leitner X-Patchwork-Id: 9306323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95C84607D2 for ; Wed, 31 Aug 2016 06:02:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D91028D83 for ; Wed, 31 Aug 2016 06:02:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 700C628E26; Wed, 31 Aug 2016 06:02:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFA9928E1F for ; Wed, 31 Aug 2016 06:02:35 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 733AF266B4F; Wed, 31 Aug 2016 08:02:33 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 45CCC266B4F; Wed, 31 Aug 2016 08:02:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id E596726711B; Tue, 30 Aug 2016 23:31:49 +0200 (CEST) Received: from relay01.alfahosting-server.de (relay01.alfahosting-server.de [109.237.142.236]) by alsa0.perex.cz (Postfix) with ESMTP id 74E7B265E0C for ; Tue, 30 Aug 2016 22:25:31 +0200 (CEST) Received: by relay01.alfahosting-server.de (Postfix, from userid 1001) id 1A90532C1A2D; Tue, 30 Aug 2016 22:25:31 +0200 (CEST) Received: from alfa3028.alfahosting-server.de (alfa3028.alfahosting-server.de [109.237.138.38]) by relay01.alfahosting-server.de (Postfix) with ESMTPS id 160BF32C1A4E; Tue, 30 Aug 2016 22:25:29 +0200 (CEST) Received: from brokenbit.home (91-115-80-231.adsl.highway.telekom.at [91.115.80.231]) (Authenticated sender: yes) by alfa3028.alfahosting-server.de (Postfix) with ESMTPSA id 9B3A13BE0001; Tue, 30 Aug 2016 22:25:27 +0200 (CEST) From: Richard Leitner To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Date: Tue, 30 Aug 2016 22:25:01 +0200 Message-Id: <20160830202501.19323-1-dev@g0hl1n.net> X-Mailer: git-send-email 2.9.3 X-Mailman-Approved-At: Wed, 31 Aug 2016 08:02:21 +0200 Cc: clemens.gruber@pqgruber.com, eric@nelint.com, lgirdwood@gmail.com, tiwai@suse.com, broonie@kernel.org, Richard Leitner Subject: [alsa-devel] [PATCH] ASoC: sgtl5000: add headphone and LINEOUT mute controls X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP These controls mute/unmute the LINEOUT and headphone outputs of SGTL5000 using its CHIP_ANA_CTRL register. Signed-off-by: Richard Leitner --- 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 */