Bug#293751: asterisk: chan_alsa.so hogs the soundcard

Hans Fugal Hans Fugal <hans@fugal.net>, 293751@bugs.debian.org
Tue, 8 Feb 2005 09:11:14 -0700


--SNIs70sCzqvszXB4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Killian,

On Tue,  8 Feb 2005 at 16:15 +0100, Kilian Krause wrote:
> as far as i understand the idea behind asterisk, it's meant to be a
> dedicated server daemon and thus of course hogs the soundcard. How else
> would you ensure that you can use the sounds channel when it's needed?
> If there's no sequencer involved, then also with ALSA the access to the
> output channels is limited.

Yes, it is a dedicated server daemon. That doesn't mean it needs to
hog the soundcard. Asterisk doesn't keep the sound files open and ready
to read at each moment. Many daemons will send mail, yet they don't keep
a connection open to port 25 on some smtp server. Other Asterisk
channels can be busy, just as regular telephones can, I see no reason
why chan_alsa should be an exception. If chan_alsa can't get the
soundcard, then the channel is busy.

Many cards, such as my own, have multiple output channels but fewer
(e.g. only one) input channels. If I set the input device to null, I can
load chan_alsa for a one-way channel. I don't use the input device all
that much, but unfortunately what I do want to use it for is a
softphone, and it is really unfortunate if asterisk is making it
difficult to use a softphone, don't you think?

> What would be the purpose of adding ALSA when you must not make sure
> that it's available?

Some people may need guaranteed availability of chan_alsa, I would just
like it to be available when I'm not using the soundcard for something
else. Perhaps an option allowing one to choose?

> If you only want ALSA access from time to time, i propose to do
> monitoring of channels with a suitable client rather than from within
> asterisk (and to set chan_alsa to noload in modules.conf).

Not a bad idea; I might do this in the meantime. I don't think there are
any clients that truly fit this bill though. IaxComm comes closest, but
it's unstable at best.

--=20
 .O.  Hans Fugal            | De gustibus non disputandum est.
 ..O  http://hans.fugal.net | Debian, vim, mutt, ruby, text, gpg
 OOO                        | WindowMaker, gaim, UTF-8, RISC, JS Bach
---------------------------------------------------------------------
GnuPG Fingerprint: 6940 87C5 6610 567F 1E95  CB5E FC98 E8CD E0AA D460

--SNIs70sCzqvszXB4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCCOSi/JjozeCq1GARAnmyAJsF+exGMoCrcaahdKC3IsAMJsv2eQCfVHXc
9TiVPmZrAB+qkjb5T/bn7MM=
=lGRp
-----END PGP SIGNATURE-----

--SNIs70sCzqvszXB4--