kern/31398: [sound] newpcm does not play back the tail of sound

Jean-Yves Lefort jylefort at FreeBSD.org
Wed Nov 9 20:36:13 GMT 2005


On Wed, 9 Nov 2005 20:28:15 +0100
Alexander Leidinger <Alexander at Leidinger.net> wrote:

> On Wed, 9 Nov 2005 19:55:03 +0100
> Jean-Yves Lefort <jylefort at FreeBSD.org> wrote:
> 
> > On Wed, 9 Nov 2005 19:25:54 +0100
> > Alexander Leidinger <Alexander at Leidinger.net> wrote:
> > 
> > > On Thu, 10 Nov 2005 00:07:38 +0800
> > > Ariff Abdullah <skywizard at MyBSD.org.my> wrote:
> > > 
> > > > On Wed, 9 Nov 2005 14:34:35 +0100
> > > > Jean-Yves Lefort <jylefort at FreeBSD.org> wrote:
> > > > > 
> > > > > Excellent. While here, could you also incorporate kern/40132 (and
> > > > > kern/20297 can be closed)?
> > > 
> > > > Looks good. I'll incorporate it. Thanks.
> > > 
> > > Did anyone actually looked if the joy device is there (dmesg | grep
> > > joy)? I once tried such a patch (I don't remember ATM if it was the
> > > same PR) and "joy" didn't attach. Do I have wrong expectations or did I
> > > something wrong?
> > 
> > The following lines need to be added to /boot/device.hints:
> > 
> > hint.joy.0.at="isa"
> > hint.joy.0.port="0x201"
> > hint.joy.1.at="isa"
> > hint.joy.1.port="0x201"
> 
> The question is: should this be added to GENERIC.hints, or to the
> man-page of the joy device, or to both... any suggestions?

I'd add it to GENERIC.hints, and add the joy.1 part to the manpage
(joy.0 is already there).

> > The "two" joysticks (I actually have one joystick with 3 axes and 4
> > buttons) work perfectly. Note that for supporting the second joystick,
> > the patch from kern/46734 is required. Since it does not apply
> > anymore, here's an updated patch:
> > 
> > --- sys/dev/joy/joy.c.orig	Wed Jun 16 11:46:48 2004
> > +++ sys/dev/joy/joy.c	Wed Oct  5 22:49:49 2005
> > @@ -104,13 +104,13 @@
> >  
> >  	joy->rid = 0;
> >  	joy->res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &joy->rid,
> > -	    RF_ACTIVE);
> > +	    RF_ACTIVE|RF_SHAREABLE);
> >  	if (joy->res == NULL)
> >  		return ENXIO;
> >  	joy->bt = rman_get_bustag(joy->res);
> >  	joy->port = rman_get_bushandle(joy->res);
> >  	joy->timeout[0] = joy->timeout[1] = 0;
> > -	joy->d = make_dev(&joy_cdevsw, 0, 0, 0, 0600, "joy%d", unit);
> > +	joy->d = make_dev(&joy_cdevsw, unit, 0, 0, 0600, "joy%d", unit);
> >  	return (0);
> >  }
> >  
> > @@ -167,6 +167,11 @@
> >  #else
> >  	disable_intr ();
> >  #endif
> > +	nanotime(&t);
> > +	end.tv_sec = 0;
> > +	end.tv_nsec = joy->timeout[joypart(dev)] * 1000;
> > +	timespecadd(&end, &t);
> > +	for (; timespeccmp(&t, &end, <) && (bus_space_read_1(bt, port, 0) & 0x0f); nanotime(&t));
> >  	bus_space_write_1 (bt, port, 0, 0xff);
> >  	nanotime(&start);
> >  	end.tv_sec = 0;
> > 
> > Could you please commit it?
> 
> Looks good (no obvious error while looking at it), but you should make
> it more obvious that the body of the for loop is empty (search for
> "nothing" in style(9)).
> 
> And since you tested it: Commit approved after fixing the style(9)
> issue (a X-committer is free to approve commits to unmaintained parts
> of X by an Y-committer). You have to use "ncvs" instead of "pcvs".

Done, thanks.

-- 
Jean-Yves Lefort

jylefort at FreeBSD.org
http://lefort.be.eu.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20051109/b0c75bc3/attachment.bin


More information about the freebsd-multimedia mailing list