1ALSALOOP(1)                 General Commands Manual                ALSALOOP(1)
2
3
4

NAME

6       alsaloop - command-line PCM loopback
7

SYNOPSIS

9       alsaloop [-option] [cmd]
10

DESCRIPTION

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

OPTIONS

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       -x <ctl_ascii_name> | --prateshift=<ctl_ascii_name>
65
66              Specify ctl ascii name for playshift sync mode (see the Examples
67              section).
68
69
70       -l <latency> | --latency=<frames>
71
72              Requested latency in frames.
73
74
75       -t <usec> | --tlatency=<usec>
76
77              Requested latency in usec (1/1000000sec).
78
79
80       -f <format> | --format=<format>
81
82              Format specification (usually S16_LE S32_LE). Use -h to list all
83              formats.  Default format is S16_LE.
84
85
86       -c <channels> | --channels=<channels>
87
88              Channel count specification. Default value is 2.
89
90
91       -r <rate> | --rate=<rate>
92
93              Rate specification. Default value is 48000 (Hz).
94
95
96       -n | --resample
97
98              Allow rate resampling using alsa-lib.
99
100
101       -A <converter> | --samplerate=<converter>
102
103              Use libsamplerate and choose a converter:
104
105                0 or sincbest     - best quality
106                1 or sincmedium   - medium quality
107                2 or sincfastest  - lowest quality
108                3 or zerohold     - hold zero samples
109                4 or linear       - worst quality - linear resampling
110                5 or auto         - choose best method
111
112
113       -B <size> | --buffer=<size>
114
115              Buffer size in frames.
116
117
118       -E <size> | --period=<size>
119
120              Period size in frames.
121
122
123       -s <secs> | --seconds=<secs>
124
125              Duration of loop in seconds.
126
127
128       -b | --nblock
129
130              Non-block mode (very early process wakeup). Eats more CPU.
131
132
133       -S <mode> | --sync=<mode>
134
135              Sync mode specification for capture to playback stream:
136                0 or none       - do not touch the stream
137                1 or simple     - add or remove samples to keep
138                                  both streams synchronized
139                2 or captshift  - use driver for the capture device
140                                  (if supported) to compensate
141                                  the rate shift
142                3 or playshift  - use driver for the playback device
143                                  (if supported) to compensate
144                                  the rate shift
145                4 or samplerate - use samplerate library to do rate resampling
146                5 or auto       - automatically selects the best method
147                                  in this order: captshift, playshift,
148                                  samplerate, simple
149
150
151       -T <num> | --thread=<num>
152
153              Thread  number  (-1 means create a unique thread). All jobs with
154              same thread numbers are run within one thread.
155
156
157       -m <mixid> | --mixer=<midid>
158
159              Redirect mixer control from the playback  card  to  the  capture
160              card. Format of mixid is SRCID(PLAYBACK)[@DSTID(PLAYBACK)]:
161
162                "name='Master Playback Switch'@name='Another Switch'"
163                "name='PCM Playback Volume'"
164
165              Known attributes:
166
167                name      - control ID name
168                index     - control ID index
169                device    - control ID device
170                subdevice - control ID subdevice
171                iface     - control ID interface
172                numid     - control ID numid
173
174
175       -O <ossmixid> | --ossmixer=<midid>
176
177              Redirect  mixer control from the OSS Mixer emulation layer (cap‐
178              ture card) to the ALSA layer (capture card). Format of  ossmixid
179              is ALSAID[,INDEX]@OSSID:
180
181                "Master@VOLUME"
182                "PCM,1@ALTPCM"
183
184              Known OSS attributes:
185
186                VOLUME,  BASS,  TREBLE,  SYNTH,  PCM,  SPEAKER, LINE, MIC, CD,
187              IMIX, ALTPCM,
188                RECLEV, IGAIN, OGAIN, LINE1, LINE2, LINE3, DIGITAL1, DIGITAL2,
189              DIGITAL3,
190                PHONEIN, PHONEOUT, VIDEO, RADIO, MONITOR
191
192
193       -v | --verbose
194
195              Verbose mode. Use multiple times to increase verbosity.
196
197
198
199       -U | --xrun
200
201              Verbose xrun profiling.
202
203
204       -W <timeout> | --wake=<timeout>
205
206              Set process wake timeout.
207
208

EXAMPLES

210       alsaloop -C hw:0,0 -P hw:1,0 -t 50000
211
212       alsaloop -C hw:soundcard,0 -P hw:Loopback,0 -t 50000 -S playshift \
213       -x iface=PCM,name='PCM Rate Shift 100000',device=1
214

BUGS

216       None known.
217

AUTHOR

219       alsaloop  is  by Jaroslav Kysela <perex@perex.cz>.  This document is by
220       Jaroslav Kysela <perex@perex.cz>.
221
222
223
224                                  5 Aug 2010                       ALSALOOP(1)
Impressum