From owner-freebsd-multimedia@FreeBSD.ORG Wed Nov 9 18:55:06 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 8FB8616A420 for ; Wed, 9 Nov 2005 18:55:06 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from 212.68.244.220.brutele.be (212.68.244.220.brutele.be [212.68.244.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA06843D49 for ; Wed, 9 Nov 2005 18:55:05 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id D6C9A550B; Wed, 9 Nov 2005 19:55:03 +0100 (CET) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id 6BF64C109; Wed, 9 Nov 2005 19:55:03 +0100 (CET) Date: Wed, 9 Nov 2005 19:55:03 +0100 From: Jean-Yves Lefort To: Alexander Leidinger Message-Id: <20051109195503.01fd1a93.jylefort@FreeBSD.org> In-Reply-To: <20051109192554.5a6d26b7@Magellan.Leidinger.net> 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> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Wed__9_Nov_2005_19_55_03_+0100_858EsXRaljb3Y0Ix" 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 18:55:06 -0000 --Signature=_Wed__9_Nov_2005_19_55_03_+0100_858EsXRaljb3Y0Ix Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 9 Nov 2005 19:25:54 +0100 Alexander Leidinger wrote: > On Thu, 10 Nov 2005 00:07:38 +0800 > Ariff Abdullah wrote: >=20 > > On Wed, 9 Nov 2005 14:34:35 +0100 > > Jean-Yves Lefort wrote: > > >=20 > > > Excellent. While here, could you also incorporate kern/40132 (and > > > kern/20297 can be closed)? >=20 > > Looks good. I'll incorporate it. Thanks. >=20 > 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=3D"isa" hint.joy.0.port=3D"0x201" hint.joy.1.at=3D"isa" hint.joy.1.port=3D"0x201" $ grep joy /var/run/dmesg.boot joy0 at port 0x201 on isa0 joy1 at port 0x201 on isa0 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 @@ =20 joy->rid =3D 0; joy->res =3D bus_alloc_resource_any(dev, SYS_RES_IOPORT, &joy->rid, - RF_ACTIVE); + RF_ACTIVE|RF_SHAREABLE); if (joy->res =3D=3D NULL) return ENXIO; joy->bt =3D rman_get_bustag(joy->res); joy->port =3D rman_get_bushandle(joy->res); joy->timeout[0] =3D joy->timeout[1] =3D 0; - joy->d =3D make_dev(&joy_cdevsw, 0, 0, 0, 0600, "joy%d", unit); + joy->d =3D make_dev(&joy_cdevsw, unit, 0, 0, 0600, "joy%d", unit); return (0); } =20 @@ -167,6 +167,11 @@ #else disable_intr (); #endif + nanotime(&t); + end.tv_sec =3D 0; + end.tv_nsec =3D 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 =3D 0; Could you please commit it? --=20 Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ --Signature=_Wed__9_Nov_2005_19_55_03_+0100_858EsXRaljb3Y0Ix Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDckYHyzD7UaO4AGoRAknCAJwO4VYwtCZGTEHtKRPeHxsCnXWhMQCeK2xr 73wqGQXviVqkAMt0bk/FV9k= =PVHu -----END PGP SIGNATURE----- --Signature=_Wed__9_Nov_2005_19_55_03_+0100_858EsXRaljb3Y0Ix--