conf: Add basic infrastructure for 2.1 surround sound
[alsa-lib.git] / src / conf / pcm / surround21.conf
1 #
2 #  Hardware output from 2.1 speakers.
3 #  Samples must be positioned:
4 #    chn0 - front left
5 #    chn1 - front right
6 #    chn2 - LFE
7 #
8
9 pcm.!surround21 {
10         @args [ CARD DEV ]
11         @args.CARD {
12                 type string
13                 default {
14                         @func getenv
15                         vars [
16                                 ALSA_SURROUND21_CARD
17                                 ALSA_PCM_CARD
18                                 ALSA_CARD
19                         ]
20                         default {
21                                 @func refer
22                                 name defaults.pcm.surround21.card
23                         }
24                 }
25         }
26         @args.DEV {
27                 type integer
28                 default {
29                         @func igetenv
30                         vars [
31                                 ALSA_SURROUND21_DEVICE
32                         ]
33                         default {
34                                 @func refer
35                                 name defaults.pcm.surround21.device
36                         }
37                 }
38         }
39         type route
40         slave.pcm {
41                 @func refer
42                 name {
43                         @func concat
44                         strings [
45                                 "cards."
46                                 {
47                                         @func card_driver
48                                         card $CARD
49                                 }
50                                 ".pcm.surround51." $DEV ":CARD=" $CARD
51                         ]
52                 }
53         }
54         slave.channels 6
55         ttable.0.0 1
56         ttable.1.1 1
57         ttable.2.5 1
58         hint {
59                 description "2.1 Surround output to Front and Subwoofer speakers"
60                 device $DEV
61         }
62 }