Re: TR: codec audio Cirrus CS42L51 - Audio capture problems

From: Liam Girdwood
Date: Wed Oct 10 2007 - 06:35:15 EST


On Wed, 2007-10-10 at 10:20 +0200, Pierre Savary wrote:

>
> I am currently writing a driver for the CS42L51 audio codec to work with
> at91sam9260, using I2C and I2S. I used the couple of files {
> /sound/soc/at91/eti_b1_wm8731.c , /sound/soc/codecs/wm8731.c } as a model.
> I succeeded in playing sounds using the codec (WAV or MP3), via /dev/dsp.
>
> Unfortunately, I encounter problems implementing the opposite, i.e.
> recording sounds. For example, when I launch the command "cat /dev/dsp >
> foo.wav", or the command "wavrec foo.wav", I get "read error: Input/output
> error".
>
> I have observed the clock signals and the RD signal (data sent from the
> codec), and when I launch the command, these signals seem correct (data is
> provided by the codec on RD pin and all signals are correctly synchronized
> together).
>
> I didn't modify the driver dedicated to the configuration of at91sam9260
> registers (at91-i2s.c) and it seems to me it should work in both ways
> (playback and record). I notably checked that the RFMR and RCMR registers of
> at91sam9260 were well configured.
>
> Do someone has an idea on where the error could come from ? I must precise
> that, as I don't work with a kernel debugger, I didn't localize where the
> error occurs.
>

Can you try "arecord -f cd -Dhw:0,0 > file.wav" as this will rule out
any OSS emulation or PCM plugin issues (this command will read directly
from your hardware).

Fwiw, this error is usually seen in capture when the upper alsa layers
don't receive any data from your hardware. This could mean your DMA or
your I2S port is not configured correctly.

Liam



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/