[sdiy] Audio CODECs

Robin Whittle rw at firstpr.com.au
Mon Mar 5 05:27:27 CET 2012


Hi Dan,

In "Re: [sdiy] 32 bit RISC MIPS32 PICs in 28 pin DIP with audio codec
interfaces & USB" you wrote:

> i keep hearing about this but what are audio codecs and what is a
> good one?

"Codec" means "coder-decoder".  It is a broadly used term, and may apply
to software and hardware, for instance in encoding digitized speech into
a voice-synthesis model compressed datastream and decoding such a stream
to produce digitised, resynthesised, voice-like signals.  There is such
a codec, in software I guess, in every digital cellphone, since none of
them transmit the raw digital sounds.

Anyway, in the context of digital audio Analog to Digital Converters and
Digital to Analog Converters (ADCs and DACs) a "codec" is a chip which
contains both.

Most common, perhaps, are those which handle 16 bit stereo and can do
44.1kHz (CD sampling rate) and perhaps higher rates.

I don't have any particular device in mind, but there are plenty of them:

 http://www.google.com/search?q=CODEC+%2216+bit%22+stereo

Texas Instruments took over Burr Brown some years ago, and Burr Brown
were historically the leaders in 16 bit DACs.  If you click on the
"Audio CODEC" link at:

  http://www.ti.com/lsds/ti/analog/audio/audio_overview.page

you should get a listing of 68 devices.  Right now, it doesn't work for
me (Initializing Tool ...) but I assume it will work properly soon.

Some of the Burr Brown devices are:

  http://www.ti.com/product/pcm3008

Generally, the best way is to use a sigma-delta ADC (hard to explain - I
still don't fully understand them - a very fast 1 bit ADC linearized to
16 bits or more by digital processing) and a conventional 16 bit to
current or voltage DAC, but with the DAC driven by a 4x or 8x
oversampling filter.

This means we don't need fancy Low Pass Filters (LPFs) on the inputs or
outputs.  If conventional ADCs and DACs were running at 44.1kHz, we
would need a really fancy and hard to create LPF with a sharp rolloff
around half this frequency, for each input and output channel.

These audio codecs often use a serial digital interface called I2S.  The
32 bit PIC microcontrollers I mentioned have a serial interface which
can support this, with First In First Out (FIFO) buffers so nothing is
lost if the CPU can't read or write the data in time.  Generally,
however, this interface would be fed by a DMA controller, with the CPU
running software to read and write the audio samples in circular buffers
in RAM, as the DMA tracks along these buffers and the FIFOs handle the
last moment timing of sending the samples one after the next to the DAC
of the CODEC and receiving likewise from the ACD part.

 - Robin




More information about the Synth-diy mailing list