From owner-freebsd-multimedia@FreeBSD.ORG Sat Aug 13 13:04:31 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 E0FD616A41F; Sat, 13 Aug 2005 13:04:31 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A40B43D46; Sat, 13 Aug 2005 13:04:30 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5F9CD.dip.t-dialin.net [84.165.249.205]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id j7DCwQe8047201; Sat, 13 Aug 2005 14:58:37 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id j7DD30gf083318; Sat, 13 Aug 2005 15:03:00 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Sat, 13 Aug 2005 15:03:00 +0200 From: Alexander Leidinger To: John Baldwin Message-ID: <20050813150300.5d4d11f2@Magellan.Leidinger.net> In-Reply-To: <200508081346.16811.jhb@FreeBSD.org> References: <20050806084910.N13128@dynamite.narpes.com> <200508081346.16811.jhb@FreeBSD.org> X-Mailer: Sylpheed-Claws 1.9.13 (GTK+ 2.6.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: "A. Wik" , multimedia@freebsd.org 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: Sat, 13 Aug 2005 13:04:32 -0000 On Mon, 8 Aug 2005 13:46:16 -0400 John Baldwin wrote: > On Saturday 06 August 2005 05:50 am, A. Wik wrote: > > I just installed a Soundblaster 16 (DSP v4.16) in my FreeBSD > > machine, and found no way to enable the 3D stereo enhancement > > feature that the Linux, DOS and Win9x drivers support. So I > > looked at the Linux driver sources and decided to add a > > compatible mixer ioctl() to the FreeBSD driver. That turned > > out to be a lot more complicated than expected, because there > > was no existing interface for this kind of hardware-specific > > ioctls. > > > > After extensive reverse-engineering of the FreeBSD driver > > model (studying the UART and TTY drivers was particularly > > helpful), and adding a method to the mixer interface, I > > managed to implement the feature, at least to the extent > > that it works for me. > > > > Perhaps you could take a look at the patch to verify that > > it doesn't break anything, and consider adding it to the > > mainstream kernel? The patch and a utility for testing > > it is available from my FTP site: > > > > ftp://vax.narpes.com/users/aw/freebsd-5.3-aw-3dse.diff > > ftp://vax.narpes.com/users/aw/s3dioctl.c I haven't looked at the patch, but from looking at the names of the files I assume you've a program which kust is responsible for activating the 3D stereo enhancement. While this enables this functionality (which is good), there should be a generic "sndctl" program which allows to manipulates multiple settings. So the sndctl program could be called in this case for exmaple as "sndctl 3dse on" (or something like this). Maybe you can add some rough command line parsing to your program which reacts on a keyword like above? Ideally it should support the "-f" option like mixer(8) does. I want to work on something like this for the s/pdif <-> analog features (ATM only available as sysctl's in -current), but I don't know when I get time to do it. Your ctl program could then be enhanced to also handle this (and maybe other things like querying for such capabilities and print them together with the current state of operation). Bye, Alexander. -- Failure is not an option. It comes bundled with your Microsoft product. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7