From patchwork Wed Feb 11 14:49:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 5812881 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 44310BF440 for ; Wed, 11 Feb 2015 14:52:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A43B20225 for ; Wed, 11 Feb 2015 14:52:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id CF2B0200C6 for ; Wed, 11 Feb 2015 14:52:16 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id CBE9C264F4B; Wed, 11 Feb 2015 15:52:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 2D3B4265057; Wed, 11 Feb 2015 15:51:35 +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 AF99626507F; Wed, 11 Feb 2015 15:51:34 +0100 (CET) Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by alsa0.perex.cz (Postfix) with ESMTP id 80B672605D0 for ; Wed, 11 Feb 2015 15:51:05 +0100 (CET) Received: by mail-we0-f176.google.com with SMTP id x3so3927647wes.7 for ; Wed, 11 Feb 2015 06:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=jjOjvh5VEcaqxgUqAVGrrG47yUMDFC/BsjXtKsppQcw=; b=eEspLm993RbT5kxCylNNZGt5pnePfh8xryTnvDCfIk8pauB+F23YJxzBaEJTSE5QUP iFZBrTL9pGjhx4Bu+ju/aa2Z1fWPjtHH09tIGGXMTR3Md8yueTy9uCmMeYAcIqdZjNSV 4cCjbJQnZEvww7bEVJEW1cM5KQfbsAFPj4GD/I8L3EzJEWxgo3uq8V3K5fjdStHne2Sw CpfBKwN+3jYZX4bCv+vODeMF+EIqeSuDgQ1FTICqKRqLCa4jAwksY8HxwsIcvQSOO5VA 1imPIkGc3oZoxZvfcujgQWwZITrIXtQTDrav4/YWY/v1uvNBiQ1pD5SjGx1OyJufZ32e C3Lw== X-Received: by 10.194.158.234 with SMTP id wx10mr64848707wjb.23.1423666265153; Wed, 11 Feb 2015 06:51:05 -0800 (PST) Received: from cizrna.lan (37-48-32-149.tmcz.cz. [37.48.32.149]) by mx.google.com with ESMTPSA id ch6sm1614075wjc.3.2015.02.11.06.51.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 06:51:04 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Date: Wed, 11 Feb 2015 15:49:53 +0100 Message-Id: <1423666200-32365-3-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1423666200-32365-1-git-send-email-tomeu.vizoso@collabora.com> References: <1423666200-32365-1-git-send-email-tomeu.vizoso@collabora.com> Cc: Mark Rutland , Alexandre Courbot , alsa-devel@alsa-project.org, Lars-Peter Clausen , Tomeu Vizoso , Pawel Moll , Ian Campbell , Takashi Iwai , Mark Brown , Stephen Warren , Liam Girdwood , devicetree@vger.kernel.org, Rob Herring , Thierry Reding , Wolfram Sang , Kumar Gala , linux-tegra@vger.kernel.org, Dylan Reid , Javier Martinez Canillas Subject: [alsa-devel] [PATCH 2/3] ASoC: tegra: Add sink for the internal mic to tegra_max98090 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 Also adds a control for the pin of the internal mic, so userspace can apply policy when the state of the external mic jack changes. Signed-off-by: Tomeu Vizoso --- Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt | 1 + sound/soc/tegra/tegra_max98090.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt index c949abc..c3495be 100644 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max98090.txt @@ -18,6 +18,7 @@ Required properties: * Headphones * Speakers * Mic Jack + * Int Mic - nvidia,i2s-controller : The phandle of the Tegra I2S controller that's connected to the CODEC. diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index 8df71a4..29ea87c 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -133,11 +133,13 @@ static const struct snd_soc_dapm_widget tegra_max98090_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_SPK("Speakers", NULL), SND_SOC_DAPM_MIC("Mic Jack", NULL), + SND_SOC_DAPM_MIC("Int Mic", NULL), }; static const struct snd_kcontrol_new tegra_max98090_controls[] = { SOC_DAPM_PIN_SWITCH("Headphones"), SOC_DAPM_PIN_SWITCH("Speakers"), + SOC_DAPM_PIN_SWITCH("Int Mic"), }; static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)