]> Git Repo - J-linux.git/commitdiff
ASoC: dmaengine: Document support for TX only or RX only streams
authorMark Brown <[email protected]>
Thu, 8 Oct 2020 16:11:05 +0000 (17:11 +0100)
committerMark Brown <[email protected]>
Fri, 9 Oct 2020 14:11:20 +0000 (15:11 +0100)
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
sound/soc/soc-generic-dmaengine-pcm.c

index fb95c1464e66d4e21da00173ec77fbdcf2046128..9ef80a48707eb6583ff51ec278c1a5b035970ba1 100644 (file)
@@ -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;
This page took 0.050444 seconds and 4 git commands to generate.