[alsa-devel] AT91 SoC PCM Capture

Frank Mandarino fmandarino at endrelia.com
Fri Jun 22 19:19:26 CEST 2007

Paul Kavan wrote:
> I am wondering what piece of code contains the capture functionality for
> the at91 soc. I am hoping to see how and when the pcm activates the ssc
> at read time. I just cannot figure out why TD0 would behave at such with
> this set of code and yet behave correctly with my polling code. Not a
> criticism....just wanting to figure this out.

There is very little distinction between Playback and Capture in the
ASoC AT91 implementation.  Each SSC has 2 DMA structures, one for each
direction.  The Playback DMA structure points at the SSC PDC transmit
registers and SSC transmit register masks, and the Capture DMA structure
points at the SSC PDC receive registers and SSC receive masks.  The DMA
structure to use is selected in at91_ssc_hw_params().

By doing this, at91-pcm.c DMA code can simply run the DMA transfers
without having to know which direction the data is being transferred.

Both receive and transmit SSC registers are initialized in
at91_ssc_hw_params(), regardless of the direction.

Frank Mandarino                                fmandarino(a)endrelia.com
Endrelia Technologies Inc.
Toronto, Ontario, Canada

More information about the Alsa-devel mailing list