Date: Fri, 30 May 2003 19:08:12 +0200 From: Alexander Langer <alex@big.endian.de> To: freebsd-multimedia@freebsd.org Cc: roger@freebsd.org Subject: Re: Linux port of the Brooktree Soundchip drivers Message-ID: <20030530170812.GA879@fump.kawo2.rwth-aachen.de> In-Reply-To: <20030516135815.GH1440@fump.kawo2.rwth-aachen.de> References: <20030516135815.GH1440@fump.kawo2.rwth-aachen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030530170812.GA879>