SB 3DSE ioctl() patch
aw at aw.gs
Mon Aug 15 03:27:05 GMT 2005
On Sun, 14 Aug 2005, Julian Elischer wrote:
> Alexander Leidinger wrote:
> > On Sat, 13 Aug 2005 13:57:53 -0700
> > Julian Elischer <julian at elischer.org> wrote:
> > ---snip---
> > % man -k mixer
> > mixer(8) - set/display soundcard mixer values
> > ---snip---
> > For me the mixer is a device which controls the volume level of various
> > streams and is responsible how to mix those streams into each other.
> > The mixer(8) program is a program which allows to manipulate the mixer
> > (let's compare it with network routing and bandwith management).
> > The sndctrl program would be responsible to query and change various
> > properties/capabilities of the soundsystem (let's compare it with
> > configuring a network interface with ifconfig) which don't have to be
> > related to the mixer, e.g. Ariff is working on "slave-channels", which
> > decouple the hardware buffer from the userland buffer. ATM
> > slave-channels are controled by a sysctl like the vchans. This could be
> > changed to be controled by sndctl. I don't think this falls into the
> > responsibility of mixer(8).
> > What are the arguments to integrate it into mixer(8)?
> one stop shopping?
> no new program to learn?
I looked at mixer(8) while exploring the the sound driver
architecture, to determine how to add the 3DSE ioctl().
However, I could not find an easy way to fit it into
either the existing mixer driver, or the userland mixer
control program. I suppose that it might have been
possible by using typecasts and having the 3DSE feature
masquerade as a mixer input/output line, but doing it
the way I did seemed like a better choice - perhaps the
main advantage being compatibility, allowing applications
such as XMMS to use the same interface for Linux and
The standalone utility to control the feature is
a quick but functional test program. I see one logical
reason for integrating its functionality into mixer(8):
the fact that the ioctls are done on the /dev/mixer
device (and at the hardware level, by manipulation of
Sound Blaster "mixer" registers).
In any case, the patch has been updated with an
"AGC" (Automatic Gain Control) ioctl() - also added
by the Linux driver to the "base" OSS driver, from
which both the FreeBSD and Linux Sound Blaster have
been derived at some point.
More information about the freebsd-multimedia