2009-07-01 15:17:51     bf537 SPORT, ad73311, DMA configuration

Document created by Aaronwu Employee on Aug 16, 2013
Version 1Show Document
  • View in full screen mode

2009-07-01 15:17:51     bf537 SPORT, ad73311, DMA configuration

Steven Vacca (UNITED STATES)

Message: 76601   

 

I am using the BF537. I need to send and rec audio to/from an AD73311 codec

using SPORT0. The kernel is configured to use the ad73311 driver, with pin PF6

set to select/enable the chip.

 

Are there any examples of code which implement the controlling of

the SPORT to Tx and Rx data, using DMA, to/from the ad73311?

 

The pertinent files, found in linux-2.6.x/sound/soc/blackfin, are:

 

bf5xx-ad73311.c

bf5xx-sport.c

 

When booting, the ad73311 is discovered properly. The configuration

code in snd_ad7331_configure(), in bf5xx-ad73311.c, is very straight forward,

and is transmitted properly.

 

But, once the SPORT is changed from Program mode to Data mode, it isn't

clear how to setup for DMA Tx/Rx of audio data to/from the 7311.

 

Thanks,

 

Steven

QuoteReplyEditDelete

 

 

2009-07-01 15:23:15     Re: bf537 SPORT, ad73311, DMA configuration

Mike Frysinger (UNITED STATES)

Message: 76602   

 

there is already a driver for the ad73311 ... is there something wrong with that ?

QuoteReplyEditDelete

 

 

2009-07-01 15:58:29     Re: bf537 SPORT, ad73311, DMA configuration

Steven Vacca (UNITED STATES)

Message: 76604   

 

Aren't the funcs in these two files the one that I should use?

 

bf5xx-ad73311.c

bf5xx-sport.c

QuoteReplyEditDelete

 

 

2009-07-01 16:00:52     Re: bf537 SPORT, ad73311, DMA configuration

Steven Vacca (UNITED STATES)

Message: 76605   

 

What I'm asking is, are there any code examples that utilize the driver funcs? It's very confusing to me.

QuoteReplyEditDelete

 

 

2009-07-01 16:16:12     Re: bf537 SPORT, ad73311, DMA configuration

Mike Frysinger (UNITED STATES)

Message: 76606   

 

it's all done via indirect function pointers.  nothing outside of that file should be calling those functions directly.  that is the point of the ALSA SoC framework.

 

if you're trying to find our way around said framework, the documentation can be found in the kernel:

linux-2.6.x/Documentation/sound/alsa/soc/overview.txt

QuoteReplyEditDelete

 

 

2009-07-01 21:38:27     Re: bf537 SPORT, ad73311, DMA configuration

Cliff Cai (CHINA)

Message: 76610   

 

Steven,

 

bf5xx-i2s-pcm.c is in charge of DMA jobs.It prepares the data for DMA and starts/stops DMA operations.

 

 

 

Cliff

QuoteReplyEditDelete

 

 

2009-07-02 10:28:34     Re: bf537 SPORT, ad73311, DMA configuration

Steven Vacca (UNITED STATES)

Message: 76686   

 

What am I opening in order to access the driver?  For example:

 

     fileDesc = open("/dev/??????",O_WRONLY,0);

 

What's an example of a typical ioctl() call to this driver?

 

     ioctl(fileDesc,cmd??????,(INT_32*) arg???);

   

If I have an output buff, outBuff[1024], and an input buff, inBuff[1024],

and I want to trigger the DMA transfer to/from the ad73311, what's an example of setting this

up and actually triggering it?

QuoteReplyEditDelete

 

 

2009-07-02 10:33:54     Re: bf537 SPORT, ad73311, DMA configuration

Mike Frysinger (UNITED STATES)

Message: 76688   

 

it's an ALSA driver which means you use the ALSA framework which means you use alsa-lib to send audio

 

or if you want something simple, use the OSS wrapper with /dev/dsp

QuoteReplyEditDelete

 

 

2009-07-02 10:46:44     Re: bf537 SPORT, ad73311, DMA configuration

Michael Hennerich (GERMANY)

Message: 76690    If you're looking for a simple /dev/dsp OSS example-

Then take a look at uclinux-dist/user/play/tone.c

 

-Michael

QuoteReplyEditDelete

Attachments

    Outcomes