Hi,
i want to transfer audio Dma Channel 1 to audio chip with SPI3.

i allocate memory for dma buffer, create dma descriptor, initialize spi3.

spi clock is working but nothing on tx line. log is below.
does any one has a sample which transfers audio buffer to spi3 or any idea
what could be wrong ?


+OEMInterruptHandler (25)
+OEMInterruptHandler BoardLevel IRQ_DMAC (25) g_pDMAReg->dint:0x2
DMA_AUDIO_INTR:0x32
+OEMInterruptHandler IRQ_DMAC:25 SYSINTR_AUDIO
Wave: dcsr: 0x80000000
PDD_AudioGetInterruptType+
Wave: Dma Chnl:0x1 OutputDmaInterrupt:0x4 - Dma Chnl InputDmaInterrupt:0x4
Wave:PDD_AudioGetInterruptType 2 AUDIO_STATE_OUT_PLAYING
Wave: PDD_AudioGetInterruptType-
+OEMInterruptHandler (25)
+OEMInterruptHandler BoardLevel IRQ_DMAC (25) g_pDMAReg->dint:0x2
DMA_AUDIO_INTR:0x32
+OEMInterruptHandler IRQ_DMAC:25 SYSINTR_AUDIO
MDD Audio Playing
Wave: dcmd: 0x9021C390
Wave: WPDM_START-
MDD No more data. List is NULL. Stopping audio
Wave: WPDM_ENDOFDATA+
Wave: WaveOutEndOfData.
Wave: WPDM_ENDOFDATA-
MDD No input state change. Do nothing
Wave: PDD_AudioGetInterruptType+
Wave: Dma Chnl:0x1 OutputDmaInterrupt:0x4 - Dma Chnl InputDmaInterrupt:0x4
Wave:PDD_AudioGetInterruptType 2 AUDIO_STATE_OUT_STOPPED
Wave: PDD_AudioGetInterruptType-

+OEMInterruptHandler (25)
+OEMInterruptHandler BoardLevel IRQ_DMAC (25) g_pDMAReg->dint:0x2
DMA_AUDIO_INTR:0x32
+OEMInterruptHandler IRQ_DMAC:25 SYSINTR_AUDIO
MDD Audio Stopped!
Wave: WPDM_STANDBY+
Wave: StopDmaOut
Wave: WaveOutStandby.
Wave: WPDM_STANDBY-
MDD No input state change. Do nothing
Wave: PDD_AudioGetInterruptType+
Wave: Dma Chnl:0x1 OutputDmaInterrupt:0xc - Dma Chnl InputDmaInterrupt:0x4
Wave:PDD_AudioGetInterruptType 1 AUDIO_STATE_OUT_STOPPED
Wave: PDD_AudioGetInterruptType-

/////same log forever

Thanks

Re: audio dma to spi by Silver

Silver
Fri Apr 18 12:02:38 PDT 2008

Verify that your TX line for the SPI controller is in SPI TX mode in the pin
multiplexer.

We have absolutely no idea what SPI3 is, as we have no idea what SOC/BSP you
are talking about.

Geoff
--


Re: audio dma to spi by Alli

Alli
Fri Apr 18 12:08:54 PDT 2008

Hi,

pxa 270, mainstone ii bsp, ce5.0 .
i can send data manually. but in audio driver when data comes to pdd
sssr:0xf024 is dcsr:0x108
then
sssr:0x8 dcsr:0xfadc

thanks.


"Silver" <moc.liamtoh@gnirrevliseht> wrote in message
news:uPA0HbYoIHA.1768@TK2MSFTNGP03.phx.gbl...
> Verify that your TX line for the SPI controller is in SPI TX mode in the
> pin multiplexer.
>
> We have absolutely no idea what SPI3 is, as we have no idea what SOC/BSP
> you are talking about.
>
> Geoff
> --
>



Re: audio dma to spi by Silver

Silver
Fri Apr 18 14:12:19 PDT 2008

Help me to help you, did you check the SPI pin mux?

What does 'send data manually' mean? Using PIO? From the debugger? I am
unsure what you are getting at here.

Have you looked at the what the register bits for sssr and dcsr mean as well
as the DMA registers? (I am not going to do it for you, you need to tell
us).


Geoff
--


Re: audio dma to spi by Alli

Alli
Sun Apr 20 23:53:42 PDT 2008

Hi
when i put some data on ssdr and i can see it on oscilloscope. but nothing
while dma transfer.

sssr:0xf024 means
TNF: TX FIFO Not Full
TFS: TX FIFO level is at or below its trigger threshold (TFT + 1), an
interrupt or DMA service request is generated.

dcsr:0x108
STOPINTR: The channel is in uninitialized or stopped state.
REQPEND: A request is pending for the channel

