[alsa-devel] Using aplay and arecord on an ARM

Frank Mandarino fmandarino at endrelia.com
Wed Jun 20 21:37:29 CEST 2007



Paul Kavan wrote:
> Frank:
> 
> 
>     Try adding the option "--with-versioned=no" to the alsa-libs configure. 
> 
> 
> That did the trick in terms of the sw params problem. With the default
> alsa.conf file, I can now get the speaker to make some noise. However,
> doing:
> 
> speaker-test -r8000 -f1000 -FS8 -tsine -l5
> 
> gives me a slightly distorted sine wave that has a period of half of
> what I would expect.

Better than no sound :)  At least something is getting through ALSA and
ASoC to your codec.

You may need to adjust the RCMR, RFRM, TCMR, TFRM register settings in
sound/soc/at91/at91-ssc.c to send the data in the mode that your codec
expects.  I have only tested I2S and DSP_A modes with S16_LE data.  It's
fairly easy to add new modes.


> 
> Frank, this is what I have for the small conf. I hope it is the right one:
> 
>
> pcm.!default {
>    type hw
>    card 0
> }
> pcm.hw {
>    type hw
>    card 0
>    device 0
>    subdevice 0
> }
> ctl.!default {
>    type hw
>    card 0
> }
> ctl.hw {
>    type hw
>    card 0
> }
> 
> 
> ctl.w6811 {
>        type hw
>        card 0
> }
> pcm.w6811 {
>        type hw
>        card 0
>        device 0
>        subdevice 0
> }
> 
> ctl.!default    = ctl.w6811
> pcm.!default    = pcm.w6811
> 
> ctl.hw {
>        @args[ CARD ]
>        @args.CARD {
>                type string
>                default "0"
>        }
>        type hw
>        card $CARD
> }
> 
> pcm.hw {
>        @args[ CARD DEV SUBDEV ]
>        @args.CARD {
>                type string
>                default "0"
>        }
>        @args.DEV {
>                type integer
>                default 0
>        }
>        @args.SUBDEV {
>                type integer
>                default 0
>        }
>        type hw
>        card $CARD
>        device $DEV
>        subdevice $SUBDEV
> }
> 
> However, when I use this as the conf, I get the following with aplay -l
> 
> /usr/share/alsa $ aplay -l
> **** List of PLAYBACK Hardware Devices ****
> ALSA lib conf.c:975:(parse_value) card is not a string
> ALSA lib conf.c:1588:(snd_config_load1) _toplevel_:45:1:Invalid argument
> ALSA lib conf.c:3066:(snd_config_update_r) /usr/share/alsa/alsa.conf may
> be old or corrupted: consit
> aplay: device_list:213: control open (0): Invalid argument
> 
> Not sure if I have the alsa.conf correct. So maybe it is a problem
> there. You mentioned a bare bones .conf, but I do not this is the only
> one I have in my email.

I don't see anything wrong with this alsa.conf, but I'm no expert.  It
is virtually the same as the one I am using, but I am using ALSA 1.0.13.

Here is the bare-bones config file that I was using before I added a
second sound device:

pcm.!default {
    type hw
    card 0
}
pcm.hw {
    type hw
    card 0
    device 0
    subdevice 0
}
ctl.!default {
    type hw
    card 0
}
ctl.hw {
    type hw
    card 0
}


../fam
-- 
Frank Mandarino                                fmandarino(a)endrelia.com
Endrelia Technologies Inc.
Toronto, Ontario, Canada


More information about the Alsa-devel mailing list