Received: by 10.192.165.148 with SMTP id m20csp1108613imm; Wed, 2 May 2018 14:19:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoJkzUIZ08d3Xld45nPDKv2YJeyoxea/upzjJrV1RjM4QmDXyLHd/biHctHgwe0Y+IbsWQL X-Received: by 2002:a65:534a:: with SMTP id w10-v6mr17259528pgr.76.1525295987866; Wed, 02 May 2018 14:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525295987; cv=none; d=google.com; s=arc-20160816; b=oGOCqLrwL4gk7rKVwMeVCgpfWM9JwZD7aGWeQWcq08z7m7M3b22AazDiyblBxDlK+x 2WCWJvC30V38QyTNhk+hZC4Zaopuq9U6DSToa4IFTOKolo7H/xBPB7ooKKfUktQBEYgO 4sssBzCsfVk3M0UOzNDF6sS6KlziEt6V+He8CC4Y7+NG6KUb/iwLJ7OiAqKfQ/fgAOr2 jPsWi7OuYJ/8MpY1kn/kngzNueHuwvYK4ZuOWbiOz+REwlFG+uRiyiCL7SxqG0aNvLEL RNyU2bJ1/HnLeXQ7ecSUzNqpDvlFqGBwkqgzXVOnWLnkUhoZ2k/lGNphqKVeOSoN5ITa 57NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:tags:references:in-reply-to:message-id :date:subject:to:from:arc-authentication-results; bh=Yc1Mlkdcp+SPt52pQpXVger+VgjHcbx1fsD6IY/e/V4=; b=1HJ64cBvXk4L/yRfb4dCTj4waa9w7dVyikV/phoaZOY4BnQW4Hn/7ajctLnudtT/69 ugTbtM5cXqSlrlbRPk/YqiENRag3e5ZyCOlueGgO6Uc+ZxEq179AHbohx+xrmfJDh29S q8h49frOT3YUTToqbnU7h57LYV7mKBpAbNRgPLc8pXeXqmDZ1eXgm2xcUKvZ/JgEcu/F 0gY9KO6gW+PrNTbfmqXnHmgLV3IPnOBXNxz0bwz6EWOso15Pz5gR79m7upahJLVBSVcz Bl1ao6xPz4sKHGA5aIjCLaBFqeZDPjEkk7cmW+8UuWu+UxSZzpdSMz5fNECmUzespY7s z2Kg== 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 j6si12290905pfc.351.2018.05.02.14.19.33; Wed, 02 May 2018 14:19:47 -0700 (PDT) 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 S1751829AbeEBVSF (ORCPT + 99 others); Wed, 2 May 2018 17:18:05 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:42616 "EHLO dd26836.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbeEBVR4 (ORCPT ); Wed, 2 May 2018 17:17:56 -0400 Received: from dayas.3.home (77.118.143.54.wireless.dyn.drei.com [77.118.143.54]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 584593367C39; Wed, 2 May 2018 23:08:26 +0200 (CEST) From: Danny Milosavljevic To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Maxime Ripard , Chen-Yu Tsai , Danny Milosavljevic , Andrea Bondavalli , Fabio Estevam , Icenowy Zheng , Philipp Zabel , Kuninori Morimoto , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH v14 4/8] ASoC: sun4i-codec: Add Mic1 Playback Switch, Mic2 Playback Switch Date: Wed, 2 May 2018 23:07:56 +0200 Message-Id: <20180502210800.1971-5-dannym@scratchpost.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180502210800.1971-1-dannym@scratchpost.org> References: <20180502210800.1971-1-dannym@scratchpost.org> Tags: patch 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 b62af407967f..0add2c44115c 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) @@ -725,6 +729,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[] = { @@ -807,10 +817,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" },