Audio Recording on AT91SAM9G20EK
Last modified by Microchip on 2025/06/09 11:08
Introduction
This page is a starting point to add recording functions to the AT91SAM9G20EK board (using Wolfson 8731). It contains the software and Hardware modifications needed.
Here are some basic tools needed to test this feature:
- Rootfs from OpenEmbedded / Angstrom (the one you will find OpenEmbeddedAngstrom page & GettingStarted demos)
- arecord package(command line example: arecord -d 10 -f cd -t wav test.wav)
Software modifications and usage
Kernel patch
The patched is against kernel 2.6.27 + Andrew Victor patches + 2.6.27-at91-exp.3.patch.
- Add support for audio capture on AT91SAM9G20EK:
- modified the ssc driver so it will handle receiving clock.
- Add in board file the ssc reception capability.
| |||||
An example of application
- To test this patch:
- Set alsamixer properly (enable the capture)
Run arecord, for instance:
arecord -d 10 -f cd -t wav test.wav
it will record a 10 seconds wave file (-f cd is 16 bit little endian, 44100, stereo)
Hardware modifications
Connections between the codec and the at91sam9g20 chip:
- RF(PB21)<---->TF <----> ADCLRC<---->DACLRC
- TK ----> BCLK
- TD(PB18) ----> DACDAT
- RD(PB19) <---- ADCDAT
Microphone input and Bias Application drawing
Where according to the Wolfson 8731 Datasheet:
- C1 = 220 pF
- C2 = 1 uF
- R1 = 680 ohms
- R2 = 47 kohms