mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Reorganization
This commit is contained in:
parent
355bb478e9
commit
2dd594a2f2
1 changed files with 178 additions and 103 deletions
281
src/alsa.conf
281
src/alsa.conf
|
|
@ -2,30 +2,9 @@
|
||||||
# ALSA library configuration file
|
# ALSA library configuration file
|
||||||
#
|
#
|
||||||
|
|
||||||
pcm.default {
|
#
|
||||||
type plug
|
# PCM interface
|
||||||
slave.pcm {
|
#
|
||||||
type hw
|
|
||||||
card {
|
|
||||||
@func getenv
|
|
||||||
@type integer
|
|
||||||
envname [
|
|
||||||
ALSA_PCM_CARD
|
|
||||||
ALSA_CARD
|
|
||||||
]
|
|
||||||
default 0
|
|
||||||
}
|
|
||||||
device {
|
|
||||||
@func getenv
|
|
||||||
@type integer
|
|
||||||
envname [
|
|
||||||
ALSA_PCM_DEVICE
|
|
||||||
]
|
|
||||||
default 0
|
|
||||||
}
|
|
||||||
subdevice -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pcm.hw {
|
pcm.hw {
|
||||||
args [ CARD DEV SUBDEV ]
|
args [ CARD DEV SUBDEV ]
|
||||||
|
|
@ -121,6 +100,35 @@ pcm.file {
|
||||||
format $(FORMAT)
|
format $(FORMAT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pcm.null {
|
||||||
|
type null
|
||||||
|
}
|
||||||
|
|
||||||
|
pcm.default {
|
||||||
|
type plug
|
||||||
|
slave.pcm {
|
||||||
|
type hw
|
||||||
|
card {
|
||||||
|
@func getenv
|
||||||
|
@type integer
|
||||||
|
envname [
|
||||||
|
ALSA_PCM_CARD
|
||||||
|
ALSA_CARD
|
||||||
|
]
|
||||||
|
default 0
|
||||||
|
}
|
||||||
|
device {
|
||||||
|
@func getenv
|
||||||
|
@type integer
|
||||||
|
envname [
|
||||||
|
ALSA_PCM_DEVICE
|
||||||
|
]
|
||||||
|
default 0
|
||||||
|
}
|
||||||
|
subdevice -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pcm.surround40 {
|
pcm.surround40 {
|
||||||
args [ CARD DEV ]
|
args [ CARD DEV ]
|
||||||
args.CARD {
|
args.CARD {
|
||||||
|
|
@ -165,13 +173,7 @@ pcm.surround40 {
|
||||||
name {
|
name {
|
||||||
@func concat
|
@func concat
|
||||||
strings [
|
strings [
|
||||||
"pcm.surround40_" $(DEV) "_"
|
"pcm.surround40_" $(DEV) ":CARD=" $(CARD)
|
||||||
{
|
|
||||||
@func pcm_id
|
|
||||||
card $(CARD)
|
|
||||||
device 0
|
|
||||||
}
|
|
||||||
":" $(CARD)
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -194,23 +196,120 @@ pcm.surround51 {
|
||||||
}
|
}
|
||||||
args.DEV {
|
args.DEV {
|
||||||
type integer
|
type integer
|
||||||
default <@ALSA_SURROUND51_DEVICE:0@>
|
default {
|
||||||
|
@func getenv
|
||||||
|
@type integer
|
||||||
|
envname [
|
||||||
|
ALSA_SURROUND51_DEVICE
|
||||||
|
]
|
||||||
|
default 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
redirect {
|
||||||
|
filename {
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
{
|
||||||
|
@func datadir
|
||||||
|
}
|
||||||
|
"/cards/"
|
||||||
|
{
|
||||||
|
@func card_strtype
|
||||||
|
card $(CARD)
|
||||||
|
}
|
||||||
|
".conf"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
name {
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
"pcm.surround51_" $(DEV) ":CARD=" $(CARD)
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type surround
|
|
||||||
card $(CARD)
|
|
||||||
device $(DEVICE)
|
|
||||||
stype "5.1"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pcm.null {
|
pcm.iec958 {
|
||||||
type null
|
args [ CARD DEV AES0 AES1 AES2 AES3 ]
|
||||||
}
|
args.CARD {
|
||||||
|
type integer
|
||||||
ctl.default {
|
default {
|
||||||
type hw
|
@func getenv
|
||||||
card <@ALSA_CARD:0@>
|
@type integer
|
||||||
|
envname [
|
||||||
|
ALSA_IEC958_CARD
|
||||||
|
ALSA_PCM_CARD
|
||||||
|
ALSA_CARD
|
||||||
|
]
|
||||||
|
default 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
args.DEV {
|
||||||
|
type integer
|
||||||
|
default {
|
||||||
|
@func getenv
|
||||||
|
@type integer
|
||||||
|
envname [
|
||||||
|
ALSA_IEC958_DEVICE
|
||||||
|
]
|
||||||
|
default 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
args.AES0 {
|
||||||
|
type integer
|
||||||
|
# consumer, not-copyright, emphasis-none, mode=0
|
||||||
|
default 0x04
|
||||||
|
}
|
||||||
|
args.AES1 {
|
||||||
|
type integer
|
||||||
|
# original, PCM coder
|
||||||
|
default 0x82
|
||||||
|
}
|
||||||
|
args.AES2 {
|
||||||
|
type integer
|
||||||
|
# source and channel
|
||||||
|
default 0x00
|
||||||
|
}
|
||||||
|
args.AES3 {
|
||||||
|
type integer
|
||||||
|
# fs=48000Hz, clock accuracy=1000ppm
|
||||||
|
default 0x02
|
||||||
|
}
|
||||||
|
redirect {
|
||||||
|
filename {
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
{
|
||||||
|
@func datadir
|
||||||
|
}
|
||||||
|
"/cards/"
|
||||||
|
{
|
||||||
|
@func card_strtype
|
||||||
|
card $(CARD)
|
||||||
|
}
|
||||||
|
".conf"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
name {
|
||||||
|
@func concat
|
||||||
|
strings [
|
||||||
|
"pcm.iec958_" $(DEV) ":"
|
||||||
|
"CARD=" $(CARD) ","
|
||||||
|
"AES0=" $(AES0) ","
|
||||||
|
"AES1=" $(AES1) ","
|
||||||
|
"AES2=" $(AES2) ","
|
||||||
|
"AES3=" $(AES3)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pcm.spdif "pcm.iec958"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Control interface
|
||||||
|
#
|
||||||
|
|
||||||
ctl.hw {
|
ctl.hw {
|
||||||
args[ CARD ]
|
args[ CARD ]
|
||||||
args.CARD {
|
args.CARD {
|
||||||
|
|
@ -233,6 +332,39 @@ ctl.shm {
|
||||||
ctl $(CTL)
|
ctl $(CTL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctl.default {
|
||||||
|
type hw
|
||||||
|
card {
|
||||||
|
@func getenv
|
||||||
|
envname [
|
||||||
|
ALSA_CARD
|
||||||
|
]
|
||||||
|
default 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# RawMidi interface
|
||||||
|
#
|
||||||
|
|
||||||
|
rawmidi.hw {
|
||||||
|
args [ CARD DEV SUBDEV ]
|
||||||
|
args.CARD {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
args.DEV {
|
||||||
|
type integer
|
||||||
|
}
|
||||||
|
args.SUBDEV {
|
||||||
|
type integer
|
||||||
|
default -1
|
||||||
|
}
|
||||||
|
type hw
|
||||||
|
card $(CARD)
|
||||||
|
device $(DEV)
|
||||||
|
subdevice $(SUBDEV)
|
||||||
|
}
|
||||||
|
|
||||||
rawmidi.default {
|
rawmidi.default {
|
||||||
type hw
|
type hw
|
||||||
card {
|
card {
|
||||||
|
|
@ -254,23 +386,9 @@ rawmidi.default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rawmidi.hw {
|
#
|
||||||
args [ CARD DEV SUBDEV ]
|
# Sequencer interface
|
||||||
args.CARD {
|
#
|
||||||
type integer
|
|
||||||
}
|
|
||||||
args.DEV {
|
|
||||||
type integer
|
|
||||||
}
|
|
||||||
args.SUBDEV {
|
|
||||||
type integer
|
|
||||||
default -1
|
|
||||||
}
|
|
||||||
type hw
|
|
||||||
card $(CARD)
|
|
||||||
device $(DEV)
|
|
||||||
subdevice $(SUBDEV)
|
|
||||||
}
|
|
||||||
|
|
||||||
seq.default {
|
seq.default {
|
||||||
type hw
|
type hw
|
||||||
|
|
@ -279,46 +397,3 @@ seq.default {
|
||||||
seq.hw {
|
seq.hw {
|
||||||
type hw
|
type hw
|
||||||
}
|
}
|
||||||
|
|
||||||
pcm.iec958 {
|
|
||||||
args [ PCM AES0 AES1 AES2 AES3 ]
|
|
||||||
args.PCM {
|
|
||||||
type string
|
|
||||||
default default
|
|
||||||
}
|
|
||||||
args.AES0 {
|
|
||||||
type integer
|
|
||||||
# IEC958_AES0_PROFESSIONAL | IEC958_AES0_NONAUDIO |
|
|
||||||
# IEC958_AES0_PRO_EMPHASIS_NONE | IEC958_AES0_PRO_FS_48000
|
|
||||||
default 0x87
|
|
||||||
}
|
|
||||||
args.AES1 {
|
|
||||||
type integer
|
|
||||||
default 0x00
|
|
||||||
}
|
|
||||||
args.AES2 {
|
|
||||||
type integer
|
|
||||||
default 0x00
|
|
||||||
}
|
|
||||||
args.AES3 {
|
|
||||||
type integer
|
|
||||||
default 0x00
|
|
||||||
}
|
|
||||||
type hooks
|
|
||||||
slave.pcm $(PCM)
|
|
||||||
hooks [
|
|
||||||
{
|
|
||||||
type ctl_elems
|
|
||||||
args [
|
|
||||||
name "IEC958 Playback PCM Stream"
|
|
||||||
subdevice 0
|
|
||||||
preserve true
|
|
||||||
lock true
|
|
||||||
value.0 $(AES0)
|
|
||||||
value.1 $(AES1)
|
|
||||||
value.2 $(AES2)
|
|
||||||
value.3 $(AES3)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue