| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | Analog Joystick Support on ALSA Drivers | 
 | 2 | ======================================= | 
 | 3 |                           Oct. 14, 2003 | 
 | 4 |            Takashi Iwai <tiwai@suse.de> | 
 | 5 |  | 
 | 6 | General | 
 | 7 | ------- | 
 | 8 |  | 
 | 9 | First of all, you need to enable GAMEPORT support on Linux kernel for | 
 | 10 | using a joystick with the ALSA driver.  For the details of gameport | 
 | 11 | support, refer to Documentation/input/joystick.txt. | 
 | 12 |  | 
 | 13 | The joystick support of ALSA drivers is different between ISA and PCI | 
 | 14 | cards.  In the case of ISA (PnP) cards, it's usually handled by the | 
 | 15 | independent module (ns558).  Meanwhile, the ALSA PCI drivers have the | 
 | 16 | built-in gameport support.  Hence, when the ALSA PCI driver is built | 
 | 17 | in the kernel, CONFIG_GAMEPORT must be 'y', too.  Otherwise, the | 
 | 18 | gameport support on that card will be (silently) disabled. | 
 | 19 |  | 
 | 20 | Some adapter modules probe the physical connection of the device at | 
 | 21 | the load time.  It'd be safer to plug in the joystick device before | 
 | 22 | loading the module. | 
 | 23 |  | 
 | 24 |  | 
 | 25 | PCI Cards | 
 | 26 | --------- | 
 | 27 |  | 
 | 28 | For PCI cards, the joystick is enabled when the appropriate module | 
 | 29 | option is specified.  Some drivers don't need options, and the | 
 | 30 | joystick support is always enabled.  In the former ALSA version, there | 
 | 31 | was a dynamic control API for the joystick activation.  It was | 
 | 32 | changed, however, to the static module options because of the system | 
 | 33 | stability and the resource management. | 
 | 34 |  | 
 | 35 | The following PCI drivers support the joystick natively. | 
 | 36 |  | 
 | 37 |     Driver	Module Option	Available Values | 
 | 38 |     --------------------------------------------------------------------------- | 
 | 39 |     als4000	joystick_port	0 = disable (default), 1 = auto-detect, | 
 | 40 |                                 manual: any address (e.g. 0x200) | 
 | 41 |     au88x0	N/A		N/A | 
 | 42 |     azf3328	joystick	0 = disable, 1 = enable, -1 = auto (default) | 
 | 43 |     ens1370	joystick	0 = disable (default), 1 = enable | 
 | 44 |     ens1371	joystick_port	0 = disable (default), 1 = auto-detect, | 
 | 45 |                                 manual: 0x200, 0x208, 0x210, 0x218 | 
 | 46 |     cmipci	joystick_port	0 = disable (default), 1 = auto-detect, | 
 | 47 |                                 manual: any address (e.g. 0x200) | 
 | 48 |     cs4281	N/A		N/A | 
 | 49 |     cs46xx	N/A		N/A | 
 | 50 |     es1938	N/A		N/A | 
 | 51 |     es1968	joystick	0 = disable (default), 1 = enable | 
 | 52 |     sonicvibes	N/A		N/A | 
 | 53 |     trident	N/A		N/A | 
 | 54 |     via82xx(*1)	joystick	0 = disable (default), 1 = enable | 
 | 55 |     ymfpci	joystick_port	0 = disable (default), 1 = auto-detect, | 
 | 56 |                                 manual: 0x201, 0x202, 0x204, 0x205(*2) | 
 | 57 |     --------------------------------------------------------------------------- | 
 | 58 |  | 
 | 59 |     *1)  VIA686A/B only | 
 | 60 |     *2)  With YMF744/754 chips, the port address can be chosen arbitrarily | 
 | 61 |  | 
 | 62 | The following drivers don't support gameport natively, but there are | 
 | 63 | additional modules.  Load the corresponding module to add the gameport | 
 | 64 | support. | 
 | 65 |  | 
 | 66 |     Driver	Additional Module | 
 | 67 |     ----------------------------- | 
 | 68 |     emu10k1	emu10k1-gp | 
 | 69 |     fm801	fm801-gp | 
 | 70 |     ----------------------------- | 
 | 71 |  | 
 | 72 | Note: the "pcigame" and "cs461x" modules are for the OSS drivers only. | 
 | 73 |       These ALSA drivers (cs46xx, trident and au88x0) have the | 
 | 74 |       built-in gameport support. | 
 | 75 |  | 
 | 76 | As mentioned above, ALSA PCI drivers have the built-in gameport | 
 | 77 | support, so you don't have to load ns558 module.  Just load "joydev" | 
 | 78 | and the appropriate adapter module (e.g. "analog"). | 
 | 79 |  | 
 | 80 |  | 
 | 81 | ISA Cards | 
 | 82 | --------- | 
 | 83 |  | 
 | 84 | ALSA ISA drivers don't have the built-in gameport support. | 
 | 85 | Instead, you need to load "ns558" module in addition to "joydev" and | 
 | 86 | the adapter module (e.g. "analog"). |