Audio Clocks On SAM9X60
Introduction
In current SAM9X60 design, there is no exclusive fractional PLL for audio applications. Nevertheless, we can still reconfigure PLLA in at91bootstrap to generate the audio clocks required by our audio peripherals. In the absence of the Audio PLL, the audio peripherals use PLLA to generate the Generic clock, just like the rest of the peripherals do. This leads to imprecise clocks for the audio peripherals, which, in the end, results in clicks and pops on the audio streams. To fix this, the PLLA can be configured in the AT91Bootstrap to generate a clock closer to (or exactly) what the audio peripherals require. Please use the attached AT91Bootstrap GIT patches to adjust PLLA for the required audio peripheral.
I2S GIT patch
The I2S patch will make PLLA generate a clock of (48 * Main Crystal Oscillator) / 2. On SAM9X60-EK there is a 24 MHz Crystal, so PLLA will generate a clock of 576 MHz. In the end, this will help provide a Generic clock of 1.536 KHz required by I2S to capture/playback a 48 KHz audio stereo stream with S16_LE format (48 * 2 * 16). For different sampling frequencies, channel number or audio format, different values are required for PLLA.
CLASSD GIT patch
The CLASSD patch will make PLLA generate a clock of (49 + 637,534×10³/2^22) * Main Crystal Oscillator) / 2. On SAM9X60-EK there is a 24 MHz Crystal, so PLLA will generate a clock of 588 MHz. In the end, this will help provide a Generic clock of 96 MHz, close to the CLASSD's DSP clock of 12.288 KHz (* 8) to playback a 48 KHz audio mono stream with S16_LE format. For different sampling frequencies, channel number or audio format, we will need different values for PLLA.
Related Topics
Boards
Components
Summary
How to configure PLLA in AT91bootstrap to generate clocks for SAM9X60