From patchwork Fri Nov 9 04:24:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10675281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6645513B0 for ; Fri, 9 Nov 2018 04:24:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 547172DE49 for ; Fri, 9 Nov 2018 04:24:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4854D2DE59; Fri, 9 Nov 2018 04:24:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C8A92DE49 for ; Fri, 9 Nov 2018 04:24:48 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 39283267B0B; Fri, 9 Nov 2018 05:24:41 +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 E140E267B05; Fri, 9 Nov 2018 05:24:37 +0100 (CET) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by alsa0.perex.cz (Postfix) with ESMTP id 302FA267B05 for ; Fri, 9 Nov 2018 05:24:34 +0100 (CET) Received: by mail-pf1-f193.google.com with SMTP id v9-v6so346339pff.2 for ; Thu, 08 Nov 2018 20:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=nWShLaaMlEgOpO/eWbfUGsExi+ZoGFlzVp7knPLJTns=; b=ulYoL+IkcizWfl7vJEfO3/ut4eVxYJ07awIvXnZK31gE11Zjy5B8RvuicQPmg5Gt36 giSIGNPzqrKkzYKnHvQCWlxZPOlmSwoKMa56TszZ/tUbrGo3vVWgAWXpl7Q57lHP4/dc jY2hsW6tULsRc8fcjYL8iZBPnkOR5VaYLO+wOnQ2zHClu1Cu9FGeYnifkatQOWkbDO6P jazc4gpAstsBXqBrgFmTh5qG+/+Wx6GZTr1sfT99TpWaiF2zSBvYIOAelVUYiWZt4cid EuyNZrG9nfHUKSUZUx8IZyf83EPZKoI5qUQ1PssYxlAMsTR1EZhHUsXPWuPivbEaTC8M bdKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nWShLaaMlEgOpO/eWbfUGsExi+ZoGFlzVp7knPLJTns=; b=VdGCebm01767sUN7h+RY4AvfKuTv4/GTvYWkuodbwCEVwiqrEkb7l8aPMGyGNKgB59 2P6nxysPEhcQ98j86+4G3jnbmb/NUpxD2GMOVIg5RZGtWhPhJz37jR8gMYScRooexHev nxHEpOfz94qCcYfO4yTZWPu0e8TrQHSjkbNAU6FFMITilPfRT1eRTuycEyKhZLMMX/Q4 yoEWw3lMIPZCquLC9C3kR5+YFAduWFHJ8EqQOlJyDpFcRh7gEHADyPIy2AZutSxiWYol AIus7+yG19YyiYwLOBX522SzSQU229LR4zjneZLVQrLyaMpEMgN3ATVG3i3zZxxbG2k2 p/rw== X-Gm-Message-State: AGRZ1gI3C2a2MSrLWEmhKDie/YvCuDqgNjqDexz2PdpC6vDk2C92chUh HaZ2XDiBxEsVBQdYXcMvo6g= X-Google-Smtp-Source: AJdET5cZ1uflPmTyFwBb+T2MQMus9vTHq6GggZWXLkAuXwvCTO1IxxKsqzJUUORSDiAs/OiZBX/EIA== X-Received: by 2002:a62:ce8e:: with SMTP id y136-v6mr7467294pfg.201.1541737473866; Thu, 08 Nov 2018 20:24:33 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-193-140.dyn.novuscom.net. [216.71.193.140]) by smtp.gmail.com with ESMTPSA id f22-v6sm6018442pff.29.2018.11.08.20.24.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Nov 2018 20:24:33 -0800 (PST) From: Vasily Khoruzhick To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vasily Khoruzhick , Mylene JOSSERAND , Kuninori Morimoto , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org Date: Thu, 8 Nov 2018 20:24:19 -0800 Message-Id: <20181109042422.25653-2-anarsoul@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109042422.25653-1-anarsoul@gmail.com> References: <20181109042422.25653-1-anarsoul@gmail.com> MIME-Version: 1.0 Subject: [alsa-devel] [PATCH v7 1/4] ASoC: sun8i-codec: add missing route for ADC 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP sun8i-codec misses a route from ADC to AIF1 Slot 0 ADC. Add it to the driver to avoid adding it to every dts. Fixes: eda85d1fee05d ("ASoC: sun8i-codec: Add ADC support for a33") Signed-off-by: Vasily Khoruzhick --- sound/soc/sunxi/sun8i-codec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index c4196d4e5915..92c5de026c43 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -481,7 +481,11 @@ static const struct snd_soc_dapm_route sun8i_codec_dapm_routes[] = { { "Right Digital DAC Mixer", "AIF1 Slot 0 Digital DAC Playback Switch", "AIF1 Slot 0 Right"}, - /* ADC routes */ + /* ADC Routes */ + { "AIF1 Slot 0 Right ADC", NULL, "ADC" }, + { "AIF1 Slot 0 Left ADC", NULL, "ADC" }, + + /* ADC Mixer Routes */ { "Left Digital ADC Mixer", "AIF1 Data Digital ADC Capture Switch", "AIF1 Slot 0 Left ADC" }, { "Right Digital ADC Mixer", "AIF1 Data Digital ADC Capture Switch", From patchwork Fri Nov 9 04:24:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10675285 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 759F013BF for ; Fri, 9 Nov 2018 04:24:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 645F12DE49 for ; Fri, 9 Nov 2018 04:24:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58B8F2DE75; Fri, 9 Nov 2018 04:24:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 839D92DE49 for ; Fri, 9 Nov 2018 04:24:56 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AE8A8267AFE; Fri, 9 Nov 2018 05:24:43 +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 CB46F267B08; Fri, 9 Nov 2018 05:24:38 +0100 (CET) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by alsa0.perex.cz (Postfix) with ESMTP id 25E44267B07 for ; Fri, 9 Nov 2018 05:24:35 +0100 (CET) Received: by mail-pg1-f196.google.com with SMTP id f8-v6so307146pgq.5 for ; Thu, 08 Nov 2018 20:24:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TJVj0t1/lNAAl/JOt325TKbL+DY+y6viaeyeHZgGOEk=; b=tbw8n7lvU/YDSP+5S8FgjqXvuPX4bWm6eMjivJa87E6N2qtYL6dCrelHfBlILNLQ9k BN3eF7V3kdLdC3zN+/BZACy6QoiT6UvcKWBbYpmiuddTxl6smlMxUOOj0IylIbVnx+fc r0iilMa0PSa0s4ORuwp34Dxx0ku6WIcOwNUl6XKADnPGbZxraQIsHcTmuUaZUScU46DI NsayG2h/gEW0P8i1hNJqqjaZfMy8CWW8UpDtwX/R8RJ5zxjAscFjaemN1fo1qFV1e6rr priiGwDOfsHxJCL94iJkHgZS382nsjP5+xkUC7dil7cAY8hA1NQXsOidpvFDGXvpbcc2 QcRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TJVj0t1/lNAAl/JOt325TKbL+DY+y6viaeyeHZgGOEk=; b=pLLlXc5UpSqNrhPifEIjTHdXi45jVpPArG0s8haE4I3glwbIgNErjGewy4E1PHJaAa 21EbWOP0ZXmawhof/ZrYMUHUSmNoxHHIQ8FRGbNh3CAGeCPmmsuCXGzmCdN29ppNwsLx 907RPgu3FpKTgJ6psLVjwwNOCeFCokdDBFINSuR3Fa4ialHvFR8i10UIrqpUqIRtJ5iQ Kf5CjurVGC39C1HtrB3kkQHJ11JnOXq45zZdLnwictCuX+R0kzX9G5ws99uwWFBjot0S C+fqrJSDr9TzdA1R74YQGtWYatHtO2564x9hsPTVAGfhRjFHDX3Sj5/Ttht9oP+2xks+ vmDw== X-Gm-Message-State: AGRZ1gLMYD/m3gHH0A9lyrMrqxWNbBvpwTQEEvjrHhZpHvFXGJAY17O5 +x82+2/GBy7Gniv+Ol1ICcg= X-Google-Smtp-Source: AJdET5fPm01zSrfV/8U8Gb/22+3v906UNRsad5HsmV99e4Xo7KrHQQeDGWHF3DyxmXIoTouGEnoruQ== X-Received: by 2002:a62:43cd:: with SMTP id l74-v6mr7683948pfi.240.1541737474848; Thu, 08 Nov 2018 20:24:34 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-193-140.dyn.novuscom.net. [216.71.193.140]) by smtp.gmail.com with ESMTPSA id f22-v6sm6018442pff.29.2018.11.08.20.24.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Nov 2018 20:24:34 -0800 (PST) From: Vasily Khoruzhick To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vasily Khoruzhick , Mylene JOSSERAND , Kuninori Morimoto , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org Date: Thu, 8 Nov 2018 20:24:20 -0800 Message-Id: <20181109042422.25653-3-anarsoul@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109042422.25653-1-anarsoul@gmail.com> References: <20181109042422.25653-1-anarsoul@gmail.com> MIME-Version: 1.0 Subject: [alsa-devel] [PATCH v7 2/4] arm64: dts: allwinner: a64: add nodes necessary for analog sound support 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Add nodes for i2s, digital and analog parts of audiocodec on A64 Signed-off-by: Vasily Khoruzhick --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index f3a66f888205..5c52eb6148a6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -173,6 +173,30 @@ compatible = "linux,spdif-dit"; }; + sound: sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "sun50i-a64-audio"; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&cpudai>; + simple-audio-card,bitclock-master = <&cpudai>; + simple-audio-card,mclk-fs = <512>; + simple-audio-card,aux-devs = <&codec_analog>; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "AIF1 Slot 0 Left ADC", "Left ADC", + "AIF1 Slot 0 Right ADC", "Right ADC"; + status = "disabled"; + + cpudai: simple-audio-card,cpu { + sound-dai = <&dai>; + }; + + link_codec: simple-audio-card,codec { + sound-dai = <&codec>; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupts = ; + compatible = "allwinner,sun50i-a64-codec-i2s"; + reg = <0x01c22c00 0x200>; + interrupts = ; + clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>; + clock-names = "apb", "mod"; + resets = <&ccu RST_BUS_CODEC>; + reset-names = "rst"; + dmas = <&dma 15>, <&dma 15>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + codec: codec@1c22e00 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun8i-a33-codec"; + reg = <0x01c22e00 0x600>; + interrupts = ; + clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>; + clock-names = "bus", "mod"; + status = "disabled"; + }; + uart0: serial@1c28000 { compatible = "snps,dw-apb-uart"; reg = <0x01c28000 0x400>; @@ -902,6 +950,12 @@ #reset-cells = <1>; }; + codec_analog: codec-analog@1f015c0 { + compatible = "allwinner,sun50i-a64-codec-analog"; + reg = <0x01f015c0 0x4>; + status = "disabled"; + }; + r_i2c: i2c@1f02400 { compatible = "allwinner,sun50i-a64-i2c", "allwinner,sun6i-a31-i2c"; From patchwork Fri Nov 9 04:24:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10675289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7538715E9 for ; Fri, 9 Nov 2018 04:25:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63A782DE49 for ; Fri, 9 Nov 2018 04:25:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 575782DE75; Fri, 9 Nov 2018 04:25:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1FB32DE52 for ; Fri, 9 Nov 2018 04:25:03 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0A782267B1D; Fri, 9 Nov 2018 05:24:45 +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 8B2A7267B08; Fri, 9 Nov 2018 05:24:39 +0100 (CET) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by alsa0.perex.cz (Postfix) with ESMTP id 14AE5267AFE for ; Fri, 9 Nov 2018 05:24:36 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id z10so304000pgp.7 for ; Thu, 08 Nov 2018 20:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=XsI6liqRm0Icct1UwElzJzz0WL5cnOhqGHow0nya2E8=; b=a4d7VFXDruYnIo5HJVbxmT7ILPu3YeAaGoJPAvudGws/g8fc+x1PHvfOAPkfpGRuNc xFL+X+3JO/SLdzrADSdNLKM6ym5gBE+FaBNzmP7Mc8OMZCXbjlEoWjT0NOAaFj9RBEP9 3vKpIRxN8xzzqelNf+ukab6PawW8Ym2bwTQWn5W0zdOw5o8iVQx2hKTsUmnEQGNh4sYk WjsWwGOpnhtOK4DOMxybXutBkI4tCyEAg0kOLY8vlQPxPp4lknFmu9NU0hSchSifAPUA DpYGvvGwm/1Jom2wzcmarU7avBw+BiNFvYhQOGH2wXNk54lNlUeqxHi6NGUe/E4U0rZu 02tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XsI6liqRm0Icct1UwElzJzz0WL5cnOhqGHow0nya2E8=; b=eXiGjxFRJJQxKd7DdYHcXkiFaApm/BRyblmFCP+KBnUvsikSEdvgb2x5jAOMKX9J7j a8c/adkQsY8wgjNsdSBDoE0iZ/+oDUUmg/I8T6AX6rPGUUbBUBbQCqjOZCAtiPOKMvyC som3xZFQLp8Se+glybLUDnWwIkas9riAJHUWTxwJzJtvWiDtbcnxus+C0dfSQ/Rti6o4 SZBKqgtxVEhtC1pez1tvHaKnBQtMRlutTAfWX7w5mrB4SMfoTIHCz//t3oCAzAUVhFLG GZ26DS1laA0Y3CNvh9iBUFR35LKjQm337UDDpDcC+E/neL0xtuv8gOdBw02q85EmBefN pKmQ== X-Gm-Message-State: AGRZ1gJgoeJvTtuNc1ZQPz7ZqsOU3sr/3m6WZCmhiZjT1DOlLKLWwqTa XUI4OwoF9+18euP/UvgiTPw= X-Google-Smtp-Source: AJdET5cij+BKCciv+ccpu9ON8gl/yfrvnxxVpu6ENBt8RSmX1+nHQ5yrpPeuIEJXspaF2QuJFTNb6g== X-Received: by 2002:a62:5210:: with SMTP id g16-v6mr7418806pfb.256.1541737475757; Thu, 08 Nov 2018 20:24:35 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-193-140.dyn.novuscom.net. [216.71.193.140]) by smtp.gmail.com with ESMTPSA id f22-v6sm6018442pff.29.2018.11.08.20.24.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Nov 2018 20:24:35 -0800 (PST) From: Vasily Khoruzhick To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vasily Khoruzhick , Mylene JOSSERAND , Kuninori Morimoto , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org Date: Thu, 8 Nov 2018 20:24:21 -0800 Message-Id: <20181109042422.25653-4-anarsoul@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109042422.25653-1-anarsoul@gmail.com> References: <20181109042422.25653-1-anarsoul@gmail.com> MIME-Version: 1.0 Subject: [alsa-devel] [PATCH v7 3/4] arm64: dts: allwinner: a64: enable sound on Pine64 and SoPine 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This commit enables I2S, digital and analog parts of audiocodec on Pine64 and SoPine boards. Signed-off-by: Vasily Khoruzhick --- .../boot/dts/allwinner/sun50i-a64-pine64.dts | 25 +++++++++++++++++++ .../allwinner/sun50i-a64-sopine-baseboard.dts | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts index c077b6c1f458..aba40b4c5216 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts @@ -75,6 +75,18 @@ }; }; +&codec { + status = "okay"; +}; + +&codec_analog { + status = "okay"; +}; + +&dai { + status = "okay"; +}; + &de { status = "okay"; }; @@ -264,6 +276,19 @@ status = "disabled"; }; +&sound { + status = "okay"; + simple-audio-card,widgets = "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "Headphone Jack", "HP", + "AIF1 Slot 0 Left ADC", "Left ADC", + "AIF1 Slot 0 Right ADC", "Right ADC", + "MIC2", "Microphone Jack"; +}; + /* On Exp and Euler connectors */ &uart0 { pinctrl-names = "default"; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts index 53fcc9098df3..be45e2a287e1 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts @@ -80,6 +80,18 @@ }; }; +&codec { + status = "okay"; +}; + +&codec_analog { + status = "okay"; +}; + +&dai { + status = "okay"; +}; + &de { status = "okay"; }; @@ -164,6 +176,19 @@ vcc-hdmi-supply = <®_dldo1>; }; +&sound { + status = "okay"; + simple-audio-card,widgets = "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "Headphone Jack", "HP", + "AIF1 Slot 0 Left ADC", "Left ADC", + "AIF1 Slot 0 Right ADC", "Right ADC", + "MIC2", "Microphone Jack"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>; From patchwork Fri Nov 9 04:24:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 10675291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A08E13BF for ; Fri, 9 Nov 2018 04:25:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183332DE49 for ; Fri, 9 Nov 2018 04:25:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BDF72DE75; Fri, 9 Nov 2018 04:25:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 598DD2DE49 for ; Fri, 9 Nov 2018 04:25:11 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A1E57267B29; Fri, 9 Nov 2018 05:24:48 +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 67B89267B0F; Fri, 9 Nov 2018 05:24:40 +0100 (CET) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by alsa0.perex.cz (Postfix) with ESMTP id E1E3A267B05 for ; Fri, 9 Nov 2018 05:24:37 +0100 (CET) Received: by mail-pg1-f193.google.com with SMTP id f8-v6so307174pgq.5 for ; Thu, 08 Nov 2018 20:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=G+RX/XTDnH8SuA0piGZ4cLJUbmY7TC6rn7MVdOwvqE4=; b=EqvvyFifydwDlvfI3oOMZh8dznvsUXcLb+uSgx8yc0PhFd4WPK9kGnGiAqjB+gnwEA mtQzvd2s4K4PgtYSeK4El4C3gZoPIbHzBniZTWFVgoH1wK8Va/z4sRcW/hAaWvB2o/x4 nf3ICVoLx4P4fBCcNuPzbC3S3vuvniB0KJ8JXeRTa7cPwAAvJdYVsigliMZ9B+OADgu6 sgXU9NZ9wBR/YEg9tIyTFb3m/x/g5+78+pX3L7xUu8u0vX8FP9kHLE0WxCaF31vuNuHW GzLHGs8zOfCXksQEe3ZEjxwoAn0RtKguwnFNV6wlgSYASJXSLvANz+IXyr6nCtBg9Uy0 QaLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G+RX/XTDnH8SuA0piGZ4cLJUbmY7TC6rn7MVdOwvqE4=; b=ghfwVeoXpcPhnVAngIPRKHu6CGnfLUW6dnVaxNYXq916d85nLPFmUBsSbyUyrm7Gip QmSzRE+2PTtjgINNlR7KGqtb2bDJN8+f8u4XYIMjX7sdk3A2emy32KjSPQhoftf09VxA Pt7tEbAvan28Inkwe10zDDGBFJqpzzxUrWm7u1e3mnbWABeE7Qtcj8PgSF8bUViwR7HF tp7bTRGqT7Bs0nJvhe1e+SOanEt66mCrf0WhzWFtbeb2RVvyD8VxKqCR/dhIqxIOEW6j R9czv6Bhwu13rNIM2LuIHpjCQXnUXE0vPbNJTfmamqutEx9fJoSIZmsR31YrFV+Zs6TG NFyA== X-Gm-Message-State: AGRZ1gLY13DsImHUQSkOK2UCTdStfBiGackCyCaSVzycb/m06wMQEH6a kXvpSaQivTV7fkHwSEPQ4dw= X-Google-Smtp-Source: AJdET5d0GOscQFdQ6vC6TCI4eTIoCyW4kBhlQLskdHTiefNG4NGOrJdcT5dHn3KeqNJFqM4R9XJy1Q== X-Received: by 2002:a62:db44:: with SMTP id f65-v6mr7462806pfg.94.1541737476761; Thu, 08 Nov 2018 20:24:36 -0800 (PST) Received: from anarsoul-thinkpad.lan (216-71-193-140.dyn.novuscom.net. [216.71.193.140]) by smtp.gmail.com with ESMTPSA id f22-v6sm6018442pff.29.2018.11.08.20.24.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Nov 2018 20:24:36 -0800 (PST) From: Vasily Khoruzhick To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Rutland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vasily Khoruzhick , Mylene JOSSERAND , Kuninori Morimoto , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org Date: Thu, 8 Nov 2018 20:24:22 -0800 Message-Id: <20181109042422.25653-5-anarsoul@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181109042422.25653-1-anarsoul@gmail.com> References: <20181109042422.25653-1-anarsoul@gmail.com> MIME-Version: 1.0 Subject: [alsa-devel] [PATCH v7 4/4] arm64: dts: allwinner: a64: enable sound on Pinebook 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This commit enables I2S, digital and analog parts of audiocodec on Pinebook Signed-off-by: Vasily Khoruzhick --- .../dts/allwinner/sun50i-a64-pinebook.dts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index 77fac84797e9..ec4dd9877355 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -64,6 +64,23 @@ compatible = "mmc-pwrseq-simple"; reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ }; + + speaker_amp: speaker_amp { + compatible = "simple-audio-amplifier"; + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + }; +}; + +&codec { + status = "okay"; +}; + +&codec_analog { + status = "okay"; +}; + +&dai { + status = "okay"; }; &ehci0 { @@ -267,6 +284,29 @@ vcc-hdmi-supply = <®_dldo1>; }; +&sound { + status = "okay"; + simple-audio-card,widgets = "Microphone", "Internal Microphone Left", + "Microphone", "Internal Microphone Right", + "Headphone", "Headphone Jack", + "Speaker", "Internal Speaker"; + simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>; + simple-audio-card,routing = + "Left DAC", "AIF1 Slot 0 Left", + "Right DAC", "AIF1 Slot 0 Right", + "INL", "LINEOUT", + "INR", "LINEOUT", + "Internal Speaker", "OUTL", + "Internal Speaker", "OUTR", + "Headphone Jack", "HP", + "AIF1 Slot 0 Left ADC", "Left ADC", + "AIF1 Slot 0 Right ADC", "Right ADC", + "Internal Microphone Left", "MBIAS", + "MIC1", "Internal Microphone Left", + "Internal Microphone Right", "HBIAS", + "MIC2", "Internal Microphone Right"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>;