From patchwork Sat Jun 24 06:24:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 9807673 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 7833660329 for ; Sat, 24 Jun 2017 06:29:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68EC124B44 for ; Sat, 24 Jun 2017 06:29:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D7B5287CA; Sat, 24 Jun 2017 06:29:32 +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 BEECA24B44 for ; Sat, 24 Jun 2017 06:29:31 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D6763267575; Sat, 24 Jun 2017 08:26:30 +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 1DDD5267576; Sat, 24 Jun 2017 08:26:29 +0200 (CEST) Received: from dd1012.kasserver.com (dd1012.kasserver.com [85.13.128.8]) by alsa0.perex.cz (Postfix) with ESMTP id 2112B267558 for ; Sat, 24 Jun 2017 08:26:23 +0200 (CEST) Received: from dayas.3.home (178.113.184.233.wireless.dyn.drei.com [178.113.184.233]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 8F7CB1CA104F; Sat, 24 Jun 2017 08:26:22 +0200 (CEST) From: Danny Milosavljevic To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Ripard , Chen-Yu Tsai , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Date: Sat, 24 Jun 2017 08:24:19 +0200 Message-Id: <20170624062419.23778-15-dannym@scratchpost.org> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170624062419.23778-1-dannym@scratchpost.org> References: <20170624062419.23778-1-dannym@scratchpost.org> Cc: Danny Milosavljevic Subject: [alsa-devel] [PATCH v13 14/14] ASoC: sun4i-codec: Add Capture Volume. 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 Add Capture Volume for Allwinner A10 and Allwinner A20. Signed-off-by: Danny Milosavljevic --- sound/soc/sunxi/sun4i-codec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 65a4685..a596249 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -675,6 +675,7 @@ static DECLARE_TLV_DB_RANGE(sun4i_codec_micin_preamp_gain_scale, static DECLARE_TLV_DB_RANGE(sun7i_codec_micin_preamp_gain_scale, 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), 1, 7, TLV_DB_SCALE_ITEM(2400, 300, 0)); +static DECLARE_TLV_DB_SCALE(sun4i_codec_adc_gain_scale, -450, 150, 0); static const char * const sun4i_codec_capture_source[] = { "Line", @@ -725,6 +726,10 @@ static const struct snd_kcontrol_new sun4i_codec_controls[] = { SOC_SINGLE_TLV("Mic Playback Volume", SUN4I_CODEC_DAC_ACTL, SUN4I_CODEC_DAC_ACTL_MICG, 7, 0, sun4i_codec_micin_loopback_gain_scale), + /* ADC */ + SOC_SINGLE_TLV("Capture Volume", SUN4I_CODEC_ADC_ACTL, + SUN4I_CODEC_ADC_ACTL_VADCG, 4, 0, + sun4i_codec_adc_gain_scale), }; static const struct snd_kcontrol_new sun4i_codec_extra_controls[] = {