From patchwork Fri Dec 23 09:21:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 9487331 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 17B31601C0 for ; Fri, 23 Dec 2016 10:24:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 088FB27C05 for ; Fri, 23 Dec 2016 10:24:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0EB127CFC; Fri, 23 Dec 2016 10:24:17 +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 3922C27C05 for ; Fri, 23 Dec 2016 10:24:16 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4FCC7267149; Fri, 23 Dec 2016 11:24:15 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 76CE7267131; Fri, 23 Dec 2016 11:21:56 +0100 (CET) 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 E2CF62670F0; Fri, 23 Dec 2016 10:21:13 +0100 (CET) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by alsa0.perex.cz (Postfix) with ESMTP id 149C0266949 for ; Fri, 23 Dec 2016 10:21:11 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id uBN9LAnf021241; Fri, 23 Dec 2016 03:21:10 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id uBN9LA3A001811; Fri, 23 Dec 2016 03:21:10 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Fri, 23 Dec 2016 03:21:09 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id uBN9L1Bu030259; Fri, 23 Dec 2016 03:21:08 -0600 From: Peter Ujfalusi To: Mark Brown , Liam Girdwood Date: Fri, 23 Dec 2016 11:21:12 +0200 Message-ID: <20161223092112.7992-4-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161223092112.7992-1-peter.ujfalusi@ti.com> References: <20161223092112.7992-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, jarkko.nikula@bitmer.com, jsarha@ti.com Subject: [alsa-devel] [PATCH 3/3] ASoC: tlv320aic3x: Add controls for selecting HP power down modes 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP When the HP drivers are powered down, their output can be placed in high-impedance state or it can be weakly driven to the VCM level. High-impedance mode provides better power saving in the expense of pop noise when powering up the HP. When the output is driven to VCM level the artifacts can be minimized, but the power down power consumption will be slightly higher. The patch adds way to select the HPL/R power-down mode. Signed-off-by: Peter Ujfalusi --- sound/soc/codecs/tlv320aic3x.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index bc220f83dd1f..3e66dedeafac 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -305,6 +305,13 @@ static const char * const aic3x_rampup_step[] = { "0ms", "1ms", "2ms", "4ms" }; static SOC_ENUM_SINGLE_DECL(aic3x_rampup_step_enum, HPOUT_POP_REDUCTION, 2, aic3x_rampup_step); +static const char * const aic3x_output_pdown_mode[] = { + "Drive to a common-mode", "High-impedance mode"}; +static SOC_ENUM_SINGLE_DECL(aic3x_hpl_pdown_mode_enum, HPLOUT_CTRL, 2, + aic3x_output_pdown_mode); +static SOC_ENUM_SINGLE_DECL(aic3x_hpr_pdown_mode_enum, HPROUT_CTRL, 2, + aic3x_output_pdown_mode); + /* * DAC digital volumes. From -63.5 to 0 dB in 0.5 dB steps */ @@ -392,6 +399,9 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = { SOC_DOUBLE_R("HPCOM Playback Switch", HPLCOM_CTRL, HPRCOM_CTRL, 3, 0x01, 0), + SOC_ENUM("Left HP Power Down mode", aic3x_hpl_pdown_mode_enum), + SOC_ENUM("Right HP Power Down mode", aic3x_hpr_pdown_mode_enum), + /* * Note: enable Automatic input Gain Controller with care. It can * adjust PGA to max value when ADC is on and will never go back.