<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Analog Joystick Support on ALSA Drivers — The Linux Kernel documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=3918102e" />
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Brief Notes on C-Media 8338/8738/8768/8770 Driver" href="cmipci.html" />
<link rel="prev" title="Card-Specific Information" href="index.html" />
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/logo.svg" alt="Logo of The Linux Kernel"/>
</a></p>
<h1 class="logo"><a href="../../index.html">The Linux Kernel</a></h1>
<p class="blurb">6.18.50</p>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../../subsystem-apis.html#human-interfaces">Human interfaces</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../../input/index.html">Input Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../hid/index.html">Human Interface Devices (HID)</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html">Sound Subsystem Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../gpu/index.html">GPU Driver Developer’s Guide</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../fb/index.html">Frame Buffer</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../leds/index.html">LEDs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#networking-interfaces">Networking interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#other-subsystems">Other subsystems</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../translations/index.html">Translations</a></li>
</ul>
</div>
<script type="text/javascript"> <!--
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
let currents = document.getElementsByClassName("current")
if (currents.length) {
sbar.scrollTop = currents[currents.length - 1].offsetTop;
}
--> </script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/sound/cards/joystick.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="analog-joystick-support-on-alsa-drivers">
<h1>Analog Joystick Support on ALSA Drivers<a class="headerlink" href="#analog-joystick-support-on-alsa-drivers" title="Link to this heading">¶</a></h1>
<p>Oct. 14, 2003</p>
<p>Takashi Iwai <<a class="reference external" href="mailto:tiwai%40suse.de">tiwai<span>@</span>suse<span>.</span>de</a>></p>
<section id="general">
<h2>General<a class="headerlink" href="#general" title="Link to this heading">¶</a></h2>
<p>First of all, you need to enable GAMEPORT support on Linux kernel for
using a joystick with the ALSA driver. For the details of gameport
support, refer to <a class="reference internal" href="../../input/joydev/joystick.html"><span class="doc">Introduction</span></a>.</p>
<p>The joystick support of ALSA drivers is different between ISA and PCI
cards. In the case of ISA (PnP) cards, it’s usually handled by the
independent module (ns558). Meanwhile, the ALSA PCI drivers have the
built-in gameport support. Hence, when the ALSA PCI driver is built
in the kernel, CONFIG_GAMEPORT must be ‘y’, too. Otherwise, the
gameport support on that card will be (silently) disabled.</p>
<p>Some adapter modules probe the physical connection of the device at
the load time. It’d be safer to plug in the joystick device before
loading the module.</p>
</section>
<section id="pci-cards">
<h2>PCI Cards<a class="headerlink" href="#pci-cards" title="Link to this heading">¶</a></h2>
<p>For PCI cards, the joystick is enabled when the appropriate module
option is specified. Some drivers don’t need options, and the
joystick support is always enabled. In the former ALSA version, there
was a dynamic control API for the joystick activation. It was
changed, however, to the static module options because of the system
stability and the resource management.</p>
<p>The following PCI drivers support the joystick natively.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Driver</p></th>
<th class="head"><p>Module Option</p></th>
<th class="head"><p>Available Values</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>als4000</p></td>
<td><p>joystick_port</p></td>
<td><p>0 = disable (default), 1 = auto-detect,
manual: any address (e.g. 0x200)</p></td>
</tr>
<tr class="row-odd"><td><p>au88x0</p></td>
<td><p>N/A</p></td>
<td><p>N/A</p></td>
</tr>
<tr class="row-even"><td><p>azf3328</p></td>
<td><p>joystick</p></td>
<td><p>0 = disable, 1 = enable, -1 = auto (default)</p></td>
</tr>
<tr class="row-odd"><td><p>ens1370</p></td>
<td><p>joystick</p></td>
<td><p>0 = disable (default), 1 = enable</p></td>
</tr>
<tr class="row-even"><td><p>ens1371</p></td>
<td><p>joystick_port</p></td>
<td><p>0 = disable (default), 1 = auto-detect,
manual: 0x200, 0x208, 0x210, 0x218</p></td>
</tr>
<tr class="row-odd"><td><p>cmipci</p></td>
<td><p>joystick_port</p></td>
<td><p>0 = disable (default), 1 = auto-detect,
manual: any address (e.g. 0x200)</p></td>
</tr>
<tr class="row-even"><td><p>cs4281</p></td>
<td><p>N/A</p></td>
<td><p>N/A</p></td>
</tr>
<tr class="row-odd"><td><p>cs46xx</p></td>
<td><p>N/A</p></td>
<td><p>N/A</p></td>
</tr>
<tr class="row-even"><td><p>es1938</p></td>
<td><p>N/A</p></td>
<td><p>N/A</p></td>
</tr>
<tr class="row-odd"><td><p>es1968</p></td>
<td><p>joystick</p></td>
<td><p>0 = disable (default), 1 = enable</p></td>
</tr>
<tr class="row-even"><td><p>sonicvibes</p></td>
<td><p>N/A</p></td>
<td><p>N/A</p></td>
</tr>
<tr class="row-odd"><td><p>trident</p></td>
<td><p>N/A</p></td>
<td><p>N/A</p></td>
</tr>
<tr class="row-even"><td><p>via82xx <a class="footnote-reference brackets" href="#f1" id="id1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a></p></td>
<td><p>joystick</p></td>
<td><p>0 = disable (default), 1 = enable</p></td>
</tr>
<tr class="row-odd"><td><p>ymfpci</p></td>
<td><p>joystick_port</p></td>
<td><p>0 = disable (default), 1 = auto-detect,
manual: 0x201, 0x202, 0x204, 0x205 <a class="footnote-reference brackets" href="#f2" id="id2" role="doc-noteref"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></a></p></td>
</tr>
</tbody>
</table>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="f1" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id1">1</a><span class="fn-bracket">]</span></span>
<p>VIA686A/B only</p>
</aside>
<aside class="footnote brackets" id="f2" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id2">2</a><span class="fn-bracket">]</span></span>
<p>With YMF744/754 chips, the port address can be chosen arbitrarily</p>
</aside>
</aside>
<p>The following drivers don’t support gameport natively, but there are
additional modules. Load the corresponding module to add the gameport
support.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Driver</p></th>
<th class="head"><p>Additional Module</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>emu10k1</p></td>
<td><p>emu10k1-gp</p></td>
</tr>
<tr class="row-odd"><td><p>fm801</p></td>
<td><p>fm801-gp</p></td>
</tr>
</tbody>
</table>
<p>Note: the “pcigame” and “cs461x” modules are for the OSS drivers only.
These ALSA drivers (cs46xx, trident and au88x0) have the
built-in gameport support.</p>
<p>As mentioned above, ALSA PCI drivers have the built-in gameport
support, so you don’t have to load ns558 module. Just load “joydev”
and the appropriate adapter module (e.g. “analog”).</p>
</section>
<section id="isa-cards">
<h2>ISA Cards<a class="headerlink" href="#isa-cards" title="Link to this heading">¶</a></h2>
<p>ALSA ISA drivers don’t have the built-in gameport support.
Instead, you need to load “ns558” module in addition to “joydev” and
the adapter module (e.g. “analog”).</p>
</section>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©The kernel development community.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../../_sources/sound/cards/joystick.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>