defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
+defaults.pcm.surround21.card defaults.pcm.card
+defaults.pcm.surround21.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
pcm.rear cards.pcm.rear
pcm.center_lfe cards.pcm.center_lfe
pcm.side cards.pcm.side
+pcm.surround21 cards.pcm.surround21
pcm.surround40 cards.pcm.surround40
pcm.surround41 cards.pcm.surround41
pcm.surround50 cards.pcm.surround50
cfg_files = default.conf front.conf rear.conf center_lfe.conf side.conf\
- surround40.conf surround41.conf \
+ surround21.conf surround40.conf surround41.conf \
surround50.conf surround51.conf \
surround71.conf iec958.conf hdmi.conf modem.conf \
dmix.conf dsnoop.conf \
--- /dev/null
+#
+# Hardware output from 2.1 speakers.
+# Samples must be positioned:
+# chn0 - front left
+# chn1 - front right
+# chn2 - LFE
+#
+
+pcm.!surround21 {
+ @args [ CARD DEV ]
+ @args.CARD {
+ type string
+ default {
+ @func getenv
+ vars [
+ ALSA_SURROUND21_CARD
+ ALSA_PCM_CARD
+ ALSA_CARD
+ ]
+ default {
+ @func refer
+ name defaults.pcm.surround21.card
+ }
+ }
+ }
+ @args.DEV {
+ type integer
+ default {
+ @func igetenv
+ vars [
+ ALSA_SURROUND21_DEVICE
+ ]
+ default {
+ @func refer
+ name defaults.pcm.surround21.device
+ }
+ }
+ }
+ type route
+ slave.pcm {
+ @func refer
+ name {
+ @func concat
+ strings [
+ "cards."
+ {
+ @func card_driver
+ card $CARD
+ }
+ ".pcm.surround51." $DEV ":CARD=" $CARD
+ ]
+ }
+ }
+ slave.channels 6
+ ttable.0.0 1
+ ttable.1.1 1
+ ttable.2.5 1
+ hint {
+ description "2.1 Surround output to Front and Subwoofer speakers"
+ device $DEV
+ }
+}