Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp277996imj; Thu, 7 Feb 2019 04:16:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IYkQmfgjU12n3ZqS3kRkgbu7YGx98JMQY15ASPmjQMhNJgI+uQn8Sco4SW313GMQespi1at X-Received: by 2002:a17:902:b701:: with SMTP id d1mr15395967pls.124.1549541793616; Thu, 07 Feb 2019 04:16:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549541793; cv=none; d=google.com; s=arc-20160816; b=SA+FqnBWT2rcDrbjffgg1dSe85eUg7Sv0T37Zufc5ILSUtG+Jxr+vO0UPGkSxOIufj nMQhMI2/a/vuGDvHF7RzLlS7Ygo4zXruM8S4kIyRmD6PQPzwhOLsZiFTcQ/XzXe5xy32 YXxamjN+98YruPL6U6oNH9lxIpqMDYvi5ScbIVp+QxsaBJ7ve/uiryOp01py4AAkMEmu oXAtnalafMalnzIHWY1sXwwuk1F0WXIXqflYkOC+VSc5i/y3MUpbXYUye0uvgv2hjXdg 5xjQ3SAmdTkc0mTzXFGeJBC9RGEf4sTWs3F9s+SUsnKPL8sfmT1lzlg/gusUoIZIeAmg rh6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=bf46GNpglyGMcK4ZqqZxL5F2J1YqMPKaCsn5qPkDrMQ=; b=SdGitrRTz524FIBuQ8iYYgGMMa3NqH4OyZAIaC657nAbIBEqw/TLYE7k/waNuBQKsh /KMGV7N25kO2/vP/NIp1NwdBJJ/RMvI1kQXQ1ESsDF7f6PXd2Hy7S1foiOS7YNytA/Fg I2kp8wgcz89bEl3aWLcwcv/sURa7gjOohz6Yk0QQ+hIUKTnd3oxF3DNawKuUopxtsOmf NcGVhy8VSYc6dWTF60DSfJtxDsvf1ZoRa9qK1Lew1dM1fZIk3u8YB3WYKf7usA30kiVo zBlPqcIoIMZmSFg7sn6T+jk6ajDxk2GwkD9cU/qxbP93bDgOx3wqPA6ZA9K3+XluuOTg uWIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=SewiX49B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si8965774pgn.502.2019.02.07.04.16.17; Thu, 07 Feb 2019 04:16:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=SewiX49B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfBGMQI (ORCPT + 99 others); Thu, 7 Feb 2019 07:16:08 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:41106 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbfBGMQG (ORCPT ); Thu, 7 Feb 2019 07:16:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=bf46GNpglyGMcK4ZqqZxL5F2J1YqMPKaCsn5qPkDrMQ=; b=SewiX49BiS8L cG6umJLQbWNhx6FpXxkqKbb8H3BIeHS8zxf4KSi8LPZw7QFAZLWA5BuaiziJltWqP5RTrpAfo6Ie9 jJFS10QsJl+4VUtPyGaQUkGVG8CA2n+H+DgiekdybcATVUuT+FHe4zGdL28pgeipS8GMmi2PBHwYZ 6BNAE=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1griay-0004ul-RW; Thu, 07 Feb 2019 12:15:56 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 7FA641127EF9; Thu, 7 Feb 2019 12:15:56 +0000 (GMT) From: Mark Brown To: Danny Milosavljevic Cc: Mark Brown , 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, alsa-devel@alsa-project.org Subject: Applied "ASoC: sun4i-codec: Add Mic1 Boost Volume, Mic2 Boost Volume" to the asoc tree In-Reply-To: <20190130103945.26692-5-dannym@scratchpost.org> X-Patchwork-Hint: ignore Message-Id: <20190207121556.7FA641127EF9@debutante.sirena.org.uk> Date: Thu, 7 Feb 2019 12:15:56 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: sun4i-codec: Add Mic1 Boost Volume, Mic2 Boost Volume has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From b329c78eb0c80bf17e877edde6d42c0793f19024 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 30 Jan 2019 11:39:40 +0100 Subject: [PATCH] ASoC: sun4i-codec: Add Mic1 Boost Volume, Mic2 Boost Volume Add Mic1 Boost Volume and Mic2 Boost Volume for Allwinner A10 and for Allwinner A20. Those controls are in different registers per chip model, so put the Allwinner A10 controls and the Allwinner A20 controls into the newly split sun4i_codec_controls and sun7i_codec_controls, respectively. Signed-off-by: Danny Milosavljevic Reviewed-by: Chen-Yu Tsai Signed-off-by: Mark Brown --- sound/soc/sunxi/sun4i-codec.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 52453c46b409..9d509ede22c7 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -95,6 +95,8 @@ #define SUN4I_CODEC_ADC_ACTL_PREG1EN (29) #define SUN4I_CODEC_ADC_ACTL_PREG2EN (28) #define SUN4I_CODEC_ADC_ACTL_VMICEN (27) +#define SUN4I_CODEC_ADC_ACTL_PREG1 (25) +#define SUN4I_CODEC_ADC_ACTL_PREG2 (23) #define SUN4I_CODEC_ADC_ACTL_VADCG (20) #define SUN4I_CODEC_ADC_ACTL_ADCIS (17) #define SUN4I_CODEC_ADC_ACTL_PA_EN (4) @@ -111,6 +113,9 @@ /* Microphone controls (sun7i only) */ #define SUN7I_CODEC_AC_MIC_PHONE_CAL (0x3c) +#define SUN7I_CODEC_AC_MIC_PHONE_CAL_PREG1 (29) +#define SUN7I_CODEC_AC_MIC_PHONE_CAL_PREG2 (26) + /* * sun6i specific registers * @@ -676,6 +681,12 @@ static const struct snd_kcontrol_new sun4i_codec_pa_mute = static DECLARE_TLV_DB_SCALE(sun4i_codec_pa_volume_scale, -6300, 100, 1); static DECLARE_TLV_DB_SCALE(sun4i_codec_micin_loopback_gain_scale, -450, 150, 0); +static DECLARE_TLV_DB_RANGE(sun4i_codec_micin_preamp_gain_scale, + 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), + 1, 7, TLV_DB_SCALE_ITEM(3500, 300, 0)); +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 const struct snd_kcontrol_new sun4i_codec_controls[] = { SOC_SINGLE_TLV("Power Amplifier Volume", SUN4I_CODEC_DAC_ACTL, @@ -684,6 +695,12 @@ 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), + SOC_SINGLE_TLV("Mic1 Boost Volume", SUN4I_CODEC_ADC_ACTL, + SUN4I_CODEC_ADC_ACTL_PREG1, 3, 0, + sun4i_codec_micin_preamp_gain_scale), + SOC_SINGLE_TLV("Mic2 Boost Volume", SUN4I_CODEC_ADC_ACTL, + SUN4I_CODEC_ADC_ACTL_PREG2, 3, 0, + sun4i_codec_micin_preamp_gain_scale), }; static const struct snd_kcontrol_new sun7i_codec_controls[] = { @@ -693,6 +710,12 @@ static const struct snd_kcontrol_new sun7i_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), + SOC_SINGLE_TLV("Mic1 Boost Volume", SUN7I_CODEC_AC_MIC_PHONE_CAL, + SUN7I_CODEC_AC_MIC_PHONE_CAL_PREG1, 7, 0, + sun7i_codec_micin_preamp_gain_scale), + SOC_SINGLE_TLV("Mic2 Boost Volume", SUN7I_CODEC_AC_MIC_PHONE_CAL, + SUN7I_CODEC_AC_MIC_PHONE_CAL_PREG2, 7, 0, + sun7i_codec_micin_preamp_gain_scale), }; static const struct snd_kcontrol_new sun4i_codec_left_mixer_controls[] = { -- 2.20.1