From patchwork Wed Dec 5 01:30:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 10712877 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 20C301057 for ; Wed, 5 Dec 2018 01:30:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E7092C497 for ; Wed, 5 Dec 2018 01:30:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02BA52C4CC; Wed, 5 Dec 2018 01:30:50 +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_INVALID, DKIM_SIGNED,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 EE09C2C497 for ; Wed, 5 Dec 2018 01:30:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AC699267B8A; Wed, 5 Dec 2018 02:30: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 0ADBF267BCE; Wed, 5 Dec 2018 02:30:39 +0100 (CET) Received: from JPN01-TY1-obe.outbound.protection.outlook.com (mail-eopbgr1400137.outbound.protection.outlook.com [40.107.140.137]) by alsa0.perex.cz (Postfix) with ESMTP id 12FAF267B8A for ; Wed, 5 Dec 2018 02:30:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+kS2r1vnRY3v3IYraaJj6S6bFcQh0faS7Zy4dGHhvbs=; b=P0kX1JwGL4sfkwhXJldKqPdgz0RYzvm+majjlWK/j7ke4lLr6huWrZwiaVHbwuFqW1stWU2Hi7XqnAl5x2+KpVCchwtpbO/M1iZnxPWIpEJs1wFDw52wbwRY4ODGdNhla3W6h3ue7hmfISnwzULDjEnA7vkfj1+mMcUGqzvcaiU= Received: from TYAPR01MB3661.jpnprd01.prod.outlook.com (20.178.137.210) by TYAPR01MB4318.jpnprd01.prod.outlook.com (20.179.173.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.18; Wed, 5 Dec 2018 01:30:31 +0000 Received: from TYAPR01MB3661.jpnprd01.prod.outlook.com ([fe80::70b6:5ef2:3f71:77c7]) by TYAPR01MB3661.jpnprd01.prod.outlook.com ([fe80::70b6:5ef2:3f71:77c7%4]) with mapi id 15.20.1382.023; Wed, 5 Dec 2018 01:30:31 +0000 From: Kuninori Morimoto To: Mark Brown Thread-Topic: [PATCH 1/6] ASoC: audio-graph-card: merge audio-graph-scu-card on Doc Thread-Index: AQHUjDocUYs9I/CkxkyjJ2i+RSwR3A== Date: Wed, 5 Dec 2018 01:30:31 +0000 Message-ID: <87zhtkdb0q.wl-kuninori.morimoto.gx@renesas.com> References: <871s6wepmp.wl-kuninori.morimoto.gx@renesas.com> In-Reply-To: <871s6wepmp.wl-kuninori.morimoto.gx@renesas.com> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: KAXPR01CA0047.jpnprd01.prod.outlook.com (2603:1096:402:1a::33) To TYAPR01MB3661.jpnprd01.prod.outlook.com (2603:1096:404:c1::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [211.11.155.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; TYAPR01MB4318; 20:ZUHV9MoOJiaC0xbXZfQzt07LvkTOtciJTeCUaitOBerXW6vdEkR9dhjPkpr65S3r63P/TuAmjVtxtUnW3wqYiiDQUfomt28qBhsKS61cHN/20WGK9oZq9eEsNNt1niLB77XkPw5L97YvKgeti8hyJUh5WJUM6Ae3QJG4miwyftU= x-ms-office365-filtering-correlation-id: c3bad52a-29ac-4b94-7c85-08d65a513ed6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:TYAPR01MB4318; x-ms-traffictypediagnostic: TYAPR01MB4318: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231455)(999002)(944501519)(52105112)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:TYAPR01MB4318; BCL:0; PCL:0; RULEID:; SRVR:TYAPR01MB4318; x-forefront-prvs: 08770259B4 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(376002)(396003)(39860400002)(366004)(136003)(346002)(189003)(199004)(7736002)(6916009)(36756003)(102836004)(6506007)(386003)(86362001)(186003)(305945005)(5660300001)(26005)(97736004)(316002)(14454004)(478600001)(4326008)(66066001)(68736007)(476003)(2616005)(11346002)(446003)(486006)(256004)(25786009)(99286004)(106356001)(105586002)(76176011)(52116002)(53936002)(8936002)(6512007)(71200400001)(71190400001)(81166006)(81156014)(8676002)(2906002)(6486002)(6436002)(6116002)(3846002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:TYAPR01MB4318; H:TYAPR01MB3661.jpnprd01.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zPlJYl6UKBwX1tPJkW2XSUe5YeZjeyTHHshn7y4YRU06VqIp30sYoSelviNEAyCIEuB+SnMGcc/kmRNzDcDFmN/hfLeoin/C4XSh0/lC1BWel6OiOZi5jast01/VGuSGk5OzR9dBefeBuWHZawgb2VRMbq7xpd8EUZiS1JuVRWy7RFdyjve9j5vmCAYqSvax8aaYa8Wvud5D0mvwao5will67ruBLXtJtyGPY6lZ9M2ec5mdMi6tdF14IefoG5zzjAsHNwcrYMSPQKBwTPokKq54nJgv4UjJ+bcnxpHvN49PCGN/8xp9tneLYrGLIEIHOdR8W24cqXzjERewVEC7aNp+ISaEWOxOO1IlGw3EIrI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-ID: <4A933D0846F4B0468892A381FBF6DBA8@jpnprd01.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3bad52a-29ac-4b94-7c85-08d65a513ed6 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Dec 2018 01:30:31.5610 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB4318 Cc: Linux-ALSA Subject: [alsa-devel] [PATCH 1/6] ASoC: audio-graph-card: merge audio-graph-scu-card on Doc 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 From: Kuninori Morimoto audio-graph-card and audio-graph-scu-card are very similar driver, but the former is supporting normal sound card, the latter is supporting DPCM sound card. We couldn't use normal sound and DPCM sound in same sound card by audio-graph-card. This patch merges both feature into it on Documentation. Now we can use both feature on same driver. Signed-off-by: Kuninori Morimoto --- .../devicetree/bindings/sound/audio-graph-card.txt | 222 +++++++++++++++++++++ 1 file changed, 222 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.txt b/Documentation/devicetree/bindings/sound/audio-graph-card.txt index 7e63e53..3d19c9b 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-card.txt +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.txt @@ -32,7 +32,9 @@ Required properties: Optional properties: - pa-gpios: GPIO used to control external amplifier. +----------------------- Example: Single DAI case +----------------------- sound_card { compatible = "audio-graph-card"; @@ -61,7 +63,9 @@ Example: Single DAI case }; }; +----------------------- Example: Multi DAI case +----------------------- sound-card { compatible = "audio-graph-card"; @@ -130,3 +134,221 @@ Example: Multi DAI case }; }; + +----------------------- +Example: Sampling Rate Conversion +----------------------- + + sound_card { + compatible = "audio-graph-card"; + + label = "sound-card"; + prefix = "codec"; + routing = "codec Playback", "DAI0 Playback", + "DAI0 Capture", "codec Capture"; + convert-rate = <48000>; + + dais = <&cpu_port>; + }; + + audio-codec { + ... + port { + codec_endpoint: endpoint { + remote-endpoint = <&cpu_endpoint>; + }; + }; + }; + + dai-controller { + ... + cpu_port: port { + cpu_endpoint: endpoint { + remote-endpoint = <&codec_endpoint>; + + dai-format = "left_j"; + ... + }; + }; + }; + +----------------------- +Example: 2 CPU 1 Codec (Mixing) +----------------------- + + sound_card { + compatible = "audio-graph-card"; + + label = "sound-card"; + routing = "codec Playback", "DAI0 Playback", + "codec Playback", "DAI1 Playback", + "DAI0 Capture", "codec Capture"; + + dais = <&cpu_port0 + &cpu_port1>; + }; + + audio-codec { + ... + + audio-graph-card,prefix = "codec"; + audio-graph-card,convert-rate = <48000>; + port { + codec_endpoint0: endpoint { + remote-endpoint = <&cpu_endpoint0>; + }; + codec_endpoint1: endpoint { + remote-endpoint = <&cpu_endpoint1>; + }; + }; + }; + + dai-controller { + ... + ports { + cpu_port0: port { + cpu_endpoint0: endpoint { + remote-endpoint = <&codec_endpoint0>; + + dai-format = "left_j"; + ... + }; + }; + cpu_port1: port { + cpu_endpoint1: endpoint { + remote-endpoint = <&codec_endpoint1>; + + dai-format = "left_j"; + ... + }; + }; + }; + }; + +----------------------- +Example: Multi DAI with DPCM +----------------------- + + CPU0 ------ ak4613 + CPU1 ------ HDMI + CPU2 ------ PCM3168A-p /* DPCM 1ch/2ch */ + CPU3 --/ /* DPCM 3ch/4ch */ + CPU4 --/ /* DPCM 5ch/6ch */ + CPU5 --/ /* DPCM 7ch/8ch */ + CPU6 ------ PCM3168A-c + + sound_card: sound { + compatible = "audio-graph-card"; + + label = "sound-card"; + + routing = "pcm3168a Playback", "DAI2 Playback", + "pcm3168a Playback", "DAI3 Playback", + "pcm3168a Playback", "DAI4 Playback", + "pcm3168a Playback", "DAI5 Playback"; + + dais = <&snd_port0 /* ak4613 */ + &snd_port1 /* HDMI0 */ + &snd_port2 /* pcm3168a playback 1ch/2ch */ + &snd_port3 /* pcm3168a playback 3ch/4ch */ + &snd_port4 /* pcm3168a playback 5ch/6ch */ + &snd_port5 /* pcm3168a playback 7ch/8ch */ + &snd_port6 /* pcm3168a capture */ + >; + }; + + ak4613: codec@10 { + ... + port { + ak4613_endpoint: endpoint { + remote-endpoint = <&rsnd_endpoint0>; + }; + }; + }; + + pcm3168a: audio-codec@44 { + ... + audio-graph-card,prefix = "pcm3168a"; + audio-graph-card,convert-channels = <8>; /* TDM Split */ + ports { + port@0 { + reg = <0>; + pcm3168a_endpoint_p1: endpoint@1 { + remote-endpoint = <&rsnd_endpoint2>; + ... + }; + pcm3168a_endpoint_p2: endpoint@2 { + remote-endpoint = <&rsnd_endpoint3>; + ... + }; + pcm3168a_endpoint_p3: endpoint@3 { + remote-endpoint = <&rsnd_endpoint4>; + ... + }; + pcm3168a_endpoint_p4: endpoint@4 { + remote-endpoint = <&rsnd_endpoint5>; + ... + }; + }; + port@1 { + reg = <1>; + pcm3168a_endpoint_c: endpoint { + remote-endpoint = <&rsnd_endpoint6>; + ... + }; + }; + }; + }; + + &sound { + ports { + rsnd_port0: port@0 { + reg = <0>; + rsnd_endpoint0: endpoint { + remote-endpoint = <&ak4613_endpoint>; + ... + }; + }; + rsnd_port1: port@1 { + reg = <1>; + rsnd_endpoint1: endpoint { + remote-endpoint = <&dw_hdmi0_snd_in>; + ... + }; + }; + rsnd_port2: port@2 { + reg = <2>; + rsnd_endpoint2: endpoint { + remote-endpoint = <&pcm3168a_endpoint_p1>; + ... + }; + }; + rsnd_port3: port@3 { + reg = <3>; + rsnd_endpoint3: endpoint { + remote-endpoint = <&pcm3168a_endpoint_p2>; + ... + }; + }; + rsnd_port4: port@4 { + reg = <4>; + rsnd_endpoint4: endpoint { + remote-endpoint = <&pcm3168a_endpoint_p3>; + ... + }; + }; + rsnd_port5: port@5 { + reg = <5>; + rsnd_endpoint5: endpoint { + remote-endpoint = <&pcm3168a_endpoint_p4>; + ... + }; + rsnd_port6: port@6 { + reg = <6>; + rsnd_endpoint6: endpoint { + remote-endpoint = <&pcm3168a_endpoint_c>; + ... + }; + }; + }; + };