Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5965579imu; Wed, 30 Jan 2019 06:37:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN4cPOQFWichSvood56x7urSnsnirc3bmwdJoX6TBrkWV1ew6oM5KrXdm5BnKGI20bKZ8yWd X-Received: by 2002:a17:902:2969:: with SMTP id g96mr30439223plb.295.1548859021207; Wed, 30 Jan 2019 06:37:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548859021; cv=none; d=google.com; s=arc-20160816; b=czTWnkVchn9s/FPxW5IVLBDkM6PPJteyC8MLg2a0qH/jQb0sDhxHo3jQGGnGLg1Q1a WjnWNN/1HUrWD24wvMAaNRm255Zq4VMR3Rwm6CRpRl4LbzLFr2pkNpNKQcsuYizn8Fl4 afli/alPMV5ZV6Wqp+VtiXmTgmYtUvQz/w7jbq4+Lz0miD3C/BbxdLrfb28wTpoWHUKT fHIxYbju3Y8kV1euWLHiSI+SoKufuyzfHPeuMPBsgSczPVGrIQEKABjLfminXo9sMiRw GQ0B5jbrzBRDYyZLStqqg9oa2/wLzZrN+aVaPmBmZ/Jnl4eT9tK/ea9cDpRVSvGFhgzW UNgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:tags :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=DeNmoOahu5HXSPHqy258DAUrgZltxE05xPZM+4JbwUE=; b=F/4RLd2DK6jq0oS2dh3ikmu5I7Yb5rq7tg9r5ot/waI3kx5fdeKaeJyBcMMHQDEXfY xLYZ7bJC8uXNeezcRxHzRwVOlgj6fhmhKB23MOZCD7DlnOWKSsouaaRMDHa4oExqoerS ET5tu1QO+5qtEY4SoOAaRPpdcTHPzC79gKzWBB9nP6s/g14rKQd560mDfhHzBaCJluOo 9IKbWjh3j3EO8cbif+MM6H01nLhjzBEKiTViq9hvigBEZxu09Ff5zejnAwZt87m/jgNN bfELaOq2e+wdwkEArCesAtLrFqzhECDgKfherx/ZvURR5q186eAJtOUHQYYP2DZzo4o1 QtcA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si1547842plt.406.2019.01.30.06.36.44; Wed, 30 Jan 2019 06:37:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731385AbfA3Of4 (ORCPT + 99 others); Wed, 30 Jan 2019 09:35:56 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:48986 "EHLO dd26836.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730905AbfA3Ofy (ORCPT ); Wed, 30 Jan 2019 09:35:54 -0500 Received: from dayas.3.home (77.116.173.211.wireless.dyn.drei.com [77.116.173.211]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 7C4EA3364BF6; Wed, 30 Jan 2019 15:26:12 +0100 (CET) From: Danny Milosavljevic To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Ripard , Chen-Yu Tsai , Danny Milosavljevic , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v15 6/8] ASoC: sun4i-codec: Add Mic1 Playback Switch, Mic2 Playback Switch Date: Wed, 30 Jan 2019 11:39:42 +0100 Message-Id: <20190130103945.26692-7-dannym@scratchpost.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190130103945.26692-1-dannym@scratchpost.org> References: <20190130103945.26692-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add Mic1 Playback Switch and Mic2 Playback Switch for Allwinner A10 and Allwinner A20. Signed-off-by: Danny Milosavljevic --- sound/soc/sunxi/sun4i-codec.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 279a7880d..87bb16e59 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -68,6 +68,10 @@ #define SUN4I_CODEC_DAC_ACTL_LDACLMIXS (15) #define SUN4I_CODEC_DAC_ACTL_RDACRMIXS (14) #define SUN4I_CODEC_DAC_ACTL_LDACRMIXS (13) +#define SUN4I_CODEC_DAC_ACTL_MIC1LS (12) +#define SUN4I_CODEC_DAC_ACTL_MIC1RS (11) +#define SUN4I_CODEC_DAC_ACTL_MIC2LS (10) +#define SUN4I_CODEC_DAC_ACTL_MIC2RS (9) #define SUN4I_CODEC_DAC_ACTL_DACPAS (8) #define SUN4I_CODEC_DAC_ACTL_MIXPAS (7) #define SUN4I_CODEC_DAC_ACTL_PA_MUTE (6) @@ -728,6 +732,12 @@ static const struct snd_kcontrol_new sun4i_codec_mixer_controls[] = { SOC_DAPM_SINGLE("Right Mixer Left DAC Playback Switch", SUN4I_CODEC_DAC_ACTL, SUN4I_CODEC_DAC_ACTL_LDACRMIXS, 1, 0), + SOC_DAPM_DOUBLE("Mic1 Playback Switch", SUN4I_CODEC_DAC_ACTL, + SUN4I_CODEC_DAC_ACTL_MIC1LS, + SUN4I_CODEC_DAC_ACTL_MIC1RS, 1, 0), + SOC_DAPM_DOUBLE("Mic2 Playback Switch", SUN4I_CODEC_DAC_ACTL, + SUN4I_CODEC_DAC_ACTL_MIC2LS, + SUN4I_CODEC_DAC_ACTL_MIC2RS, 1, 0), }; static const struct snd_kcontrol_new sun4i_codec_pa_mixer_controls[] = { @@ -810,10 +820,14 @@ static const struct snd_soc_dapm_route sun4i_codec_codec_dapm_routes[] = { { "Right Mixer", NULL, "Mixer Enable" }, { "Right Mixer", "Right Mixer Left DAC Playback Switch", "Left DAC" }, { "Right Mixer", "Right Mixer Right DAC Playback Switch", "Right DAC" }, + { "Right Mixer", "Mic1 Playback Switch", "MIC1 Pre-Amplifier" }, + { "Right Mixer", "Mic2 Playback Switch", "MIC2 Pre-Amplifier" }, /* Left Mixer Routes */ { "Left Mixer", NULL, "Mixer Enable" }, { "Left Mixer", "Left Mixer Left DAC Playback Switch", "Left DAC" }, + { "Left Mixer", "Mic1 Playback Switch", "MIC1 Pre-Amplifier" }, + { "Left Mixer", "Mic2 Playback Switch", "MIC2 Pre-Amplifier" }, /* Power Amplifier Routes */ { "Power Amplifier", "Mixer Playback Switch", "Left Mixer" },