aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt210
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl923
-rw-r--r--Documentation/sound/alsa/soc/DAI.txt6
-rw-r--r--Documentation/sound/alsa/soc/clocking.txt10
-rw-r--r--Documentation/sound/alsa/soc/codec.txt53
-rw-r--r--Documentation/sound/alsa/soc/dapm.txt51
-rw-r--r--Documentation/sound/alsa/soc/machine.txt12
-rw-r--r--Documentation/sound/alsa/soc/overview.txt42
-rw-r--r--Documentation/sound/alsa/soc/platform.txt6
-rw-r--r--Documentation/sound/alsa/soc/pops_clicks.txt10
10 files changed, 705 insertions, 618 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 4b48c2e82c3..e985cf5e041 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -57,7 +57,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
- Default: 1
- For auto-loading more than one card, specify this
option together with snd-card-X aliases.
-
+ slots - Reserve the slot index for the given driver.
+ This option takes multiple strings.
+ See "Module Autoloading Support" section for details.
Module snd-pcm-oss
------------------
@@ -148,13 +150,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on Analog Devices AD1816A/AD1815 ISA chips.
- port - port # for AD1816A chip (PnP setup)
- mpu_port - port # for MPU-401 UART (PnP setup)
- fm_port - port # for OPL3 (PnP setup)
- irq - IRQ # for AD1816A chip (PnP setup)
- mpu_irq - IRQ # for MPU-401 UART (PnP setup)
- dma1 - first DMA # for AD1816A chip (PnP setup)
- dma2 - second DMA # for AD1816A chip (PnP setup)
clockfreq - Clock frequency for AD1816A chip (default = 0, 33000Hz)
This module supports multiple cards, autoprobe and PnP.
@@ -201,14 +196,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on Avance Logic ALS100/ALS120 ISA chips.
- port - port # for ALS100 (SB16) chip (PnP setup)
- irq - IRQ # for ALS100 (SB16) chip (PnP setup)
- dma8 - 8-bit DMA # for ALS100 (SB16) chip (PnP setup)
- dma16 - 16-bit DMA # for ALS100 (SB16) chip (PnP setup)
- mpu_port - port # for MPU-401 UART (PnP setup)
- mpu_irq - IRQ # for MPU-401 (PnP setup)
- fm_port - port # for OPL3 FM (PnP setup)
-
This module supports multiple cards, autoprobe and PnP.
The power-management is supported.
@@ -302,15 +289,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on Aztech System AZT2320 ISA chip (PnP only).
- port - port # for AZT2320 chip (PnP setup)
- wss_port - port # for WSS (PnP setup)
- mpu_port - port # for MPU-401 UART (PnP setup)
- fm_port - FM port # for AZT2320 chip (PnP setup)
- irq - IRQ # for AZT2320 (WSS) chip (PnP setup)
- mpu_irq - IRQ # for MPU-401 UART (PnP setup)
- dma1 - 1st DMA # for AZT2320 (WSS) chip (PnP setup)
- dma2 - 2nd DMA # for AZT2320 (WSS) chip (PnP setup)
-
This module supports multiple cards, PnP and autoprobe.
The power-management is supported.
@@ -350,6 +328,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on C-Media CMI8330 ISA chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
wssport - port # for CMI8330 chip (WSS)
wssirq - IRQ # for CMI8330 chip (WSS)
wssdma - first DMA # for CMI8330 chip (WSS)
@@ -404,6 +386,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on CS4232/CS4232A ISA chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for CS4232 chip (PnP setup - 0x534)
cport - control port # for CS4232 chip (PnP setup - 0x120,0x210,0xf00)
mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
@@ -412,10 +398,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
dma1 - first DMA # for CS4232 chip (0,1,3)
dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
- isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards. This module does not support autoprobe
- thus main port must be specified!!! Other ports are optional.
+ (if ISA PnP is not used) thus main port must be specified!!! Other ports are
+ optional.
The power-management is supported.
@@ -425,6 +411,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on CS4235/CS4236/CS4236B/CS4237B/
CS4238B/CS4239 ISA chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for CS4236 chip (PnP setup - 0x534)
cport - control port # for CS4236 chip (PnP setup - 0x120,0x210,0xf00)
mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
@@ -433,7 +423,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
dma1 - first DMA # for CS4236 chip (0,1,3)
dma2 - second DMA # for CS4236 chip (0,1,3), -1 = disable
- isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards. This module does not support autoprobe
(if ISA PnP is not used) thus main port and control port must be
@@ -503,13 +492,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for Diamond Technologies DT-019X / Avance Logic ALS-007 (PnP
only)
- port - Port # (PnP setup)
- mpu_port - Port # for MPU-401 (PnP setup)
- fm_port - Port # for FM OPL-3 (PnP setup)
- irq - IRQ # (PnP setup)
- mpu_irq - IRQ # for MPU-401 (PnP setup)
- dma8 - DMA # (PnP setup)
-
This module supports multiple cards. This module is enabled only with
ISA PnP support.
@@ -607,10 +589,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on ESS ES968 chip (PnP only).
- port - port # for ES968 (SB8) chip (PnP setup)
- irq - IRQ # for ES968 (SB8) chip (PnP setup)
- dma1 - DMA # for ES968 (SB8) chip (PnP setup)
-
This module supports multiple cards, PnP and autoprobe.
The power-management is supported.
@@ -633,13 +611,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for ESS AudioDrive ES-18xx sound cards.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for ES-18xx chip (0x220,0x240,0x260)
mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default)
fm_port - port # for FM (optional, not used)
irq - IRQ # for ES-18xx chip (5,7,9,10)
dma1 - first DMA # for ES-18xx chip (0,1,3)
dma2 - first DMA # for ES-18xx chip (0,1,3)
- isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards, ISA PnP and autoprobe (without MPU-401
port if native ISA PnP routines are not used).
@@ -763,9 +744,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
VIA VT8251/VT8237A,
SIS966, ULI M5461
+ [Multiple options for each card instance]
model - force the model name
position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
+
+ [Single (global) options]
single_cmd - Use single immediate commands to communicate with
codecs (for debugging only)
enable_msi - Enable Message Signaled Interrupt (MSI) (default = off)
@@ -774,8 +758,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
power_save_controller - Reset HD-audio controller in power-saving mode
(default = on)
- This module supports one card and autoprobe.
-
+ This module supports multiple cards and autoprobe.
+
Each codec may have a model table for different configurations.
If your machine isn't listed there, the default (usually minimal)
configuration is set up. You can pass "model=<name>" option to
@@ -817,17 +801,23 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
will Will laptops (PB V7900)
replacer Replacer 672V
basic fixed pin assignment (old default model)
+ test for testing/debugging purpose, almost all controls can
+ adjusted. Appearing only when compiled with
+ $CONFIG_SND_DEBUG=y
auto auto-config reading BIOS (default)
ALC262
fujitsu Fujitsu Laptop
hp-bpc HP xw4400/6400/8400/9400 laptops
hp-bpc-d7000 HP BPC D7000
+ hp-tc-t5735 HP Thin Client T5735
+ hp-rp5700 HP RP5700
benq Benq ED8
benq-t31 Benq T31
hippo Hippo (ATI) with jack detection, Sony UX-90s
hippo_1 Hippo (Benq) with jack detection
sony-assamd Sony ASSAMD
+ ultra Samsung Q1 Ultra Vista model
basic fixed pin assignment w/o SPDIF
auto auto-config reading BIOS (default)
@@ -835,6 +825,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
3stack 3-stack model
toshiba Toshiba A205
acer Acer laptops
+ dell Dell OEM laptops (Vostro 1200)
+ test for testing/debugging purpose, almost all controls can
+ adjusted. Appearing only when compiled with
+ $CONFIG_SND_DEBUG=y
auto auto-config reading BIOS (default)
ALC662
@@ -843,6 +837,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
3stack-6ch-dig 3-stack (6-channel) with SPDIF
6stack-dig 6-stack with SPDIF
lenovo-101e Lenovo laptop
+ eeepc-p701 ASUS Eeepc P701
+ eeepc-ep20 ASUS Eeepc EP20
auto auto-config reading BIOS (default)
ALC882/885
@@ -877,6 +873,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
haier-w66 Haier W66
6stack-hp HP machines with 6stack (Nettle boards)
3stack-hp HP machines with 3stack (Lucknow, Samba boards)
+ 6stack-dell Dell machines with 6stack (Inspiron 530)
+ mitac Mitac 8252D
auto auto-config reading BIOS (default)
ALC861/660
@@ -928,6 +926,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
AD1984
basic default configuration
thinkpad Lenovo Thinkpad T61/X61
+ dell Dell T3400
AD1986A
6stack 6-jack, separate surrounds (default)
@@ -947,7 +946,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
auto auto-config reading BIOS (default)
Conexant 5045
- laptop Laptop config
+ laptop-hpsense Laptop with HP sense (old model laptop)
+ laptop-micsense Laptop with Mic sense (old model fujitsu)
+ laptop-hpmicsense Laptop with HP and Mic senses
+ benq Benq R55E
test for testing/debugging purpose, almost all controls
can be adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
@@ -960,6 +962,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
can be adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
+ Conexant 5051
+ laptop Basic Laptop config (default)
+ hp HP Spartan laptop
+
STAC9200
ref Reference board
dell-d21 Dell (unknown)
@@ -1091,6 +1097,15 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
See hdspm.txt for details.
+ Module snd-hifier
+ -----------------
+
+ Module for the MediaTek/TempoTec HiFier Fantasia sound card.
+
+ This module supports autoprobe and multiple cards.
+
+ Power management is _not_ supported.
+
Module snd-ice1712
------------------
@@ -1156,11 +1171,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
* Chaintech 9CJS
* Chaintech AV-710
* Shuttle SN25P
+ * Onkyo SE-90PCI
+ * Onkyo SE-200PCI
model - Use the given board model, one of the following:
revo51, revo71, amp2000, prodigy71, prodigy71lt,
prodigy192, aureon51, aureon71, universe, ap192,
- k8x800, phase22, phase28, ms300, av710
+ k8x800, phase22, phase28, ms300, av710, se200pci,
+ se90pci
This module supports multiple cards and autoprobe.
@@ -1257,15 +1275,19 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32
and other sound cards based on AMD InterWave (tm) chip.
- port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260)
- irq - IRQ # for InterWave chip (3,5,9,11,12,15)
- dma1 - DMA # for InterWave chip (0,1,3,5,6,7)
- dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable)
joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V)
midi - 1 = MIDI UART enable, 0 = MIDI UART disable (default)
pcm_voices - reserved PCM voices for the synthesizer (default 2)
effect - 1 = InterWave effects enable (default 0);
requires 8 voices
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
+ port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260)
+ irq - IRQ # for InterWave chip (3,5,9,11,12,15)
+ dma1 - DMA # for InterWave chip (0,1,3,5,6,7)
+ dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable)
This module supports multiple cards, autoprobe and ISA PnP.
@@ -1276,16 +1298,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
and other sound cards based on AMD InterWave (tm) chip with TEA6330T
circuit for extended control of bass, treble and master volume.
- port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260)
- port_tc - tone control (i2c bus) port # for TEA6330T chip (0x350,0x360,0x370,0x380)
- irq - IRQ # for InterWave chip (3,5,9,11,12,15)
- dma1 - DMA # for InterWave chip (0,1,3,5,6,7)
- dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable)
joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V)
midi - 1 = MIDI UART enable, 0 = MIDI UART disable (default)
pcm_voices - reserved PCM voices for the synthesizer (default 2)
effect - 1 = InterWave effects enable (default 0);
requires 8 voices
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
+ port - port # for InterWave chip (0x210,0x220,0x230,0x240,0x250,0x260)
+ port_tc - tone control (i2c bus) port # for TEA6330T chip (0x350,0x360,0x370,0x380)
+ irq - IRQ # for InterWave chip (3,5,9,11,12,15)
+ dma1 - DMA # for InterWave chip (0,1,3,5,6,7)
+ dma2 - DMA # for InterWave chip (0,1,3,5,6,7,-1=disable)
This module supports multiple cards, autoprobe and ISA PnP.
@@ -1473,6 +1499,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for Yamaha OPL3-SA2/SA3 sound cards.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - control port # for OPL3-SA chip (0x370)
sb_port - SB port # for OPL3-SA chip (0x220,0x240)
wss_port - WSS port # for OPL3-SA chip (0x530,0xe80,0xf40,0x604)
@@ -1481,7 +1511,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ # for OPL3-SA chip (5,7,9,10)
dma1 - first DMA # for Yamaha OPL3-SA chip (0,1,3)
dma2 - second DMA # for Yamaha OPL3-SA chip (0,1,3), -1 = disable
- isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards and ISA PnP. It does not support
autoprobe (if ISA PnP is not used) thus all ports must be specified!!!
@@ -1494,6 +1523,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on OPTi 82c92x and Analog Devices AD1848 chips.
Module works with OAK Mozart cards as well.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for WSS chip (0x530,0xe80,0xf40,0x604)
mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330)
fm_port - port # for OPL3 device (0x388)
@@ -1508,6 +1541,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on OPTi 82c92x and Crystal CS4231 chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for WSS chip (0x530,0xe80,0xf40,0x604)
mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330)
fm_port - port # for OPL3 device (0x388)
@@ -1523,6 +1560,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for sound cards based on OPTi 82c93x chips.
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for WSS chip (0x530,0xe80,0xf40,0x604)
mpu_port - port # for MPU-401 UART (0x300,0x310,0x320,0x330)
fm_port - port # for OPL3 device (0x388)
@@ -1533,6 +1574,22 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
This module supports only one card, autoprobe and PnP.
+ Module snd-oxygen
+ -----------------
+
+ Module for sound cards based on the C-Media CMI8788 chip:
+ * Asound A-8788
+ * AuzenTech X-Meridian
+ * Bgears b-Enspirer
+ * Club3D Theatron DTS
+ * HT-Omega Claro
+ * Razer Barracuda AC-1
+ * Sondigo Inferno
+
+ This module supports autoprobe and multiple cards.
+
+ Power management is _not_ supported.
+
Module snd-pcxhr
----------------
@@ -1647,6 +1704,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
SoundBlaster AWE 32 (PnP),
SoundBlaster AWE 64 PnP
+ mic_agc - Mic Auto-Gain-Control - 0 = disable, 1 = enable (default)
+ csp - ASP/CSP chip support - 0 = disable (default), 1 = enable
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
port - port # for SB DSP 4.x chip (0x220,0x240,0x260)
mpu_port - port # for MPU-401 UART (0x300,0x330), -1 = disable
awe_port - base port # for EMU8000 synthesizer (0x620,0x640,0x660)
@@ -1654,9 +1717,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
irq - IRQ # for SB DSP 4.x chip (5,7,9,10)
dma8 - 8-bit DMA # for SB DSP 4.x chip (0,1,3)
dma16 - 16-bit DMA # for SB DSP 4.x chip (5,6,7)
- mic_agc - Mic Auto-Gain-Control - 0 = disable, 1 = enable (default)
- csp - ASP/CSP chip support - 0 = disable (default), 1 = enable
- isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
This module supports multiple cards, autoprobe and ISA PnP.
@@ -1739,18 +1799,21 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
Module for Turtle Beach Maui, Tropez and Tropez+ sound cards.
+ use_cs4232_midi - Use CS4232 MPU-401 interface
+ (inaccessibly located inside your computer)
+ isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
+
+ with isapnp=0, the following options are available:
+
cs4232_pcm_port - Port # for CS4232 PCM interface.
cs4232_pcm_irq - IRQ # for CS4232 PCM interface (5,7,9,11,12,15).
cs4232_mpu_port - Port # for CS4232 MPU-401 interface.
cs4232_mpu_irq - IRQ # for CS4232 MPU-401 interface (9,11,12,15).
- use_cs4232_midi - Use CS4232 MPU-401 interface
- (inaccessibly located inside your computer)
ics2115_port - Port # for ICS2115
ics2115_irq - IRQ # for ICS2115
fm_port - FM OPL-3 Port #
dma1 - DMA1 # for CS4232 PCM interface.
dma2 - DMA2 # for CS4232 PCM interface.
- isapnp - ISA PnP detection - 0 = disable, 1 = enable (default)
The below are options for wavefront_synth features:
wf_raw - Assume that we need to boot the OS (default:no)
@@ -1965,6 +2028,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
This module supports multiple cards.
+ Module snd-virtuoso
+ -------------------
+
+ Module for sound cards based on the Asus AV200 chip, i.e.,
+ Xonar D2 and Xonar D2X.
+
+ This module supports autoprobe and multiple cards.
+
+ Power management is _not_ supported.
+
Module snd-vx222
----------------
@@ -2135,6 +2208,23 @@ alias sound-slot-1 snd-ens1371
In this example, the interwave card is always loaded as the first card
(index 0) and ens1371 as the second (index 1).
+Alternative (and new) way to fixate the slot assignment is to use
+"slots" option of snd module. In the case above, specify like the
+following:
+
+options snd slots=snd-interwave,snd-ens1371
+
+Then, the first slot (#0) is reserved for snd-interwave driver, and
+the second (#1) for snd-ens1371. You can omit index option in each
+driver if slots option is used (although you can still have them at
+the same time as long as they don't conflict).
+
+The slots option is especially useful for avoiding the possible
+hot-plugging and the resultant slot conflict. For example, in the
+case above again, the first two slots are already reserved. If any
+other driver (e.g. snd-usb-audio) is loaded before snd-interwave or
+snd-ens1371, it will be assigned to the third or later slot.
+
ALSA PCM devices to OSS devices mapping
=======================================
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 2c3fc3cb3b6..b03df4d4795 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -18,7 +18,7 @@
</affiliation>
</author>
- <date>September 10, 2007</date>
+ <date>Oct 15, 2007</date>
<edition>0.3.7</edition>
<abstract>
@@ -67,7 +67,7 @@
This document describes how to write an
<ulink url="http://www.alsa-project.org/"><citetitle>
ALSA (Advanced Linux Sound Architecture)</citetitle></ulink>
- driver. The document focuses mainly on the PCI soundcard.
+ driver. The document focuses mainly on PCI soundcards.
In the case of other device types, the API might
be different, too. However, at least the ALSA kernel API is
consistent, and therefore it would be still a bit help for
@@ -75,23 +75,23 @@
</para>
<para>
- The target of this document is ones who already have enough
- skill of C language and have the basic knowledge of linux
- kernel programming. This document doesn't explain the general
- topics of linux kernel codes and doesn't cover the detail of
- implementation of each low-level driver. It describes only how is
+ This document targets people who already have enough
+ C language skills and have basic linux kernel programming
+ knowledge. This document doesn't explain the general
+ topic of linux kernel coding and doesn't cover low-level
+ driver implementation details. It only describes
the standard way to write a PCI sound driver on ALSA.
</para>
<para>
- If you are already familiar with the older ALSA ver.0.5.x, you
- can check the drivers such as <filename>es1938.c</filename> or
- <filename>maestro3.c</filename> which have also almost the same
+ If you are already familiar with the older ALSA ver.0.5.x API, you
+ can check the drivers such as <filename>sound/pci/es1938.c</filename> or
+ <filename>sound/pci/maestro3.c</filename> which have also almost the same
code-base in the ALSA 0.5.x tree, so you can compare the differences.
</para>
<para>
- This document is still a draft version. Any feedbacks and
+ This document is still a draft version. Any feedback and
corrections, please!!
</para>
</preface>
@@ -106,7 +106,7 @@
<section id="file-tree-general">
<title>General</title>
<para>
- The ALSA drivers are provided in the two ways.
+ The ALSA drivers are provided in two ways.
</para>
<para>
@@ -114,15 +114,14 @@
ALSA's ftp site, and another is the 2.6 (or later) Linux kernel
tree. To synchronize both, the ALSA driver tree is split into
two different trees: alsa-kernel and alsa-driver. The former
- contains purely the source codes for the Linux 2.6 (or later)
+ contains purely the source code for the Linux 2.6 (or later)
tree. This tree is designed only for compilation on 2.6 or
later environment. The latter, alsa-driver, contains many subtle
- files for compiling the ALSA driver on the outside of Linux
- kernel like configure script, the wrapper functions for older,
- 2.2 and 2.4 kernels, to adapt the latest kernel API,
+ files for compiling ALSA drivers outside of the Linux kernel tree,
+ wrapper functions for older 2.2 and 2.4 kernels, to adapt the latest kernel API,
and additional drivers which are still in development or in
tests. The drivers in alsa-driver tree will be moved to
- alsa-kernel (eventually 2.6 kernel tree) once when they are
+ alsa-kernel (and eventually to the 2.6 kernel tree) when they are
finished and confirmed to work fine.
</para>
@@ -168,7 +167,7 @@
<section id="file-tree-core-directory">
<title>core directory</title>
<para>
- This directory contains the middle layer, that is, the heart
+ This directory contains the middle layer which is the heart
of ALSA drivers. In this directory, the native ALSA modules are
stored. The sub-directories contain different modules and are
dependent upon the kernel config.
@@ -181,7 +180,7 @@
The codes for PCM and mixer OSS emulation modules are stored
in this directory. The rawmidi OSS emulation is included in
the ALSA rawmidi code since it's quite small. The sequencer
- code is stored in core/seq/oss directory (see
+ code is stored in <filename>core/seq/oss</filename> directory (see
<link linkend="file-tree-core-directory-seq-oss"><citetitle>
below</citetitle></link>).
</para>
@@ -200,7 +199,7 @@
<section id="file-tree-core-directory-seq">
<title>core/seq</title>
<para>
- This and its sub-directories are for the ALSA
+ This directory and its sub-directories are for the ALSA
sequencer. This directory contains the sequencer core and
primary sequencer modules such like snd-seq-midi,
snd-seq-virmidi, etc. They are compiled only when
@@ -229,22 +228,22 @@
<title>include directory</title>
<para>
This is the place for the public header files of ALSA drivers,
- which are to be exported to the user-space, or included by
+ which are to be exported to user-space, or included by
several files at different directories. Basically, the private
header files should not be placed in this directory, but you may
- still find files there, due to historical reason :)
+ still find files there, due to historical reasons :)
</para>
</section>
<section id="file-tree-drivers-directory">
<title>drivers directory</title>
<para>
- This directory contains the codes shared among different drivers
- on the different architectures. They are hence supposed not to be
+ This directory contains code shared among different drivers
+ on different architectures. They are hence supposed not to be
architecture-specific.
For example, the dummy pcm driver and the serial MIDI
driver are found in this directory. In the sub-directories,
- there are the codes for components which are independent from
+ there is code for components which are independent from
bus and cpu architectures.
</para>
@@ -271,7 +270,7 @@
<para>
Although there is a standard i2c layer on Linux, ALSA has its
- own i2c codes for some cards, because the soundcard needs only a
+ own i2c code for some cards, because the soundcard needs only a
simple operation and the standard i2c API is too complicated for
such a purpose.
</para>
@@ -292,28 +291,28 @@
<para>
So far, there is only Emu8000/Emu10k1 synth driver under
- synth/emux sub-directory.
+ the <filename>synth/emux</filename> sub-directory.
</para>
</section>
<section id="file-tree-pci-directory">
<title>pci directory</title>
<para>
- This and its sub-directories hold the top-level card modules
- for PCI soundcards and the codes specific to the PCI BUS.
+ This directory and its sub-directories hold the top-level card modules
+ for PCI soundcards and the code specific to the PCI BUS.
</para>
<para>
- The drivers compiled from a single file is stored directly on
- pci directory, while the drivers with several source files are
- stored on its own sub-directory (e.g. emu10k1, ice1712).
+ The drivers compiled from a single file are stored directly
+ in the pci directory, while the drivers with several source files are
+ stored on their own sub-directory (e.g. emu10k1, ice1712).
</para>
</section>
<section id="file-tree-isa-directory">
<title>isa directory</title>
<para>
- This and its sub-directories hold the top-level card modules
+ This directory and its sub-directories hold the top-level card modules
for ISA soundcards.
</para>
</section>
@@ -321,16 +320,16 @@
<section id="file-tree-arm-ppc-sparc-directories">
<title>arm, ppc, and sparc directories</title>
<para>
- These are for the top-level card modules which are
- specific to each given architecture.
+ They are used for top-level card modules which are
+ specific to one of these architectures.
</para>
</section>
<section id="file-tree-usb-directory">
<title>usb directory</title>
<para>
- This contains the USB-audio driver. On the latest version, the
- USB MIDI driver is integrated together with usb-audio driver.
+ This directory contains the USB-audio driver. In the latest version, the
+ USB MIDI driver is integrated in the usb-audio driver.
</para>
</section>
@@ -338,16 +337,17 @@
<title>pcmcia directory</title>
<para>
The PCMCIA, especially PCCard drivers will go here. CardBus
- drivers will be on pci directory, because its API is identical
- with the standard PCI cards.
+ drivers will be in the pci directory, because their API is identical
+ to that of standard PCI cards.
</para>
</section>
<section id="file-tree-oss-directory">
<title>oss directory</title>
<para>
- The OSS/Lite source files are stored here on Linux 2.6 (or
- later) tree. (In the ALSA driver tarball, it's empty, of course :)
+ The OSS/Lite source files are stored here in Linux 2.6 (or
+ later) tree. In the ALSA driver tarball, this directory is empty,
+ of course :)
</para>
</section>
</chapter>
@@ -362,7 +362,7 @@
<section id="basic-flow-outline">
<title>Outline</title>
<para>
- The minimum flow of PCI soundcard is like the following:
+ The minimum flow for PCI soundcards is as follows:
<itemizedlist>
<listitem><para>define the PCI ID table (see the section
@@ -370,9 +370,13 @@
</citetitle></link>).</para></listitem>
<listitem><para>create <function>probe()</function> callback.</para></listitem>
<listitem><para>create <function>remove()</function> callback.</para></listitem>
- <listitem><para>create pci_driver table which contains the three pointers above.</para></listitem>
- <listitem><para>create <function>init()</function> function just calling <function>pci_register_driver()</function> to register the pci_driver table defined above.</para></listitem>
- <listitem><para>create <function>exit()</function> function to call <function>pci_unregister_driver()</function> function.</para></listitem>
+ <listitem><para>create a <structname>pci_driver</structname> structure
+ containing the three pointers above.</para></listitem>
+ <listitem><para>create an <function>init()</function> function just calling
+ the <function>pci_register_driver()</function> to register the pci_driver table
+ defined above.</para></listitem>
+ <listitem><para>create an <function>exit()</function> function to call
+ the <function>pci_unregister_driver()</function> function.</para></listitem>
</itemizedlist>
</para>
</section>
@@ -382,15 +386,14 @@
<para>
The code example is shown below. Some parts are kept
unimplemented at this moment but will be filled in the
- succeeding sections. The numbers in comment lines of
- <function>snd_mychip_probe()</function> function are the
- markers.
+ next sections. The numbers in the comment lines of the
+ <function>snd_mychip_probe()</function> function
+ refer to details explained in the following section.
<example>
- <title>Basic Flow for PCI Drivers Example</title>
+ <title>Basic Flow for PCI Drivers - Example</title>
<programlisting>
<![CDATA[
- #include <sound/driver.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
@@ -398,6 +401,7 @@
#include <sound/initval.h>
/* module parameters (see "Module Parameters") */
+ /* SNDRV_CARDS: maximum number of cards supported by this module */
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
@@ -405,13 +409,13 @@
/* definition of the chip-specific record */
struct mychip {
struct snd_card *card;
- /* rest of implementation will be in the section
- * "PCI Resource Managements"
+ /* the rest of the implementation will be in section
+ * "PCI Resource Management"
*/
};
/* chip-specific destructor
- * (see "PCI Resource Managements")
+ * (see "PCI Resource Management")
*/
static int snd_mychip_free(struct mychip *chip)
{
@@ -442,7 +446,7 @@
*rchip = NULL;
/* check PCI availability here
- * (see "PCI Resource Managements")
+ * (see "PCI Resource Management")
*/
....
@@ -454,7 +458,7 @@
chip->card = card;
/* rest of initialization here; will be implemented
- * later, see "PCI Resource Managements"
+ * later, see "PCI Resource Management"
*/
....
@@ -521,7 +525,7 @@
return 0;
}
- /* destructor -- see "Destructor" sub-section */
+ /* destructor -- see the "Destructor" sub-section */
static void __devexit snd_mychip_remove(struct pci_dev *pci)
{
snd_card_free(pci_get_drvdata(pci));
@@ -536,16 +540,16 @@
<section id="basic-flow-constructor">
<title>Constructor</title>
<para>
- The real constructor of PCI drivers is probe callback. The
- probe callback and other component-constructors which are called
- from probe callback should be defined with
- <parameter>__devinit</parameter> prefix. You
- cannot use <parameter>__init</parameter> prefix for them,
+ The real constructor of PCI drivers is the <function>probe</function> callback.