alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	Stephen Warren <swarren@nvidia.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Michael Wei Hong Sit <michael.wei.hong.sit@intel.com>
Subject: Re: [PATCH] ASoC: dmaengine: Document support for TX only or RX only streams
Date: Mon, 12 Oct 2020 19:31:47 +0300	[thread overview]
Message-ID: <20201012163147.GD4077@smile.fi.intel.com> (raw)
In-Reply-To: <20201012154803.GG4332@sirena.org.uk>

On Mon, Oct 12, 2020 at 04:48:03PM +0100, Mark Brown wrote:
> On Mon, Oct 12, 2020 at 04:55:27PM +0300, Andy Shevchenko wrote:
> 
> > Currently those drivers need to do something like:
> 
> > 	if (of_property_is_present("dma-names"))
> > 		ret = try DMA mode;
> > 	else
> > 		ret = try PIO mode;
> 
> > but this seems to me a bit stricter than needed. What if DMA mode fails, shall
> > we fail the probe of the driver?
> 
> They can also just try registering DMA and fall back to PIO.

There is no possibility to do like this right now.

> > If ASoC supports optional DMA resources, above can be simplified to something
> > like:
> 
> > 	ret = try DMA mode;
> > 	if (ret != DMA mode ok)
> > 		ret = try PIO mode;
> 
> > which makes OF dependent parts gone along with relying on the properties rather
> > than real resource availability.
> 
> I don't understand the blocker to writing that code at the minute?

Return code in both cases DMA okay, DMA is not okay is 0.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2020-10-12 16:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 16:11 [PATCH] ASoC: dmaengine: Document support for TX only or RX only streams Mark Brown
2020-10-09 10:27 ` Andy Shevchenko
2020-10-09 10:31   ` Andy Shevchenko
2020-10-12 13:37     ` Mark Brown
2020-10-12 13:55       ` Andy Shevchenko
2020-10-12 15:48         ` Mark Brown
2020-10-12 16:31           ` Andy Shevchenko [this message]
2020-10-12 18:26             ` Mark Brown
2020-10-13 13:02               ` Andy Shevchenko
2020-10-09 15:01 ` 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=20201012163147.GD4077@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --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).