From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67B6DC61DA4 for ; Thu, 16 Feb 2023 13:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject:MIME-Version: Date:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=e+pIM2TE8GvaedCgotV4BPimZdRMJrsJ1KoPxRoZtB0=; b=JYXiY5N8BAAbDZU9mhbAyoZzcB NmyKFfeEc0JrAOslfprdZIk0bHFElXBypTuKe/3+kHekrVRF4KVqHu7wmE/YRpfeFho9JBBSDObtB hiF3b2L9CEnSPWGebw5N4QZDg4mZ4OHlkBgkbiTO2LuEeN92hDNjIauzlr2tdrMaG+5npY/mR3qiy 3lIz3YTnDe38OoEyGK+VJ72M3mQWJTyEQYIEWU49ZBHIR5Juxrf6mVRl+8EoOFypKzW5IQ1fAzEE/ EO6VMRa60toEG2uRo5UKz1AspyP8Usu9eV9wlD1Yzq3VwR92eF4VMBJNEZkdYK9nR1r0LCzFsJ9xF h0PbSp+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSehp-00ASI2-CZ; Thu, 16 Feb 2023 13:53:49 +0000 Received: from www381.your-server.de ([78.46.137.84]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSehl-00ASE9-Qh for linux-arm-kernel@lists.infradead.org; Thu, 16 Feb 2023 13:53:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=5wvZVya/2I1adudMn9fCri4kPYjsevI/+W1YoF4YvTA=; b=XhjsIg9nnXiF733/UZ3CZuuTc5 J2M07IyYKxTdSWr2tvEhXuQlYBuhoFWWq8KpH+3QD4tC8rUeKh5fmCULd7AmvZmUY/SrLn1U6GN0J IVlxrM3ApZwEzri1aiJn3S9FlVgYsKb+ga4x2g4GamkYY8sm+9UhS/LLjB/AKzuTm/dZeLrldQnsq P1BGYyRLZxDuXQIxi8Yxuqic5THp2NRxUFThF0HhVnQIZNDCC1W2LUK5N93HC/KiD/BzqHUT3W0nH nZ2qLhh3G9XD+KIoAtziYmH4DTdOAeZ6Nxs0s/2NxqJbIMjFQtHjgYa1U+LBARPqfaD5NTDYpR69f ePclMGig==; Received: from sslproxy06.your-server.de ([78.46.172.3]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pSehd-000Nzn-Nj; Thu, 16 Feb 2023 14:53:37 +0100 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSehd-0007xS-75; Thu, 16 Feb 2023 14:53:37 +0100 Message-ID: Date: Thu, 16 Feb 2023 05:53:34 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 1/3] ASoC: soc-generic-dmaengine-pcm: add option to start DMA after DAI Content-Language: en-US To: Claudiu.Beznea@microchip.com, broonie@kernel.org References: <20230214161435.1088246-1-claudiu.beznea@microchip.com> <20230214161435.1088246-2-claudiu.beznea@microchip.com> <4b109846-2019-219a-262e-46f5bb504c99@microchip.com> From: Lars-Peter Clausen In-Reply-To: <4b109846-2019-219a-262e-46f5bb504c99@microchip.com> X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.7/26814/Thu Feb 16 09:40:04 2023) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_055345_914605_2A2C0D3F X-CRM114-Status: GOOD ( 19.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/16/23 01:49, Claudiu.Beznea@microchip.com wrote: > On 14.02.2023 23:26, Mark Brown wrote: >> On Tue, Feb 14, 2023 at 10:14:28AM -0800, Lars-Peter Clausen wrote: >>> On 2/14/23 08:14, Claudiu Beznea wrote: >>>> @@ -450,6 +450,8 @@ int snd_dmaengine_pcm_register(struct device *dev, >>>> else >>>> driver = &dmaengine_pcm_component; >>>> + driver->start_dma_last = config->start_dma_last; >>> This will break if you have multiple sound cards in the system. >>> dmaengine_pcm_component must stay const. >> Right, if we need to modify it we either need to select which of >> multiple const structs to register or to take a copy and modify >> that. I've not looked at the actual changes yet. > OK, I will try that and return with a new patch. > > On the other hand do you think the other solution presented in cover letter > would be better? From the cover letter: > > "The other solution that was identified for this was to extend the already > existing mechanism around struct snd_soc_dai_link::stop_dma_first. The downside > of this was that a potential struct snd_soc_dai_link::start_dma_last > would have to be populated on sound card driver thus, had to be taken > into account in all sound card drivers. At the moment, the mchp-pdmc is > used only with simple-audio-card. In case of simple-audio-card a new DT > binding would had to be introduced to specify this action on dai-link > descriptions (as of my investigation)." > Can't you just set `start_dma_last` on the `mchp_pdmc_dai_component`? In your code you iterate over all the components of the link and if any of them has it set the DMA is started last. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel