From owner-freebsd-multimedia@FreeBSD.ORG Fri Nov 4 19:19:57 2005 Return-Path: X-Original-To: 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 E806616A41F for ; Fri, 4 Nov 2005 19:19:57 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from tomoyo.MyBSD.org.my (tomoyo.mybsd.org.my [202.157.186.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6133543D45 for ; Fri, 4 Nov 2005 19:19:57 +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 E937C6CC23; Sat, 5 Nov 2005 03:21:55 +0800 (MYT) Received: from tomoyo.MyBSD.org.my ([127.0.0.1]) by localhost (TOMOYO.MYBSD.ORG.MY [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 36958-03; Sat, 5 Nov 2005 03:21:54 +0800 (MYT) Received: from kasumi.MyBSD.org.my (kasumi.MyBSD.org.my [IPv6:2001:328:2002:aa2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 337226CC22; Sat, 5 Nov 2005 03:21:50 +0800 (MYT) Date: Sat, 5 Nov 2005 03:20:08 +0800 From: Ariff Abdullah To: Warner Losh Message-Id: <20051105032008.384323ac.skywizard@MyBSD.org.my> In-Reply-To: <20051104.114748.71117327.imp@bsdimp.com> References: <20051104161811.4ca68aac.skywizard@MyBSD.org.my> <20051104.085348.89043521.imp@bsdimp.com> <20051105023834.5da2a41b.skywizard@MyBSD.org.my> <20051104.114748.71117327.imp@bsdimp.com> 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 AntiVirus & AntiSpam Scanner running on FreeBSD mailserver at TOMOYO.MYBSD.ORG.MY Cc: multimedia@freebsd.org Subject: Re: Sound driver weirdness 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: Fri, 04 Nov 2005 19:19:58 -0000 On Fri, 04 Nov 2005 11:47:48 -0700 (MST) Warner Losh wrote: > > current from 'a while' ago. I no longer have the old kernel to know > what exact version it was. > > > What makes you think channel reset isn't succeeding? Any other > > error or diagnostic messages from syslog/console? > > Nope. What makes me think this is purely code inspection for the > operation not supported by device: > > if (flags & FREAD) { > ... > /* got a channel, already locked for us */ > if (chn_reset(rdch, fmt)) { > pcm_chnrelease(rdch); > i_dev->si_drv1 = NULL; > return ENODEV; > } > ... > } > if (flags & FWRITE) { > /* open for write */ > ... > if (!wrch) > error = EBUSY; /* XXX Right return code? */ > else if (chn_reset(wrch, fmt)) > error = ENODEV; > ... > > > > Perhaps /dev/dsp has been acquired by something else (since your > > vchans disabled). fstat | grep dsp. How about enabling vchans? > > % fstat | grep dps > % > "dsp" > Why are my vchans disabled, what does that mean and what can I do > about it? > That means at most, only single process (sound apps) can acquire the sound device (vchans = virtual channels). 1) Try enabling vchans by increasing the value of both hw.snd.maxautovchans and hw.snd.pcm0.vchans (4 is a good start). After that, you probably need to reduce the value of hw.snd.pcm0.vchanrate to 44100 (only if necessary). 2) Try to use other 'simpler' apps, such as mpg321 3) hm.. I don't think my recent commit against both dsp.c/mixer.c cause this problem (maybe?). Note that there was also a commit by DES, so you probably need to back off dsp.c down to rev. 1.85 -- Ariff Abdullah MyBSD http://www.MyBSD.org.my (IPv6/IPv4) http://staff.MyBSD.org.my (IPv6/IPv4) http://tomoyo.MyBSD.org.my (IPv6/IPv4)