Re: [PATCH] ASoC: tegra: use dmaengine based dma driver

From: Laxman Dewangan
Date: Mon Jul 02 2012 - 04:29:44 EST


On Saturday 30 June 2012 08:38 PM, Laxman Dewangan wrote:
On Friday 29 June 2012 10:32 PM, Stephen Warren wrote:
On 06/29/2012 05:34 AM, Laxman Dewangan wrote:
Use the dmaengine based Tegra APB DMA driver for
data transfer between SPI fifo and memory in
place of legacy Tegra APB DMA.

Because generic soc-dmaengine-pcm uses the DMAs API
based on dmaengine, using the exported APIs provided
by this generic driver.

The new driver is selected if legacy driver is not
selected and new dma driver is enabled through config
file.
This works just fine with the existing non-dmaengine DMA driver enabled.

However, I can't get it to work with dmaengine:

# aplay ~/abba-dq-48000-stereo.wav
[ 151.613476] tegra20-i2s tegra20-i2s.0: dmaengine pcm open failed with err -6
[ 151.620557] tegra20-i2s tegra20-i2s.0: can't open platform tegra20-i2s.0: -6
aplay: main:654: audio open error: No such device or address
With the error, it seems that dmachannel is not getting allocated.

I do have the following in my local tree:
68a67b8 ARM: tegra: add device tree AUXDATA for APBDMA
0db7a96 ARM: tegra: dma: rename driver name for clock to "tegra-apbdma"

Some dma changes which I sent and already on linux-next are also require
with the above change.
Alsong with that I have local change like to rename the dma driver to
compatible with dts files (remove -new from driver).

I think I should send that patches so that you can test it by:
- Taking already applied dma driver change in linux-next.
- Apply my new patches which I am going to send.

And do local change in the tegra_defconfig to disable SYSTEM_DMA and
enable dmaengine based dma driver.


The new dma patches are:

dma: tegra: fix residual calculation for cyclic case
dma: tegra: rename driver and compatible to match with dts

You require dma changes which is already in linux-next:

dma: tegra: set DMA_CYCLIC capability
dma: tegra: do not set transfer desc flag to DMA_CTRL_ACK in cyclic mode
dma: tegra: add clk_prepare/clk_unprepare
dma: tegra: use sg_dma_address() for getting dma buffer address
dma: tegra: add dmaengine based dma driver



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/