1ALSALOOP(1) General Commands Manual ALSALOOP(1)
2
3
4
6 alsaloop - command-line PCM loopback
7
9 alsaloop [-option] [cmd]
10
12 alsaloop allows create a PCM loopback between a PCM capture device and
13 a PCM playback device.
14
15 alsaloop supports multiple soundcards, adaptive clock synchronization,
16 adaptive rate resampling using the samplerate library (if available in
17 the system). Also, mixer controls can be redirected from one card to
18 another (for example Master and PCM).
19
20
22 -h | --help
23
24 Prints the help information.
25
26
27 -g <file> | --config=<file>
28
29 Use given configuration file. The syntax of this file is simple:
30 one line contains the command line options for one job. The '#'
31 means comment and rest of line is ignored. Example:
32
33 # First line - comment, second line - first job
34 -C hw:1,0 -P hw:0,0 -t 50000 -T 1
35 # Third line - comment, fourth line - second job
36 -C hw:1,1 -P hw:0,1 -t 40000 -T 2
37
38
39 -d | --daemonize
40
41 Daemonize the main process and use syslog for messages.
42
43
44 -P <device> | --pdevice=<device>
45
46 Use given playback device.
47
48
49 -C <device> | --cdevice=<device>
50
51 Use given capture device.
52
53
54 -X <device> | --pctl=<device>
55
56 Use given CTL device for playback.
57
58
59 -Y <device> | --cctl=<device>
60
61 Use given CTL device for capture.
62
63
64 -l <latency> | --latency=<frames>
65
66 Requested latency in frames.
67
68
69 -t <usec> | --tlatency=<usec>
70
71 Requested latency in usec (1/1000000sec).
72
73
74 -f <format> | --format=<format>
75
76 Format specification (usually S16_LE S32_LE). Use -h to list all
77 formats. Default format is S16_LE.
78
79
80 -c <channels> | --channels=<channels>
81
82 Channel count specification. Default value is 2.
83
84
85 -c <rate> | --rate=<rate>
86
87 Rate specification. Default value is 48000 (Hz).
88
89
90 -n | --resample
91
92 Allow rate resampling using alsa-lib.
93
94
95 -A <converter> | --samplerate=<converter>
96
97 Use libsamplerate and choose a converter:
98
99 0 or sincbest - best quality
100 1 or sincmedium - medium quality
101 2 or sincfastest - lowest quality
102 3 or zerohold - hold zero samples
103 4 or linear - worst quality - linear resampling
104 5 or auto - choose best method
105
106
107 -B <size> | --buffer=<size>
108
109 Buffer size in frames.
110
111
112 -E <size> | --period=<size>
113
114 Period size in frames.
115
116
117 -s <secs> | --seconds=<secs>
118
119 Duration of loop in seconds.
120
121
122 -b | --nblock
123
124 Non-block mode (very early process wakeup). Eats more CPU.
125
126
127 -S <mode> | --sync=<mode>
128
129 Sync mode specification for capture to playback stream:
130 0 or none - do not touch the stream
131 1 or simple - add or remove samples to keep
132 both streams synchronized
133 2 or captshift - use driver for the capture device
134 (if supported) to compensate
135 the rate shift
136 3 or playshift - use driver for the playback device
137 (if supported) to compensate
138 the rate shift
139 4 or samplerate - use samplerate library to do rate resampling
140 5 or auto - automatically selects the best method
141 in this order: captshift, playshift,
142 samplerate, simple
143
144
145 -T <num> | --thread=<num>
146
147 Thread number (-1 means create a unique thread). All jobs with
148 same thread numbers are run within one thread.
149
150
151 -m <mixid> | --mixer=<midid>
152
153 Redirect mixer control from the playback card to the capture
154 card. Format of mixid is SRCID(PLAYBACK)[@DSTID(PLAYBACK)]:
155
156 "name='Master Playback Switch'@name='Another Switch'"
157 "name='PCM Playback Volume'"
158
159 Known attributes:
160
161 name - control ID name
162 index - control ID index
163 device - control ID device
164 subdevice - control ID subdevice
165 iface - control ID interface
166 numid - control ID numid
167
168
169 -O <ossmixid> | --ossmixer=<midid>
170
171 Redirect mixer control from the OSS Mixer emulation layer (cap‐
172 ture card) to the ALSA layer (capture card). Format of ossmixid
173 is ALSAID[,INDEX]@OSSID:
174
175 "Master@VOLUME"
176 "PCM,1@ALTPCM"
177
178 Known OSS attributes:
179
180 VOLUME, BASS, TREBLE, SYNTH, PCM, SPEAKER, LINE, MIC, CD,
181 IMIX, ALTPCM,
182 RECLEV, IGAIN, OGAIN, LINE1, LINE2, LINE3, DIGITAL1, DIGITAL2,
183 DIGITAL3,
184 PHONEIN, PHONEOUT, VIDEO, RADIO, MONITOR
185
186
187 -v | --verbose
188
189 Verbose mode. Use multiple times to increase verbosity.
190
191
192
193 -U | --xrun
194
195 Verbose xrun profiling.
196
197
198 -W <timeout> | --wake=<timeout>
199
200 Set process wake timeout.
201
202
204 alsaloop -C hw:0,0 -P hw:1,0 -t 50000
205
206
208 None known.
209
211 alsaloop is by Jaroslav Kysela <perex@perex.cz>. This document is by
212 Jaroslav Kysela <perex@perex.cz>.
213
214
215
216 5 Aug 2010 ALSALOOP(1)