[alsa-devel] ASoC and a codec that can't be controlled

Liam Girdwood lg at opensource.wolfsonmicro.com
Wed May 30 14:28:40 CEST 2007

On Tue, 2007-05-29 at 13:10 -0500, Timur Tabi wrote:
> Liam Girdwood wrote:
> > Some codecs can only support a small range of sample rates e.g. 8k &
> > 48k, whilst your controller may support more. This just makes sure the
> > audio is set a rate the codec can handle, otherwise audio quality will
> > probably suffer.
> What about boards where the codec does *not* dictate the available sample rates?  That is, 
> what if the SOC can't generate the frequencies necessary to drive the codec at all the 
> rates it supports?  The codec driver would then need to be told by the machine driver 
> which sample rates are going to be used.  When the codec driver is initialized, it needs 
> to set the snd_soc_codec.dai field to point to the codec's DAI, and that structure 
> contains the list of supported sample rates.

ASoC creates a bitmask of supported sample rates from the DMA, I2S
controller and codec and then AND's them together. It then checks the
requested rate, etc against this bitmask before proceeding. This way the
whole audio system dictates the supported rate and not any single


More information about the Alsa-devel mailing list