summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/sst-haswell-pcm.c
diff options
context:
space:
mode:
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>2014-05-02 16:56:31 +0100
committerMark Brown <broonie@linaro.org>2014-05-02 09:53:02 -0700
commit10df350977b15d44dba0b3b44e3da7989711cb8d (patch)
tree4c8c6254379f1a798b8a072f3067e5c002a1c362 /sound/soc/intel/sst-haswell-pcm.c
parent0b708c87f66a15190fb43661c2320fd48c4dc6c8 (diff)
ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.
The Intel IOMMU requires that the ACPI device is used to allocate all DMA memory buffers. This means we need to pass the DMA device pointer into child component devices that allocate DMA memory. We also only set the DMA mask for the ACPI device now instead of for each component device. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/intel/sst-haswell-pcm.c')
-rw-r--r--sound/soc/intel/sst-haswell-pcm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c
index dc53f501c64..ba585a75878 100644
--- a/sound/soc/intel/sst-haswell-pcm.c
+++ b/sound/soc/intel/sst-haswell-pcm.c
@@ -633,17 +633,16 @@ static void hsw_pcm_free(struct snd_pcm *pcm)
static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct snd_pcm *pcm = rtd->pcm;
+ struct snd_soc_platform *platform = rtd->platform;
+ struct sst_pdata *pdata = dev_get_platdata(platform->dev);
+ struct device *dev = pdata->dma_dev;
int ret = 0;
- ret = dma_coerce_mask_and_coherent(rtd->card->dev, DMA_BIT_MASK(32));
- if (ret)
- return ret;
-
if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream ||
pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_DEV_SG,
- rtd->card->dev,
+ dev,
hsw_pcm_hardware.buffer_bytes_max,
hsw_pcm_hardware.buffer_bytes_max);
if (ret) {