Welcome, Guest

Author Topic: Problem with 'speaker-test'  (Read 4309 times)

djrose

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Problem with 'speaker-test'
« on: March 05, 2014, 12:32:41 PM »
I'm running the application 'speaker-test' as detailed on http://linux-sunxi.org/Audio_Codec

Unfortunately I repeatedly get the error message:

Code: [Select]
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

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Problem with 'speaker-test'
« Reply #1 on: March 05, 2014, 01:40:11 PM »
A step forward ...

If I try the commands:

Code: [Select]
speaker-test -D hw:0,0 -twav -c2
and

Code: [Select]
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

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Problem with 'speaker-test'
« Reply #2 on: March 05, 2014, 02:07:54 PM »
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:

Code: [Select]
pcm.!default {
  type hw
  card 0
  device 0
}

ctl.!default {
  type hw
  card 0
}


visionimpaired

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Problem with 'speaker-test'
« Reply #3 on: March 05, 2014, 10:25:40 PM »
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

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Problem with 'speaker-test'
« Reply #4 on: March 06, 2014, 09:34:06 AM »
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:

Code: [Select]
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.