From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 6 09:50:37 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 262A916A41F for ; Sat, 6 Aug 2005 09:50:37 +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 90AD143D48 for ; Sat, 6 Aug 2005 09:50:36 +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 1E1LK3-0005xs-Qv for freebsd-hackers@freebsd.org; Sat, 06 Aug 2005 09:50:31 +0000 Received: from localhost ([127.0.0.1]) by dynamite.narpes.com with esmtp (Exim 4.43) id 1E1LK2-0005LL-B9 for freebsd-hackers@freebsd.org; Sat, 06 Aug 2005 09:50:30 +0000 Date: Sat, 6 Aug 2005 09:50:29 +0000 (GMT) From: "A. Wik" To: freebsd-hackers@freebsd.org Message-ID: <20050806084910.N13128@dynamite.narpes.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Sat, 06 Aug 2005 11:50:05 +0000 Subject: SB 3DSE ioctl() patch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 09:50:37 -0000 (This was originally addressed to Cameron Grant, the author of the files I modified. Unfortunately, my message bounced, and shortly thereafter, I learned that he passed away earlier this year [1]. I hope this forum is an appropriate alternative.) [1] http://lists.nycbug.org/pipermail/talk/2005-March/005014.html **** Hello, 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 Regards, A. Wik