Date: Sat, 29 Jul 2000 22:05:22 -0700 (PDT) From: stake@po.shiojiri.ne.jp To: freebsd-gnats-submit@FreeBSD.org Subject: kern/20297: Joystick is not enabled with es1370 based soundcard. Message-ID: <20000730050522.7701937B6D9@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 20297
>Category: kern
>Synopsis: Joystick is not enabled with es1370 based soundcard.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 29 22:10:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Takefumi SAYO
>Release: 4.1-STABLE
>Organization:
Personal
>Environment:
FreeBSD vipal5.my.domain 4.1-STABLE FreeBSD 4.1-STABLE #1: Sun Jul 30 13:22:40 JST 2000 root@vipal5.my.domain:/usr/src/sys/compile/TEST i386
>Description:
Joystick is not enabled with es1370 based soundcard.
$ grep '$FreeBSD:' /usr/src/sys/dev/sound/pci/es137x.*
/usr/src/sys/dev/sound/pci/es137x.c: * $FreeBSD: src/sys/dev/sound/pci/es137x.c,v 1.13.2.2 2000/07/19 21:18:45 cg Exp $
/usr/src/sys/dev/sound/pci/es137x.h: * $FreeBSD: src/sys/dev/sound/pci/es137x.h,v 1.3.2.2 2000/07/19 21:18:45 cg Exp $
>How-To-Repeat:
1. Boot TEST kernel.
$ diff GENERIC TEST
235a236,241
>
> # For PnP/PCI sound cards
> device pcm
>
> # joy: joystick
> device joy0 at isa? port IO_GAME
2. Run joy(4) example program.
$ perl -e 'open(JOY,"/dev/joy0")||die;while(1){sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\n";sleep(1);}'
-2147483648 -2147483648 0 0
-2147483648 -2147483648 0 0
-2147483648 -2147483648 0 0
-2147483648 -2147483648 0 0
>Fix:
Add CTRL_JYSTK_EN to es->ctrl in es1370_init().
(but checking io port may be needed...)
$ diff -c es137x.c.dist es137x.c
*** es137x.c.dist Thu Jul 20 06:18:45 2000
--- es137x.c Sun Jul 30 13:22:23 2000
***************
*** 466,471 ****
--- 466,472 ----
es1370_init(struct es_info *es)
{
es->ctrl = CTRL_CDC_EN | CTRL_SERR_DIS |
+ CTRL_UART_EN | CTRL_JYSTK_EN |
(DAC2_SRTODIV(DSP_DEFAULT_SPEED) << CTRL_SH_PCLKDIV);
bus_space_write_4(es->st, es->sh, ES1370_REG_CONTROL, es->ctrl);
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000730050522.7701937B6D9>
