summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-generic-dmaengine-pcm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-10-08 18:11:05 +0200
committerMark Brown <broonie@kernel.org>2020-10-09 16:11:20 +0200
commit86f29c7442ac4ba5fe19fc2ada457f76c0080dd6 (patch)
treeb4ccc96962338b19b77b220e014879feb7f9bc89 /sound/soc/soc-generic-dmaengine-pcm.c
parentASoC: mchp-spdiftx: remove 'TX' from playback stream name (diff)
downloadlinux-86f29c7442ac4ba5fe19fc2ada457f76c0080dd6.tar.xz
linux-86f29c7442ac4ba5fe19fc2ada457f76c0080dd6.zip
ASoC: dmaengine: Document support for TX only or RX only streams
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> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://lore.kernel.org/r/20201008161105.21804-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-generic-dmaengine-pcm.c')
-rw-r--r--sound/soc/soc-generic-dmaengine-pcm.c5
1 files changed, 5 insertions, 0 deletions
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;