From patchwork Thu Dec 21 07:13:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Jiada" X-Patchwork-Id: 10127067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CAE04603B5 for ; Thu, 21 Dec 2017 07:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B934C29ACB for ; Thu, 21 Dec 2017 07:21:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACB5A29AF0; Thu, 21 Dec 2017 07:21: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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=unavailable 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 E5E7329ACB for ; Thu, 21 Dec 2017 07:21:22 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7820E266F62; Thu, 21 Dec 2017 08:13:11 +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 CCC08266F64; Thu, 21 Dec 2017 08:13:09 +0100 (CET) Received: from relay1.mentorg.com (relay1.mentorg.com [192.94.38.131]) by alsa0.perex.cz (Postfix) with ESMTP id 96BA7266DB1 for ; Thu, 21 Dec 2017 08:13:07 +0100 (CET) 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 1eRv2P-000680-3w from Jiada_Wang@mentor.com ; Wed, 20 Dec 2017 23:13:05 -0800 Received: from [192.168.109.130] (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, 20 Dec 2017 23:13:01 -0800 Message-ID: <5A3B5EFE.8070606@mentor.com> Date: Wed, 20 Dec 2017 23:13:02 -0800 From: Jiada Wang User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120411 Thunderbird/11.0.1 MIME-Version: 1.0 To: Kuninori Morimoto References: <1513832314-29727-1-git-send-email-jiada_wang@mentor.com> <87k1xgbnfz.wl%kuninori.morimoto.gx@renesas.com> In-Reply-To: <87k1xgbnfz.wl%kuninori.morimoto.gx@renesas.com> 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: alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, broonie@kernel.org Subject: Re: [alsa-devel] [PATCH v1 1/1] ASoC: rsnd: ssi: Fix issue in dma data address assignment 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 Hi Morimoto-san On 12/20/2017 10:42 PM, Kuninori Morimoto wrote: > Hi Jiada > > Thank you for your patch > >> Same SSI device may be used in different dai links, >> by only having one dma struct in rsnd_ssi, after the first >> instance's dma config be initilized, the following instances >> can no longer configure dma, this causes issue, when their >> dma data address are different from the first instance. >> >> This patch by introduces two dma struct in rdai, each SSI >> instance in a dai link is assigned with two dma struct, >> to store dma configuration for playback and capture. >> >> Signed-off-by: Jiada Wang >> --- > (snip) >> @@ -876,7 +876,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod, >> return ret; >> >> /* SSI probe might be called many times in MUX multi path */ >> - ret = rsnd_dma_attach(io, mod,&ssi->dma); >> + ret = rsnd_dma_attach(io, mod,&rdai->dma[is_play]); >> >> return ret; >> } > Some cases, same SSI might be used on different dai links. > In my understanding, it happen if you uses MIXer. > But, are you using same SSI for both playback and capture ?? No, I am not using same SSI in both playback and capture of same dai-link, without this patch, I am seeing issues when rcar sound is working in multi DAI mode, for example with the following configuration playing with dai1 will have issue. Thanks, Jiada > Best regards > --- > Kuninori Morimoto diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi index a298df7..16f3214 100644 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi @@ -94,14 +94,24 @@ }; rsnd_ak4613: sound { - compatible = "simple-audio-card"; + compatible = "simple-scu-audio-card"; simple-audio-card,format = "left_j"; simple-audio-card,bitclock-master = <&sndcpu>; simple-audio-card,frame-master = <&sndcpu>; - sndcpu: simple-audio-card,cpu { - sound-dai = <&rcar_sound>; + simple-audio-card,prefix = "ak4613"; + simple-audio-card,routing = + "ak4613 Playback", "DAI0 Playback", + "DAI0 Capture", "ak4613 Capture", + "ak4613 Playback", "DAI1 Playback"; + + sndcpu: simple-audio-card,cpu@0 { + sound-dai = <&rcar_sound 0>; + }; + + simple-audio-card,cpu@1 { + sound-dai = <&rcar_sound 1>; }; sndcodec: simple-audio-card,codec { @@ -517,7 +527,7 @@ pinctrl-names = "default"; /* Single DAI */ - #sound-dai-cells = <0>; + #sound-dai-cells = <1>; /* audio_clkout0/1/2/3 */ #clock-cells = <1>; @@ -549,6 +559,9 @@ playback = <&ssi0 &src0 &dvc0>; capture = <&ssi1 &src1 &dvc1>; }; + dai1 { + playback = <&ssi0>; + }; }; };