# ALSA library configuration file
#
-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 interface
+#
pcm.hw {
args [ CARD DEV SUBDEV ]
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 {
args [ CARD DEV ]
args.CARD {
name {
@func concat
strings [
- "pcm.surround40_" $(DEV) "_"
- {
- @func pcm_id
- card $(CARD)
- device 0
- }
- ":" $(CARD)
+ "pcm.surround40_" $(DEV) ":CARD=" $(CARD)
]
}
}
}
args.DEV {
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 {
- type null
}
-ctl.default {
- type hw
- card <@ALSA_CARD:0@>
+pcm.iec958 {
+ args [ CARD DEV AES0 AES1 AES2 AES3 ]
+ args.CARD {
+ type integer
+ default {
+ @func getenv
+ @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 {
args[ CARD ]
args.CARD {
ctl $(CTL)
}
-rawmidi.default {
+ctl.default {
type hw
card {
@func getenv
- @type integer
envname [
- ALSA_RAWMIDI_CARD
ALSA_CARD
]
default 0
}
- device {
- @func getenv
- @type integer
- envname [
- ALSA_RAWMIDI_DEVICE
- ]
- default 0
- }
}
+#
+# RawMidi interface
+#
+
rawmidi.hw {
args [ CARD DEV SUBDEV ]
args.CARD {
subdevice $(SUBDEV)
}
-seq.default {
+rawmidi.default {
type hw
+ card {
+ @func getenv
+ @type integer
+ envname [
+ ALSA_RAWMIDI_CARD
+ ALSA_CARD
+ ]
+ default 0
+ }
+ device {
+ @func getenv
+ @type integer
+ envname [
+ ALSA_RAWMIDI_DEVICE
+ ]
+ default 0
+ }
}
-seq.hw {
+#
+# Sequencer interface
+#
+
+seq.default {
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)
- ]
- }
- ]
+seq.hw {
+ type hw
}