Bug 20297

Summary: [sound] [patch] Joystick is not enabled with es1370 based soundcard.
Product: Base System Reporter: stake <stake>
Component: kernAssignee: freebsd-multimedia (Nobody) <multimedia>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description stake 2000-07-30 06:10:01 UTC
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 $

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
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
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-07-31 10:42:12 UTC
Responsible Changed
From-To: freebsd-bugs->cg

Cameron, this one contains a patch. :-)
Comment 2 chris 2002-04-21 21:54:08 UTC
FWIW, there seems to be a similar method to enable the joystick on
es1371-based cards.  The difference seems to be that it is necessary
to specify the IO address instead of just a boolean.  Apparently this
is done on Linux.

http://groups.google.com/groups?selm=lxpatch.v2.1patch-2.1.132.pt35.36805F24%40mvmap66.ciw.uni-karlsruhe.de

I was about to try to get it working, but I won't be able to spend the
time on it for a while.  I just noticed this PR and even though it's
old, I might as well add this info.
-- 
Christopher Masto

CB461C61 8AFC E3A8 7CE5 9023 B35D  C26A D849 1F6E CB46 1C61
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2004-09-09 20:32:46 UTC
Responsible Changed
From-To: cg->sound

With permission, reassign to mailing list alias.
Comment 4 Alexander Leidinger freebsd_committer freebsd_triage 2005-12-28 18:42:14 UTC
State Changed
From-To: open->closed

Fixed in -current.