Commit e1f8e356 authored by Jaroslav Kysela's avatar Jaroslav Kysela

Merge suse.cz:/home/perex/bk/linux-sound/linux-sound

into suse.cz:/home/perex/bk/linux-sound/work
parents 53b4c216 6a4dad1d
Advanced Linux Sound Architecture - Driver
==========================================
Configuration guide
Kernel Configuration
====================
To enable the ALSA support, at least you need to build the kernel with
the primary sound card support (CONFIG_SOUND). Since ALSA can emulate
the OSS, you don't have to choose any of the OSS/Free modules. Please
enable "OSS API emulation" (CONFIG_SND_OSSEMUL) and both OSS mixer and
PCM supports if you want to run the OSS application with the ALSA.
When you want to support the WaveTable functionality on some cards
such like SB Live!, you need to enable "Sequencer support"
(CONFIG_SND_SEQUENCER).
For getting more verbose debug messages, turn on "Verbose printk" and
"Debug" options. For checking the memory leaks, you can turn on
"Debug memory" option, too. "Debug detection" will put more
additional checks for the detection of cards.
Please note that all the ALSA ISA drivers support Linux isapnp API (if
the card supports). You don't need to configure the PnP via
isapnptools.
Module parameters
=================
A user can modify or set parameters at the load time of the module. If
the module supports more cards and you have got more than one card
of the same type, you may simply specify more values for the parameter,
delimited by commas.
Note that module option names were changed in 0.9.0rc4. The 'snd_'
prefix was removed.
Module snd
----------
The module snd is the ALSA core module, which is used by all ALSA
card drivers. This takes the global options for creating devices,
etc.
major - major # for sound driver
- default is 116
cards_limit
- specifies card limit # (1-8)
- good for kmod support if you do not want to search
for soundcards which are not installed in your system
device_mode
- specifies permission mask for dynamic sound device filesystem
- default value = 0666
- for example 'device_mode=0660'
device_gid
- specifies GID number for dynamic sound device filesystem
- default value = 0 (root)
device_uid
- specifies UID number for dynamic sound device filesystem
- default value = 0 (root)
Module snd-pcm-oss
------------------
The PCM OSS emulation module.
This module takes the options to change the mapping of devices.
dsp_map - PCM device number maps assigned to the 1st OSS device.
(default: 0)
adsp_map - PCM device number maps assigned to the 2st OSS device.
(default: 1)
nonblock_open - Don't block opening busy PCM devices.
For example, when dsp_map=2, /dev/dsp will be mapped to PCM #2 of
the card #0. Similarly, when adsp_map=0, /dev/adsp will be mapped
to PCM #0 of the card #0.
For changing the second or later card, specify the option with
commas, such like "dsp_map=0,1".
nonblock_open option is used to change the behavior of the PCM
regarding opening the device. When this option is non-zero,
opening a busy OSS PCM device won't be blocked but return
immediately with EAGAIN (just like O_NONBLOCK flag).
Module snd-rawmidi
------------------
This module takes the options to change the mapping of OSS
devices like snd-pcm-oss module.
midi_map - MIDI device number maps assigned to the 1st OSS device.
(default: 0)
amidi_map - MIDI device number maps assigned to the 2st OSS device.
(default: 1)
Global parameters for top soundcard modules
-------------------------------------------
Each of top-level soundcard module takes some general options,
index - 0-7 - index (slot #) for soundcard
- if not set or -1, first free index (slot #) is assigned
id - user identification for card (up to 15 chars)
- default expression is 'card<index>' (for example card1)
- value is used for /proc/asound filesystem
- this value can be used by applications for identification
of card if user does not want identify card with index number
enable - enable card (only first card is enabled by default)
Module snd-ad1816a
------------------
Module for soundcards 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)
Module supports up to 8 cards, autoprobe and PnP.
Module snd-ad1848
-----------------
Module for soundcards based on AD1848/AD1847/CS4248 ISA chips.
port - port # for AD1848 chip
irq - IRQ # for AD1848 chip
dma1 - DMA # for AD1848 chip (0,1,3)
Module supports up to 8 cards. This module does not support autoprobe
thus main port must be specified!!! Other ports are optional.
Module snd-ali5451
------------------
Module for ALi M5451 PCI chip.
pcm_channels - Number of hardware channels assigned for PCM
Module supports autoprobe and multiple chips (max 8).
The power-management is supported.
Module snd-als100
-----------------
Module for soundcards 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)
Module supports up to 8 cards, autoprobe and PnP.
Module snd-als4000
------------------
Module for soundcards based on Avance Logic ALS4000 PCI chip.
joystick_port - port # for legacy joystick support.
default: 0x200 for the 1st card.
0 = disabled
Module supports up to 8 cards, autoprobe and PnP.
Module snd-azt2320
------------------
Module for soundcards 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)
Module supports up to 8 cards, PnP and autoprobe.
Module snd-cmi8330
------------------
Module for soundcards based on C-Media CMI8330 ISA chips.
wssport - port # for CMI8330 chip (WSS)
wssirq - IRQ # for CMI8330 chip (WSS)
wssdma - first DMA # for CMI8330 chip (WSS)
sbport - port # for CMI8330 chip (SB16)
sbirq - IRQ # for CMI8330 chip (SB16)
sbdma8 - 8bit DMA # for CMI8330 chip (SB16)
sbdma16 - 16bit DMA # for CMI8330 chip (SB16)
Module supports up to 8 cards and autoprobe.
Module snd-cmipci
-----------------
Module for C-Media CMI8338 and 8738 PCI soundcards.
mpu_port - 0x300 (default),0x310,0x320,0x330, -1 (diable)
fm_port - 0x388 (default), -1 (disable)
Module supports autoprobe and multiple chips (max 8).
Module snd-cs4231
-----------------
Module for soundcards based on CS4231 ISA chips.
port - port # for CS4231 chip
mpu_port - port # for MPU-401 UART (optional), -1 = disable
irq - IRQ # for CS4231 chip
mpu_irq - IRQ # for MPU-401 UART
dma1 - first DMA # for CS4231 chip
dma2 - second DMA # for CS4231 chip
Module supports up to 8 cards. This module does not support autoprobe
thus main port must be specified!!! Other ports are optional.
The power-management is supported.
Module snd-cs4232
-----------------
Module for soundcards based on CS4232/CS4232A ISA chips.
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
fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
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)
Module supports up to 8 cards. This module does not support autoprobe
thus main port must be specified!!! Other ports are optional.
The power-management is supported.
Module snd-cs4236
-----------------
Module for soundcards based on CS4235/CS4236/CS4236B/CS4237B/
CS4238B/CS4239 ISA chips.
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
fm_port - FM port # for CS4236 chip (PnP setup - 0x388), -1 = disable
irq - IRQ # for CS4236 chip (5,7,9,11,12,15)
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)
Module supports up to 8 cards. This module does not support autoprobe
(if ISA PnP is not used) thus main port and control port must be
specified!!! Other ports are optional.
The power-management is supported.
Module snd-cs4281
-----------------
Module for Cirrus Logic CS4281 soundchip.
dual_codec - Secondary codec ID (0 = disable, default)
Module supports up to 8 cards.
The power-management is supported.
Module snd-cs46xx
-----------------
Module for PCI soundcards based on CS4610/CS4612/CS4614/CS4615/CS4622/
CS4624/CS4630/CS4280 PCI chips.
external_amp - Force to enable external amplifer.
thinkpad - Force to enable Thinkpad's CLKRUN control.
mmap_valid - Support OSS mmap mode (default = 0).
Module supports up to 8 cards and autoprobe.
Usually external amp and CLKRUN controls are detected automatically
from PCI sub vendor/device ids. If they don't work, give the options
above explicitly.
The power-management is supported.
Module snd-dt019x
-----------------
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)
Module supports up to 8 cards. This module is enabled only with
ISA PnP support.
Module snd-dummy
----------------
Module for the dummy soundcard. This soundcard doesn't do any output
or input, but you may use this module for any application which
requires a soundcard (like RealPlayer).
Module snd-emu10k1
------------------
Module for EMU10K1/EMU10k2 based PCI soundcards.
* Sound Blaster Live!
* Sound Blaster PCI 512
* Emu APS (partially supported)
* Sound Blaster Audigy
extin - bitmap of available external inputs for FX8010 (see bellow)
extout - bitmap of available external outputs for FX8010 (see bellow)
seq_ports - allocated sequencer ports (4 by default)
max_synth_voices - limit of voices used for wavetable (64 by default)
max_buffer_size - specifies the maximum size of wavetable/pcm buffers
given in MB unit. Default value is 128.
enable_ir - enable IR
Module supports up to 8 cards and autoprobe.
Input & Output configurations [extin/extout]
* Creative Card wo/Digital out [0x0003/0x1f03]
* Creative Card w/Digital out [0x0003/0x1f0f]
* Creative Card w/Digital CD in [0x000f/0x1f0f]
* Creative Card wo/Digital out + LiveDrive [0x3fc3/0x1fc3]
* Creative Card w/Digital out + LiveDrive [0x3fc3/0x1fcf]
* Creative Card w/Digital CD in + LiveDrive [0x3fcf/0x1fcf]
* Creative Card wo/Digital out + Digital I/O 2 [0x0fc3/0x1f0f]
* Creative Card w/Digital out + Digital I/O 2 [0x0fc3/0x1f0f]
* Creative Card w/Digital CD in + Digital I/O 2 [0x0fcf/0x1f0f]
* Creative Card 5.1/w Digital out + LiveDrive [0x3fc3/0x1fff]
* Creative Card all ins and outs [0x3fff/0x1fff]
Module snd-ens1370
------------------
Module for Ensoniq AudioPCI ES1370 PCI soundcards.
* SoundBlaster PCI 64
* SoundBlaster PCI 128
Module supports up to 8 cards and autoprobe.
Module snd-ens1371
------------------
Module for Ensoniq AudioPCI ES1371 PCI soundcards.
* SoundBlaster PCI 64
* SoundBlaster PCI 128
* SoundBlaster Vibra PCI
Module supports up to 8 cards and autoprobe.
Module snd-es968
----------------
Module for soundcards 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)
Module supports up to 8 cards, PnP and autoprobe.
Module snd-es1688
-----------------
Module for ESS AudioDrive ES-1688 and ES-688 soundcards.
port - port # for ES-1688 chip (0x220,0x240,0x260)
mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default)
irq - IRQ # for ES-1688 chip (5,7,9,10)
mpu_irq - IRQ # for MPU-401 port (5,7,9,10)
dma8 - DMA # for ES-1688 chip (0,1,3)
Module supports up to 8 cards and autoprobe (without MPU-401 port).
Module snd-es18xx
-----------------
Module for ESS AudioDrive ES-18xx soundcards.
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)
Module supports up to 8 cards ISA PnP and autoprobe (without MPU-401 port
if native ISA PnP routines are not used).
When dma2 is equal with dma1, the driver works as half-duplex.
The power-management is supported.
Module snd-es1938
-----------------
Module for soundcards based on ESS Solo-1 (ES1938,ES1946) chips.
Module supports up to 8 cards and autoprobe.
Module snd-es1968
-----------------
Module for soundcards based on ESS Maestro-1/2/2E (ES1968/ES1978) chips.
total_bufsize - total buffer size in kB (1-4096kB)
pcm_substreams_p - playback channels (1-8, default=2)
pcm_substreams_c - capture channels (1-8, default=0)
clock - clock (0 = auto-detection)
use_pm - support the power-management (0 = off, 1 = on,
2 = auto)
Module supports up to 8 cards and autoprobe.
The power-management is supported.
Module snd-fm801
----------------
Module for ForteMedia FM801 based PCI soundcards.
Module supports up to 8 cards and autoprobe.
Module snd-gusclassic
---------------------
Module for Gravis UltraSound Classic soundcard.
port - port # for GF1 chip (0x220,0x230,0x240,0x250,0x260)
irq - IRQ # for GF1 chip (3,5,9,11,12,15)
dma1 - DMA # for GF1 chip (1,3,5,6,7)
dma2 - DMA # for GF1 chip (1,3,5,6,7,-1=disable)
joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V)
voices - GF1 voices limit (14-32)
pcm_voices - reserved PCM voices
Module supports up to 8 cards and autoprobe.
Module snd-gusextreme
---------------------
Module for Gravis UltraSound Extreme (Synergy ViperMax) soundcard.
port - port # for ES-1688 chip (0x220,0x230,0x240,0x250,0x260)
gf1_port - port # for GF1 chip (0x210,0x220,0x230,0x240,0x250,0x260,0x270)
mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable
irq - IRQ # for ES-1688 chip (5,7,9,10)
gf1_irq - IRQ # for GF1 chip (3,5,9,11,12,15)
mpu_irq - IRQ # for MPU-401 port (5,7,9,10)
dma8 - DMA # for ES-1688 chip (0,1,3)
dma1 - DMA # for GF1 chip (1,3,5,6,7)
joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V)
voices - GF1 voices limit (14-32)
pcm_voices - reserved PCM voices
Module supports up to 8 cards and autoprobe (without MPU-401 port).
Module snd-gusmax
-----------------
Module for Gravis UltraSound MAX soundcard.
port - port # for GF1 chip (0x220,0x230,0x240,0x250,0x260)
irq - IRQ # for GF1 chip (3,5,9,11,12,15)
dma1 - DMA # for GF1 chip (1,3,5,6,7)
dma2 - DMA # for GF1 chip (1,3,5,6,7,-1=disable)
joystick_dac - 0 to 31, (0.59V-4.52V or 0.389V-2.98V)
voices - GF1 voices limit (14-32)
pcm_voices - reserved PCM voices
Module supports up to 8 cards and autoprobe.
Module snd-hdsp
---------------
Module for RME Hammerfall DSP audio interface(s)
precise_ptr - Enable precise pointer (doesn't work reliably).
(default = 0)
line_outs_monitor - Send all input and playback streams to line outs
by default. (default = 0)
force_firmware - Force a reload of the I/O box firmware
(default = 0)
Module supports up to 8 cards.
Module snd-ice1712
------------------
Module for Envy24 (ICE1712) based PCI soundcards.
* MidiMan M Audio Delta 1010
* MidiMan M Audio Delta DiO 2496
* MidiMan M Audio Delta 66
* MidiMan M Audio Delta 44
* MidiMan M Audio Audiophile 2496
* TerraTec EWS 88MT
* TerraTec EWS 88D
* TerraTec EWX 24/96
omni - Omni I/O support for MidiMan M-Audio Delta44/66
Module supports up to 8 cards and autoprobe. Note: The consumer part
is not used with all Envy24 based cards (for example in the MidiMan Delta
serie).
Module snd-intel8x0
-------------------
Module for AC'97 motherboards from Intel and compatibles.
* Intel i810/810E, i815, i820, i830, i84x, MX440
* SiS 7012 (SiS 735)
* NVidia NForce, NForce2
* AMD AMD768, AMD8111
* ALi m5455
ac97_clock - AC'97 codec clock base (0 = auto-detect)
joystick_port - Joystick port # (0 = disabled, 0x200)
mpu_port - MPU401 port # (0 = disabled, 0x330,0x300)
Module supports autoprobe and multiple bus-master chips (max 8).
Note: the latest driver supports auto-detection of chip clock.
if you still encounter too fast playback, specify the clock
explicitly via the module option "ac97_clock=41194".
The joystick and MPU-401 are supported only certain hardwares.
MPU401 is experimental, It doesn't work perfectly.
The power-management is supported.
Module snd-interwave
--------------------
Module for Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32
and other soundcards 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
Module supports up to 8 cards, autoprobe and ISA PnP.
Module snd-interwave-stb
------------------------
Module for UltraSound 32-Pro (soundcard from STB used by Compaq)
and other soundcards 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
Module supports up to 8 cards, autoprobe and ISA PnP.
Module snd-korg1212
-------------------
Module for Korg 1212 IO PCI card
Module supports up to 8 cards.
Module snd-maestro3
-------------------
Module for Allegro/Maestro3 chips
external_amp - enable external amp (enabled by default)
amp_gpio - GPIO pin number for external amp (0-15) or
-1 for default pin (8 for allegro, 1 for
others)
Module supports autoprobe and multiple chips (max 8).
Note: the binding of amplifier is dependent on hardware.
If there is no sound even though all channels are unmuted, try to
specify other gpio connection via amp_gpio option.
For example, a Panasonic notebook might need "amp_gpio=0x0d"
option.
The power-management is supported.
Module snd-mpu401
-----------------
Module for MPU-401 UART devices.
port - port number or -1 (disable)
irq - IRQ number or -1 (disable)
Module supports multiple devices (max 8).
Module snd-mtpav
----------------
Module for MOTU MidiTimePiece AV multiport MIDI (on the parallel
port).
port - I/O port # for MTPAV (0x378,0x278, default=0x378)
irq - IRQ # for MTPAV (7,5, default=7)
hwports - number of supported hardware ports, default=8.
Module supports only 1 card. This module has no enable option.
Module snd-nm256
----------------
Module for NeoMagic NM256AV/ZX chips
playback_bufsize - max playback frame size in kB (4-128kB)
capture_bufsize - max capture frame size in kB (4-128kB)
force_ac97 - 0 or 1 (disabled by default)
buffer_top - specify buffer top address
use_cache - 0 or 1 (disabled by default)
vaio_hack - alias buffer_top=0x25a800
Module supports autoprobe and multiple chips (max 8).
Note: on some notebooks the buffer address cannot be detected
automatically, or causes hang-up during initialization.
In such a case, specify the buffer top address explicity via
buffer_top option.
For example,
Sony F250: buffer_top=0x25a800
Sony F270: buffer_top=0x272800
The driver supports only ac97 codec. It's possible to force
to initialize/use ac97 although it's not detected. In such a
case, use force_ac97=1 option.
The power-management is supported.
Module snd-opl3sa2
------------------
Module for Yamaha OPL3-SA2/SA3 soundcards.
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)
midi_port - port # for MPU-401 UART (0x300,0x330), -1 = disable
fm_port - FM port # for OPL3-SA chip (0x388), -1 = disable
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)
Module supports up to 8 cards and ISA PnP. This module does not support
autoprobe (if ISA PnP is not used) thus all ports must be specified!!!
The power-management is supported.
Module snd-opti92x-ad1848
-------------------------
Module for soundcards based on OPTi 82c92x and Analog Devices AD1848 chips.
Module works with OAK Mozart cards as well.
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)
irq - IRQ # for WSS chip (5,7,9,10,11)
mpu_irq - IRQ # for MPU-401 UART (5,7,9,10)
dma1 - first DMA # for WSS chip (0,1,3)
This module supports only one card, autoprobe and PnP.
Module snd-opti92x-cs4231
-------------------------
Module for soundcards based on OPTi 82c92x and Crystal CS4231 chips.
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)
irq - IRQ # for WSS chip (5,7,9,10,11)
mpu_irq - IRQ # for MPU-401 UART (5,7,9,10)
dma1 - first DMA # for WSS chip (0,1,3)
dma2 - second DMA # for WSS chip (0,1,3)
This module supports only one card, autoprobe and PnP.
Module snd-opti93x
------------------
Module for soundcards based on OPTi 82c93x chips.
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)
irq - IRQ # for WSS chip (5,7,9,10,11)
mpu_irq - IRQ # for MPU-401 UART (5,7,9,10)
dma1 - first DMA # for WSS chip (0,1,3)
dma2 - second DMA # for WSS chip (0,1,3)
This module supports only one card, autoprobe and PnP.
Module snd-powermac (on ppc only)
---------------------------------
Module for PowerMac, iMac and iBook on-board soundchips
enable_beep - enable beep using PCM (enabled as default)
Module supports autoprobe a chip.
Note: the driver may have problems regarding endianess.
The power-management is supported.
Module snd-rme32
----------------
Module for RME Digi32, Digi32/8 and Digi32 PRO soundcards.
Module supports up to 8 cards.
Module snd-rme96
----------------
Module for RME Digi96, Digi96/8 and Digi96/8 PRO/PAD/PST soundcards.
Module supports up to 8 cards.
Module snd-rme9652
------------------
Module for RME Digi9652 (Hammerfall, Hammerfall-Light) soundcards.
precise_ptr - Enable precise pointer (doesn't work reliably).
(default = 0)
Module supports up to 8 cards.
Module snd-sa11xx-uda1341 (on arm only)
---------------------------------------
Module for Philips UDA1341TS on Compaq iPAQ H3600 soundcard.
Module supports only one card.
Module has no enable and index options.
Module snd-sb8
--------------
Module for 8-bit SoundBlaster cards: SoundBlaster 1.0,
SoundBlaster 2.0,
SoundBlaster Pro
port - port # for SB DSP chip (0x220,0x240,0x260)
irq - IRQ # for SB DSP chip (5,7,9,10)
dma8 - DMA # for SB DSP chip (1,3)
Module supports up to 8 cards and autoprobe.
Module snd-sb16 and snd-sbawe
-----------------------------
Module for 16-bit SoundBlaster cards: SoundBlaster 16 (PnP),
SoundBlaster AWE 32 (PnP),
SoundBlaster AWE 64 PnP
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)
(snd-sbawe module only)
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)
Module supports up to 8 cards, autoprobe and ISA PnP.
Note: To use Vibra16X cards in 16-bit half duplex mode, you must
disable 16bit DMA with dma16 = -1 module parameter.
Also, all Sound Blaster 16 type cards can operate in 16-bit
half duplex mode through 8-bit DMA channel by disabling their
16-bit DMA channel.
Module snd-sgalaxy
------------------
Module for Aztech Sound Galaxy soundcard.
sbport - Port # for SB16 interface (0x220,0x240)
wssport - Port # for WSS interface (0x530,0xe80,0xf40,0x604)
irq - IRQ # (7,9,10,11)
dma1 - DMA #
Module supports up to 8 cards.
Module snd-sun-amd7930 (on sparc only)
--------------------------------------
Module for AMD7930 sound chips found on Sparcs.
Module supports up to 8 cards.
Module snd-sun-cs4231 (on sparc only)
-------------------------------------
Module for CS4231 sound chips found on Sparcs.
Module supports up to 8 cards.
Module snd-wavefront
--------------------
Module for Turtle Beach Maui, Tropez and Tropez+ soundcards.
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)
Module supports up to 8 cards and ISA PnP.
Module snd-sonicvibes
---------------------
Module for S3 SonicVibes PCI soundcards.
* PINE Schubert 32 PCI
reverb - Reverb Enable - 1 = enable, 0 = disable (default)
- SoundCard must have onboard SRAM for this.
mge - Mic Gain Enable - 1 = enable, 0 = disable (default)
Module supports up to 8 cards and autoprobe.
Module snd-serial-u16550
------------------------
Module for UART16550A serial MIDI ports.
port - port # for UART16550A chip
irq - IRQ # for UART16550A chip, -1 = poll mode
speed - speed in bauds (9600,19200,38400,57600,115200)
38400 = default
base - base for divisor in bauds (57600,115200,230400,460800)
115200 = default
outs - number of MIDI ports in a serial port (1-4)
1 = default
adaptor - Type of adaptor.
0 = Soundcanvas, 1 = MS-124T, 2 = MS-124W S/A,
3 = MS-124W M/B, 4 = Generic
Module supports up to 8 cards. This module does not support autoprobe
thus the main port must be specified!!! Other options are optional.
Module snd-trident
------------------
Module for Trident 4DWave DX/NX soundcards.
* Best Union Miss Melody 4DWave PCI
* HIS 4DWave PCI
* Warpspeed ONSpeed 4DWave PCI
* AzTech PCI 64-Q3D
* Addonics SV 750
* CHIC True Sound 4Dwave
* Shark Predator4D-PCI
* Jaton SonicWave 4D
pcm_channels - max channels (voices) reserved for PCM
wavetable_size - max wavetable size in kB (4-?kb)
Module supports up to 8 cards and autoprobe.
The power-management is supported.
Module snd-usb-audio
--------------------
Module for USB audio and USB MIDI devices.
vid - Vendor ID for the device (optional)
pid - Product ID for the device (optional)
This module supports up to 8 cards, autoprobe and hotplugging.
Module snd-via82xx
------------------
Module for AC'97 motherboards based on VIA 82C686A/686B, 8233
(south) bridge.
mpu_port - 0x300,0x310,0x320,0x330, otherwise obtain BIOS setup
ac97_clock - AC'97 codec clock base (default 48000Hz)
Module supports autoprobe and multiple bus-master chips (max 8).
Note: on some SMP motherboards like MSI 694D the interrupts might
not be generated properly. In such a case, please try to
set the SMP (or MPS) version on BIOS to 1.1 instead of
default value 1.4. Then the interrupt number will be
assigned under 15. You might also upgrade your BIOS.
Module snd-virmidi
------------------
Module for virtual rawmidi devices.
This module creates virtual rawmidi devices which communicate
to the corresponding ALSA sequencer ports.
midi_devs - MIDI devices # (1-8, default=4)
Module supports up to 8 cards.
Module snd-ymfpci
-----------------
Module for Yamaha PCI chips (YMF72x, YMF74x & YMF75x).
mpu_port - 0x300,0x330,0x332,0x334, -1 (disable) by default
fm_port - 0x388,0x398,0x3a0,0x3a8, -1 (disable) by default
rear_switch - enable shared rear/line-in switch (bool)
Module supports autoprobe and multiple chips (max 8).
The power-management is supported.
modprobe/kmod support
=====================
The modprobe program must know which modules are used for the
device major numbers.
Native ALSA devices have got default number 116. Thus a line like
'alias char-major-116 snd' must be added to /etc/modules.conf. If you have
compiled the ALSA driver with the OSS/Free emulation code, then you
will need to add lines as explained below:
The ALSA driver uses soundcore multiplexer for 2.2+ kernels and OSS compatible
devices. You should add line like 'alias char-major-14 soundcore'.
Example with OSS/Free emulation turned on:
----- /etc/modules.conf
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore
----- /etc/modules.conf
After the main multiplexer is loaded, its code requests top-level soundcard
module. String 'snd-card-%i' is requested for native devices where %i is
soundcard number from zero to seven. String 'sound-slot-%i' is requested
for native devices where %i is slot number (for ALSA owner this means soundcard
number).
----- /etc/modules.conf
# ALSA portion
alias snd-card-0 snd-interwave
alias snd-card-1 snd-ens1371
# OSS/Free portion
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
----- /etc/modules.conf
We are finished at this point with the configuration for ALSA native devices,
but you may also need autoloading for ALSA's add-on OSS/Free emulation
modules. At this time only one module does not depend on any others, thus
must be loaded separately - snd-pcm-oss. String 'sound-service-%i-%i'
is requested for OSS/Free service where first %i means slot number
(e.g. card number) and second %i means service number.
----- /etc/modules.conf
# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
# OSS/Free portion - card #2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
----- /etc/modules.conf
A complete example for Gravis UltraSound PnP soundcard:
----- /etc/modules.conf
# ISA PnP support (don't use IRQs 9,10,11,12,13)
options isapnp isapnp_reserve_irq=9,10,11,12,13
# ALSA native device support
alias char-major-116 snd
options snd major=116 cards_limit=1
alias snd-card-0 snd-interwave
options snd-interwave index=0 id="GusPnP"
# OSS/Free setup
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
-----
A complete example if you want to use more soundcards in one machine
(the configuration below is for Sound Blaster 16 and Gravis UltraSound Classic):
----- /etc/modules.conf
# ISA PnP support (don't use IRQs 9,10,11,12,13)
# it's only an example to reserve some IRQs for another hardware
options isapnp isapnp_reserve_irq=9,10,11,12,13
# ALSA native device support
alias char-major-116 snd
options snd major=116 cards_limit=2
alias snd-card-0 snd-gusclassic
alias snd-card-1 snd-sb16
options snd-gusclassic index=0 id="Gus" \
port=0x220 irq=5 dma1=6 dma2=7
options snd-sb16 index=1 id="SB16"
# OSS/Free setup
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
-----
A complete example, two Gravis UltraSound Classic soundcards are installed
in the system:
----- /etc/modules.conf
# ALSA native device support
alias char-major-116 snd
options snd major=116 cards_limit=2
alias snd-card-0 snd-gusclassic
alias snd-card-1 snd-gusclassic
options snd-gusclassic index=0,1 id="Gus1","Gus2" \
port=0x220,0x240 irq=5,7 dma1=1,5 dma2=3,6
# OSS/Free setup
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
-----
If you want to autoclean your modules, you should put below line to your
/etc/crontab:
*/10 * * * * root /sbin/modprobe -rs snd-card-0 snd-card-1; /sbin/rmmod -as
You may also want to extend the soundcard list to follow your requirements.
ALSA PCM devices to OSS devices mapping
=======================================
/dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> minor 4
/dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> minor 3
/dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> minor 12
/dev/snd/pcmC1D0 -> /dev/audio1 -> minor 4+16 = 20
/dev/snd/pcmC1D0 -> /dev/dsp1 -> minor 3+16 = 19
/dev/snd/pcmC1D1 -> /dev/adsp1 -> minor 12+16 = 28
/dev/snd/pcmC2D0 -> /dev/audio2 -> minor 4+32 = 36
/dev/snd/pcmC2D0 -> /dev/dsp2 -> minor 3+32 = 39
/dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44
The first number from /dev/snd/pcmC{X}D{Y} expression means soundcard number
and second means device number.
Please note that the device mapping above may be varied via the module
options of snd-pcm-oss module.
DEVFS support
=============
The ALSA driver fully supports the devfs extension.
You should add lines below to your devfsd.conf file:
LOOKUP snd MODLOAD ACTION snd
REGISTER ^sound/.* PERMISSIONS root.audio 660
REGISTER ^snd/.* PERMISSIONS root.audio 660
Warning: These lines assume that you have the audio group in your system.
Otherwise replace audio word with another group name (root for
example).
Proc interfaces (/proc/asound)
==============================
/proc/asound/card#/pcm#[cp]/oss
-------------------------------
String "erase" - erase all additional informations about OSS applications
String "<app_name> <fragments> <fragment_size> [<options>]"
<app_name> - name of application with (higher priority) or without path
<fragments> - number of fragments or zero if auto
<fragment_size> - size of fragment in bytes or zero if auto
<options> - optional parameters
- disable the application tries to open a pcm device for
this channel but does not want to use it.
(Cause a bug or mmap needs)
It's good for Quake etc...
- direct don't use plugins
- block force block mode (rvplayer)
- non-block force non-block mode
Example: echo "x11amp 128 16384" > /proc/asound/card0/pcm0p/oss
echo "squake 0 0 disable" > /proc/asound/card0/pcm0c/oss
echo "rvplayer 0 0 block" > /proc/asound/card0/pcm0p/oss
Links
=====
ALSA project homepage
http://www.alsa-project.org
This document describes standard names of mixer controls.
Syntax: SOURCE [DIRECTION] FUNCTION
DIRECTION:
<nothing> (both directions)
Playback
Capture
Bypass Playback
Bypass Capture
FUNCTION:
Switch (on/off switch)
Volume
Route (route control, hardware specific)
SOURCE:
Master
Master Mono
Hardware Master
Headphone
PC Speaker
Phone
Phone Input
Phone Output
Synth
FM
Mic
Line
CD
Video
Zoom Video
Aux
PCM
PCM Front
PCM Rear
PCM Pan
Loopback
Analog Loopback (D/A -> A/D loopback)
Digital Loopback (playback -> capture loopback - without analog path)
Mono
Mono Output
Multi
ADC
Wave
Music
I2S
IEC958
Exceptions:
[Digital] Capture Source
[Digital] Capture Switch (aka input gain switch)
[Digital] Capture Volume (aka input gain volume)
[Digital] Playback Switch (aka output gain switch)
[Digital] Playback Volume (aka output gain volume)
Tone Control - Switch
Tone Control - Bass
Tone Control - Treble
3D Control - Switch
3D Control - Center
3D Control - Depth
3D Control - Wide
3D Control - Space
3D Control - Level
Mic Boost [(?dB)]
PCM interface:
Sample Clock Source { "Word", "Internal", "AutoSync" }
Clock Sync Status { "Lock", "Sync", "No Lock" }
External Rate /* external capture rate */
Capture Rate /* capture rate taken from external source */
IEC958 (S/PDIF) interface:
IEC958 [...] [Playback|Capture] Switch /* turn on/off the IEC958 interface */
IEC958 [...] [Playback|Capture] Volume /* digital volume control */
IEC958 [...] [Playback|Capture] Default /* default or global value - read/write */
IEC958 [...] [Playback|Capture] Mask /* consumer and professional mask */
IEC958 [...] [Playback|Capture] Con Mask /* consumer mask */
IEC958 [...] [Playback|Capture] Pro Mask /* professional mask */
IEC958 [...] [Playback|Capture] PCM Stream /* the settings assigned to a PCM stream */
......@@ -2091,6 +2091,9 @@ static void hp100_update_stats(struct net_device *dev)
static void hp100_misc_interrupt(struct net_device *dev)
{
#ifdef HP100_DEBUG_B
int ioaddr = dev->base_addr;
#endif
struct hp100_private *lp = (struct hp100_private *) dev->priv;
#ifdef HP100_DEBUG_B
......
/* include/version.h. Generated automatically by configure. */
#define CONFIG_SND_VERSION "0.9.0rc6"
#define CONFIG_SND_DATE " (Wed Dec 11 21:24:39 2002 UTC)"
#define CONFIG_SND_DATE " (Tue Dec 17 19:01:13 2002 UTC)"
......@@ -92,6 +92,56 @@ int snd_pcm_sgbuf_delete(snd_pcm_substream_t *substream)
return 0;
}
/*
* snd_pci_alloc_page - allocate a page in the valid pci dma mask
*
* returns the virtual address and stores the physical address on
* addrp. this function cannot be called from interrupt handlers or
* within spinlocks.
*/
#ifdef __i386__
/*
* on ix86, we allocate a page with GFP_KERNEL to assure the
* allocation. the code is almost same with kernel/i386/pci-dma.c but
* it allocates only a single page and checkes the validity of the
* page address with the given pci dma mask.
*/
inline static void *snd_pci_alloc_page(struct pci_dev *pci, dma_addr_t *addrp)
{
void *ptr;
dma_addr_t addr;
unsigned long rmask;
if (pci)
rmask = ~(unsigned long)pci->dma_mask;
else
rmask = 0;
ptr = (void *)__get_free_page(GFP_KERNEL);
if (ptr) {
addr = virt_to_phys(ptr);
if (((unsigned long)addr + PAGE_SIZE - 1) & rmask) {
/* try to reallocate with the GFP_DMA */
free_page((unsigned long)ptr);
ptr = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
if (ptr) /* ok, the address must be within lower 16MB... */
addr = virt_to_phys(ptr);
else
addr = 0;
}
} else
addr = 0;
if (ptr)
memset(ptr, 0, PAGE_SIZE);
*addrp = addr;
return ptr;
}
#else
/* on other architectures, call snd_malloc_pci_pages() helper function
* which uses pci_alloc_consistent().
*/
#define snd_pci_alloc_page(pci, addrp) snd_malloc_pci_pages(pci, PAGE_SIZE, addrp)
#endif
/*
* allocate sg buffer table with the given byte size.
* if the buffer table already exists, try to resize it.
......@@ -128,7 +178,7 @@ int snd_pcm_sgbuf_alloc(snd_pcm_substream_t *substream, size_t size)
while (sgbuf->pages < pages) {
void *ptr;
dma_addr_t addr;
ptr = snd_malloc_pci_pages(sgbuf->pci, PAGE_SIZE, &addr);
ptr = snd_pci_alloc_page(sgbuf->pci, &addr);
if (! ptr)
return -ENOMEM;
sgbuf->table[sgbuf->pages].buf = ptr;
......
......@@ -205,19 +205,19 @@ static int translate_subdevice_to_hwport(mtpav_t *chip, int subdev)
static int translate_hwport_to_subdevice(mtpav_t *chip, int hwport)
{
int port;
int p;
if (hwport <= 0x00) /* all ports */
return chip->num_ports + MTPAV_PIDX_BROADCAST;
else if (hwport <= 0x08) { /* single port */
port = hwport - 1;
if (port >= chip->num_ports)
port = 0;
return port;
p = hwport - 1;
if (p >= chip->num_ports)
p = 0;
return p;
} else if (hwport <= 0x10) { /* remote port */
port = hwport - 0x09 + chip->num_ports;
if (port >= chip->num_ports * 2)
port = chip->num_ports;
return port;
p = hwport - 0x09 + chip->num_ports;
if (p >= chip->num_ports * 2)
p = chip->num_ports;
return p;
} else if (hwport == 0x11) /* computer port */
return chip->num_ports + MTPAV_PIDX_COMPUTER;
else /* ADAT */
......@@ -335,11 +335,11 @@ static void snd_mtpav_output_write(snd_rawmidi_substream_t * substream)
static void snd_mtpav_portscan(mtpav_t *chip) // put mtp into smart routing mode
{
u8 port;
u8 p;
for (port = 0; port < 8; port++) {
for (p = 0; p < 8; p++) {
snd_mtpav_send_byte(chip, 0xf5);
snd_mtpav_send_byte(chip, port);
snd_mtpav_send_byte(chip, p);
snd_mtpav_send_byte(chip, 0xfe);
}
}
......@@ -350,12 +350,12 @@ static void snd_mtpav_portscan(mtpav_t *chip) // put mtp into smart routing mode
static int snd_mtpav_input_open(snd_rawmidi_substream_t * substream)
{
unsigned long flags;
mtpav_port_t *port = &mtp_card->ports[substream->number];
mtpav_port_t *portp = &mtp_card->ports[substream->number];
//printk("mtpav port: %d opened\n", (int) substream->number);
spin_lock_irqsave(&mtp_card->spinlock, flags);
port->mode |= MTPAV_MODE_INPUT_OPENED;
port->input = substream;
portp->mode |= MTPAV_MODE_INPUT_OPENED;
portp->input = substream;
if (mtp_card->share_irq++ == 0)
snd_mtpav_mputreg(mtp_card, CREG, (SIGC_INTEN | SIGC_WRITE)); // enable pport interrupts
spin_unlock_irqrestore(&mtp_card->spinlock, flags);
......@@ -368,14 +368,14 @@ static int snd_mtpav_input_open(snd_rawmidi_substream_t * substream)
static int snd_mtpav_input_close(snd_rawmidi_substream_t *substream)
{
unsigned long flags;
mtpav_port_t *port = &mtp_card->ports[substream->number];
mtpav_port_t *portp = &mtp_card->ports[substream->number];
//printk("mtpav port: %d closed\n", (int) port);
//printk("mtpav port: %d closed\n", (int) portp);
spin_lock_irqsave(&mtp_card->spinlock, flags);
port->mode &= (~MTPAV_MODE_INPUT_OPENED);
port->input = NULL;
portp->mode &= (~MTPAV_MODE_INPUT_OPENED);
portp->input = NULL;
if (--mtp_card->share_irq == 0)
snd_mtpav_mputreg(mtp_card, CREG, 0); // disable pport interrupts
......@@ -389,13 +389,13 @@ static int snd_mtpav_input_close(snd_rawmidi_substream_t *substream)
static void snd_mtpav_input_trigger(snd_rawmidi_substream_t * substream, int up)
{
unsigned long flags;
mtpav_port_t *port = &mtp_card->ports[substream->number];
mtpav_port_t *portp = &mtp_card->ports[substream->number];
spin_lock_irqsave(&mtp_card->spinlock, flags);
if (up)
port->mode |= MTPAV_MODE_INPUT_TRIGGERED;
portp->mode |= MTPAV_MODE_INPUT_TRIGGERED;
else
port->mode &= ~MTPAV_MODE_INPUT_TRIGGERED;
portp->mode &= ~MTPAV_MODE_INPUT_TRIGGERED;
spin_unlock_irqrestore(&mtp_card->spinlock, flags);
}
......@@ -416,9 +416,9 @@ static void snd_mtpav_output_timer(unsigned long data)
add_timer(&chip->timer);
/* process each port */
for (p = 0; p <= chip->num_ports * 2 + MTPAV_PIDX_BROADCAST; p++) {
mtpav_port_t *port = &mtp_card->ports[p];
if ((port->mode & MTPAV_MODE_OUTPUT_TRIGGERED) && port->output)
snd_mtpav_output_port_write(port, port->output);
mtpav_port_t *portp = &mtp_card->ports[p];
if ((portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED) && portp->output)
snd_mtpav_output_port_write(portp, portp->output);
}
spin_unlock(&chip->spinlock);
}
......@@ -445,11 +445,11 @@ static void snd_mtpav_remove_output_timer(mtpav_t *chip)
static int snd_mtpav_output_open(snd_rawmidi_substream_t * substream)
{
unsigned long flags;
mtpav_port_t *port = &mtp_card->ports[substream->number];
mtpav_port_t *portp = &mtp_card->ports[substream->number];
spin_lock_irqsave(&mtp_card->spinlock, flags);
port->mode |= MTPAV_MODE_OUTPUT_OPENED;
port->output = substream;
portp->mode |= MTPAV_MODE_OUTPUT_OPENED;
portp->output = substream;
spin_unlock_irqrestore(&mtp_card->spinlock, flags);
return 0;
};
......@@ -460,11 +460,11 @@ static int snd_mtpav_output_open(snd_rawmidi_substream_t * substream)
static int snd_mtpav_output_close(snd_rawmidi_substream_t * substream)
{
unsigned long flags;
mtpav_port_t *port = &mtp_card->ports[substream->number];
mtpav_port_t *portp = &mtp_card->ports[substream->number];
spin_lock_irqsave(&mtp_card->spinlock, flags);
port->mode &= (~MTPAV_MODE_OUTPUT_OPENED);
port->output = NULL;
portp->mode &= (~MTPAV_MODE_OUTPUT_OPENED);
portp->output = NULL;
spin_unlock_irqrestore(&mtp_card->spinlock, flags);
return 0;
};
......@@ -475,17 +475,17 @@ static int snd_mtpav_output_close(snd_rawmidi_substream_t * substream)
static void snd_mtpav_output_trigger(snd_rawmidi_substream_t * substream, int up)
{
unsigned long flags;
mtpav_port_t *port = &mtp_card->ports[substream->number];
mtpav_port_t *portp = &mtp_card->ports[substream->number];
spin_lock_irqsave(&mtp_card->spinlock, flags);
if (up) {
if (! (port->mode & MTPAV_MODE_OUTPUT_TRIGGERED)) {
if (! (portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED)) {
if (mtp_card->istimer++ == 0)
snd_mtpav_add_output_timer(mtp_card);
port->mode |= MTPAV_MODE_OUTPUT_TRIGGERED;
portp->mode |= MTPAV_MODE_OUTPUT_TRIGGERED;
}
} else {
port->mode &= ~MTPAV_MODE_OUTPUT_TRIGGERED;
portp->mode &= ~MTPAV_MODE_OUTPUT_TRIGGERED;
if (--mtp_card->istimer == 0)
snd_mtpav_remove_output_timer(mtp_card);
}
......@@ -501,15 +501,15 @@ static void snd_mtpav_output_trigger(snd_rawmidi_substream_t * substream, int up
static void snd_mtpav_inmidi_process(mtpav_t *mcrd, u8 inbyte)
{
mtpav_port_t *port;
mtpav_port_t *portp;
if (mcrd->inmidiport > mcrd->num_ports * 2 + MTPAV_PIDX_BROADCAST)
return;
port = &mcrd->ports[mcrd->inmidiport];
if (port->mode & MTPAV_MODE_INPUT_TRIGGERED) {
portp = &mcrd->ports[mcrd->inmidiport];
if (portp->mode & MTPAV_MODE_INPUT_TRIGGERED) {
spin_unlock(&mcrd->spinlock);
snd_rawmidi_receive(port->input, &inbyte, 1);
snd_rawmidi_receive(portp->input, &inbyte, 1);
spin_lock(&mcrd->spinlock);
}
}
......
......@@ -1831,9 +1831,10 @@ static int snd_ali5451_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
return change;
}
static snd_kcontrol_new_t snd_ali5451_mixer_spdif[] __devinit = {
static snd_kcontrol_new_t snd_ali5451_mixer_spdif[] __devinitdata = {
/* spdif aplayback switch */
ALI5451_SPDIF(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), 0, 0),
/* FIXME: "IEC958 Playback Switch" may conflict with one on ac97_codec */
ALI5451_SPDIF("IEC958 Output switch", 0, 0),
/* spdif out to spdif channel */
ALI5451_SPDIF("IEC958 Channel Output Switch", 0, 1),
/* spdif in from spdif channel */
......@@ -1861,7 +1862,7 @@ static int __devinit snd_ali_mixer(ali_t * codec)
return err;
}
if (codec->revision == ALI_5451_V02) {
for(idx = 0; idx < 3; idx++) {
for(idx = 0; idx < ARRAY_SIZE(snd_ali5451_mixer_spdif); idx++) {
err=snd_ctl_add(codec->card, snd_ctl_new1(&snd_ali5451_mixer_spdif[idx], codec));
if (err < 0) return err;
}
......@@ -2010,10 +2011,12 @@ static int snd_ali_chip_init(ali_t *codec)
if (codec->revision == ALI_5451_V02) {
pci_dev = codec->pci_m1533;
pci_read_config_byte(pci_dev, 0x59, &temp);
temp |= 0x80;
pci_write_config_byte(pci_dev, 0x59, temp);
pci_dev = codec->pci_m7101;
pci_read_config_byte(pci_dev, 0xb8, &temp);
temp |= 1 << 6;
temp |= 0x20;
pci_write_config_byte(pci_dev, 0xB8, temp);
}
......
......@@ -164,7 +164,7 @@ struct _snd_fm801 {
};
static struct pci_device_id snd_fm801_ids[] __devinitdata = {
{ 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, }, /* FM801 */
{ 0x1319, 0x0801, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0, }, /* FM801 */
{ 0, }
};
......
......@@ -24,9 +24,12 @@
*
*/
#define HOONTECH_DEVICE_DESC "{Hoontech SoundTrack DSP 24},"
#define HOONTECH_DEVICE_DESC \
"{Hoontech SoundTrack DSP 24}," \
"{Hoontech SoundTrack DSP 24 Value}," \
"{Hoontech SoundTrack DSP 24 Media 7.1}," \
#define ICE1712_SUBDEVICE_STDSP24 0x12141217 /* Hoontech SoundTrack Audio DSP 24 */
#define ICE1712_SUBDEVICE_STDSP24 0x12141217 /* Hoontech SoundTrack Audio DSP 24 */
#define ICE1712_SUBDEVICE_STDSP24_MEDIA7_1 0x16141217 /* Hoontech ST Audio DSP24 Media 7.1 */
extern struct snd_ice1712_card_info snd_ice1712_hoontech_cards[];
......
......@@ -53,6 +53,7 @@ MODULE_DEVICES("{{Intel,82801AA-ICH},"
"{Intel,MX440},"
"{SiS,SI7012},"
"{NVidia,NForce Audio},"
"{NVidia,NForce2 Audio},"
"{AMD,AMD768},"
"{AMD,AMD8111},"
"{ALI,M5455}}");
......@@ -127,6 +128,9 @@ MODULE_PARM_SYNTAX(mpu_port, SNDRV_ENABLED ",allows:{{0},{0x330},{0x300}},dialog
#ifndef PCI_DEVICE_ID_NVIDIA_MCP_AUDIO
#define PCI_DEVICE_ID_NVIDIA_MCP_AUDIO 0x01b1
#endif
#ifndef PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO
#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
#endif
enum { DEVICE_INTEL, DEVICE_INTEL_ICH4, DEVICE_SIS, DEVICE_ALI };
......@@ -383,6 +387,7 @@ static struct pci_device_id snd_intel8x0_ids[] __devinitdata = {
{ 0x8086, 0x7195, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* 440MX */
{ 0x1039, 0x7012, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_SIS }, /* SI7012 */
{ 0x10de, 0x01b1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* NFORCE */
{ 0x10de, 0x006a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* NFORCE2 */
{ 0x1022, 0x746d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD8111 */
{ 0x1022, 0x7445, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_INTEL }, /* AMD768 */
{ 0x10b9, 0x5455, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_ALI }, /* Ali5455 */
......@@ -2298,6 +2303,7 @@ static struct shortname_table {
{ PCI_DEVICE_ID_INTEL_ICH4, "Intel 82801DB-ICH4" },
{ PCI_DEVICE_ID_SI_7012, "SiS SI7012" },
{ PCI_DEVICE_ID_NVIDIA_MCP_AUDIO, "NVidia NForce" },
{ PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO, "NVidia NForce2" },
{ 0x746d, "AMD AMD8111" },
{ 0x7445, "AMD AMD768" },
{ 0x5455, "ALi M5455" },
......
......@@ -526,7 +526,11 @@ static struct snd_urb_ops audio_urb_ops[2] = {
/*
* complete callback from data urb
*/
#ifndef OLD_USB
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
#else
static void snd_complete_urb(struct urb *urb)
#endif
{
snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context;
snd_usb_substream_t *subs = ctx->subs;
......@@ -551,7 +555,11 @@ static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
/*
* complete callback from sync urb
*/
#ifndef OLD_USB
static void snd_complete_sync_urb(struct urb *urb, struct pt_regs *regs)
#else
static void snd_complete_sync_urb(struct urb *urb)
#endif
{
snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context;
snd_usb_substream_t *subs = ctx->subs;
......@@ -583,6 +591,9 @@ static int deactivate_urbs(snd_usb_substream_t *subs)
subs->running = 0;
if (subs->stream->chip->shutdown) /* to be sure... */
return 0;
#ifndef SND_USB_ASYNC_UNLINK
if (in_interrupt())
return 0;
......@@ -870,7 +881,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *run
u->urb->transfer_flags = URB_ISO_ASAP | UNLINK_FLAGS;
u->urb->number_of_packets = u->packets;
u->urb->context = u;
u->urb->complete = snd_complete_urb;
u->urb->complete = (usb_complete_t)snd_complete_urb;
}
if (subs->syncpipe) {
......@@ -892,7 +903,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *run
u->urb->transfer_flags = URB_ISO_ASAP | UNLINK_FLAGS;
u->urb->number_of_packets = u->packets;
u->urb->context = u;
u->urb->complete = snd_complete_sync_urb;
u->urb->complete = (usb_complete_t)snd_complete_sync_urb;
}
}
return 0;
......@@ -2253,9 +2264,6 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
snd_usb_audio_t *chip;
snd_card_t *card;
struct list_head *p;
snd_usb_stream_t *as;
snd_usb_substream_t *subs;
int idx;
if (ptr == (void *)-1)
return;
......@@ -2265,22 +2273,21 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
down(&register_mutex);
chip->shutdown = 1;
chip->num_interfaces--;
if (chip->num_interfaces <= 0)
if (chip->num_interfaces <= 0) {
snd_card_disconnect(card);
list_for_each(p, &chip->pcm_list) {
as = list_entry(p, snd_usb_stream_t, list);
for (idx = 0; idx < 2; idx++) {
subs = &as->substream[idx];
if (!subs->num_formats)
continue;
release_substream_urbs(subs);
if (subs->interface >= 0) {
usb_set_interface(subs->dev, subs->interface, 0);
subs->interface = -1;
/* release the pcm resources */
list_for_each(p, &chip->pcm_list) {
snd_usb_stream_t *as;
int idx;
as = list_entry(p, snd_usb_stream_t, list);
for (idx = 0; idx < 2; idx++) {
snd_usb_substream_t *subs;
subs = &as->substream[idx];
if (!subs->num_formats)
continue;
release_substream_urbs(subs);
}
}
}
if (chip->num_interfaces <= 0) {
up(&register_mutex);
snd_card_free_in_thread(card);
} else {
......
......@@ -172,7 +172,11 @@ static void snd_usbmidi_input_packet(snd_usb_midi_in_endpoint_t* ep,
/*
* Processes the data read from the device.
*/
#ifndef OLD_USB
static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs)
#else
static void snd_usbmidi_in_urb_complete(struct urb* urb)
#endif
{
snd_usb_midi_in_endpoint_t* ep = snd_magic_cast(snd_usb_midi_in_endpoint_t, urb->context, return);
......@@ -197,7 +201,11 @@ static void snd_usbmidi_in_urb_complete(struct urb* urb, struct pt_regs *regs)
/*
* Converts the data read from a Midiman device to standard USB MIDI packets.
*/
#ifndef OLD_USB
static void snd_usbmidi_in_midiman_complete(struct urb* urb, struct pt_regs *regs)
#else
static void snd_usbmidi_in_midiman_complete(struct urb* urb)
#endif
{
if (urb->status == 0) {
uint8_t* buffer = (uint8_t*)urb->transfer_buffer;
......@@ -223,10 +231,18 @@ static void snd_usbmidi_in_midiman_complete(struct urb* urb, struct pt_regs *reg
}
}
}
#ifndef OLD_USB
snd_usbmidi_in_urb_complete(urb, regs);
#else
snd_usbmidi_in_urb_complete(urb);
#endif
}
#ifndef OLD_USB
static void snd_usbmidi_out_urb_complete(struct urb* urb, struct pt_regs *regs)
#else
static void snd_usbmidi_out_urb_complete(struct urb* urb)
#endif
{
snd_usb_midi_out_endpoint_t* ep = snd_magic_cast(snd_usb_midi_out_endpoint_t, urb->context, return);
......@@ -451,8 +467,10 @@ static void snd_usbmidi_output_trigger(snd_rawmidi_substream_t* substream, int u
usbmidi_out_port_t* port = (usbmidi_out_port_t*)substream->runtime->private_data;
port->active = up;
if (up)
tasklet_hi_schedule(&port->ep->tasklet);
if (up) {
if (! port->ep->umidi->chip->shutdown) /* to be sure... */
tasklet_hi_schedule(&port->ep->tasklet);
}
}
static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream)
......@@ -489,7 +507,8 @@ static void snd_usbmidi_in_endpoint_delete(snd_usb_midi_in_endpoint_t* ep)
{
if (ep->urb) {
if (ep->urb->transfer_buffer) {
usb_unlink_urb(ep->urb);
if (! ep->umidi->chip->shutdown) /* to be sure */
usb_unlink_urb(ep->urb);
kfree(ep->urb->transfer_buffer);
}
usb_free_urb(ep->urb);
......@@ -587,10 +606,12 @@ static int snd_usbmidi_in_endpoint_create(snd_usb_midi_t* umidi,
}
if (int_epd)
usb_fill_int_urb(ep->urb, umidi->chip->dev, pipe, buffer, length,
snd_usbmidi_in_urb_complete, ep, int_epd->bInterval);
(usb_complete_t)snd_usbmidi_in_urb_complete,
ep, int_epd->bInterval);
else
usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer, length,
snd_usbmidi_in_urb_complete, ep);
(usb_complete_t)snd_usbmidi_in_urb_complete,
ep);
rep->in = ep;
return 0;
......@@ -615,7 +636,8 @@ static void snd_usbmidi_out_endpoint_delete(snd_usb_midi_out_endpoint_t* ep)
tasklet_kill(&ep->tasklet);
if (ep->urb) {
if (ep->urb->transfer_buffer) {
usb_unlink_urb(ep->urb);
if (! ep->umidi->chip->shutdown) /* to be sure */
usb_unlink_urb(ep->urb);
kfree(ep->urb->transfer_buffer);
}
usb_free_urb(ep->urb);
......@@ -654,7 +676,8 @@ static int snd_usbmidi_out_endpoint_create(snd_usb_midi_t* umidi,
return -ENOMEM;
}
usb_fill_bulk_urb(ep->urb, umidi->chip->dev, pipe, buffer,
ep->max_transfer, snd_usbmidi_out_urb_complete, ep);
ep->max_transfer,
(usb_complete_t)snd_usbmidi_out_urb_complete, ep);
spin_lock_init(&ep->buffer_lock);
tasklet_init(&ep->tasklet, snd_usbmidi_out_tasklet, (unsigned long)ep);
......@@ -944,7 +967,7 @@ static int snd_usbmidi_create_endpoints_midiman(snd_usb_midi_t* umidi,
err = snd_usbmidi_in_endpoint_create(umidi, &ep_info, &umidi->endpoints[0]);
if (err < 0)
return err;
umidi->endpoints[0].in->urb->complete = snd_usbmidi_in_midiman_complete;
umidi->endpoints[0].in->urb->complete = (usb_complete_t)snd_usbmidi_in_midiman_complete;
if (endpoint->out_cables > 0x0001) {
ep_info.epnum = get_endpoint(hostif, 4)->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
......
......@@ -296,7 +296,7 @@ static int get_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i
return 0;
}
}
snd_printdd(KERN_ERR "cannot get ctl value: req = 0x%x, idx = 0x%x, val = 0x%x, type = %d\n", request, validx, cval->ctrlif | (cval->id << 8), cval->val_type);
snd_printdd(KERN_ERR "cannot get ctl value: req = 0x%x, wValue = 0x%x, wIndex = 0x%x, type = %d\n", request, validx, cval->ctrlif | (cval->id << 8), cval->val_type);
return -EINVAL;
}
......@@ -331,6 +331,7 @@ static int set_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i
validx, cval->ctrlif | (cval->id << 8),
buf, val_len, HZ / 10) >= 0)
return 0;
snd_printdd(KERN_ERR "cannot set ctl value: req = 0x%x, wValue = 0x%x, wIndex = 0x%x, type = %d, data = 0x%x/0x%x\n", request, validx, cval->ctrlif | (cval->id << 8), cval->val_type, buf[0], buf[1]);
return -EINVAL;
}
......@@ -571,11 +572,11 @@ static void usb_mixer_elem_free(snd_kcontrol_t *kctl)
/*
* retrieve the minimum and maximum values for the specified control
*/
static int get_min_max(usb_mixer_elem_info_t *cval)
static int get_min_max(usb_mixer_elem_info_t *cval, int default_min)
{
/* for failsafe */
cval->min = 0;
cval->max = 1;
cval->min = default_min;
cval->max = cval->min + 1;
cval->res = 1;
if (cval->val_type == USB_MIXER_BOOLEAN ||
......@@ -634,7 +635,7 @@ static int mixer_ctl_feature_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
uinfo->value.integer.max = 1;
} else {
if (! cval->initialized)
get_min_max(cval);
get_min_max(cval, 0);
uinfo->value.integer.min = 0;
uinfo->value.integer.max = (cval->max - cval->min) / cval->res;
}
......@@ -784,7 +785,7 @@ static void build_feature_ctl(mixer_build_t *state, unsigned char *desc,
}
/* get min/max values */
get_min_max(cval);
get_min_max(cval, 0);
kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval);
if (! kctl) {
......@@ -952,7 +953,7 @@ static void build_mixer_unit_ctl(mixer_build_t *state, unsigned char *desc,
}
/* get min/max values */
get_min_max(cval);
get_min_max(cval, 0);
kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval);
if (! kctl) {
......@@ -1060,6 +1061,7 @@ struct procunit_value_info {
int control;
char *suffix;
int val_type;
int min_value;
};
struct procunit_info {
......@@ -1070,12 +1072,12 @@ struct procunit_info {
static struct procunit_value_info updown_proc_info[] = {
{ USB_PROC_UPDOWN_SWITCH, "Switch", USB_MIXER_BOOLEAN },
{ USB_PROC_UPDOWN_MODE_SEL, "Mode Select", USB_MIXER_U8 },
{ USB_PROC_UPDOWN_MODE_SEL, "Mode Select", USB_MIXER_U8, 1 },
{ 0 }
};
static struct procunit_value_info prologic_proc_info[] = {
{ USB_PROC_PROLOGIC_SWITCH, "Switch", USB_MIXER_BOOLEAN },
{ USB_PROC_PROLOGIC_MODE_SEL, "Mode Select", USB_MIXER_U8 },
{ USB_PROC_PROLOGIC_MODE_SEL, "Mode Select", USB_MIXER_U8, 1 },
{ 0 }
};
static struct procunit_value_info threed_enh_proc_info[] = {
......@@ -1173,7 +1175,7 @@ static int build_audio_procunit(mixer_build_t *state, int unitid, unsigned char
cval->channels = 1;
/* get min/max values */
get_min_max(cval);
get_min_max(cval, valinfo->min_value);
kctl = snd_ctl_new1(&mixer_procunit_ctl, cval);
if (! kctl) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment