From owner-freebsd-multimedia@FreeBSD.ORG Mon Aug 15 03:27:04 2005 Return-Path: X-Original-To: multimedia@freebsd.org Delivered-To: freebsd-multimedia@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBF9A16A41F; Mon, 15 Aug 2005 03:27:04 +0000 (GMT) (envelope-from aw@aw.gs) Received: from mariah.narpes.com (mariah.narpes.com [213.250.81.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0817E43D46; Mon, 15 Aug 2005 03:27:03 +0000 (GMT) (envelope-from aw@aw.gs) Received: from dynamite.narpes.com ([193.22.86.8]) by mariah.narpes.com with esmtp (Exim 4.30) id 1E4Vco-0003xh-CH; Mon, 15 Aug 2005 03:26:58 +0000 Received: from localhost ([127.0.0.1]) by dynamite.narpes.com with esmtp (Exim 4.43) id 1E4Vcc-000MAz-23; Mon, 15 Aug 2005 03:26:46 +0000 Date: Mon, 15 Aug 2005 03:26:38 +0000 (GMT) From: "A. Wik" To: Julian Elischer In-Reply-To: <42FFA268.5060400@elischer.org> Message-ID: <20050815025007.T82687@dynamite.narpes.com> References: <20050806084910.N13128@dynamite.narpes.com> <200508081346.16811.jhb@FreeBSD.org> <20050813150300.5d4d11f2@Magellan.Leidinger.net> <42FE5ED1.5070209@elischer.org> <20050814113838.762e6330@Magellan.Leidinger.net> <42FFA268.5060400@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Alexander Leidinger , multimedia@freebsd.org, John Baldwin Subject: Re: SB 3DSE ioctl() patch X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2005 03:27:05 -0000 On Sun, 14 Aug 2005, Julian Elischer wrote: > Alexander Leidinger wrote: > > On Sat, 13 Aug 2005 13:57:53 -0700 > > Julian Elischer 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 FreeBSD. 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. -aw