From patchwork Tue Nov 3 04:37:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Zhang X-Patchwork-Id: 7539721 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D281FBEEA4 for ; Tue, 3 Nov 2015 04:37:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 103B2206E6 for ; Tue, 3 Nov 2015 04:37:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 572BA2070E for ; Tue, 3 Nov 2015 04:37:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B6299265062; Tue, 3 Nov 2015 05:37:53 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D2D18264F3F; Tue, 3 Nov 2015 05:37:45 +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 0952B264F50; Tue, 3 Nov 2015 05:37:43 +0100 (CET) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by alsa0.perex.cz (Postfix) with ESMTP id C3B03264F37 for ; Tue, 3 Nov 2015 05:37:38 +0100 (CET) Received: by pacfv9 with SMTP id fv9so7273322pac.3 for ; Mon, 02 Nov 2015 20:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=olcgQ7BpJdghMaD4UvaZTG4u/6wZXK297a8RS85SY9Y=; b=fcxCpFHAH/Vbv2VmvLYsvB7JMU7vddDYoyh4Yyo3NjrmCrw6pHTTt9AdHNvZEYD7+J wqAgRrv8tskSde9u7ogFFu7IRH0bJu+CiFbA2cn23aPAjTJ1GG4Yz4LA3X+tZEofxK0o ov79WmqutiNzQv4rgc20oR+SuH3LIf+cp+gsg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=olcgQ7BpJdghMaD4UvaZTG4u/6wZXK297a8RS85SY9Y=; b=JThJAaMrStjSx367LpYnQkfPtYcDbdR+kV/1bEXHJMSYOUoRsXn9EFVVl+QhTXPHIv H2zVeA8ifrSMuPVNV6hzASaGqmsKCAP5LdIO7fozB4bSuXGeiEdibOzY3yyI7CCw2+1F 2EBx61xIxG88LtpX+Bv2Z9AGt9mlzh4T119jLGZt+C2aOBjFWIv1jMnfzt1cWpff2BKB JkxLQ5dLpF32y58U6CIX1dRAKFyRcIiKK4JFYtXMhxnvbIzFmbpP5gNEGz//nBR8lknA RdzrJy8lVfN3/ZGmku6BBalh6bTDHnyguiT5ioQQjKPQ5SNCYeNC8UDqu9D7GMuF/o8F rqpg== X-Gm-Message-State: ALoCoQkfRv95sqVz7do6FA1ZkRYcVnleiTjJCIzUJojrG1H31JYlbHXBTA9VKEJ6WziLIvfADbwO X-Received: by 10.68.109.34 with SMTP id hp2mr31748076pbb.9.1446525457225; Mon, 02 Nov 2015 20:37:37 -0800 (PST) Received: from benzh.mtv.corp.google.com ([172.22.65.67]) by smtp.gmail.com with ESMTPSA id rc5sm26841850pbc.95.2015.11.02.20.37.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Nov 2015 20:37:36 -0800 (PST) From: Ben Zhang To: Mark Brown Date: Mon, 2 Nov 2015 20:37:14 -0800 Message-Id: <1446525434-17922-1-git-send-email-benzh@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 Cc: Oder Chiou , alsa-devel@alsa-project.org, Liam Girdwood , John Lin , Ben Zhang , Bard Liao , Dylan Reid Subject: [alsa-devel] [PATCH] ASoC: rt5645: Add Mono ADC Boost Gain control 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 "Mono ADC Boost Gain" (MX-20h) is a coarse capture volume control with a step of 12dB on the Mono audio path. It is similar to the "STO1 ADC Boost Gain" control on the Stereo1 audio path. Signed-off-by: Ben Zhang --- sound/soc/codecs/rt5645.c | 3 +++ sound/soc/codecs/rt5645.h | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index f046bb8..f8c5e82 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -625,6 +625,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = { SOC_DOUBLE_TLV("STO2 ADC Boost Gain", RT5645_ADC_BST_VOL1, RT5645_STO2_ADC_L_BST_SFT, RT5645_STO2_ADC_R_BST_SFT, 3, 0, adc_bst_tlv), + SOC_DOUBLE_TLV("Mono ADC Boost Gain", RT5645_ADC_BST_VOL2, + RT5645_MONO_ADC_L_BST_SFT, RT5645_MONO_ADC_R_BST_SFT, 3, 0, + adc_bst_tlv), /* I2S2 function select */ SOC_SINGLE("I2S2 Func Switch", RT5645_GPIO_CTRL1, RT5645_I2S2_SEL_SFT, diff --git a/sound/soc/codecs/rt5645.h b/sound/soc/codecs/rt5645.h index 7cea282..9ddba59 100644 --- a/sound/soc/codecs/rt5645.h +++ b/sound/soc/codecs/rt5645.h @@ -322,6 +322,14 @@ #define RT5645_STO2_ADC_COMP_MASK (0x3 << 4) #define RT5645_STO2_ADC_COMP_SFT 4 +/* Mono ADC Boost Volume Control (0x20) */ +#define RT5645_MONO_ADC_L_BST_MASK (0x3 << 14) +#define RT5645_MONO_ADC_L_BST_SFT 14 +#define RT5645_MONO_ADC_R_BST_MASK (0x3 << 12) +#define RT5645_MONO_ADC_R_BST_SFT 12 +#define RT5645_MONO_ADC_COMP_MASK (0x3 << 10) +#define RT5645_MONO_ADC_COMP_SFT 10 + /* Stereo2 ADC Mixer Control (0x26) */ #define RT5645_STO2_ADC_SRC_MASK (0x1 << 15) #define RT5645_STO2_ADC_SRC_SFT 15