From patchwork Fri May 22 22:09:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Reid X-Patchwork-Id: 6469121 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 537AA9F1CC for ; Fri, 22 May 2015 22:12:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A0FB2052D for ; Fri, 22 May 2015 22:12:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 52E9220528 for ; Fri, 22 May 2015 22:12:16 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3E7FC26071B; Sat, 23 May 2015 00:12:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9353726043C; Sat, 23 May 2015 00:11:09 +0200 (CEST) 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 D1CD6260563; Sat, 23 May 2015 00:11:08 +0200 (CEST) Received: from mail-ob0-f201.google.com (mail-ob0-f201.google.com [209.85.214.201]) by alsa0.perex.cz (Postfix) with ESMTP id 9FC0C2604A4 for ; Sat, 23 May 2015 00:10:56 +0200 (CEST) Received: by obcwm4 with SMTP id wm4so1840822obc.0 for ; Fri, 22 May 2015 15:10:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wRzauloyfUVJah82RM34btMX2GcalO4w3P+7Jw2U0lk=; b=Tco3WNUby2FoD2F98V/kkTZ5KCHZsJssvhqUqor9m1B86m3WI/0vGJ78OCnE9K0OtD fwWuXXY+yPHSzBozLrtWybnIQbfNDYLsadn9i+Ere9YDsX1ebXkG1rPaPSaiU5wYO+g8 1ok4BMexWWnK5hQe39WaEc5xg0wH7a8M2e1lmnKPCvhIyTyGVjC5nY+GBTsMnFfNkABD lHwXEYz4uFlAS82xMCl+J+/B9XZ6gD/5VwMMA6yveb0NIMnGu53iGx91NFZ5RVAw18BN 799QdCiI4UdTADz71gkEErZ7xIA6JmDTJ3i/z1ZOAeEvaVy0qWLSTDR+vIqGR5KiPQoX xV5A== X-Gm-Message-State: ALoCoQkWlIfY9ZSDO9WtaRQfO2KXFmlM50GsypX+i3rCe3sl53Q1KmTH65H5Xtc+tnGvy7jDFrZ7mUrQtQv8Igs5v/THEBxIcwDuqAEFzejU+JJy3tpUG2ZLCBcuophIfxdPm8Tw2eluIKG65665r+mW1itCxRnhnWCGL85JogfRF2Bmfcf9tNAwolYCA64kfTOgPJ71Zgdm X-Received: by 10.50.43.231 with SMTP id z7mr7684478igl.7.1432332655477; Fri, 22 May 2015 15:10:55 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id f100si176020yhp.7.2015.05.22.15.10.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 15:10:55 -0700 (PDT) Received: from hojo20.mtv.corp.google.com ([172.22.65.103]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id qxt687Uj.1; Fri, 22 May 2015 15:10:55 -0700 Received: by hojo20.mtv.corp.google.com (Postfix, from userid 123195) id AA7C31C3BFA; Fri, 22 May 2015 15:10:53 -0700 (PDT) From: Dylan Reid To: alsa-devel@alsa-project.org Date: Fri, 22 May 2015 15:09:23 -0700 Message-Id: <1432332563-15447-6-git-send-email-dgreid@chromium.org> X-Mailer: git-send-email 2.2.1.62.g3f15098 In-Reply-To: <1432332563-15447-1-git-send-email-dgreid@chromium.org> References: <1432332563-15447-1-git-send-email-dgreid@chromium.org> Cc: lars@metafoo.de, zhengxing@rock-chips.com, tiwai@suse.de, lgirdwood@gmail.com, broonie@kernel.org, Dylan Reid Subject: [alsa-devel] [RFC 5/5] ARM: tegra: nyan: specify gpio-audio-jack device 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 Model the audio jack as a headset jack using the new gpio-audio-jack device. Signed-off-by: Dylan Reid --- arch/arm/boot/dts/tegra124-nyan.dtsi | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi index a9aec23..ec33110 100644 --- a/arch/arm/boot/dts/tegra124-nyan.dtsi +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi @@ -1,4 +1,5 @@ #include +#include #include "tegra124.dtsi" / { @@ -661,6 +662,23 @@ }; }; + audio_jack: gpio-audio-jack { + compatible = "gpio-audio-jack"; + gpio-audio-jack,jack-name = "Headset Jack"; + gpio-audio-jack,sw-det-gpios = + <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>, + <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_LOW>; + gpio-audio-jack,gpio-names = + "Headphones", + "Mic Jack"; + gpio-audio-jack,report-masks = + , + ; + gpio-audio-jack,debounce-times = + <150>, + <150>; + }; + sound { nvidia,audio-routing = "Headphones", "HPR", @@ -674,15 +692,13 @@ nvidia,i2s-controller = <&tegra_i2s1>; nvidia,audio-codec = <&acodec>; + nvidia,headset-dev = <&audio_jack>; clocks = <&tegra_car TEGRA124_CLK_PLL_A>, <&tegra_car TEGRA124_CLK_PLL_A_OUT0>, <&tegra_car TEGRA124_CLK_EXTERN1>; clock-names = "pll_a", "pll_a_out0", "mclk"; - nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>; - nvidia,mic-det-gpios = - <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>; }; gpio-restart {