Improved .asoundrc changes

This commit is contained in:
Abramo Bagnara 2001-03-17 16:34:43 +00:00
parent 0300bbbbb3
commit a275d66356
25 changed files with 888 additions and 612 deletions

View file

@ -1,169 +1,261 @@
# Server definition
server.NAME {
host STR # host where the server is located (if map to local address
# server is local, and then it may be started automatically)
[socket STR] # PF_LOCAL socket name to listen/connect
[port INT] # PF_INET port number to listen/connect
}
PCM common fields:
type PCM type
[comment] Saved comments
# PCM type definition
pcm_type.NAME {
[lib STR] # Library file (default libasound.so)
[open STR] # Open function (default _snd_pcm_NAME_open)
}
PCM types:
# PCM scope type definition
pcm_scope_type.NAME {
[lib STR] # Library file (default libasound.so)
[open STR] # Open function (default _snd_pcm_scope_NAME_open)
}
- hw Kernel PCM
Fields:
card Card name or number
[device] Device number (default 0)
[subdevice] Subdevice number, -1 first available (default -1)
# Slave PCM definition
pcm_slave.NAME {
pcm STR # PCM name
format STR # Format
channels INT # Channels
rate INT # Rate
period_time INT # Period time
buffer_time INT # Buffer time
etc.
}
- plug Format adjusted PCM
Fields:
sname Slave PCM name
ttable Transfer table (bidimensional compound of
cchannels * schannels numbers)
.C
.S route value
# PCM definition
pcm.NAME {
type STR # Type
[comment ANY] # Saved comments
- linear Linear format conversion PCM
- adpcm IMA-ADPCM format conversion PCM
- alaw A-Law format conversion PCM
- mulaw Mu-Law format conversion PCM
Fields:
sformat Slave format
sname Slave PCM name
- rate Rate conversion PCM
Fields:
[sformat] Slave format (default client format)
srate Slave rate
sname Slave PCM name
- route Attenuated static route PCM
Fields:
[sformat] Slave format (default client format)
[schannels] Slave channels (default client channels)
sname Slave PCM name
ttable Transfer table (bidimensional compound of
cchannels * schannels numbers)
.C
.S route value
- multi Linked PCMs (exclusive access to selected channels)
Fields:
slave Slaves definitions
.N Slave definition
.name Slave PCM name
.channels Slave channels
binding Bindings table
.N Binding for client channel N
.sidx Slave key for slave definition
.schannel Slave channel
- file File plugin
Fields:
sname Slave PCM name
file File name (or fd)
[format] File format (NYI)
# PCM types:
type hw # Kernel PCM
card INT/STR # Card name or number
[device] INT # Device number (default 0)
[subdevice] INT # Subdevice number, -1 first available (default -1)
- null Null endpoint plugin (NYI)
Fields:
time Time related or not
- shm Shared memory client PCM
Fields:
server Server name
sname Slave PCM name on server
- share Share PCM
Fields:
sname Slave name
[schannels] Slave channels
[sformat] Slave format
[srate] Slave rate
binding Bindings table
.N Slave channel for client channel N
- meter Meter PCM
Fields:
sname Slave name
[frequency] Updates per second
scope Scopes
.N Scope #N
.type Scope type
[.PARAMS] Scope params
- mix Mix PCM (NYI)
Fields:
sname Server name
binding Bindings table
.N Binding for client channel N
.schannel Slave channel
- droute Attenuated dynamic route PCM (NYI)
Fields:
[sformat] Slave format (default client format)
[schannels] Slave channels (default client channels)
sname Slave PCM name
binding Bindings table
.N Binding entry
.cchannel Client channels
.C Client channel
.schannel Slave channels
.S Slave channel
.control Control name of C * S values or C values (only if C == S)
- lbserver Loopback server (NYI)
Fields:
name Loopback PCM ID (useful for multiple loopback served by the
same server)
[socket] PF_LOCAL socket name to listen
[port] PF_INET port number to listen
sname Slave name
type plug # Format adjusted PCM
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
}
ttable { # Transfer table (bidimensional compound of
# cchannels * schannels numbers)
CCHANNEL {
SCHANNEL REAL # route value (0.0 ... 1.0)
}
}
CTL common fields:
type CTL type
[comment] Saved comments
type linear # Linear format conversion PCM
type adpcm # IMA-ADPCM format conversion PCM
type alaw # A-Law format conversion PCM
type mulaw # Mu-Law format conversion PCM
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
format STR # Slave format
}
- hw Kernel CTL
Fields:
card Card name or number
- shm Shared memory client CTL
Fields:
server Server name
sname Slave CTL name on server
type rate # Rate conversion PCM
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
[format STR] # Slave format (default client format)
rate INT # Slave rate
}
Other related definitions:
- pcmtype PCM type
Fields:
[lib] Library file
open Open function
type route # Attenuated static route PCM
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
[format STR] # Slave format (default client format)
[channels INT] # Slave channels (default client channels)
}
ttable { # Transfer table (bidimensional compound of
# cchannels * schannels numbers)
CCHANNEL {
SCHANNEL REAL # route value (0.0 ... 1.0)
}
}
- ctltype Control type
Fields:
[lib] Library file
open Open function
- scopetype PCM scope type
Fields:
[lib] Library file
open Open function
type multi # Linked PCMs (exclusive access to selected channels)
slaves { # Slaves definitions
N STR # Slave name for slave N
# or
N { # Slave definition for slave N
pcm STR # Slave PCM name
channels INT # Slave channels
}
}
bindings { # Bindings table
N { # Binding for client channel N
slave STR # Slave key
channel INT # Slave channel
}
}
- server Server
Fields:
host host where the server is located (if map to local address
server is local, and then it may be started automatically)
[socket] PF_LOCAL socket name to listen/connect
[port] PF_INET port number to listen/connect
type file # File plugin
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
}
[format STR] # File format (NYI)
type meter # Meter PCM
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
}
[frequency INT] # Updates per second
scopes { # Scopes
N { # Scope definition
type STR # Scope type
[PARAMS] # Scope params
}
}
type droute # Attenuated dynamic route PCM (NYI)
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
[format STR] # Slave format (default client format)
[channels INT] # Slave channels (default client channels)
}
ctl STR # Ctl name
bindings { # Bindings table
N { # Binding entry
cchannels { # Client channels
C INT # Client channel
}
schannel { # Slave channels
S INT # Slave channel
}
control STR # Control name of C * S (or C values: only if C == S)
}
}
type loopback # Loopback server (NYI)
server STR # Server name
slave STR # Slave name
# or
slave { # Slave definition or name
pcm STR # Slave PCM name
}
type null # Null endpoint plugin
[time INT] # Time related or not (NYI)
type shm # Shared memory client PCM
server STR # Server name
pcm STR # PCM name on server
type share # Share PCM
slave STR # Slave name
bindings { # Bindings table
N INT # Slave channel for client channel N
}
type mix # Mix PCM
slave STR # Slave name
bindings { # Bindings table
N INT # Slave channel for client channel N
}
}
# CTL type definition
ctl_type.NAME {
[lib STR] # Library file (default libasound.so)
[open STR] # Open function (default _snd_ctl_NAME_open)
}
# CTL definition
ctl.NAME {
type STR # Type
[comment ANY] # Saved comments
# CTL types
type hw
card STR/INT # Card name or number
type shm # Shared memory client CTL
server STR # Server name
ctl STR # CTL name on server
}
# RAWMIDI type definition
rawmidi_type.NAME {
[lib STR] # Library file (default libasound.so)
[open STR] # Open function (default _snd_rawmidi_NAME_open)
}
# RAWMIDI definition
rawmidi.NAME {
type STR # Type
[comment ANY] # Saved comments
# RAWMIDI types:
type hw # Kernel RAWMIDI
card INT/STR # Card name or number
[device] INT # Device number (default 0)
[subdevice] INT # Subdevice number, -1 first available (default -1)
}
# SEQ type definition
seq_type.NAME {
[lib STR] # Library file (default libasound.so)
[open STR] # Open function (default _snd_seq_NAME_open)
}
# SEQ definition
seq.NAME {
type STR # Type
[comment ANY] # Saved comments
# SEQ types:
type hw # Kernel SEQ
}
# Aliases
DEF.NAME1 NAME2 # DEF.NAME1 is an alias for DEF.NAME2
Some examples:
pcmtype.hw {
open _snd_pcm_hw_open
}
pcmtype.plug {
open _snd_pcm_plug_open
}
pcm.trident {
type hw
card 0
@ -180,31 +272,41 @@ pcm.ice1712_spdif {
type plug
ttable.0.8 1
ttable.1.9 1
sname ice1712
slave.pcm ice1712
}
pcm_slave.rs {
pcm trident
rate 44100
}
pcm.r {
type rate
slave rs
}
pcm.m {
type meter
sname plug:trident
slave.pcm plug:trident
frequency 50
scope.0 {
scopes.0 {
type level
}
}
scopetype.level {
scope_type.level {
lib /home/abramo/scopes/liblevel.so
}
Special PCM names:
hw:#card,#dev,#subdev
hw:#card,#dev
plug:#card,#dev,#subdev
plug:#card,#dev
plug:sname
shm:socket,sname
file:fname,fmt,sname
file:fname,fmt
file:fname
hw:CARD,DEV,SUBDEV
hw:CARD,DEV
plug:CARD,DEV,SUBDEV
plug:CARD,DEV
plug:SLAVE_PCM
shm:SOCKET,PCM
file:FNAME,FMT,SLAVE_PCM
file:FNAME,FMT
file:FNAME
null