From owner-freebsd-multimedia@FreeBSD.ORG Sat Jul 9 21:15:21 2005 Return-Path: X-Original-To: freebsd-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 E2A7B16A41C for ; Sat, 9 Jul 2005 21:15:20 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from tomoyo.MyBSD.org.my (duke.voidnetwork.com [202.157.186.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55B0C43D45 for ; Sat, 9 Jul 2005 21:15:20 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from localhost (localhost [127.0.0.1]) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 9004C6CC35; Sun, 10 Jul 2005 05:20:48 +0800 (MYT) Received: from tomoyo.MyBSD.org.my ([127.0.0.1]) by localhost (duke.voidnetwork.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09498-01; Sun, 10 Jul 2005 05:20:46 +0800 (MYT) Received: from kasumi.MyBSD.org.my (unknown [60.48.108.255]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 7C5376CC30; Sun, 10 Jul 2005 05:20:42 +0800 (MYT) Date: Sun, 10 Jul 2005 05:15:23 +0800 From: Ariff Abdullah To: noackjr@alumni.rice.edu Message-Id: <20050710051523.0a67cd91.skywizard@MyBSD.org.my> In-Reply-To: <42D02CA9.4080201@alumni.rice.edu> References: <42D02CA9.4080201@alumni.rice.edu> Organization: MyBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-antivirus-mail-gateway at TOMOYO.MYBSD.ORG.MY Cc: freebsd-multimedia@freebsd.org, mat@cnd.mcgill.ca Subject: Re: Massive sound changes / fix (24/32bit pcm support, new sampling rate converter, various fixes) 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, 09 Jul 2005 21:15:21 -0000 On Sat, 09 Jul 2005 14:59:37 -0500 Jonathan Noack wrote: > >> > Hardware spessific changes > >> > ========================== > >> > >> > 3. es137x.c / es137x.h > >> > * Register programming error during device initialization > >> > especially for CT4730 / EV1938 chip, causing misconfigured > >> > mixer (David Xu), crippled after power cycle (Kevin > >Oberman). > > Fixed. > >> > * Incorporate locking/spdif patches from Jon Noack. Not all > >> > es137x > >> > can really do spdif, clean it up a bit to only let few > >> > capable chip. > >> > >> --- /var/log/dmesg.today Sat Jul 9 13:13:45 2005 > >> +++ /var/run/dmesg.boot Sat Jul 9 20:04:47 2005 > >> @@ -57,7 +57,6 @@ > >> pci0: at device 7.5 (no driver attached) > >> pcm0: port 0xb800-0xb83f irq 5 at device 9.0 > >on > pci0 pcm0: > >> -pcm0: [GIANT-LOCKED] > >> xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xbc00-0xbc7f mem > >> 0xe7000000-0xe700007f irq 11 at device 10.0 on pci0 miibus0: > > bus> on xl0 xlphy0: <3c905C 10/100 internal PHY> on miibus0 > >> > >> And the music plays just fine, no bad behavior so far. > >> > > Credit goes to Jonathan Noack for adding spdif / locking. If you > > think there are lots of pops / crackling sound, you may as well > > play around with sysctl hw.snd.pcm0.latency_timer (especially > > during untarring big tarball). > > My spdif work: > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/68594 > Thanks for that. > Mathew Kanner did the original locking, which I cleaned up a bit: > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/59349 > Oops... I thought it always you. > The _real_ credit for my locking work goes to the horrible > interactivity problems that plagued -CURRENT about a year ago. > Adding locking to the driver was a desperate attempt to get sound > without pauses... > Plus, I've added hw.snd.pcm.latency_timer to reduce any crackling noise down to nil (pciconf -w just too cryptic for that). This really improve situation especially with VIA motherboard and perhaps, others too. > In any case, I've been running these changes for at least a year > with no problems. I tried to pester folks into committing it many > times (with no success), so I am VERY excited about this work! > > I don't know if you've touched the man pages at all, but my latest > patch includes a man page update for the spdif sysctl: > http://www.noacks.org/freebsd/es137x.diff > Currently I haven't touched any man pages at all. Can you do separate patches for that? There are few new sysctls need to be documented, perhaps you can do that too. es137x: 1) hw.snd.pcm.latency_timer - PCI latency timer adjustment. Most pops / crackling issue can be solved by adjusting it to appropriate value (especially on VIA mobo). General Sound Driver: 1) hw.snd.feeder_rate_ratemin/ratemax - Minimum / Maximum allowable rate 2) hw.snd.feeder_rate_scaling - Rate conversion precision / quality (Most of the options already explained in feeder_rate.c) 3) hw.snd.feeder_rate_buffersize - Buffer space for rate converter There are few LORs (during boot) with this much integrated es137x (which I do believe false positives). Perhaps you can reproduce it by enabling WITNESS? http://staff.mybsd.org.my/skywizard/FreeBSD/sound/LOR/es137x_lor.txt (This is slightly outdated, some of it have bean dealt with) Thanks for your works! -- Ariff Abdullah MyBSD http://www.MyBSD.org.my (IPv6/IPv4) http://staff.MyBSD.org.my (IPv6/IPv4) http://tomoyo.MyBSD.org.my (IPv6/IPv4)