Thanks


"Silver" <moc.liamtoh@gnirrevliseht> wrote in message
news:%23JcBmjZoIHA.5096@TK2MSFTNGP02.phx.gbl...
> Help me to help you, did you check the SPI pin mux?
>
> What does 'send data manually' mean? Using PIO? From the debugger? I am
> unsure what you are getting at here.
>
> Have you looked at the what the register bits for sssr and dcsr mean as
> well as the DMA registers? (I am not going to do it for you, you need to
> tell us).
>
>
> Geoff
> --
>




Re: audio dma to spi by Silver

Silver
Mon Apr 21 09:00:57 PDT 2008

It seems likethe DMA transfer was never started, or points at the incorrect
destination.

What is the pending request that the data channel has?


Re: audio dma to spi by Alli

Alli
Mon Apr 21 23:40:32 PDT 2008

Hi,

SSP3 settings are same as I2S emulation with SSP port section in PXA 270
manual.

in PDD_AudioInitialize

OutputDmaChannel= 0x01;
InputDmaChannel = 0x04;
gIntrAudio=0x19;
Allocate memmory for DMA buffer and decriptors.
set GPIO pin direction and AltFn settings.

enable SSP3
Create DMA decriptors
map OutputChannel 1 to DRCMR67 for SSP3 TX


intr.c
OEMInterruptHandler

else if(irq == IRQ_DMAC)
{
volatile BULVERDE_DMA_REG *g_pDMAReg= NULL;
g_pDMAReg = (volatile BULVERDE_DMA_REG *)
OALPAtoVA(BULVERDE_BASE_REG_PA_DMAC, FALSE);
irq,g_pDMAReg->dint,DMA_AUDIO_INTR));

//Log =BoardLevel IRQ_DMAC (0x19) g_pDMAReg->dint:0x2 DMA_AUDIO_INTR:0x32
//dint is channel 1 . i think i made a mistake here.

CLRREG32(&g_pICReg->icmr, (1 << irq));
if (g_pDMAReg->dint & DMA_AUDIO_INTR)
{
sysIntr = SYSINTR_AUDIO;

}
...

Thanks


"Silver" <moc.liamtoh@gnirrevliseht> wrote in message
news:%23XsWlj8oIHA.6096@TK2MSFTNGP06.phx.gbl...
> It seems likethe DMA transfer was never started, or points at the
> incorrect destination.
>
> What is the pending request that the data channel has?
>





Re: audio dma to spi by Silver

Silver
Tue Apr 22 09:49:50 PDT 2008

My train of thought is like this:
You have verified that the Alt Func is setup (you can send data using PIO).
Hence you have also verified that the SSP port is setup and functional.

Now you want to add DMA -
Setup the DMA destination to the SSP3 TxFIFO
Setup the source to a buffer
Kick DMA go

Did anything work?


Then move on to verifying the IRQ, setting up double buffering DMA.

So, do you ever see anything on the SSP when DMA is started? Ok - DMA is
setup corectly, move onto the interrupt setup.

Do you ever see a DMA interrupt? Verify that the correct IRQ was used in
InterruptInitialize and that the OAL can handle the IRQ.
Verify that the DMA done IRQ is enabled for the channel and that the global
DMA irq is enabled (if it works that way on pxa270),.

I'm afraid I don't have the time to run thru the PXA270 spec to check the
interrupt register anable bits and DMA IRQ setup right now, sorry.

Geoff
--


Re: audio dma to spi by Alli

Alli
Tue Apr 22 13:42:07 PDT 2008

thanks, i will try to rewrite driver on weekend.


"Silver" <moc.liamtoh@gnirrevliseht> wrote in message
news:eI7LjjJpIHA.1768@TK2MSFTNGP03.phx.gbl...
> My train of thought is like this:
> You have verified that the Alt Func is setup (you can send data using
> PIO). Hence you have also verified that the SSP port is setup and
> functional.
>
> Now you want to add DMA -
> Setup the DMA destination to the SSP3 TxFIFO
> Setup the source to a buffer
> Kick DMA go
>
> Did anything work?
>
>
> Then move on to verifying the IRQ, setting up double buffering DMA.
>
> So, do you ever see anything on the SSP when DMA is started? Ok - DMA is
> setup corectly, move onto the interrupt setup.
>
> Do you ever see a DMA interrupt? Verify that the correct IRQ was used in
> InterruptInitialize and that the OAL can handle the IRQ.
> Verify that the DMA done IRQ is enabled for the channel and that the
> global DMA irq is enabled (if it works that way on pxa270),.
>
> I'm afraid I don't have the time to run thru the PXA270 spec to check the
> interrupt register anable bits and DMA IRQ setup right now, sorry.
>
> Geoff
> --
>