Multiple simultaneous sound channels (sources) with X.org and Envy24 (M-Audio Audiophile 2496)

Stefan Ehmann shoesoft at gmx.net
Tue Dec 16 16:13:14 PST 2008


On Tuesday 16 December 2008 22:43:47 Scott Spare wrote:
> Multimedia gurus,
>
> I am looking for advice about the best way to handle the following
> situation:
> Playing sound with any two apps at the same time causes errors, sound
> stuttering and / or hangups.
>
> So far, I've tested and confirmed this problem under the following
> conditions:
> -Amarok is playing music and Pidgin tries to make noise to tell me
> someone's online.
> -XMMS is playing music and Pidgin tries to make noise.
> -XMMS and Amarok are both playing music at the same time.
> -Shell-FM is playing music and Pidgin tries to make noise.
>
> Expected behavior:
> Simultaneous sounds play simultaneously.
>
> Errors received:
> pcm0: play: dsp0.p0 play interrupt timeout, channel dead
> pcm0: play: dsp0.p1 play interrupt timeout, channel dead
>
> What I have tried so far:
> -I've enabled autovchans in sysctls: hw.snd.maxautovchans: 4.  This did not
> help.
> -Reading more, I became a bit confused about a message regarding the driver
> (or at least the hardware) supporting multiplexing natively

It doesn't happen with all applications. Playing two files with mplayer 
simultaneously works for instance. Don't think it has anything to do with xorg 
but haven't found out under what exact circumstances it fails.

The hardware mixing seems to be buggy in some cases. But it seems to be used 
even if vchans is enabled. So there's no easy way to workaround that.

Maybe someone could come up with a simple patch to disable the hardware mixing 
feature. I've tried some time ago but failed.

> -So I installed OSS, thinking that maybe it could solve my multiple audio
> source problems, but got the same problem - stuttering sound when playing
> multiple sources, followed by instability.  I later learned that OSS hadn't
> loaded correctly, and didn't support multiple sound channels on FreeBSD
> anyway, and I am trying to avoid running a heavy sound server if
> possible...  so without any luck with OSS, I've now uninstalled it.  I'm
> open to suggestions.  Does anyone know how PC-BSD handles sound?  Maybe
> they've got it right for the desktop?  There's ALSA, ESD, ARTS, OSS FreeBSD
> version via ports, OSS 4Front version, vchans, hardware multiplexing and
> more.  Pretty confusing.

It's been some time since I used the 4Front driver. There's something called 
virtual channel mixer or something similar. IIRC it provides several dsp 
devices; but you need to explicitly specify which device to use. So it's not 
as comfortable as the shipped driver.

Also some applications have troubles with the driver, e.g. you need to patch 
libao. But maybe that's already been fixed.

-- 
Stefan


More information about the freebsd-multimedia mailing list