This thread may be useful. http://www.cubieforums.com/index.php?topic=1081.0
As soon as I get the new DMA code from Emilio I can check 24b out in my 3.16 ALSA driver. On Mon, Jul 14, 2014 at 2:25 PM, <[email protected]> wrote: > Hello > > Some time ago I was trying enable the A20 audio codec to work with 24bit, I > think I gave one step forward, but I stopped in other point. Hope someone > could help with this. Bellow is the e-mail that I sent to alsa developers > list. > > --- > > Hello, > > I'm working with sunxi-codec of allwinner A20 device. Currently the > codec driver works only for 16bit mode, the source code can be found > here: > https://github.com/linux-sunxi/linux-sunxi/tree/sunxi-3.4/sound/soc/sunxi, > and the A20 datasheet here: > https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-PDFs/A20%20User%20Manual%202013-03-22.pdf. > > Reading the allwinner A20 datasheet and doing some modifications on > sunxi code I managed the codec to work in 24bit mode. However, it > isn't working properly. When I play a stereo wav file using the aplay > command the audio data of both channels are played mixed in only one > channel and the another channel didn't plays any sound. > > For example, picture a wav stereo file with this samples: > left right > 0.5 -0.5 > 0.4 -0.4 > 0.3 -0.3 > 0.2 -0.2 > > The played sound is: > left right > 0.5 0.0 > -0.5 0.0 > 0.4 0.0 > -0.4 0.0 > 0.3 0.0 > -0.3 0.0 > 0.2 0.0 > -0.2 0.0 > > The A20 datasheet says: > "DAC TX DATA REGISTER (TXDATA): Transmitting left, right channel > sample data should be written this register one by one. The left > channel sample data is first and then the right channel sample." > > I guess that this is related with the problem, despite the datasheet > didn't notify, I think that in 16bit mode the TXDATA transmits both > channels data together as the register is 32bit. > > I'm not familiar writing alsa driver and other alsa working concepts. > I hope someone can help me with this. > > The diff file of sunxi-codec.c is here: http://pastebin.com/raw.php?i=SvypkVU6 > > I appreciate any help. > > Regards, > Ricardo > > -- > You received this message because you are subscribed to the Google Groups > "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- Jon Smirl [email protected] -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
