From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 3 16:27:08 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 242D41065728 for ; Sun, 3 Aug 2008 16:27:08 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id DD3F68FC16 for ; Sun, 3 Aug 2008 16:27:07 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id 965FA6D450; Sun, 3 Aug 2008 18:11:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IuLP580gVzxi; Sun, 3 Aug 2008 18:10:57 +0200 (CEST) Received: by mx1.rink.nu (Postfix, from userid 1000) id 4AB986D453; Sun, 3 Aug 2008 18:10:57 +0200 (CEST) Date: Sun, 3 Aug 2008 18:10:57 +0200 From: Rink Springer To: alec@setfilepointer.com, brucem@mail.cruzio.com Message-ID: <20080803161057.GB35301@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: hackers@freebsd.org Subject: Patch for working AMD Geode CS5530 audio driver on HEAD 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: Sun, 03 Aug 2008 16:27:08 -0000 Hi, As outlined in http://lists.freebsd.org/pipermail/freebsd-hackers/2008-January/022986.html, Alec had some problems with the snd_geode driver. While I cannot test whether it works using Geode CS5536 hardware, I've managed to get the driver to work using CS5530 hardware on FreeBSD HEAD. The patch is available at http://people.freebsd.org/~rink/various/ns_geode.diff - using this, my Compaq Evo T30 flawlessly plays MP3's. The problem was that the busdma tag allocation specifies a maximum allocation size of 65536 bytes, yet it had to do so using 1 segment of at most 65535 bytes (note: 1 byte less). Since the channel code tries to allocate 65536 bytes, this didn't work [1]; yet, the return code check was messages up (sndbuf_alloc() returns 0 on success, not -1 on failure) which caused page faults later on. I am interested in integrating this work in HEAD; however, if Alec and/or Bruce could try, see and hack away to make it work on the CS5536 (or are willing to ship me a system ;-), that'd be great. [1] Thanks to Scott Long for pointing me towards the right direction. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder