• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9pcm.!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_inum
48					card $CARD
49				}
50				".pcm.surround51." $DEV ":CARD=" $CARD
51			]
52		}
53	}
54	ttable.0.FL 1
55	ttable.1.FR 1
56	ttable.2.LFE 1
57	hint {
58		description "2.1 Surround output to Front and Subwoofer speakers"
59		device_output $DEV
60		omit_noargs true
61	}
62}
63