FoxBoard G20 Audio Support Preview
On this page you can find all the information about the development
to add audio support
to Foxboard using the new Daisy cabling system.
The audio codec used is the WM8731, is low power stereo codecs with an integrated headphone driver, stereo line-out, stereo line-in and mono microphone level audio inputs.
WM8731 Codecs is supported by the Linux kernel and works with alsa drivers.
Schematics daisy_16_audio.pdf
The communication between the FoxBoard and the Codecs is done by SSC (Synchronous Serial Controller) for the audio interface (Daisy D5 ←→ J2)
and I²C for control interface (Daisy D6 ←→ J1).
| Audio Interface | ||||||
|---|---|---|---|---|---|---|
| PB16 | PB17 | PB18 | PB19 | PB21 | PB20 1) | |
| SSC | TK0 | TF0 | TD0 | RD0 | RF0 | RK0 |
| Control Interface | ||
|---|---|---|
| PA23 | PA24 | |
| I²C | TWD | TWCK |
| Master Clock | |
|---|---|
| PB31 | |
| Programmable Clock | PCK1 |
WM8731 codecs is supported in the linux kernel but to be used with the daisy16 needs some changes. You must apply an additional patch.
these kernels contain the default acmesystems configuration with Daisy16 Support
Files to store in the first FAT16 partition:
Linux kernel 2.6.35.4
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.4.tar.bz2 $ tar -xjvf linux-2.6.35.4.tar.bz2 $ cd linux-2.6.35.4 $ wget http://www.acmesystems.it/foxg20/download/kernel/0003-Acme-Systems-board-files.patch $ patch -p1 < 0003-Acme-Systems-board-files.patch $ wget http://www.acmesystems.it/foxg20/download/kernel/makefile
$ tar -xzvf daisy16_26354.tar.gz $ patch -p1 < daisy16_26354/daisy16_26354.patch
$ cp daisy16_26354/daisy16_26354.config .config
$ make menuconfig
$ make
Linux kernel 2.6.38
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.tar.bz2 $ tar -xjvf linux-2.6.38.tar.bz2 $ cd linux-2.6.38 $ wget http://foxg20.acmesystems.it/download/kernel_2.6.38/makefile
$ tar -xzvf daisy16_2638.tar.gz $ patch -p1 < daisy16_2638/daisy16_2638.patch
$ cp daisy16_2638/daisy16_2638.config .config
$ make menuconfig
$ make
... ssc ssc.0: Atmel SSC device at 0xc48a0000 (irq 14) ... netusG20_wm8731 : daisy16: wm8731__init() called asoc: wm8731-hifi <-> atmel-ssc-dai.0 mapping ok ALSA device list: #0: DAISY16 ...
apt-get install alsa-utils
alsamixer -V all
arecord -d 5 -v -v -Dhw:0,0 -f cd record_line_in.wav
aplay record_line_in.wav
A great console music player is cmus
apt-get install cmus cmus
Cmus has a syntax very similar to vim:
:add 'directory_audio' # add audio file to playlist :q # exit to cmus z # previous x # play c # pause v # stop b # next ^L # refresh n # search-next r # toggle repeat 1 # view tree 2 # view sorted 3 # view playlist 4 # view queue 5 # view browser 6 # view filters 7 # view settings + # vol +10% - # vol -10%