From owner-freebsd-multimedia@FreeBSD.ORG Wed Nov 9 19:28:28 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 BF01116A41F; Wed, 9 Nov 2005 19:28:28 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56AAF43D58; Wed, 9 Nov 2005 19:28:25 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5DF88.dip.t-dialin.net [84.165.223.136]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id jA9J5rgD087098; Wed, 9 Nov 2005 20:05:55 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id jA9JSFiG083144; Wed, 9 Nov 2005 20:28:15 +0100 (CET) (envelope-from Alexander@Leidinger.net) Date: Wed, 9 Nov 2005 20:28:15 +0100 From: Alexander Leidinger To: Jean-Yves Lefort Message-ID: <20051109202815.1854cd1d@Magellan.Leidinger.net> In-Reply-To: <20051109195503.01fd1a93.jylefort@FreeBSD.org> References: <200511081520.jA8FKJZd045781@freefall.freebsd.org> <20051108233517.5ec73d79.skywizard@MyBSD.org.my> <20051108181710.5c94a158.jylefort@FreeBSD.org> <20051109174843.7e97f8d7.skywizard@MyBSD.org.my> <20051109130245.3e807703.jylefort@FreeBSD.org> <20051109204513.54f482d3.skywizard@MyBSD.org.my> <20051109143435.7ee172cb.jylefort@FreeBSD.org> <20051110000738.00a209a6.skywizard@MyBSD.org.my> <20051109192554.5a6d26b7@Magellan.Leidinger.net> <20051109195503.01fd1a93.jylefort@FreeBSD.org> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.6; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new Cc: freebsd-multimedia@FreeBSD.org, skywizard@MyBSD.org.my Subject: Re: kern/31398: [sound] newpcm does not play back the tail of sound 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: Wed, 09 Nov 2005 19:28:29 -0000 On Wed, 9 Nov 2005 19:55:03 +0100 Jean-Yves Lefort wrote: > On Wed, 9 Nov 2005 19:25:54 +0100 > Alexander Leidinger wrote: > > > On Thu, 10 Nov 2005 00:07:38 +0800 > > Ariff Abdullah wrote: > > > > > On Wed, 9 Nov 2005 14:34:35 +0100 > > > Jean-Yves Lefort 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? > $ grep joy /var/run/dmesg.boot > joy0 at port 0x201 on isa0 > joy1 at port 0x201 on isa0 Yeah! > 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". Bye, Alexander. -- Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7