User:VanInwagen
From Openmoko
"matthiasfelsche" at "web" dot "de"
Fiddlin' with Alsa and the Wolfson
While writing Dictator 0.3 I came in trouble with recording and playing audio an the neo. Something seems wrong with either my state-files for Dictator or with the configuration of the wolfson or with the wolfson itself or something mysterious.
Strange Behaviour
trying arecord with only one channel on either 'hw:0' or 'hw:0,0' produces the following:
root@om-gta02 ~ $ arecord -v --channels=1 -f S16_LE -r 8000 -D hw:0 Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono arecord: set_params:906: Channels count non available
Recording with two channels works.
While playing a stereo wav-file the following is putted out to dmesg:
[87893.780000] mapped channel 10 to 2
Recording a wav with Dictator and explicitly saying, that one channel is used, the other one is putted into the file as well. If you do something like:
cat test.wav | od -x | less
You can see the double-bytes with regular no-data values (0x0000 or 0xffff or similar). On the Neo these files are played in their declared speed but if you for example load them into audacity on your host-PC it will play the file twice as slow because it reads the second frame with 0-data too.
Where does this mysterious double.byte come from and why does the Neo ignore it? Recording with two-channels where one explicitly bears the empty channel, everything is fine on neo and on host-PC.
Removing the NULL-Bytes while recording mono, the file will be played at the right speed on your host but the Neo will double its speed.
I think it's the wolfson but i have to investigate.
Info Output Stuff
$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: neo1973gta02 [neo1973-gta02], device 0: WM8753 HiFi WM8753 HiFi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: neo1973gta02 [neo1973-gta02], device 1: Voice WM8753 Voice-1 [] Subdevices: 1/1 Subdevice #0: subdevice #0
root@om-gta02 ~ $ cat /proc/asound/devices 0: [ 0] : control 16: [ 0- 0]: digital audio playback 17: [ 0- 1]: digital audio playback 24: [ 0- 0]: digital audio capture 25: [ 0- 1]: digital audio capture 33: : timer
root@om-gta02 ~ $ cat /proc/asound/pcm 00-00: WM8753 HiFi WM8753 HiFi-0 : : playback 1 : capture 1 00-01: Voice WM8753 Voice-1 : : playback 1 : capture 1
root@om-gta02 ~ $ cat /proc/asound/cards 0 [neo1973gta02 ]: WM8753 - neo1973-gta02 neo1973-gta02 (WM8753)
root@om-gta02 ~ $ cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 1.0.18a.