From patchwork Thu Sep 27 05:03:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617221 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 E047916B1 for ; Thu, 27 Sep 2018 05:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD1E82B199 for ; Thu, 27 Sep 2018 05:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C01752B1D7; Thu, 27 Sep 2018 05:04:13 +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.9 required=2.0 tests=BAYES_00,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 D335A2B199 for ; Thu, 27 Sep 2018 05:04:12 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8D02D2678C4; Thu, 27 Sep 2018 07:04:10 +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 E7DA72678C4; Thu, 27 Sep 2018 07:04:07 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id BA83C2678C3 for ; Thu, 27 Sep 2018 07:04:05 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5OT6-0002AR-PT from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:04:04 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:04:01 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:03:58 +0900 Message-ID: <20180927050407.17765-2-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180927050407.17765-1-jiada_wang@mentor.com> References: <20180927050407.17765-1-jiada_wang@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 01/10] ASoC: rsnd: ssi: Request dedicated dma channels for busif1 to 7 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: Jiada Wang Currently ssi driver only request dma channel for SSI_0, which is used to transfer data to/from busif0. But since busif1 to busif7 also maybe used, dedicated dma channels are request for data transfer between these busif. Signed-off-by: Jiada Wang --- sound/soc/sh/rcar/ssi.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 3adcc4f778f7..75a3d15084c2 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -76,6 +76,8 @@ #define SSI_NAME "ssi" +#define SSI_DMA_NAME_SIZE 10 + struct rsnd_ssi { struct rsnd_mod mod; @@ -938,12 +940,20 @@ static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_dai_stream *io, { struct rsnd_priv *priv = rsnd_mod_to_priv(mod); int is_play = rsnd_io_is_play(io); - char *name; + int busif = rsnd_ssi_get_busif(io); + char name[SSI_DMA_NAME_SIZE]; - if (rsnd_ssi_use_busif(io)) - name = is_play ? "rxu" : "txu"; - else - name = is_play ? "rx" : "tx"; + if (rsnd_ssi_use_busif(io)) { + if (is_play) + snprintf(name, SSI_DMA_NAME_SIZE, "rxu%d", busif); + else + snprintf(name, SSI_DMA_NAME_SIZE, "txu%d", busif); + } else { + if (is_play) + snprintf(name, SSI_DMA_NAME_SIZE, "rx"); + else + snprintf(name, SSI_DMA_NAME_SIZE, "tx"); + } return rsnd_dma_request_channel(rsnd_ssi_of_node(priv), mod, name); From patchwork Thu Sep 27 05:03:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617225 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 BF88716B1 for ; Thu, 27 Sep 2018 05:04:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC6D52B199 for ; Thu, 27 Sep 2018 05:04:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A03522B1D7; Thu, 27 Sep 2018 05:04:32 +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.9 required=2.0 tests=BAYES_00,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 CDD4B2B199 for ; Thu, 27 Sep 2018 05:04:31 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5A5E32678DA; Thu, 27 Sep 2018 07:04:16 +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 27E1C2678CE; Thu, 27 Sep 2018 07:04:11 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 2DDCE2678BE for ; Thu, 27 Sep 2018 07:04:09 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5OTA-0002BL-Bb from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:04:08 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:04:04 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:03:59 +0900 Message-ID: <20180927050407.17765-3-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180927050407.17765-1-jiada_wang@mentor.com> References: <20180927050407.17765-1-jiada_wang@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 02/10] arm64: r8a7795: add dma request number for busif1 ~ busif7 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: Jiada Wang This patch adds dma request number for busif1 ~ busif7 Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 130 ++++++++++++++++++++--- 1 file changed, 113 insertions(+), 17 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index b5f2273caca4..0a66bda7124f 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -1923,53 +1923,149 @@ rcar_sound,ssi { ssi0: ssi-0 { interrupts = ; - dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x01>, <&audma1 0x02>, + <&audma0 0x15>, <&audma1 0x16>, + <&audma0 0x35>, <&audma1 0x36>, + <&audma0 0x37>, <&audma1 0x38>, + <&audma0 0x47>, <&audma1 0x48>, + <&audma0 0x3f>, <&audma1 0x40>, + <&audma0 0x43>, <&audma1 0x44>, + <&audma0 0x4f>, <&audma1 0x50>, + <&audma0 0x53>, <&audma1 0x54>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi1: ssi-1 { - interrupts = ; - dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; - dma-names = "rx", "tx", "rxu", "txu"; + interrupts = ; + dmas = <&audma0 0x03>, <&audma1 0x04>, + <&audma0 0x49>, <&audma1 0x4a>, + <&audma0 0x4b>, <&audma1 0x4c>, + <&audma0 0x57>, <&audma1 0x58>, + <&audma0 0x59>, <&audma1 0x5a>, + <&audma0 0x5f>, <&audma1 0x60>, + <&audma0 0xc3>, <&audma1 0xc4>, + <&audma0 0xc7>, <&audma1 0xc8>, + <&audma0 0xcb>, <&audma1 0xcc>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi2: ssi-2 { interrupts = ; - dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x05>, <&audma1 0x06>, + <&audma0 0x63>, <&audma1 0x64>, + <&audma0 0x67>, <&audma1 0x68>, + <&audma0 0x6b>, <&audma1 0x6c>, + <&audma0 0x6d>, <&audma1 0x6e>, + <&audma0 0xcf>, <&audma1 0xce>, + <&audma0 0xeb>, <&audma1 0xec>, + <&audma0 0xed>, <&audma1 0xee>, + <&audma0 0xef>, <&audma1 0xf0>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi3: ssi-3 { interrupts = ; - dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x07>, <&audma1 0x08>, + <&audma0 0x6f>, <&audma1 0x70>, + <&audma0 0x21>, <&audma1 0x22>, + <&audma0 0x23>, <&audma1 0x24>, + <&audma0 0x25>, <&audma1 0x26>, + <&audma0 0x27>, <&audma1 0x28>, + <&audma0 0x29>, <&audma1 0x2a>, + <&audma0 0x2b>, <&audma1 0x2c>, + <&audma0 0x2d>, <&audma1 0x2e>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi4: ssi-4 { interrupts = ; - dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x09>, <&audma1 0x0a>, + <&audma0 0x71>, <&audma1 0x72>, + <&audma0 0x17>, <&audma1 0x18>, + <&audma0 0x19>, <&audma1 0x1a>, + <&audma0 0x1b>, <&audma1 0x1c>, + <&audma0 0x1d>, <&audma1 0x1e>, + <&audma0 0x1f>, <&audma1 0x20>, + <&audma0 0x31>, <&audma1 0x32>, + <&audma0 0x33>, <&audma1 0x34>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi5: ssi-5 { interrupts = ; dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; ssi6: ssi-6 { interrupts = ; dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; ssi7: ssi-7 { interrupts = ; dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; ssi8: ssi-8 { interrupts = ; dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; ssi9: ssi-9 { interrupts = ; - dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x13>, <&audma1 0x14>, + <&audma0 0x7d>, <&audma1 0x7e>, + <&audma0 0x7f>, <&audma1 0x80>, + <&audma0 0x81>, <&audma1 0x82>, + <&audma0 0x83>, <&audma1 0x84>, + <&audma0 0xa3>, <&audma1 0xa4>, + <&audma0 0xa5>, <&audma1 0xa6>, + <&audma0 0xa7>, <&audma1 0xa8>, + <&audma0 0xa9>, <&audma1 0xaa>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; }; From patchwork Thu Sep 27 05:04:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617229 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 4D962180E for ; Thu, 27 Sep 2018 05:04:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A9432B199 for ; Thu, 27 Sep 2018 05:04:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E6432B1D7; Thu, 27 Sep 2018 05:04: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.9 required=2.0 tests=BAYES_00,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 C5C132B199 for ; Thu, 27 Sep 2018 05:04:48 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1DC8D2678E5; Thu, 27 Sep 2018 07:04:29 +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 7F49A2678EC; Thu, 27 Sep 2018 07:04:25 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 1FEAE2678D5 for ; Thu, 27 Sep 2018 07:04:12 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5OTD-0002Bn-U8 from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:04:11 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:04:08 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:04:00 +0900 Message-ID: <20180927050407.17765-4-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180927050407.17765-1-jiada_wang@mentor.com> References: <20180927050407.17765-1-jiada_wang@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 03/10] arm64: r8a7796: add dma request number for busif1 ~ busif7 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: Jiada Wang This patch adds dma request number for busif1 ~ busif7 Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 136 +++++++++++++++++++---- 1 file changed, 116 insertions(+), 20 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi index 1ec6aaa520c1..e9b05d997c4e 100644 --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi @@ -1797,53 +1797,149 @@ rcar_sound,ssi { ssi0: ssi-0 { interrupts = ; - dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x01>, <&audma1 0x02>, + <&audma0 0x15>, <&audma1 0x16>, + <&audma0 0x35>, <&audma1 0x36>, + <&audma0 0x37>, <&audma1 0x38>, + <&audma0 0x47>, <&audma1 0x48>, + <&audma0 0x3f>, <&audma1 0x40>, + <&audma0 0x43>, <&audma1 0x44>, + <&audma0 0x4f>, <&audma1 0x50>, + <&audma0 0x53>, <&audma1 0x54>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi1: ssi-1 { interrupts = ; - dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x03>, <&audma1 0x04>, + <&audma0 0x49>, <&audma1 0x4a>, + <&audma0 0x4b>, <&audma1 0x4c>, + <&audma0 0x57>, <&audma1 0x58>, + <&audma0 0x59>, <&audma1 0x5a>, + <&audma0 0x5f>, <&audma1 0x60>, + <&audma0 0xc3>, <&audma1 0xc4>, + <&audma0 0xc7>, <&audma1 0xc8>, + <&audma0 0xcb>, <&audma1 0xcc>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi2: ssi-2 { interrupts = ; - dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x05>, <&audma1 0x06>, + <&audma0 0x63>, <&audma1 0x64>, + <&audma0 0x67>, <&audma1 0x68>, + <&audma0 0x6b>, <&audma1 0x6c>, + <&audma0 0x6d>, <&audma1 0x6e>, + <&audma0 0xcf>, <&audma1 0xce>, + <&audma0 0xeb>, <&audma1 0xec>, + <&audma0 0xed>, <&audma1 0xee>, + <&audma0 0xef>, <&audma1 0xf0>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi3: ssi-3 { interrupts = ; - dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x07>, <&audma1 0x08>, + <&audma0 0x6f>, <&audma1 0x70>, + <&audma0 0x21>, <&audma1 0x22>, + <&audma0 0x23>, <&audma1 0x24>, + <&audma0 0x25>, <&audma1 0x26>, + <&audma0 0x27>, <&audma1 0x28>, + <&audma0 0x29>, <&audma1 0x2a>, + <&audma0 0x2b>, <&audma1 0x2c>, + <&audma0 0x2d>, <&audma1 0x2e>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi4: ssi-4 { interrupts = ; - dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x09>, <&audma1 0x0a>, + <&audma0 0x71>, <&audma1 0x72>, + <&audma0 0x17>, <&audma1 0x18>, + <&audma0 0x19>, <&audma1 0x1a>, + <&audma0 0x1b>, <&audma1 0x1c>, + <&audma0 0x1d>, <&audma1 0x1e>, + <&audma0 0x1f>, <&audma1 0x20>, + <&audma0 0x31>, <&audma1 0x32>, + <&audma0 0x33>, <&audma1 0x34>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; - ssi5: ssi-5 { + ssi5: ssi@5 { interrupts = ; dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; - ssi6: ssi-6 { + ssi6: ssi@6 { interrupts = ; dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; - ssi7: ssi-7 { + ssi7: ssi@7 { interrupts = ; dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; - ssi8: ssi-8 { + ssi8: ssi@8 { interrupts = ; dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; ssi9: ssi-9 { interrupts = ; - dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x13>, <&audma1 0x14>, + <&audma0 0x7d>, <&audma1 0x7e>, + <&audma0 0x7f>, <&audma1 0x80>, + <&audma0 0x81>, <&audma1 0x82>, + <&audma0 0x83>, <&audma1 0x84>, + <&audma0 0xa3>, <&audma1 0xa4>, + <&audma0 0xa5>, <&audma1 0xa6>, + <&audma0 0xa7>, <&audma1 0xa8>, + <&audma0 0xa9>, <&audma1 0xaa>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; }; From patchwork Thu Sep 27 05:04:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617227 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 0777F16B1 for ; Thu, 27 Sep 2018 05:04:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E67902B199 for ; Thu, 27 Sep 2018 05:04:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8B552B1D7; Thu, 27 Sep 2018 05:04:41 +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.9 required=2.0 tests=BAYES_00,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 0EE752B199 for ; Thu, 27 Sep 2018 05:04:41 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BDC852678D3; Thu, 27 Sep 2018 07:04:20 +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 874FB2678DF; Thu, 27 Sep 2018 07:04:18 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 7EE022678C5 for ; Thu, 27 Sep 2018 07:04:16 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5OTH-0002CC-Hh from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:04:15 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:04:11 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:04:01 +0900 Message-ID: <20180927050407.17765-5-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180927050407.17765-1-jiada_wang@mentor.com> References: <20180927050407.17765-1-jiada_wang@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 04/10] arm64: r8a774a1: add dma request number for busif1 ~ busif7 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: Jiada Wang This patch adds dma request number for busif1 ~ busif7 Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 137 ++++++++++++++++++---- 1 file changed, 117 insertions(+), 20 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi index 012cbb64246e..c9aad3e3b1b0 100644 --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi @@ -1247,55 +1247,152 @@ rcar_sound,ssi { ssi0: ssi-0 { interrupts = ; - dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x01>, <&audma1 0x02>, + <&audma0 0x15>, <&audma1 0x16>, + <&audma0 0x35>, <&audma1 0x36>, + <&audma0 0x37>, <&audma1 0x38>, + <&audma0 0x47>, <&audma1 0x48>, + <&audma0 0x3f>, <&audma1 0x40>, + <&audma0 0x43>, <&audma1 0x44>, + <&audma0 0x4f>, <&audma1 0x50>, + <&audma0 0x53>, <&audma1 0x54>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi1: ssi-1 { interrupts = ; - dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x03>, <&audma1 0x04>, + <&audma0 0x49>, <&audma1 0x4a>, + <&audma0 0x4b>, <&audma1 0x4c>, + <&audma0 0x57>, <&audma1 0x58>, + <&audma0 0x59>, <&audma1 0x5a>, + <&audma0 0x5f>, <&audma1 0x60>, + <&audma0 0xc3>, <&audma1 0xc4>, + <&audma0 0xc7>, <&audma1 0xc8>, + <&audma0 0xcb>, <&audma1 0xcc>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi2: ssi-2 { interrupts = ; - dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x05>, <&audma1 0x06>, + <&audma0 0x63>, <&audma1 0x64>, + <&audma0 0x67>, <&audma1 0x68>, + <&audma0 0x6b>, <&audma1 0x6c>, + <&audma0 0x6d>, <&audma1 0x6e>, + <&audma0 0xcf>, <&audma1 0xce>, + <&audma0 0xeb>, <&audma1 0xec>, + <&audma0 0xed>, <&audma1 0xee>, + <&audma0 0xef>, <&audma1 0xf0>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi3: ssi-3 { interrupts = ; - dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x07>, <&audma1 0x08>, + <&audma0 0x6f>, <&audma1 0x70>, + <&audma0 0x21>, <&audma1 0x22>, + <&audma0 0x23>, <&audma1 0x24>, + <&audma0 0x25>, <&audma1 0x26>, + <&audma0 0x27>, <&audma1 0x28>, + <&audma0 0x29>, <&audma1 0x2a>, + <&audma0 0x2b>, <&audma1 0x2c>, + <&audma0 0x2d>, <&audma1 0x2e>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; ssi4: ssi-4 { interrupts = ; - dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x09>, <&audma1 0x0a>, + <&audma0 0x71>, <&audma1 0x72>, + <&audma0 0x17>, <&audma1 0x18>, + <&audma0 0x19>, <&audma1 0x1a>, + <&audma0 0x1b>, <&audma1 0x1c>, + <&audma0 0x1d>, <&audma1 0x1e>, + <&audma0 0x1f>, <&audma1 0x20>, + <&audma0 0x31>, <&audma1 0x32>, + <&audma0 0x33>, <&audma1 0x34>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; - ssi5: ssi-5 { + ssi5: ssi@5 { interrupts = ; dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; - ssi6: ssi-6 { + ssi6: ssi@6 { interrupts = ; dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; - ssi7: ssi-7 { + ssi7: ssi@7 { interrupts = ; dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; - ssi8: ssi-8 { + ssi8: ssi@8 { interrupts = ; dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; - dma-names = "rx", "tx", "rxu", "txu"; + dma-names = "rx", "tx", "rxu0", "txu0"; }; ssi9: ssi-9 { interrupts = ; - dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; - dma-names = "rx", "tx", "rxu", "txu"; + dmas = <&audma0 0x13>, <&audma1 0x14>, + <&audma0 0x7d>, <&audma1 0x7e>, + <&audma0 0x7f>, <&audma1 0x80>, + <&audma0 0x81>, <&audma1 0x82>, + <&audma0 0x83>, <&audma1 0x84>, + <&audma0 0xa3>, <&audma1 0xa4>, + <&audma0 0xa5>, <&audma1 0xa6>, + <&audma0 0xa7>, <&audma1 0xa8>, + <&audma0 0xa9>, <&audma1 0xaa>; + dma-names = "rx", "tx", + "rxu0", "txu0", + "rxu1", "txu1", + "rxu2", "txu2", + "rxu3", "txu3", + "rxu4", "txu4", + "rxu5", "txu5", + "rxu6", "txu6", + "rxu7", "txu7"; }; }; + }; ports { #address-cells = <1>; From patchwork Thu Sep 27 05:11:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617247 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 AB403913 for ; Thu, 27 Sep 2018 05:11:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99C2C2B2C1 for ; Thu, 27 Sep 2018 05:11:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 976C92B2C5; Thu, 27 Sep 2018 05:11:05 +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.9 required=2.0 tests=BAYES_00,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 3306A2B156 for ; Thu, 27 Sep 2018 05:11:05 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 947A62678C4; Thu, 27 Sep 2018 07:11:03 +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 556D62678CC; Thu, 27 Sep 2018 07:11:01 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 82CAA2678BE for ; Thu, 27 Sep 2018 07:10:59 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5OZm-0002qB-MG from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:10:58 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:10:55 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:11:04 +0900 Message-ID: <20180927051104.17838-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 05/10] arm64: r8a7795: change to use extended audio dmac register 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: Jiada Wang Basic audio dmac register only supports busif from 0 to 3, in order to use busif4 ~ busif7, extended audio dmac register need to be used. Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a7795.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi index 0a66bda7124f..32d191102a81 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -1796,7 +1796,7 @@ <0 0xec5a0000 0 0x100>, /* ADG */ <0 0xec540000 0 0x1000>, /* SSIU */ <0 0xec541000 0 0x280>, /* SSI */ - <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ + <0 0xec760000 0 0x200>; /* Audio DMAC peri peri*/ reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; clocks = <&cpg CPG_MOD 1005>, From patchwork Thu Sep 27 05:11:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617249 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 A3EBF16B1 for ; Thu, 27 Sep 2018 05:11:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FF042B194 for ; Thu, 27 Sep 2018 05:11:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83DB32B2C1; Thu, 27 Sep 2018 05:11:23 +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.9 required=2.0 tests=BAYES_00,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 1EAF32B194 for ; Thu, 27 Sep 2018 05:11:23 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EA18D2678C3; Thu, 27 Sep 2018 07:11:21 +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 CD2952678CC; Thu, 27 Sep 2018 07:11:19 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 184C12678BE for ; Thu, 27 Sep 2018 07:11:17 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5Oa5-0002tI-3E from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:11:17 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:11:13 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:11:23 +0900 Message-ID: <20180927051123.17886-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 06/10] arm64: r8a7796: change to use extended audio dmac register 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: Jiada Wang Basic audio dmac register only supports busif from 0 to 3, in order to use busif4 ~ busif7, extended audio dmac register need to be used. Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a7796.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi index e9b05d997c4e..827a704154cd 100644 --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi @@ -1670,7 +1670,7 @@ <0 0xec5a0000 0 0x100>, /* ADG */ <0 0xec540000 0 0x1000>, /* SSIU */ <0 0xec541000 0 0x280>, /* SSI */ - <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ + <0 0xec760000 0 0x200>; /* Audio DMAC peri peri*/ reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; clocks = <&cpg CPG_MOD 1005>, From patchwork Thu Sep 27 05:11:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617251 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 0AF0916B1 for ; Thu, 27 Sep 2018 05:11:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECCAB2B078 for ; Thu, 27 Sep 2018 05:11:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E0FC72B0C2; Thu, 27 Sep 2018 05:11:43 +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.9 required=2.0 tests=BAYES_00,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 76FE82B078 for ; Thu, 27 Sep 2018 05:11:43 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5B6E12678CE; Thu, 27 Sep 2018 07:11:42 +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 37C412678D1; Thu, 27 Sep 2018 07:11:40 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 6F62B2678CA for ; Thu, 27 Sep 2018 07:11:38 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5OaP-0002vL-K6 from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:11:37 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:11:34 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:11:44 +0900 Message-ID: <20180927051144.17935-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 07/10] arm64: r8a774a1: change to use extended audio dmac register 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: Jiada Wang Basic audio dmac register only supports busif from 0 to 3, in order to use busif4 ~ busif7, extended audio dmac register need to be used. Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi index c9aad3e3b1b0..c3e0f2151176 100644 --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi @@ -1120,7 +1120,7 @@ <0 0xec5a0000 0 0x100>, /* ADG */ <0 0xec540000 0 0x1000>, /* SSIU */ <0 0xec541000 0 0x280>, /* SSI */ - <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ + <0 0xec760000 0 0x200>; /* Audio DMAC peri peri*/ reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; clocks = <&cpg CPG_MOD 1005>, From patchwork Thu Sep 27 05:11:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617253 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 7CF4D913 for ; Thu, 27 Sep 2018 05:12:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 677542B078 for ; Thu, 27 Sep 2018 05:12:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A04B2B0AD; Thu, 27 Sep 2018 05:12:11 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI 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 CFF202B078 for ; Thu, 27 Sep 2018 05:11:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B0B292678CA; Thu, 27 Sep 2018 07:11:56 +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 06D602678D1; Thu, 27 Sep 2018 07:11:54 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 650792678C4 for ; Thu, 27 Sep 2018 07:11:52 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5Oad-0002vq-IC from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:11:51 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:11:48 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:11:58 +0900 Message-ID: <20180927051158.17983-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 08/10] arm64: r8a77965: change to use extended audio dmac register 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: Jiada Wang Basic audio dmac register only supports busif from 0 to 3, in order to use busif4 ~ busif7, extended audio dmac register need to be used. Signed-off-by: Jiada Wang --- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi index fd00010a5ed7..6c0d5053a81c 100644 --- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi @@ -1405,7 +1405,7 @@ <0 0xec5a0000 0 0x100>, /* ADG */ <0 0xec540000 0 0x1000>, /* SSIU */ <0 0xec541000 0 0x280>, /* SSI */ - <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ + <0 0xec760000 0 0x200>; /* Audio DMAC peri peri*/ /* placeholder */ rcar_sound,dvc { From patchwork Thu Sep 27 05:12:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617255 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 3EE6C913 for ; Thu, 27 Sep 2018 05:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DDAB2B078 for ; Thu, 27 Sep 2018 05:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21A982B0AD; Thu, 27 Sep 2018 05:12:18 +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.9 required=2.0 tests=BAYES_00,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 579B32B078 for ; Thu, 27 Sep 2018 05:12:12 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0EA2D2678C4; Thu, 27 Sep 2018 07:12:11 +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 D229C2678D6; Thu, 27 Sep 2018 07:12:08 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 0C5552678C4 for ; Thu, 27 Sep 2018 07:12:06 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5Oas-0002wS-0M from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:12:06 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:12:02 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:12:12 +0900 Message-ID: <20180927051212.18032-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 09/10] ASoC: rsnd: add busif property to dai stream 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: Jiada Wang SSI may use different busif for data transfer, this patch adds busif property to each dai stream, to indicate the busif used by playback/capture stream. Signed-off-by: Jiada Wang --- sound/soc/sh/rcar/core.c | 16 +++++++++++++++- sound/soc/sh/rcar/rsnd.h | 3 +++ sound/soc/sh/rcar/ssi.c | 5 ++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 40d7dc4f7839..aee3132c72b9 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -560,6 +560,14 @@ struct rsnd_dai *rsnd_rdai_get(struct rsnd_priv *priv, int id) return priv->rdai + id; } +struct rsnd_kctrl_cfg_s *rsnd_busif_get(struct rsnd_priv *priv, int id) +{ + if ((id < 0) || (id >= 2 * rsnd_rdai_nr(priv))) + return NULL; + + return priv->busif + id; +} + static struct snd_soc_dai_driver *rsnd_daidrv_get(struct rsnd_priv *priv, int id) { @@ -1045,6 +1053,9 @@ static void __rsnd_dai_probe(struct rsnd_priv *priv, io_playback = &rdai->playback; io_capture = &rdai->capture; + io_playback->busif = rsnd_busif_get(priv, dai_i); + io_capture->busif = rsnd_busif_get(priv, rsnd_rdai_nr(priv) + dai_i); + snprintf(rdai->name, RSND_DAI_NAME_SIZE, "rsnd-dai.%d", dai_i); rdai->priv = priv; @@ -1108,6 +1119,7 @@ static int rsnd_dai_probe(struct rsnd_priv *priv) struct snd_soc_dai_driver *rdrv; struct device *dev = rsnd_priv_to_dev(priv); struct rsnd_dai *rdai; + struct rsnd_kctrl_cfg_s *busif; int nr; int is_graph; int dai_i; @@ -1123,12 +1135,14 @@ static int rsnd_dai_probe(struct rsnd_priv *priv) rdrv = devm_kcalloc(dev, nr, sizeof(*rdrv), GFP_KERNEL); rdai = devm_kcalloc(dev, nr, sizeof(*rdai), GFP_KERNEL); - if (!rdrv || !rdai) + busif = devm_kcalloc(dev, 2 * nr, sizeof(*busif), GFP_KERNEL); + if (!rdrv || !rdai || !busif) return -ENOMEM; priv->rdai_nr = nr; priv->daidrv = rdrv; priv->rdai = rdai; + priv->busif = busif; /* * parse all dai diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 4464d1d0a042..59b6d89d8edc 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -456,6 +456,7 @@ struct rsnd_dai_stream { struct rsnd_mod *dma; struct rsnd_dai *rdai; struct device *dmac_dev; /* for IPMMU */ + struct rsnd_kctrl_cfg_s *busif; u32 parent_ssi_status; }; #define rsnd_io_to_mod(io, i) ((i) < RSND_MOD_MAX ? (io)->mod[(i)] : NULL) @@ -629,6 +630,8 @@ struct rsnd_priv { */ struct snd_soc_dai_driver *daidrv; struct rsnd_dai *rdai; + struct rsnd_kctrl_cfg_s *busif; + int rdai_nr; }; diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 75a3d15084c2..4ac4b5b75ae2 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -154,7 +154,10 @@ int rsnd_ssi_use_busif(struct rsnd_dai_stream *io) int rsnd_ssi_get_busif(struct rsnd_dai_stream *io) { - return 0; /* BUSIF0 only for now */ + if (!rsnd_ssi_use_busif(io)) + return 0; + + return io->busif->val; } static void rsnd_ssi_status_clear(struct rsnd_mod *mod) From patchwork Thu Sep 27 05:12:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10617257 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 64CF416B1 for ; Thu, 27 Sep 2018 05:12:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 501302B078 for ; Thu, 27 Sep 2018 05:12:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 441F42B0AD; Thu, 27 Sep 2018 05:12:30 +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.9 required=2.0 tests=BAYES_00,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 75A7C2B078 for ; Thu, 27 Sep 2018 05:12:29 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5B7622678D9; Thu, 27 Sep 2018 07:12:28 +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 622812678DA; Thu, 27 Sep 2018 07:12:26 +0200 (CEST) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 6106E2678D1 for ; Thu, 27 Sep 2018 07:12:24 +0200 (CEST) Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5Ob9-0002xI-Cw from Jiada_Wang@mentor.com ; Wed, 26 Sep 2018 22:12:23 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 22:12:19 -0700 From: To: , , , , Date: Thu, 27 Sep 2018 14:12:29 +0900 Message-ID: <20180927051229.18080-1-jiada_wang@mentor.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Cc: jiada_wang@mentor.com, twischer@de.adit-jv.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, dragos_tarcatu@mentor.com Subject: [alsa-devel] [PATCH linux-next 10/10] ASoC: rsnd: Add kctrl to configure dai's busif 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: Jiada Wang ssi0, ssi1, ssi2, ssi3, ssi4 and ssi9 have busif0 to busif7, currently only busif0 is used by all ssi. But tdm split and tdm ex-split mode, which require busif1 to busif7. This patch adds kctrl in ssi for dai-link, to make it possible to configure the busif used by each dai-link. Also adds rsnd_dma_addr_update() interface to make it possible to update dma data address when there is change in condition of dai connection. Signed-off-by: Jiada Wang --- sound/soc/sh/rcar/dma.c | 32 ++++++++++++++++++++++++++++++++ sound/soc/sh/rcar/rsnd.h | 2 ++ sound/soc/sh/rcar/ssi.c | 31 ++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c index 6d1947515dc8..8c284fd73fc1 100644 --- a/sound/soc/sh/rcar/dma.c +++ b/sound/soc/sh/rcar/dma.c @@ -792,6 +792,38 @@ int rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod, return rsnd_dai_connect(*dma_mod, io, (*dma_mod)->type); } +void rsnd_dma_addr_update(struct rsnd_dai_stream *io, + struct rsnd_mod *mod, + struct rsnd_mod *dma_mod) +{ + struct rsnd_mod *mod_from = NULL; + struct rsnd_mod *mod_to = NULL; + struct rsnd_priv *priv = rsnd_io_to_priv(io); + struct rsnd_dma_ctrl *dmac = rsnd_priv_to_dmac(priv); + struct device *dev = rsnd_priv_to_dev(priv); + int is_play = rsnd_io_is_play(io); + struct rsnd_dma *dma = rsnd_mod_to_dma(dma_mod); + + if (!dmac) + return; + + rsnd_dma_of_path(mod, io, is_play, &mod_from, &mod_to); + + dma->src_addr = rsnd_dma_addr(io, mod_from, is_play, 1); + dma->dst_addr = rsnd_dma_addr(io, mod_to, is_play, 0); + + if (mod_from && mod_to) { + struct rsnd_dmapp *dmapp = rsnd_dma_to_dmapp(dma); + + dmapp->chcr = rsnd_dmapp_get_chcr(io, mod_from, mod_to) | + PDMACHCR_DE; + } + + dev_dbg(dev, "%s[%d] %pad -> %pad\n", + rsnd_mod_name(mod), rsnd_mod_id(mod), + &dma->src_addr, &dma->dst_addr); +} + int rsnd_dma_probe(struct rsnd_priv *priv) { struct platform_device *pdev = rsnd_priv_to_pdev(priv); diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 59b6d89d8edc..6c16d8403f7a 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -233,6 +233,8 @@ u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod); */ int rsnd_dma_attach(struct rsnd_dai_stream *io, struct rsnd_mod *mod, struct rsnd_mod **dma_mod); +void rsnd_dma_addr_update(struct rsnd_dai_stream *io, + struct rsnd_mod *mod, struct rsnd_mod *dma_mod); int rsnd_dma_probe(struct rsnd_priv *priv); struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node, struct rsnd_mod *mod, char *name); diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 4ac4b5b75ae2..b469db238697 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -160,6 +160,15 @@ int rsnd_ssi_get_busif(struct rsnd_dai_stream *io) return io->busif->val; } +static void rsnd_ssi_set_busif(struct rsnd_dai_stream *io, + struct rsnd_mod *mod) +{ + if (!rsnd_ssi_use_busif(io)) + return; + + rsnd_dma_addr_update(io, mod, io->dma); +} + static void rsnd_ssi_status_clear(struct rsnd_mod *mod) { rsnd_mod_write(mod, SSISR, 0); @@ -718,6 +727,10 @@ static int rsnd_ssi_pcm_new(struct rsnd_mod *mod, struct rsnd_dai_stream *io, struct snd_soc_pcm_runtime *rtd) { + int is_play = rsnd_io_is_play(io); + int id = rsnd_mod_id(mod); + int ret = 0; + /* * rsnd_rdai_is_clk_master() will be enabled after set_fmt, * and, pcm_new will be called after it. @@ -725,7 +738,23 @@ static int rsnd_ssi_pcm_new(struct rsnd_mod *mod, */ rsnd_ssi_parent_attach(mod, io); - return 0; + if (!rsnd_ssi_use_busif(io)) + return 0; + + if (rsnd_ssi_is_multi_slave(mod, io)) + return 0; + + /* SSI5 to SSI8 only have one BUSIF */ + if (id <= 4 || id == 9) + ret = rsnd_kctrl_new_s(mod, io, rtd, + is_play ? + "SSI Out BUSIF" : + "SSI In BUSIF", + rsnd_kctrl_accept_anytime, + rsnd_ssi_set_busif, + io->busif, 7); + + return ret; } static int rsnd_ssi_common_probe(struct rsnd_mod *mod,