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

Timur Tabi timur at freescale.com
Tue May 29 20:10:09 CEST 2007

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.

I guess in the PowerPC world, the codec driver can query the codec node in the device 
tree, but ideally there would need to be some standard interface.

Timur Tabi
Linux Kernel Developer @ Freescale

More information about the Alsa-devel mailing list