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

NAME

6       arecord, aplay - command-line sound recorder and player for ALSA sound‐
7       card driver
8

SYNOPSIS

10       arecord [flags] [filename]
11       aplay [flags] [filename [filename]] ...
12
13

DESCRIPTION

15       arecord is a command-line soundfile recorder  for  the  ALSA  soundcard
16       driver.  It  supports several file formats and multiple soundcards with
17       multiple devices. If recording with interleaved mode samples  the  file
18       is automatically split before the 2GB filesize.
19
20       aplay  is  much  the same, only it plays instead of recording. For sup‐
21       ported soundfile formats, the sampling rate, bit depth,  and  so  forth
22       can be automatically determined from the soundfile header.
23
24       If filename is not specified, the standard output or input is used. The
25       aplay utility accepts multiple filenames.
26
27

OPTIONS

29       -h, --help
30              Help: show syntax.
31
32       --version
33              Print current version.
34
35       -l, --list-devices
36              List all soundcards and digital audio devices
37
38       -L, --list-pcms
39              List all PCMs defined
40
41       -D, --device=NAME
42              Select PCM by name
43
44       -q --quiet
45              Quiet mode. Suppress messages (not sound :))
46
47       -t, --file-type TYPE
48              File type (voc, wav, raw or au).  If this parameter  is  omitted
49              the WAVE format is used.
50
51       -c, --channels=#
52              The number of channels.  The default is one channel.
53
54       -f --format=FORMAT
55              Sample format
56              Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE
57              S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE
58              FLOAT_BE  FLOAT64_LE  FLOAT64_BE  IEC958_SUBFRAME_LE IEC958_SUB‐
59              FRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM
60              Some of these may not be available on selected hardware
61              There are also two format shortcuts available:
62              -f cd (16 bit little endian, 44100, stereo [-f S16_LE -c2 -r44100]
63              -f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
64              If no format is given U8 is used.
65
66       -r, --rate=#<Hz>
67              Sampling rate in Hertz. The default rate is 8000 Hertz.
68
69       -d, --duration=#
70              Interrupt after # seconds.  A value of zero means infinity.  The
71              default  is  zero, so if this option is omitted then the arecord
72              process will run until it is killed.
73
74       -s, --sleep-min=#
75              Min ticks to sleep. The default is not to sleep.
76
77       -M, --mmap
78              Use memory-mapped (mmap) I/O mode for the audio stream.  If this
79              option is not set, the read/write I/O mode will be used.
80
81       -N, --nonblock
82              Open  the  audio  device  in non-blocking mode. If the device is
83              busy the program will exit immediately.  If this option  is  not
84              set  the  program will block until the audio device is available
85              again.
86
87       -F, --period-time=#
88              Distance between interrupts is #  microseconds.   If  no  period
89              time  and  no  period size is given then a quarter of the buffer
90              time is set.
91
92       -B, --buffer-time=#
93              Buffer duration is # microseconds If no buffer time and no  buf‐
94              fer  size  is given then the maximal allowed buffer time but not
95              more than 500ms is set.
96
97       --period-size=#
98              Distance between interrupts is # frames If no period size and no
99              period time is given then a quarter of the buffer size is set.
100
101       --buffer-size=#
102              Buffer duration is # frames If no buffer time and no buffer size
103              is given then the maximal allowed buffer time but not more  than
104              500ms is set.
105
106       -A, --avail-min=#
107              Min available space for wakeup is # microseconds
108
109       -R, --start-delay=#
110              Delay  for  automatic  PCM  start is # microseconds (relative to
111              buffer size if <= 0)
112
113       -T, --stop-delay=#
114              Delay for automatic PCM stop is # microseconds from xrun
115
116       -v, --verbose
117              Show PCM structure and setup.  This option is accumulative.  The
118              VU meter is displayed when this is given twice or three times.
119
120       -I, --separate-channels
121              One file for each channel
122
123
124   Example:
125       aplay -c 1 -t raw -r 22050 -f mu_law foobar
126              will  play the raw file "foobar" as a 22050-Hz, mono, 8-bit, Mu-
127              Law .au file.
128
129
130       arecord -d 10 -f cd -t wav -D copy foobar.wav
131              will record foobar.wav as a  10-second,  CD-quality  wave  file,
132              using  the  PCM  "copy"  (which  might  be defined in the user's
133              .asoundrc file as:
134              pcm.copy {
135                type plug
136                slave {
137                  pcm hw
138                }
139                route_policy copy
140              }
141
142

SEE ALSO

144        alsamixer(1), amixer(1)
145
146

BUGS

148       Note that .aiff files are not currently supported.
149
150

AUTHOR

152       arecord and aplay are by Jaroslav Kysela <perex@suse.cz> This  document
153       is by Paul Winkler <zarmzarm@erols.com>.  Updated for Alsa 0.9 by James
154       Tappin <james@xena.uklinux.net>
155
156
157
158
159                                 2 August 2001                        APLAY(1)
Impressum