[asterisk-users] Asterisk throws error using the alsa, module
vitaminx
vitaminx at callistix.net
Mon Dec 14 13:42:50 CST 2009
On Mon, 14 Dec 2009 11:02:02 -0800, Dave Platt <dplatt at radagast.org>
wrote:
>>> See if it plays back properly.
>>
>> Running aplay as asterisk user seems to be no problem:
>>
>> asterisk at puppy$ aplay /usr/share/sounds/alsa/Front_Center.wav
>> Playing: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit
>> Little Endian, Rate: 48000 Hz, mono
>> asterisk at puppy:~$ aplay -Dpulse /usr/share/sounds/alsa/Front_Center.wav
>> Wiedergabe: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16
>> bit
>> Little Endian, Rate: 48000 Hz, mono
>> asterisk at puppy:~$ aplay -Ddefault
/usr/share/sounds/alsa/Front_Center.wav
>> Wiedergabe: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16
>> bit
>> Little Endian, Rate: 48000 Hz, mono
>>
>> pulseaudio spawns itself as it should:
>>
>> asterisk at puppy:~$ ps -A | grep pulse
>> 23820 ? 00:00:00 pulseaudio
>>
>>
>> this works as defined in /etc/asound.conf:
>>
>> asterisk at puppy:~$ cat /etc/asound.conf
>> pcm.pulse {
>> type pulse
>> }
>>
>> ctl.pulse {
>> type pulse
>> }
>>
>> pcm.!default {
>> type pulse
>> }
>>
>> ctl.!default {
>> type pulse
>> }
>
> I haven't used pulseaudio myself, nor the ALSA plugin to
> redirect audio through it. I infer that by default
> you're routing ALSA connections through the pulseaudio
> plugin/connector, and that the pulseaudio daemon has been
> configured to send its output to a different ALSA device
> (e.g. to hw: or plughw:)?
>
> Best I can suggest, at this point, is that you check
> to see whether you can turn on some sort of debugging
> in the pulseaudio daemon, to see what sort of connections
> it's receiving from clients, and what it's doing with them.
>
> It's possible that there's some sort of access-permission
> problem in pulseaudio and it's refusing to allow connections
> from asterisk for some reason.
this i got from syslog:
puppy:~# grep pulse /var/log/syslog | tail -3
Dec 14 20:32:45 puppy pulseaudio[25967]: main.c: Unable to contact D-Bus:
org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch
terminated abnormally without any error message
Dec 14 20:32:46 puppy pulseaudio[25967]: alsa-source.c:
snd_pcm_mmap_commit: The device or resource is busy
Dec 14 20:39:11 puppy pulseaudio[26368]: main.c: Unable to contact D-Bus:
org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch
terminated abnormally without any error message
Hmmm, since aplay / arecord are working fine - is it maybe that asterisk
wants to lock the soundcard exclusively?
>>
>> i've acticated the alsa plugin for asterisk:
>>
>> puppy:/etc/asterisk# grep -E 'alsa|oss' modules.conf
>> load => chan_alsa.so
>> noload => chan_oss.so
>>
>> puppy:/etc/asterisk# grep default alsa.conf
>> input_device=default
>> output_device=default
>
> Might try setting these to "pulse" rather than
> "default", perhaps?
The same result :/
>> i'm running pulseaudio on top of alsa. through setting /etc/asound.conf
>> as
>> above any calls to alsa should be redirected to pulseaudio (at least
>> that's
>> what i thought).
>
>> Asterisk Ready.
>> *CLI> console dial s
>> *CLI> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read
>> error: Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
>> Input/output error
>> [repeated indefinitely until killed]
>
> Hmmm. Since these are occurring when reading a channel, it indicates
> that it's the attempt to read audio from pulseaudio which isn't
> working. Have you confirmed that pulseaudio is in fact working
> correctly in both directions (using e.g. both aplay and arecord)?
recording works as desired:
asterisk at puppy:~$ arecord -Ddefault >test.wav
Aufnahme: WAVE 'stdin' : Unsigned 8 bit, Rate: 8000 Hz, mono
asterisk at puppy:~$ ls -l test.wav
-rw-r--r-- 1 asterisk asterisk 17044 14. Dez 20:26 test.wav
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
irc ..... #callistix @ freenode
mail ..... vitaminx at callistix.net
www ..... http://www.callistix.net
icecast ..... http://icecast.callistix.net:8000/
More information about the asterisk-users
mailing list