diff mbox

[2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation

Message ID 1399643264-7669-2-git-send-email-jarkko.nikula@linux.intel.com (mailing list archive)
State Accepted
Commit dfe1951b0c1c6a80b8ad8702eb93f8a4dffa31f1
Headers show

Commit Message

Jarkko Nikula May 9, 2014, 1:47 p.m. UTC
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>
---
 sound/soc/intel/sst-baytrail-pcm.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Mark Brown May 12, 2014, 10:10 p.m. UTC | #1
On Fri, May 09, 2014 at 04:47:44PM +0300, Jarkko Nikula wrote:
> 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.

Is this needed as a bug fix?
Jarkko Nikula May 13, 2014, 7:30 a.m. UTC | #2
On 05/13/2014 01:10 AM, Mark Brown wrote:
> On Fri, May 09, 2014 at 04:47:44PM +0300, Jarkko Nikula wrote:
>> 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.
> Is this needed as a bug fix?
Not really. AFAIK this IOMMU issues doesn't hit on Baytrail so this 2/2 
is more like keeping code in sync.
Mark Brown May 13, 2014, 10:54 a.m. UTC | #3
On Fri, May 09, 2014 at 04:47:44PM +0300, Jarkko Nikula wrote:
> 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.

Applied, thanks.
diff mbox

Patch

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)
 {
 	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",