Hi!
I'm having a little problem to conigure the McASP on an AM3359. I use an ADS1278 ADC with a Beaglebone (AM3359) running Angstrom Linux. I modified the alsa asoc drivers/codecs to read 16 24bit values through McASP (2 ADS1278 dasychained).
Since I can't handle 24bit datatypes in my application without casting them previously, I'd like to handle this step in the "receive format unit" on the McASP module. I figured out that there's a way to convert 24bit values to 32bit with padding the bits[24:31] with the value of bit 23.
How can I tell the McASP module to stop reading after 3 bytes to generate the 32bit value and the read the next 3 bytes?
Thanks for helping!
hitsch
Hi,
Have a look at the Format Unit section (22.3.9.2) of the AM335x TRM for this. The Linux driver has some bits of code to handle the 24bits format that you can build upon. Try updating DAVINCI_MCASP_PCM_FMTS and see if things work.
Regards,
Vaibhav
---------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
Hi Vaibhav
Thanks! Using SNDRV_PCM_FORMAT_S32_LE, setting up bit padding and configuring a slot length of 24 for DAVINCI_MCASP_RXFMT_REG solved the problem.It's not really generic though.
Hi chrigima, i'm in a similar project with the beaglebone, i'm using the pcm 1808 for audio input, and i really need help: can you tell me how exactly did you modify the alsa drivers to get the data aout of the ADC??
Thanks!!
Hi Ezequiel
What distro are you working with?
I'm using Ubuntu 12.10 on the beaglebone.
Sorry for the delay