Skip to content

Commit

Permalink
ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation
Browse files Browse the repository at this point in the history
This follows the same idea than commit 10df350
("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>
  • Loading branch information
Jarkko Nikula authored and Mark Brown committed May 13, 2014
1 parent 6fb8b02 commit dfe1951
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sound/soc/intel/sst-baytrail-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,16 @@ static int sst_byt_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct snd_pcm *pcm = rtd->pcm;
size_t size;
struct snd_soc_platform *platform = rtd->platform;
struct sst_pdata *pdata = dev_get_platdata(platform->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) {
size = sst_byt_pcm_hardware.buffer_bytes_max;
ret = snd_pcm_lib_preallocate_pages_for_all(pcm,
SNDRV_DMA_TYPE_DEV,
rtd->card->dev,
pdata->dma_dev,
size, size);
if (ret) {
dev_err(rtd->dev, "dma buffer allocation failed %d\n",
Expand Down

0 comments on commit dfe1951

Please sign in to comment.