[linux-cirrus] Re: redboot / sound support

  • From: uhmgawa <uhmgawa@xxxxxxxxxxxxxx>
  • To: linux-cirrus@xxxxxxxxxxxxx
  • Date: Tue, 10 May 2005 10:42:22 -0400

Valentin MISSIER wrote:
> I am now trying to use the analog (later I2S) sound output. I build the 
> 2.6.11.7 kernel with sound support and devfs, so I have /dev/sound/dsp and 
> all.
> Sound does not work for me (I am trying to build aumix to see if that's a 
> mixer problem...). A simple "cat sound.au > /dev/sound/dsp" does not work for 
> me.
> However, mpg123 seems very slow (even though I can't hear any sound from the 
> output), as I use kernel soft floating point (the regular kind, as with the 
> fast kernel soft float engine I cannot login).

The 9302 eval board arrived with an windoZe ce
app which could decode an mp3 file and render
PCM to the onboard codec which I believe is
operating in I2S mode.  In my attempt to decode
the audio section of the data manual it appears
only I2S mode furnishes a clock from the 92xx to
external circuitry.  So this agrees with usage
of the CS4271 codec.

I was curious at what frequency the codec was running
so I measured the MCLK input of the CS4271 which was
11.06835Mhz.  This appears odd as the audio frame
rate (LRCK) is divided by MCLK for one of: 64, 96,
128, 192, 256, 384, 512, 768, 1024.. of which only a
subset apply depending upon master/slave mode and
oversampling rate [x1,x2,x4].

My point here is MCLK running at 11.06835Mhz
doesn't divide to a familiar frame rate,  Eg: 32Khz,
44.1Khz, 48Khz, etc..

divisor      LRCK
----------------------
MCLK/128     86.471Khz
MCLK/192     57.647Khz
MCLK/256     43.235Khz
MCLK/384     28.823Khz

Some of these look closer to baud rates than
conventional audio sample rates.  So it is possible
Cirrus created the mp3 at an oddball frame rate, or
just let it decode at the wrong frame rate, or this
is somehow a bug in the wince driver.  Regrettably
the wince bits are no longer available for
experimentation as they have been overwritten by
redboot when that battle started.

Anyone out there using I2S under linux successfully
(either with the CS4271 or another codec) and able
to generate a standard LRCK frame rate?

-- 
uhmgawa@xxxxxxxxxxxxxx        www.gnu.org

Other related posts: