From patchwork Thu Mar 20 10:04:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 3865061 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 058279F370 for ; Thu, 20 Mar 2014 11:07:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3183120221 for ; Thu, 20 Mar 2014 11:07:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 08D5820179 for ; Thu, 20 Mar 2014 11:07:50 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C5863265279; Thu, 20 Mar 2014 12:07:48 +0100 (CET) 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,FREEMAIL_FROM, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id F1246265207; Thu, 20 Mar 2014 12:07:00 +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 E8BD1265211; Thu, 20 Mar 2014 12:06:58 +0100 (CET) Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by alsa0.perex.cz (Postfix) with ESMTP id D7FF1265232 for ; Thu, 20 Mar 2014 12:06:27 +0100 (CET) Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:212:bfff:fe1e:9ce4]) by smtp3-g21.free.fr (Postfix) with ESMTP id 32BC9A627C; Thu, 20 Mar 2014 12:06:20 +0100 (CET) X-Mailbox-Line: From 0168bdcc3dac2e6b4c907cec7fb6ddf0f02e1eac Mon Sep 17 00:00:00 2001 Message-Id: <0168bdcc3dac2e6b4c907cec7fb6ddf0f02e1eac.1395312925.git.moinejf@free.fr> In-Reply-To: References: From: Jean-Francois Moine Date: Thu, 20 Mar 2014 11:04:16 +0100 To: Jyri Sarha Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] [PARTIAL PATCH 2/3] ASoC: simple-card: Add DT documentation for multi-DAI links 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 Many couples of CPU/CODEC DAI links may be described in the DT thanks to 'simple-audio-card,dai-link' containers. Signed-off-by: Jean-Francois Moine --- .../devicetree/bindings/sound/simple-card.txt | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt index 881914b1..131aa2a 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-card.txt @@ -23,6 +23,11 @@ Optional properties: Required subnodes: +- simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes + This container may be omitted when the + card has only one DAI link. + See the examples. + - simple-audio-card,cpu : CPU sub-node - simple-audio-card,codec : CODEC sub-node @@ -49,7 +54,7 @@ Note: CPU and CODEC sides as we need to keep the settings identical for both ends of the link. -Example: +Example 1 - single DAI link: sound { compatible = "simple-audio-card"; @@ -94,3 +99,38 @@ sh_fsi2: sh_fsi2@ec230000 { interrupt-parent = <&gic>; interrupts = <0 146 0x4>; }; + +Example 2 - many DAI links: + +sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "Cubox Audio"; + simple-audio-card,format = "i2s"; + + simple-audio-card,dai-link@0 { /* I2S - HDMI */ + simple-audio-card,cpu { + sound-dai = <&audio1 0>; + }; + simple-audio-card,codec { + sound-dai = <&tda998x 0>; + }; + }; + + simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ + simple-audio-card,cpu { + sound-dai = <&audio1 1>; + }; + simple-audio-card,codec { + sound-dai = <&tda998x 1>; + }; + }; + + simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ + simple-audio-card,cpu { + sound-dai = <&audio1 1>; + }; + simple-audio-card,codec { + sound-dai = <&spdif_codec>; + }; + }; +};