aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2014-05-09 09:47:44 -0400
committerMark Brown <broonie@linaro.org>2014-05-13 06:54:11 -0400
commitdfe1951b0c1c6a80b8ad8702eb93f8a4dffa31f1 (patch)
tree5ce76f2ffdd76ad3f3ba8a892c43495effd90507
parent6fb8b02b4be5fa41e39a26fc11b8093518713e30 (diff)
ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation
This follows the same idea than commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is enabled.") by using only ACPI device for all DMA allocations. Since DMA masking is already done in firmware loading it can be removed from here. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/intel/sst-baytrail-pcm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/intel/sst-baytrail-pcm.c b/sound/soc/intel/sst-baytrail-pcm.c
index 00a2118d20f5..0afb3491f5f0 100644
--- a/sound/soc/intel/sst-baytrail-pcm.c
+++ b/sound/soc/intel/sst-baytrail-pcm.c
@@ -319,18 +319,16 @@ static int sst_byt_pcm_new(struct snd_soc_pcm_runtime *rtd)
319{ 319{
320 struct snd_pcm *pcm = rtd->pcm; 320 struct snd_pcm *pcm = rtd->pcm;
321 size_t size; 321 size_t size;
322 struct snd_soc_platform *platform = rtd->platform;
323 struct sst_pdata *pdata = dev_get_platdata(platform->dev);
322 int ret = 0; 324 int ret = 0;
323 325
324 ret = dma_coerce_mask_and_coherent(rtd->card->dev, DMA_BIT_MASK(32));
325 if (ret)
326 return ret;
327
328 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream || 326 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream ||
329 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { 327 pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
330 size = sst_byt_pcm_hardware.buffer_bytes_max; 328 size = sst_byt_pcm_hardware.buffer_bytes_max;
331 ret = snd_pcm_lib_preallocate_pages_for_all(pcm, 329 ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
332 SNDRV_DMA_TYPE_DEV, 330 SNDRV_DMA_TYPE_DEV,
333 rtd->card->dev, 331 pdata->dma_dev,
334 size, size); 332 size, size);
335 if (ret) { 333 if (ret) {
336 dev_err(rtd->dev, "dma buffer allocation failed %d\n", 334 dev_err(rtd->dev, "dma buffer allocation failed %d\n",