* [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
@ 2014-05-09 13:47 Jarkko Nikula
2014-05-09 13:47 ` [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation Jarkko Nikula
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Jarkko Nikula @ 2014-05-09 13:47 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is
enabled.") caused following regression in Baytrail SST:
baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed
baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware
Fix this by calling dma_coerce_mask_and_coherent() in sst_byt_init() with
the same dma_dev device what is now used in sst_fw_new() when allocating the
DMA buffer.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/sst-baytrail-dsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/sst-baytrail-dsp.c b/sound/soc/intel/sst-baytrail-dsp.c
index 4a5d489e520b..fc588764ffa3 100644
--- a/sound/soc/intel/sst-baytrail-dsp.c
+++ b/sound/soc/intel/sst-baytrail-dsp.c
@@ -324,7 +324,7 @@ static int sst_byt_init(struct sst_dsp *sst, struct sst_pdata *pdata)
return ret;
}
- ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
+ ret = dma_coerce_mask_and_coherent(sst->dma_dev, DMA_BIT_MASK(32));
if (ret)
return ret;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation
2014-05-09 13:47 [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Jarkko Nikula
@ 2014-05-09 13:47 ` Jarkko Nikula
2014-05-12 22:10 ` Mark Brown
2014-05-13 10:54 ` Mark Brown
2014-05-12 22:09 ` [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Mark Brown
2014-05-13 17:26 ` [PATCH 1/2] " Mark Brown
2 siblings, 2 replies; 12+ messages in thread
From: Jarkko Nikula @ 2014-05-09 13:47 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
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(-)
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",
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation
2014-05-09 13:47 ` [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation Jarkko Nikula
@ 2014-05-12 22:10 ` Mark Brown
2014-05-13 7:30 ` Jarkko Nikula
2014-05-13 10:54 ` Mark Brown
1 sibling, 1 reply; 12+ messages in thread
From: Mark Brown @ 2014-05-12 22:10 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 347 bytes --]
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?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation
2014-05-12 22:10 ` Mark Brown
@ 2014-05-13 7:30 ` Jarkko Nikula
0 siblings, 0 replies; 12+ messages in thread
From: Jarkko Nikula @ 2014-05-13 7:30 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
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.
--
Jarkko
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation
2014-05-09 13:47 ` [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation Jarkko Nikula
2014-05-12 22:10 ` Mark Brown
@ 2014-05-13 10:54 ` Mark Brown
1 sibling, 0 replies; 12+ messages in thread
From: Mark Brown @ 2014-05-13 10:54 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 335 bytes --]
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.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-09 13:47 [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Jarkko Nikula
2014-05-09 13:47 ` [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation Jarkko Nikula
@ 2014-05-12 22:09 ` Mark Brown
2014-05-13 7:22 ` Jarkko Nikula
2014-05-13 17:26 ` [PATCH 1/2] " Mark Brown
2 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2014-05-12 22:09 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 403 bytes --]
On Fri, May 09, 2014 at 04:47:43PM +0300, Jarkko Nikula wrote:
> Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is
> enabled.") caused following regression in Baytrail SST:
>
> baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed
> baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware
Is this needed on fix/intel? If so it doesn't apply there...
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-12 22:09 ` [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Mark Brown
@ 2014-05-13 7:22 ` Jarkko Nikula
2014-05-13 10:53 ` Mark Brown
0 siblings, 1 reply; 12+ messages in thread
From: Jarkko Nikula @ 2014-05-13 7:22 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
On 05/13/2014 01:09 AM, Mark Brown wrote:
> On Fri, May 09, 2014 at 04:47:43PM +0300, Jarkko Nikula wrote:
>> Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is
>> enabled.") caused following regression in Baytrail SST:
>>
>> baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed
>> baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware
> Is this needed on fix/intel? If so it doesn't apply there...
Indeed it doesn't. I accidentally made it on top of my suspend/resume
set and it appears to conflict without [PATCH 4/7] ASoC: Intel: Move
Baytrail extended fw address saving to sst_byt_boot()".
In case you are thinking to queue Liam's 10df350977b1 as a fix Is it ok
if I resend this on top of it and handle conflict when merging
origin/topic/intel?
--
Jarkko
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-13 7:22 ` Jarkko Nikula
@ 2014-05-13 10:53 ` Mark Brown
2014-05-13 12:46 ` [PATCHv2] " Jarkko Nikula
0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2014-05-13 10:53 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]
On Tue, May 13, 2014 at 10:22:08AM +0300, Jarkko Nikula wrote:
> In case you are thinking to queue Liam's 10df350977b1 as a fix Is it ok if I
> resend this on top of it and handle conflict when merging
> origin/topic/intel?
Yes, it's on my fix/intel branch - please send a fix based off that.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCHv2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-13 10:53 ` Mark Brown
@ 2014-05-13 12:46 ` Jarkko Nikula
2014-05-13 17:21 ` Mark Brown
0 siblings, 1 reply; 12+ messages in thread
From: Jarkko Nikula @ 2014-05-13 12:46 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is
enabled.") caused following regression in Baytrail SST:
baytrail-pcm-audio baytrail-pcm-audio: error: DMA alloc failed
baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware
Fix this by calling dma_coerce_mask_and_coherent() in sst_byt_init() with
the same dma_dev device what is now used in sst_fw_new() when allocating the
DMA buffer.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
For fix/intel branch.
---
sound/soc/intel/sst-baytrail-dsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/sst-baytrail-dsp.c b/sound/soc/intel/sst-baytrail-dsp.c
index a50bf7fc0e3a..adf0aca5aca6 100644
--- a/sound/soc/intel/sst-baytrail-dsp.c
+++ b/sound/soc/intel/sst-baytrail-dsp.c
@@ -324,7 +324,7 @@ static int sst_byt_init(struct sst_dsp *sst, struct sst_pdata *pdata)
memcpy_toio(sst->addr.lpe + SST_BYT_MAILBOX_OFFSET,
&pdata->fw_base, sizeof(u32));
- ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
+ ret = dma_coerce_mask_and_coherent(sst->dma_dev, DMA_BIT_MASK(32));
if (ret)
return ret;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCHv2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-13 12:46 ` [PATCHv2] " Jarkko Nikula
@ 2014-05-13 17:21 ` Mark Brown
0 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2014-05-13 17:21 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]
On Tue, May 13, 2014 at 03:46:06PM +0300, Jarkko Nikula wrote:
> Commit 10df350977b1 ("ASoC: Intel: Fix Audio DSP usage when IOMMU is
> enabled.") caused following regression in Baytrail SST:
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-09 13:47 [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Jarkko Nikula
2014-05-09 13:47 ` [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation Jarkko Nikula
2014-05-12 22:09 ` [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Mark Brown
@ 2014-05-13 17:26 ` Mark Brown
2014-05-14 6:18 ` Jarkko Nikula
2 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2014-05-13 17:26 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 379 bytes --]
On Fri, May 09, 2014 at 04:47:43PM +0300, Jarkko Nikula wrote:
> - ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
> + ret = dma_coerce_mask_and_coherent(sst->dma_dev, DMA_BIT_MASK(32));
> if (ret)
> return ret;
My resolution of the merge of your revised version and topic/intel looks
like this so I *think* it's OK but please check that I did the right
thing.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading
2014-05-13 17:26 ` [PATCH 1/2] " Mark Brown
@ 2014-05-14 6:18 ` Jarkko Nikula
0 siblings, 0 replies; 12+ messages in thread
From: Jarkko Nikula @ 2014-05-14 6:18 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
On 05/13/2014 08:26 PM, Mark Brown wrote:
> On Fri, May 09, 2014 at 04:47:43PM +0300, Jarkko Nikula wrote:
>
>> - ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
>> + ret = dma_coerce_mask_and_coherent(sst->dma_dev, DMA_BIT_MASK(32));
>> if (ret)
>> return ret;
> My resolution of the merge of your revised version and topic/intel looks
> like this so I *think* it's OK but please check that I did the right
> thing.
Thanks, it's ok! And sorry the mess, I was somehow blind to see Liam's
patch being 3.15 material. Hurry to weekend I guess.
--
Jarkko
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-05-14 6:18 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 13:47 [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Jarkko Nikula
2014-05-09 13:47 ` [PATCH 2/2] ASoC: Intel: Use ACPI device for Baytrail PCM buffer allocation Jarkko Nikula
2014-05-12 22:10 ` Mark Brown
2014-05-13 7:30 ` Jarkko Nikula
2014-05-13 10:54 ` Mark Brown
2014-05-12 22:09 ` [PATCH 1/2] ASoC: Intel: Fix Baytrail SST DSP firmware loading Mark Brown
2014-05-13 7:22 ` Jarkko Nikula
2014-05-13 10:53 ` Mark Brown
2014-05-13 12:46 ` [PATCHv2] " Jarkko Nikula
2014-05-13 17:21 ` Mark Brown
2014-05-13 17:26 ` [PATCH 1/2] " Mark Brown
2014-05-14 6:18 ` Jarkko Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox