From patchwork Thu Feb 12 08:41:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 439118 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E27A7140079 for ; Thu, 12 Feb 2015 19:43:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755339AbbBLImi (ORCPT ); Thu, 12 Feb 2015 03:42:38 -0500 Received: from mail-we0-f171.google.com ([74.125.82.171]:35721 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753026AbbBLImg (ORCPT ); Thu, 12 Feb 2015 03:42:36 -0500 Received: by mail-we0-f171.google.com with SMTP id p10so8538843wes.2; Thu, 12 Feb 2015 00:42:34 -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=S3CTHXNs+XMiM/Xhg89ov+XDvAohE4SCru5Lm2SCTbs=; b=UD/fOOg+UfZAyByNgG6RdIPrhZmWpCaT/Ygs0wZw4TllKQUo5VqDgR+V6aXJoTQKZm qNal7tDyQFXzcAg0cDdGOy6OQOyRE9Ox7BbvI18Hc1WihU4m2jCmP99wGjcLlQ8PqFhT pbd2UsqL1KIl4oWj6SPhqmAGG2ZDhMlzEEcresT3x5eKiXBrwBnRkoSMOxN/3pLcoVdM znqKP0CxqDwdVIbMk5vgEZkbA75wqgAWIDHCYy83sDV+D/FHknc+YlfYTJS8Q2weD/Sp Jj2LvCeRNCz6/dsMmTkDcXDK1jpv4GlPb3T1Kx9NGkLkdDh/tQKDy69EzjpksvsO3fGE 5Wuw== X-Received: by 10.180.109.193 with SMTP id hu1mr3880158wib.25.1423730554593; Thu, 12 Feb 2015 00:42:34 -0800 (PST) Received: from cizrna.lan (37-48-47-45.tmcz.cz. [37.48.47.45]) by mx.google.com with ESMTPSA id jg3sm1580612wid.0.2015.02.12.00.42.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 00:42:33 -0800 (PST) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , Tomeu Vizoso , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Stephen Warren , Thierry Reding , Alexandre Courbot , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Dylan Reid , Lars-Peter Clausen , Wolfram Sang , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH v2 2/3] ASoC: tegra: Add sink for the internal mic to tegra_max98090 Date: Thu, 12 Feb 2015 09:41:56 +0100 Message-Id: <1423730523-26266-3-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1423730523-26266-1-git-send-email-tomeu.vizoso@collabora.com> References: <1423730523-26266-1-git-send-email-tomeu.vizoso@collabora.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Acked-by: Stephen Warren --- 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)