From: <Claudiu.Beznea@microchip.com>
To: <lars@metafoo.de>, <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <perex@perex.cz>,
<tiwai@suse.com>, <Nicolas.Ferre@microchip.com>,
<alexandre.belloni@bootlin.com>, <alsa-devel@alsa-project.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] ASoC: soc-generic-dmaengine-pcm: add option to start DMA after DAI
Date: Fri, 17 Feb 2023 10:59:37 +0000 [thread overview]
Message-ID: <61ce577d-03d3-5437-52ce-ec823a7a89ca@microchip.com> (raw)
In-Reply-To: <b57b8fbe-c558-8d5d-5fb3-7540d2fa83ae@metafoo.de>
On 16.02.2023 15:53, Lars-Peter Clausen wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> 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.
Yes, that is also working.
In this patch I chose to have it on DMA component as the operation is
specific to DMA... It looked better to me this way. But is true that having
it on mchp_pdmc_dai_component wouldn't affect the behavior.
Thank you,
Claudiu
next prev parent reply other threads:[~2023-02-17 11:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 16:14 [PATCH 0/3] ASoC: mchp-pdmc: fix poc noises when starting capture Claudiu Beznea
2023-02-14 16:14 ` [PATCH 1/3] ASoC: soc-generic-dmaengine-pcm: add option to start DMA after DAI Claudiu Beznea
2023-02-14 18:14 ` Lars-Peter Clausen
2023-02-14 21:26 ` Mark Brown
2023-02-16 9:49 ` Claudiu.Beznea
2023-02-16 13:53 ` Lars-Peter Clausen
2023-02-17 10:59 ` Claudiu.Beznea [this message]
2023-02-14 16:14 ` [PATCH 2/3] ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding Claudiu Beznea
2023-02-16 10:04 ` Krzysztof Kozlowski
2023-02-16 10:15 ` Claudiu.Beznea
2023-02-16 10:18 ` Krzysztof Kozlowski
2023-02-16 10:41 ` Claudiu.Beznea
2023-02-16 10:43 ` Krzysztof Kozlowski
2023-02-16 14:46 ` Mark Brown
2023-02-14 16:14 ` [PATCH 3/3] ASoC: mchp-pdmc: fix poc noise at capture startup Claudiu Beznea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61ce577d-03d3-5437-52ce-ec823a7a89ca@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).