Re: [LAD] Opening ALSA devices (hardware and PCM)

From: Clemens Ladisch <clemens@email-addr-hidden>
Date: Tue Jun 08 2010 - 10:27:05 EEST

Julien Claassen wrote:
> I was wondering, is there a difference in opening a device like
> plughw:0,0
> and
> plug:pcm.my_own_device

If my_own_device is defined as a hw device, no.

> I've looked in the code of aplay

aplay is more a debugging tool for driver than an example for application
writers.

> The application is question is chan_alsa from asterisk. So it's quite
> limited: configured for 8kHz, 16bit (either se or le) and mono. They use a
> fixed periodsize and connected buffer.

There is no guarantee that ALSA devices support any particular period
or buffer sizes.

> I want to connect a pcm-device wired to JACK to the asterisk software, yet
> it either tells me, that the argument is invalid Plug:pcm.name or plug:name)
> or it gets read/write errors or it simply crashes.

I've looked into chan_alsa.c; it doesn't take the actual period size
into account when setting the buffer size (so it could be possible that
the buffer is too small), and it doesn't abort on errors (so the actual
device parameters could be anything).

Are there any error messages in the asterisk log?

Regards,
Clemens
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Jun 8 12:15:02 2010

This archive was generated by hypermail 2.1.8 : Tue Jun 08 2010 - 12:15:02 EEST