18c2ecf20Sopenharmony_ci=======================================
28c2ecf20Sopenharmony_ciAnalog Joystick Support on ALSA Drivers
38c2ecf20Sopenharmony_ci=======================================
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciOct. 14, 2003
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciTakashi Iwai <tiwai@suse.de>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciGeneral
108c2ecf20Sopenharmony_ci-------
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciFirst of all, you need to enable GAMEPORT support on Linux kernel for
138c2ecf20Sopenharmony_ciusing a joystick with the ALSA driver.  For the details of gameport
148c2ecf20Sopenharmony_cisupport, refer to Documentation/input/joydev/joystick.rst.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciThe joystick support of ALSA drivers is different between ISA and PCI
178c2ecf20Sopenharmony_cicards.  In the case of ISA (PnP) cards, it's usually handled by the
188c2ecf20Sopenharmony_ciindependent module (ns558).  Meanwhile, the ALSA PCI drivers have the
198c2ecf20Sopenharmony_cibuilt-in gameport support.  Hence, when the ALSA PCI driver is built
208c2ecf20Sopenharmony_ciin the kernel, CONFIG_GAMEPORT must be 'y', too.  Otherwise, the
218c2ecf20Sopenharmony_cigameport support on that card will be (silently) disabled.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciSome adapter modules probe the physical connection of the device at
248c2ecf20Sopenharmony_cithe load time.  It'd be safer to plug in the joystick device before
258c2ecf20Sopenharmony_ciloading the module.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciPCI Cards
298c2ecf20Sopenharmony_ci---------
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciFor PCI cards, the joystick is enabled when the appropriate module
328c2ecf20Sopenharmony_cioption is specified.  Some drivers don't need options, and the
338c2ecf20Sopenharmony_cijoystick support is always enabled.  In the former ALSA version, there
348c2ecf20Sopenharmony_ciwas a dynamic control API for the joystick activation.  It was
358c2ecf20Sopenharmony_cichanged, however, to the static module options because of the system
368c2ecf20Sopenharmony_cistability and the resource management.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciThe following PCI drivers support the joystick natively.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci==============	=============	============================================
418c2ecf20Sopenharmony_ciDriver		Module Option	Available Values
428c2ecf20Sopenharmony_ci==============	=============	============================================
438c2ecf20Sopenharmony_cials4000		joystick_port	0 = disable (default), 1 = auto-detect,
448c2ecf20Sopenharmony_ci	                        manual: any address (e.g. 0x200)
458c2ecf20Sopenharmony_ciau88x0		N/A		N/A
468c2ecf20Sopenharmony_ciazf3328		joystick	0 = disable, 1 = enable, -1 = auto (default)
478c2ecf20Sopenharmony_ciens1370		joystick	0 = disable (default), 1 = enable
488c2ecf20Sopenharmony_ciens1371		joystick_port	0 = disable (default), 1 = auto-detect,
498c2ecf20Sopenharmony_ci	                        manual: 0x200, 0x208, 0x210, 0x218
508c2ecf20Sopenharmony_cicmipci		joystick_port	0 = disable (default), 1 = auto-detect,
518c2ecf20Sopenharmony_ci	                        manual: any address (e.g. 0x200)
528c2ecf20Sopenharmony_cics4281		N/A		N/A
538c2ecf20Sopenharmony_cics46xx		N/A		N/A
548c2ecf20Sopenharmony_cies1938		N/A		N/A
558c2ecf20Sopenharmony_cies1968		joystick	0 = disable (default), 1 = enable
568c2ecf20Sopenharmony_cisonicvibes	N/A		N/A
578c2ecf20Sopenharmony_citrident		N/A		N/A
588c2ecf20Sopenharmony_civia82xx [#f1]_	joystick	0 = disable (default), 1 = enable
598c2ecf20Sopenharmony_ciymfpci		joystick_port	0 = disable (default), 1 = auto-detect,
608c2ecf20Sopenharmony_ci	                        manual: 0x201, 0x202, 0x204, 0x205 [#f2]_
618c2ecf20Sopenharmony_ci==============	=============	============================================
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci.. [#f1] VIA686A/B only
648c2ecf20Sopenharmony_ci.. [#f2] With YMF744/754 chips, the port address can be chosen arbitrarily
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ciThe following drivers don't support gameport natively, but there are
678c2ecf20Sopenharmony_ciadditional modules.  Load the corresponding module to add the gameport
688c2ecf20Sopenharmony_cisupport.
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci=======	=================
718c2ecf20Sopenharmony_ciDriver	Additional Module
728c2ecf20Sopenharmony_ci=======	=================
738c2ecf20Sopenharmony_ciemu10k1	emu10k1-gp
748c2ecf20Sopenharmony_cifm801	fm801-gp
758c2ecf20Sopenharmony_ci=======	=================
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciNote: the "pcigame" and "cs461x" modules are for the OSS drivers only.
788c2ecf20Sopenharmony_ciThese ALSA drivers (cs46xx, trident and au88x0) have the
798c2ecf20Sopenharmony_cibuilt-in gameport support.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciAs mentioned above, ALSA PCI drivers have the built-in gameport
828c2ecf20Sopenharmony_cisupport, so you don't have to load ns558 module.  Just load "joydev"
838c2ecf20Sopenharmony_ciand the appropriate adapter module (e.g. "analog").
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ciISA Cards
878c2ecf20Sopenharmony_ci---------
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ciALSA ISA drivers don't have the built-in gameport support.
908c2ecf20Sopenharmony_ciInstead, you need to load "ns558" module in addition to "joydev" and
918c2ecf20Sopenharmony_cithe adapter module (e.g. "analog").
92