From owner-freebsd-multimedia@FreeBSD.ORG Fri May 30 10:08:15 2003 Return-Path: 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 E885A37B401; Fri, 30 May 2003 10:08:15 -0700 (PDT) Received: from fump.kawo2.rwth-aachen.de (fump.kawo2.RWTH-Aachen.DE [134.130.181.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8180743FE0; Fri, 30 May 2003 10:08:14 -0700 (PDT) (envelope-from alex@fump.kawo2.rwth-aachen.de) Received: from fump.kawo2.rwth-aachen.de (localhost.kawo2.rwth-aachen.de [127.0.0.1])h4UH8C0Y001146; Fri, 30 May 2003 19:08:13 +0200 (CEST) (envelope-from alex@fump.kawo2.rwth-aachen.de) Received: (from alex@localhost) by fump.kawo2.rwth-aachen.de (8.12.9/8.12.9/Submit) id h4UH8Ceq001145; Fri, 30 May 2003 19:08:12 +0200 (CEST) Date: Fri, 30 May 2003 19:08:12 +0200 From: Alexander Langer To: freebsd-multimedia@freebsd.org Message-ID: <20030530170812.GA879@fump.kawo2.rwth-aachen.de> References: <20030516135815.GH1440@fump.kawo2.rwth-aachen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030516135815.GH1440@fump.kawo2.rwth-aachen.de> X-PGP-Fingerprint: 7EC1 5B98 4554 2A63 9079 2B2F 9A94 CD6F 7F14 EFA4 X-PGP-at: finger alex@big.endian.de X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. User-Agent: Mutt/1.5.3i cc: roger@freebsd.org Subject: Re: Linux port of the Brooktree Soundchip drivers X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 17:08:16 -0000 Hi! I did major foobar and posted a diff for my proof-of-concept hack, which was not the actual patch. No wonder all people had compile-problems + warnings. Also, the patch was very unclean. Now, here's the correct version, which is close to final. I have only tried it on -CURRENT. As I don't own a STABLE box there's also only minor chance that I'll ever backport it. This adds a new kernel option "BKTR_NEW_MSP34XX_DRIVER". If this kernel option is not defined, the old code is used, so it should be rather ready to be committed. For trying this out, it is recommended to boot -v (or sysctl debug.bootverbose=1 before loading the kernel module). This way you can test the channels and find out if your card finds the correct mode. Also, if your card's autodetection doesn't work although you have a MSP345* chip, you might want to set: hint.bktr.0.simple = 0 in device.hints (use kenv on -STABLE before loading the module) This disables the fast autodetection and programs the chip in the "old", slower way, which is the MSP340* way. Anyways, what else? My kernel panic'ed with "sleeping without a mutex" once the kernel thread was started, when I statically compiled the driver into a test-kernel. I really don't know why - if I use a kernel module which I load from the boot loader, everything works. So if you encounter the same problem, please use bktr.ko for now. There still is a little TODO list: - I don't do mutex stuff yet, so this driver might not be MP-safe. I.e. the various "tsleep()" calls and situations might be a problem. As I'm not so familiar with this, I have to do that later. I'm sorry. - As I don't have a dolby chipset, anyone with a dolby card should tell me if the dolby sysctl has any effect. Or whatever ;-) Again, here's the patch: http://people.freebsd.org/~alex/bktr.patch (This patch patches the kernel module's Makefile to use the new driver) Please: test this and give feedback. (Code is diff-reduced to the Linux version, so please excuse bad style.) Thanks Alex