[alsa-devel] ASoC: at91sam9260-PCM1808/TAS5709-based board driver

Pedro I. Sanchez psanchez at fosstel.com
Thu Aug 27 21:11:49 CEST 2009

> On Tue, Aug 25, 2009 at 03:46:14PM -0400, Pedro I. Sanchez wrote:
>> The big quest for me now is to figure out what "cmr_div" and "period"
>> have to be. They must be different for each sample rate. Any pointers
>> would be appreciated.
> There should be a clocking diagram in the CPU manual which will show how
> things are interrelated.  The period of a clock will be 1/rate - the
> length of time taken for a clock cycle.

I'm still struggling with the clocks but in the mean time I have a related
question. Why is it that if I play a 24-bit encoded play the hw_params()
function in my driver is called with SNDRV_PCM_FORMAT_S16_LE format? Does
ALSA makes an on-the-fly conversion?

$ aplay c2_24.wav
Playing WAVE 'c2_24.wav' : Signed 24 bit Little Endian in 3bytes, Rate
44100 Hz, Mono

... and my ipspeaker machine driver module says:

Aug 27 15:03:15 ubuntu kernel: ipspeaker_hw_params: pcm rate is 44100
Aug 27 15:03:16 ubuntu kernel: ipspeaker_hw_params: PCM format

I would expect my driver to be told that the format is
SNDRV_PCM_FORMAT_S24_LE. Why is this?



More information about the Alsa-devel mailing list