Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2004 11:24:29 -0400
From:      Mathew Kanner <mat@cnd.mcgill.ca>
To:        "Conrad J. Sabatier" <conrads@cox.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Questionable code in sys/dev/sound/pcm/channel.c
Message-ID:  <20040727152429.GB92352@cnd.mcgill.ca>
In-Reply-To: <XFMail.20040726174446.conrads@cox.net>
References:  <200407262233.i6QMXghe058450@gw.catspoiler.org> <XFMail.20040726174446.conrads@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 26, Conrad J. Sabatier wrote:
> 
> On 26-Jul-2004 Don Lewis wrote:
> > 
> > I just looked at the code some more.  With timeout hardwired to 1,
> > count can never go negative.  The code initializes count to hz, and
> > then decrements it whenever chn_sleep() returns EWOULDBLOCK, and
> > re-initializes count to hz if chn_sleep() returns zero.  With timeout
> > hardwired to 1, count should only be able to decrement to zero if
> > chn_sleep() returns EWOULDBLOCK hz times in a row, which means that
> > nothing could be stuffed into the buffer for one second, which seems
> > like a long time ...
> > 
> > I suspect that with your change the write() call is returning a 0 and
> > the player software is doing a retry that succeeds (or this might be
> > audible as a skip).
> 
> Hmmm.  Well, one thing's for certain: you've obviously managed to
> discern more about what's going on in this code than me!  :-)
> 
> It would be nice to hear from our sound maintainers on this issue. 
> They've been rather...quiet lately.  :-)

	Who are the sound maintainers ?  :) My internet is supposed to
be re-connected on Friday so I will start to be more active then.
However, my knowledge of internals of PCM is somewhat limited.

	--Mat

-- 
	sig machine broken



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040727152429.GB92352>