File: alsaloop.1

package info (click to toggle)
alsa-utils 1.0.28-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,280 kB
  • ctags: 1,585
  • sloc: ansic: 21,693; sh: 6,035; xml: 590; makefile: 374; sed: 16
file content (206 lines) | stat: -rw-r--r-- 5,000 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
.TH ALSALOOP 1 "5 Aug 2010"
.SH NAME
alsaloop \- command\-line PCM loopback
.SH SYNOPSIS
\fBalsaloop\fP [\fI\-option\fP] [\fIcmd\fP]
.SH DESCRIPTION

\fBalsaloop\fP allows create a PCM loopback between a PCM capture device
and a PCM playback device.

\fBalsaloop\fP supports multiple soundcards, adaptive clock synchronization,
adaptive rate resampling using the samplerate library (if available in
the system). Also, mixer controls can be redirected from one card to
another (for example Master and PCM).

.SH OPTIONS

.TP
\fI\-h\fP | \fI\-\-help\fP

Prints the help information.

.TP
\fI\-g <file>\fP | \fI\-\-config=<file>\fP

Use given configuration file. The syntax of this file is simple: one line
contains the command line options for one job. The '#' means comment and
rest of line is ignored. Example:

  # First line \- comment, second line \- first job
  \-C hw:1,0 \-P hw:0,0 \-t 50000 \-T 1
  # Third line \- comment, fourth line \- second job
  \-C hw:1,1 \-P hw:0,1 \-t 40000 \-T 2

.TP
\fI\-d\fP | \fI\-\-daemonize\fP

Daemonize the main process and use syslog for messages.

.TP
\fI\-P <device>\fP | \fI\-\-pdevice=<device>\fP

Use given playback device.

.TP
\fI\-C <device>\fP | \fI\-\-cdevice=<device>\fP

Use given capture device.

.TP
\fI\-X <device>\fP | \fI\-\-pctl=<device>\fP

Use given CTL device for playback.

.TP
\fI\-Y <device>\fP | \fI\-\-cctl=<device>\fP

Use given CTL device for capture.

.TP
\fI\-l <latency>\fP | \fI\-\-latency=<frames>\fP

Requested latency in frames.

.TP
\fI\-t <usec>\fP | \fI\-\-tlatency=<usec>\fP

Requested latency in usec (1/1000000sec).

.TP
\fI\-f <format>\fP | \fI\-\-format=<format>\fP

Format specification (usually S16_LE S32_LE). Use \-h to list all formats.
Default format is S16_LE.

.TP
\fI\-c <channels>\fP | \fI\-\-channels=<channels>\fP

Channel count specification. Default value is 2.

.TP
\fI\-c <rate>\fP | \fI\-\-rate=<rate>\fP

Rate specification. Default value is 48000 (Hz).

.TP
\fI\-n\fP | \fI\-\-resample\fP

Allow rate resampling using alsa\-lib.

.TP
\fI\-A <converter>\fP | \fI\-\-samplerate=<converter>\fP

Use libsamplerate and choose a converter:

  0 or sincbest     \- best quality
  1 or sincmedium   \- medium quality
  2 or sincfastest  \- lowest quality
  3 or zerohold     \- hold zero samples
  4 or linear       \- worst quality - linear resampling
  5 or auto         \- choose best method

.TP
\fI\-B <size>\fP | \fI\-\-buffer=<size>\fP

Buffer size in frames.

.TP
\fI\-E <size>\fP | \fI\-\-period=<size>\fP

Period size in frames.

.TP
\fI\-s <secs>\fP | \fI\-\-seconds=<secs>\fP

Duration of loop in seconds.

.TP
\fI\-b\fP | \fI\-\-nblock\fP

Non\-block mode (very early process wakeup). Eats more CPU.

.TP
\fI\-S <mode>\fP | \fI\-\-sync=<mode>\fP

Sync mode specification for capture to playback stream:
  0 or none       \- do not touch the stream
  1 or simple     \- add or remove samples to keep
                    both streams synchronized
  2 or captshift  \- use driver for the capture device
                    (if supported) to compensate
                    the rate shift
  3 or playshift  \- use driver for the playback device
                    (if supported) to compensate
                    the rate shift
  4 or samplerate \- use samplerate library to do rate resampling
  5 or auto       \- automatically selects the best method
                    in this order: captshift, playshift,
                    samplerate, simple

.TP
\fI\-T <num>\fP | \fI\-\-thread=<num>\fP

Thread number (\-1 means create a unique thread). All jobs with same
thread numbers are run within one thread.

.TP
\fI\-m <mixid>\fP | \fI\-\-mixer=<midid>\fP

Redirect mixer control from the playback card to the capture card. Format of
\fImixid\fP is SRCID(PLAYBACK)[@DSTID(PLAYBACK)]:

  "name='Master Playback Switch'@name='Another Switch'"
  "name='PCM Playback Volume'"

Known attributes:

  name      \- control ID name
  index     \- control ID index
  device    \- control ID device
  subdevice \- control ID subdevice
  iface     \- control ID interface
  numid     \- control ID numid

.TP
\fI\-O <ossmixid>\fP | \fI\-\-ossmixer=<midid>\fP

Redirect mixer control from the OSS Mixer emulation layer (capture card)
to the ALSA layer (capture card). Format of \fIossmixid\fP is
ALSAID[,INDEX]@OSSID:

  "Master@VOLUME"
  "PCM,1@ALTPCM"

Known OSS attributes:

  VOLUME, BASS, TREBLE, SYNTH, PCM, SPEAKER, LINE, MIC, CD, IMIX, ALTPCM,
  RECLEV, IGAIN, OGAIN, LINE1, LINE2, LINE3, DIGITAL1, DIGITAL2, DIGITAL3,
  PHONEIN, PHONEOUT, VIDEO, RADIO, MONITOR

.TP
\fI\-v\fP | \fI\-\-verbose\fP

Verbose mode. Use multiple times to increase verbosity.


.TP
\fI\-U\fP | \fI\-\-xrun\fP

Verbose xrun profiling.

.TP
\fI\-W <timeout>\fP | \fI\-\-wake=<timeout>\fP

Set process wake timeout.

.SH EXAMPLES

.TP
\fBalsaloop \-C hw:0,0 \-P hw:1,0 \-t 50000\fR

.SH BUGS
None known.
.SH AUTHOR
\fBalsaloop\fP is by Jaroslav Kysela <perex@perex.cz>.
This document is by Jaroslav Kysela <perex@perex.cz>.