During probe, the Baytrail audio driver reports errors such as:
[44.172040] baytrail-pcm-audio baytrail-pcm-audio: error: invalid DMA engine 0 [44.172137] baytrail-pcm-audio baytrail-pcm-audio: sst_dma_new failed
Those error messages are misleading, there is no error since the DMA is explicitly not configured for Baytrail. Add a test to remove DMA error checks when DMA is not configured and return silently.
Acked-by: Liam Girdwood liam.r.girdwood@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/intel/sst-acpi.c | 1 + sound/soc/intel/sst-dsp.h | 1 + sound/soc/intel/sst-firmware.c | 4 ++++ 3 files changed, 6 insertions(+)
diff --git a/sound/soc/intel/sst-acpi.c b/sound/soc/intel/sst-acpi.c index b3d8456..42f293f 100644 --- a/sound/soc/intel/sst-acpi.c +++ b/sound/soc/intel/sst-acpi.c @@ -142,6 +142,7 @@ static int sst_acpi_probe(struct platform_device *pdev) sst_acpi->desc = desc; sst_acpi->mach = mach;
+ sst_pdata->resindex_dma_base = desc->resindex_dma_base; if (desc->resindex_dma_base >= 0) { sst_pdata->dma_engine = desc->dma_engine; sst_pdata->dma_base = desc->resindex_dma_base; diff --git a/sound/soc/intel/sst-dsp.h b/sound/soc/intel/sst-dsp.h index f291e32..148d8c5 100644 --- a/sound/soc/intel/sst-dsp.h +++ b/sound/soc/intel/sst-dsp.h @@ -206,6 +206,7 @@ struct sst_pdata { const struct firmware *fw;
/* DMA */ + int resindex_dma_base; /* other fields invalid if equals to -1 */ u32 dma_base; u32 dma_size; int dma_engine; diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index 5f71ef6..4a993d1 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -271,6 +271,10 @@ int sst_dma_new(struct sst_dsp *sst) const char *dma_dev_name; int ret = 0;
+ if (sst->pdata->resindex_dma_base == -1) + /* DMA is not used, return and squelsh error messages */ + return 0; + /* configure the correct platform data for whatever DMA engine * is attached to the ADSP IP. */ switch (sst->pdata->dma_engine) {