Skip to contentSkip to conversation

dmaengine: dw-dmac: Custom cyclic API (Why?)

DISCUSSION Jose Abreu 4 participants 10 messages Dec 30, 2016 – May 22, 2017

lore
Share & tools
lore

Jose Abreu

author
#0 lore raw

Hi All,

I am going to work with dw-dmac AHB controller and I wanted to use SND_DMAENGINE_PCM. In order to use this, a standard DMA driver with cyclic support is needed. I found out that dw-dmac is capable of cyclic transfers but instead of using the DMA engine standard cyclic API it uses a custom API. Is there any specific reason for this? What is the effort to change the custom API to a standard DMA engine cyclic API?

Best regards,

Jose Miguel Abreu

author
#1 lore raw

++dw-dmac Maintainers

Quoted 16 lines · Jose Abreu

Hi All,

I am going to work with dw-dmac AHB controller and I wanted to use SND_DMAENGINE_PCM. In order to use this, a standard DMA driver with cyclic support is needed. I found out that dw-dmac is capable of cyclic transfers but instead of using the DMA engine standard cyclic API it uses a custom API. Is there any specific reason for this? What is the effort to change the custom API to a standard DMA engine cyclic API?

Best regards,

Jose Miguel Abreu

#2 lore raw
Quoted 15 lines · Jose Abreu

++dw-dmac Maintainers

Quoted 11 lines · Jose Abreu

Hi All,

I am going to work with dw-dmac AHB controller and I wanted to use SND_DMAENGINE_PCM. In order to use this, a standard DMA driver with cyclic support is needed. I found out that dw-dmac is capable of cyclic transfers but instead of using the DMA engine standard cyclic API it uses a custom API. Is there any specific reason for this? What is the effort to change the custom API to a standard DMA engine cyclic API?

Because it was a predecessor of generic implementation.

I used to have some semi-finished patch to switch to generic API, though at that point I had no means to test it.

Since I eventually got iDMA 32-bit, which is used as LPE Audio DMA engine, support in my branch I might test it in the future, though I think someone else would be much faster than me.

So, I can share whatever I have to the topic with someone who is really interested to do that task.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#3 lore raw
Quoted 17 lines · Andy Shevchenko
Quoted 15 lines · Jose Abreu

++dw-dmac Maintainers

Quoted 11 lines · Jose Abreu

Hi All,

I am going to work with dw-dmac AHB controller and I wanted to use SND_DMAENGINE_PCM. In order to use this, a standard DMA driver with cyclic support is needed. I found out that dw-dmac is capable of cyclic transfers but instead of using the DMA engine standard cyclic API it uses a custom API. Is there any specific reason for this? What is the effort to change the custom API to a standard DMA engine cyclic API?

Quoted 1 line

Because it was a predecessor of generic implementation.

And we don't have an implementation that uses this.

Quoted 6 lines

I used to have some semi-finished patch to switch to generic API, though at that point I had no means to test it.

Since I eventually got iDMA 32-bit, which is used as LPE Audio DMA engine, support in my branch I might test it in the future, though I think someone else would be much faster than me.

no we can't, since the DSP is involved and takes control, so unless we do lots of nasty hacks, it won't be testable. I don't see the ROI for such an effort.

not sure about non intel ones, viresh?

btw, feel free to test and send patches if you have such a h/w

Signature · 1 line
~Vinod
#4 lore raw
Quoted 1 line · Vinod Koul

not sure about non intel ones, viresh?

