Sound driver weirdness

Ariff Abdullah skywizard at MyBSD.org.my
Fri Nov 4 11:19:58 PST 2005


On Fri, 04 Nov 2005 11:47:48 -0700 (MST)
Warner Losh <imp at bsdimp.com> 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)


More information about the freebsd-multimedia mailing list