Audio Recording on AT91SAM9G20EK

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:
  1. modified the ssc driver so it will handle receiving clock.
  2. Add in board file the ssc reception capability.

Linux Kernel revision Experimental patches
Linux 2.6.27 2.6.27-atmel_ssc-exp.patch.gz

An example of application

  • To test this patch:
  1. Set alsamixer properly (enable the capture)
  2. 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

ssc_connection_with_codec.png

Microphone input and Bias Application drawing

mic_hw_schematic.png

Where according to the Wolfson 8731 Datasheet:

  • C1 = 220 pF
  • C2 = 1 uF
  • R1 = 680 ohms
  • R2 = 47 kohms
I Attachment Action Size Date WhoSorted ascending Comment
Unknown file formatpatch atmel_ssc_2.6.27.patch manage 1.1 K 2009-10-27 - 12:07 NicolasFerre  
PNGpng mic_hw_schematic.png manage 12.3 K 2009-10-27 - 12:06 NicolasFerre hardware schematic(MIC)
PNGpng ssc_connection_with_codec.png manage 9.1 K 2009-10-27 - 12:07 NicolasFerre Connection between atmel ssc and codec