From: Lars-Peter Clausen <lars@metafoo.de>
To: Andy Shevchenko <andriy.shevchenko@intel.com>,
Stephen Warren <swarren@nvidia.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
"Sit, Michael Wei Hong" <michael.wei.hong.sit@intel.com>
Subject: Re: (Optional?) DMA vs. PIO
Date: Thu, 8 Oct 2020 17:42:03 +0200 [thread overview]
Message-ID: <4e7e32a6-4f7d-ae57-533f-cadfdf91299c@metafoo.de> (raw)
In-Reply-To: <20201008150539.GQ4077@smile.fi.intel.com>
On 10/8/20 5:05 PM, Andy Shevchenko wrote:
> Hi!
>
> During internal review of one patch I have been puzzled with the following code
> and Pierre suggested to ask mailing list for help.
>
> My main concern is what was the idea behind? Does it mean we support optional
> DMA in such case? If now, why not to return an error code directly?
>
> ---8<---8<---8<---
>
>> Why ASoC core has the following code in the first place:
>>
>> 387 chan = dma_request_chan(dev, name);
>> 388 if (IS_ERR(chan)) {
>> 389 if (PTR_ERR(chan) == -EPROBE_DEFER)
>> 390 return -EPROBE_DEFER;
>> 391 pcm->chan[i] = NULL;
>> 392 } else {
>> 393 pcm->chan[i] = chan;
>> 394 }
>>
>> (note lines 389-391).
>> If PIO fallback is not okay, why not to return an error there?
> no idea, the code has been this way since 2013
> (5eda87b890f867b098e5566b5543642851e8b9c3)
>
> It's worth asking the question on the mailing list, I don't know if this is a
> bug or a feature.
>
This is to handle the case where a only TX or only RX is supported. In
that case it is not an error if only one DMA channel is specified.
next prev parent reply other threads:[~2020-10-08 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 15:05 (Optional?) DMA vs. PIO Andy Shevchenko
2020-10-08 15:29 ` Stephen Warren
2020-10-08 15:42 ` Lars-Peter Clausen [this message]
2020-10-08 15:46 ` Mark Brown
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=4e7e32a6-4f7d-ae57-533f-cadfdf91299c@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@intel.com \
--cc=broonie@kernel.org \
--cc=michael.wei.hong.sit@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=swarren@nvidia.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).