[alsa-devel] Fwd: enabling a20 allwinner audio codec to 24bit
ricardo.crudo at gmail.com
Thu May 22 23:30:35 CEST 2014
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
and the A20 datasheet here:
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:
The played sound is:
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.
More information about the Alsa-devel