Not sure really :(

Signature · 1 line
viresh
#5 lore raw
In reply to Vinod Koul
Quoted 12 lines · Vinod Koul
Quoted 10 lines · Andy Shevchenko
Quoted 1 line · Jose Abreu

++dw-dmac Maintainers

I used to have some semi-finished patch to switch to generic API, though
at that point I had no means to test it.

Since I eventually got iDMA 32-bit, which is used as LPE Audio DMA engine, support in my branch I might test it in the future, though I think someone else would be much faster than me.

Quoted 5 lines

no we can't, since the DSP is involved and takes control, so unless we do
lots of nasty hacks, it won't be testable. I don't see the ROI for such an
effort.

Thanks for clarification

Quoted 1 line

btw, feel free to test and send patches if you have such a h/w

Actually we have AVR32 connected to our lab. So, I can test it there, but I rather need a patch to use some dummy stub instead of codec (it has no codec connected).

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
author
#6 lore raw

Hi,

Quoted 16 lines · Andy Shevchenko
Quoted 7 lines · Vinod Koul
Quoted 6 lines · Andy Shevchenko
Quoted 1 line · Jose Abreu

++dw-dmac Maintainers

I used to have some semi-finished patch to switch to generic API, though
at that point I had no means to test it.

Quoted 8 lines
Quoted 3 lines

Since I eventually got iDMA 32-bit, which is used as LPE Audio DMA engine, support in my branch I might test it in the future, though I think someone else would be much faster than me.

no we can't, since the DSP is involved and takes control, so unless we do
lots of nasty hacks, it won't be testable. I don't see the ROI for such an
effort.

Quoted 7 lines

Thanks for clarification

Quoted 1 line

btw, feel free to test and send patches if you have such a h/w

Actually we have AVR32 connected to our lab. So, I can test it there, but I rather need a patch to use some dummy stub instead of codec (it has no codec connected).

Thank you all for the info. I don't have the HW ready to test yet (I was collecting some info first), but when I do I can test on my side using Designware I2S and ALSA SoC DMA engine.

Best regards,
Jose Miguel Abreu

#7 lore raw
Quoted 13 lines · Jose Abreu
Quoted 11 lines · Andy Shevchenko
Quoted 2 lines · Vinod Koul
Quoted 1 line · Andy Shevchenko

On Fri, 2016-12-30 at 12:05 +0000, Jose Abreu wrote:

Actually we have AVR32 connected to our lab. So, I can test it there,
but I rather need a patch to use some dummy stub instead of codec (it
has no codec connected).

Quoted 3 lines

Thank you all for the info. I don't have the HW ready to test yet (I was collecting some info first), but when I do I can test on my side using Designware I2S and ALSA SoC DMA engine.

Just TWIMC, AVR32 is going to be removed from kernel.
It means in particularly I will follow up and remove related bits in dw_dmac driver, including custom cyclic API.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
author
#8 lore raw

Hi Andy,

Quoted 12 lines · Andy Shevchenko
Quoted 11 lines · Jose Abreu
Quoted 10 lines · Andy Shevchenko
Quoted 2 lines · Vinod Koul
Quoted 1 line · Andy Shevchenko

On Fri, 2016-12-30 at 12:05 +0000, Jose Abreu wrote:

Actually we have AVR32 connected to our lab. So, I can test it there,
but I rather need a patch to use some dummy stub instead of codec (it
has no codec connected).

Quoted 7 lines
Quoted 3 lines

Thank you all for the info. I don't have the HW ready to test yet (I was collecting some info first), but when I do I can test on my side using Designware I2S and ALSA SoC DMA engine.

Just TWIMC, AVR32 is going to be removed from kernel.
It means in particularly I will follow up and remove related bits in dw_dmac driver, including custom cyclic API.

Thanks for sharing this! Unfortunately the plans to include a DMA for I2S audio were postponed so I never got to the point of implementing/testing it. As I don't see any plans in using this cyclic DMA for now I guess if I need to use it I will implement it again using the standard cyclic DMA engine API.

Best regards,
Jose Miguel Abreu

#9 lore raw
Quoted 25 lines · Jose Abreu
Quoted 14 lines · Andy Shevchenko
Quoted 13 lines · Jose Abreu
Quoted 11 lines · Andy Shevchenko
Quoted 3 lines · Vinod Koul
Quoted 1 line · Andy Shevchenko

On Fri, 2016-12-30 at 12:05 +0000, Jose Abreu wrote:

Actually we have AVR32 connected to our lab. So, I can test it there,
but I rather need a patch to use some dummy stub instead of codec
(it
has no codec connected).

Quoted 8 lines
Quoted 3 lines

Thank you all for the info. I don't have the HW ready to test yet (I was collecting some info first), but when I do I can test on my side using Designware I2S and ALSA SoC DMA engine.

Just TWIMC, AVR32 is going to be removed from kernel.
It means in particularly I will follow up and remove related bits in dw_dmac driver, including custom cyclic API.

Quoted 5 lines

Thanks for sharing this! Unfortunately the plans to include a DMA for I2S audio were postponed so I never got to the point of implementing/testing it. As I don't see any plans in using this cyclic DMA for now I guess if I need to use it I will implement it again using the standard cyclic DMA engine API.

Just heads up TWIMC the custom API has been removed.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy