Daisy 16 Audio adapter

 ''Audio support for FoxBoardG20''
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

Prototype Preview


Dimension: 40x40mm


WM8731 Codec Features

  • Stereo 24-bit multi-bit sigma delta ADCs and DACs are used with oversampling digital interpolation and decimation filters.
  • Highly Efficient Headphone Driver
  • Audio Performance : ADC SNR 90dB at 3.3V , DAC SNR 100dB at 3.3V
  • Low Power : Playback only 22mW
  • Selectable ADC High Pass Filter
  • Microphone Input and Electret Bias with Side Tone Mixer


Communication between foxboardG20 and Codecs

 ''Codecs Communication''
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 ClockPCK1


Add audio support to the Linux Kernel for the Daisy16

WM8731 codecs is supported in the linux kernel but to be used with the daisy16 needs some changes. You must apply an additional patch.

Precompiled Kernel Image

these kernels contain the default acmesystems configuration with Daisy16 Support

Files to store in the first FAT16 partition:

How to apply Madefree patch & recompile kernel

Linux kernel 2.6.35.4

  • Download the kernel sources and apply Acme Systems patch:
    $ 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
  • Download the Madefree Patch
    daisy16_26354.tar.gz (MD5:8e5ede6d218e34574c71cfdbcb880dfc)
  • Apply the patch:
    $ tar -xzvf daisy16_26354.tar.gz
    $ patch -p1 < daisy16_26354/daisy16_26354.patch
  • Then copy the .config to use the last Madefree factory default configuration files:
    $ cp daisy16_26354/daisy16_26354.config .config
  • Configuring your kernel:
    $ make menuconfig
  • Building your kernel:
    $ make

Linux kernel 2.6.38

  • Download the kernel sources :
    $ 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
  • Download the Madefree Patch
    daisy16_2638.tar.gz (MD5:c9f75aca53b6858c3c82edd5a497b718)
  • Apply the patch:
    $ tar -xzvf daisy16_2638.tar.gz
    $ patch -p1 < daisy16_2638/daisy16_2638.patch
  • Then copy the .config to use the last Madefree factory default configuration files:
    $ cp daisy16_2638/daisy16_2638.config .config
  • Configuring your kernel:
    $ make menuconfig
  • Building your kernel:
    $ make

Check the functionalities

  • Check dmesg after boot:
    ...
    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
    ...
    
  • Install alsa-utils
    apt-get install alsa-utils
  • Run alsamixer:
    alsamixer -V all
  • Configure ALSA like this
  • Launch recording for 5sec. stereo wav acquisition
    arecord -d 5 -v -v -Dhw:0,0 -f cd record_line_in.wav
  • Play what you recorded
    aplay record_line_in.wav

Play your music library

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%

Link

1) This line was used to Play-LED
 
daisy_audio.txt · Last modified: 2011/11/30 18:50 by daniele.sdei
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki