alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dmaengine: Document support for TX only or RX only streams
@ 2020-10-08 16:11 Mark Brown
  2020-10-09 10:27 ` Andy Shevchenko
  2020-10-09 15:01 ` Mark Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Mark Brown @ 2020-10-08 16:11 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: alsa-devel, Stephen Warren, Andy Shevchenko, Liam Girdwood,
	Pierre-Louis Bossart, Mark Brown, Michael Wei Hong Sit

We intentionally do not return an error if we get a permanent failure
from dma_request_chan() in order to support systems which have TX only
or RX only channels. Add a comment documenting this.

Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-generic-dmaengine-pcm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index fb95c1464e66..9ef80a48707e 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -386,6 +386,11 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
 			name = config->chan_names[i];
 		chan = dma_request_chan(dev, name);
 		if (IS_ERR(chan)) {
+			/*
+			 * Only report probe deferral errors, channels
+			 * might not be present for devices that
+			 * support only TX or only RX.
+			 */
 			if (PTR_ERR(chan) == -EPROBE_DEFER)
 				return -EPROBE_DEFER;
 			pcm->chan[i] = NULL;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-13 13:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-10-12 18:26             ` Mark Brown
2020-10-13 13:02               ` Andy Shevchenko
2020-10-09 15:01 ` Mark Brown

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).