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

Scott Spare scuppers at
Thu Dec 18 12:58:19 PST 2008

Thank you for your detailed message. I am more than willing to test any new
driver code for Envy24 that supports multiplexing if anyone creates it.  I
looked at the code for the driver yesterday, but realized after about half
an hour of reading code that driver debugging is way beyond my C ability.

I was unable to figure out what that high-quality hardware mixing is called
in the driver, or whether it's just automatically enabled, and so would be
something that would have to be disabled explicitly by sending a signal to
the chip to tell it not to use it.  I would be very glad to use the hardware
mixer if it was working.  Also I'm not really clear on what portion of all
this is handled by the driver itself, and what's handled by the kernel

I looked around for datasheets for the VIA Envy24 chip itself, and couldn't
find those.  I personally thank Konstantin and whoever else authored these
drivers in the first place. How they did so without datasheets, I will never

FWIW, there's a web page on the chip itself at
The digital mixer is shown on that page in a block diagram, but the quality
of the diagram is not so good.  There's a zip file for an "image kit" on
that page, but that's just logos.

Next steps: I think I'm going to try OSS again and see if I can get that
virtual channel mixing thing working.  I might also look at the source of
their envy24 support to see if that answers anything.  I kind of doubt it,
but it's worth a shot.  I'd really prefer to use some kind of low-level
solution like the hardware mixing or FreeBSDs vchans.  I think the driver
may be disabling the vchans, but not sure.

The driver itself has been working great with libao besides the multiplexing
issue.  I use it every day to play music on Amarok.  What a great card.
Thanks once again.


On Tue, Dec 16, 2008 at 6:46 PM, Stefan Ehmann <shoesoft at> wrote:

> 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