Problem with 'speaker-test'

Started by djrose, March 05, 2014, 12:32:41 PM

Previous topic - Next topic

djrose

I'm running the application 'speaker-test' as detailed on http://linux-sunxi.org/Audio_Codec

Unfortunately I repeatedly get the error message:

ALSA lib pcm_direct.c:1505:(_snd_pcm_direct_get_slave_ipc_offset) Invalid value for card
Playback open error: -2,No such file or directory


I've tried it with both the official "A10 OLinuXino LIME Debian image release-2" and with a self-built image from http://olimex.wordpress.com/2014/01/15/building-debian-linux-bootable-sd-card-with-hardware-accelerated-video-decoding-and-kernel-3-4-for-a10-olinuxino-lime/  - And both give the same result.

Similar errors occur with other sound related tools (such as 'aplay').

Does anyone else see the same error message? Any ideas about what is happening?

djrose

A step forward ...

If I try the commands:

speaker-test -D hw:0,0 -twav -c2

and

aplay -D hw:0,0 sample.wav

I hear sound correctly. That device name of hw:0,0 is the key.

It looks like I'm doing something wrong with the editing of file /etc/asound.conf. Don't know what though  :(

djrose

The details at http://linux-sunxi.org/Audio_Codec don't work for me. hw:0,0 is card 0, device 0 - but the details talk of card 1.

So, the file /etc/asound.conf needed the following added to have the default device operational:

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

ctl.!default {
  type hw
  card 0
}



visionimpaired

Thanks for your info on the speaker.
Where do you attach the speaker to the LIME.
Can the lime drive line out or do you need an amplified speaker/
TIA.
V

djrose

Quote from: visionimpaired on March 05, 2014, 10:25:40 PM
Where do you attach the speaker to the LIME.
Can the lime drive line out or do you need an amplified speaker/

I'm connecting small earphones/headphones to:

HPOUTL (Left)  on GPIO-1, pin 16
HPOUTR (Right) on GPIO-1, pin 18
HPCOM  (Common)on GPIO-1, pin 16


You would likely need a small amplifier to connect up to larger speakers.