tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

aplay.1 (8914B)


      1 .TH APLAY 1 "1 January 2010"
      2 .SH NAME
      3 arecord, aplay \- command\-line sound recorder and player for ALSA 
      4 soundcard driver
      5 .SH SYNOPSIS
      6 \fBarecord\fP [\fIflags\fP] [filename]
      7 .br
      8 \fBaplay\fP [\fIflags\fP] [filename [filename]] ...
      9 
     10 .SH DESCRIPTION
     11 \fBarecord\fP is a command\-line soundfile recorder for the ALSA soundcard
     12 driver. It supports several file formats and multiple soundcards with
     13 multiple devices. If recording with interleaved mode samples the file is
     14 automatically split before the 2GB filesize.
     15 
     16 \fBaplay\fP is much the same, only it plays instead of recording. For
     17 supported soundfile formats, the sampling rate, bit depth, and so
     18 forth can be automatically determined from the soundfile header.
     19 
     20 If filename is not specified, the standard output or input is used. The \fBaplay\fP utility accepts multiple filenames.
     21 
     22 .SH OPTIONS
     23 .TP
     24 \fI\-h, \-\-help\fP
     25 Help: show syntax.
     26 .TP
     27 \fI\-\-version\fP
     28 Print current version.
     29 .TP
     30 \fI\-l, \-\-list\-devices\fP
     31 List all soundcards and digital audio devices
     32 .TP
     33 \fI\-L, \-\-list\-pcms\fP
     34 List all PCMs defined
     35 .TP
     36 \fI\-D, \-\-device=NAME\fP
     37 Select PCM by name
     38 .TP
     39 \fI\-q \-\-quiet\fP
     40 Quiet mode. Suppress messages (not sound :))
     41 .TP
     42 \fI\-t, \-\-file\-type TYPE\fP
     43 File type (voc, wav, raw or au).
     44 If this parameter is omitted the WAVE format is used.
     45 .TP
     46 \fI\-c, \-\-channels=#\fP
     47 The number of channels.
     48 The default is one channel.
     49 Valid values are 1 through 32.
     50 .TP
     51 \fI\-f \-\-format=FORMAT\fP
     52 Sample format
     53 .br
     54 Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE
     55 S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE
     56 FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW
     57 A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE
     58 S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
     59 .br
     60 Some of these may not be available on selected hardware
     61 .br
     62 The available format shortcuts are:
     63 .nf
     64 \-f cd (16 bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100]
     65 \-f cdr (16 bit big endian, 44100, stereo) [\-f S16_BE \-c2 \-f44100]
     66 \-f dat (16 bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000]
     67 .fi
     68 If no format is given U8 is used.
     69 .TP
     70 \fI\-r, \-\-rate=#<Hz>\fP
     71 Sampling rate in Hertz. The default rate is 8000 Hertz.
     72 If the value specified is less than 300, it is taken as the rate in kilohertz.
     73 Valid values are 2000 through 192000 Hertz.
     74 .TP
     75 \fI\-d, \-\-duration=#\fP
     76 Interrupt after # seconds.
     77 A value of zero means infinity.
     78 The default is zero, so if this option is omitted then the arecord process will run until it is killed.
     79 .TP
     80 \fI\-s, \-\-sleep\-min=#\fP
     81 Min ticks to sleep. The default is not to sleep.
     82 .TP
     83 \fI\-M, \-\-mmap\fP            
     84 Use memory\-mapped (mmap) I/O mode for the audio stream.
     85 If this option is not set, the read/write I/O mode will be used.
     86 .TP
     87 \fI\-N, \-\-nonblock\fP          
     88 Open the audio device in non\-blocking mode. If the device is busy the program will exit immediately.
     89 If this option is not set the program will block until the audio device is available again.
     90 .TP
     91 \fI\-F, \-\-period\-time=#\fP     
     92 Distance between interrupts is # microseconds.
     93 If no period time and no period size is given then a quarter of the buffer time is set.
     94 .TP
     95 \fI\-B, \-\-buffer\-time=#\fP     
     96 Buffer duration is # microseconds
     97 If no buffer time and no buffer size is given then the maximal allowed buffer time but not more than 500ms is set.
     98 .TP
     99 \fI\-\-period\-size=#\fP     
    100 Distance between interrupts is # frames
    101 If no period size and no period time is given then a quarter of the buffer size is set.
    102 .TP
    103 \fI\-\-buffer\-size=#\fP     
    104 Buffer duration is # frames
    105 If no buffer time and no buffer size is given then the maximal allowed buffer time but not more than 500ms is set.
    106 .TP
    107 \fI\-A, \-\-avail\-min=#\fP       
    108 Min available space for wakeup is # microseconds
    109 .TP
    110 \fI\-R, \-\-start\-delay=#\fP     
    111 Delay for automatic PCM start is # microseconds 
    112 (relative to buffer size if <= 0)
    113 .TP
    114 \fI\-T, \-\-stop\-delay=#\fP      
    115 Delay for automatic PCM stop is # microseconds from xrun
    116 .TP
    117 \fI\-v, \-\-verbose\fP           
    118 Show PCM structure and setup.
    119 This option is accumulative.  The VU meter is displayed when this
    120 is given twice or three times.
    121 .TP
    122 \fI\-V, \-\-vumeter=TYPE\fP
    123 Specifies the VU\-meter type, either \fIstereo\fP or \fImono\fP.
    124 The stereo VU\-meter is available only for 2\-channel stereo samples
    125 with interleaved format.
    126 .TP
    127 \fI\-I, \-\-separate\-channels\fP 
    128 One file for each channel.  This option disables max\-file\-time
    129 and use\-strftime, and ignores SIGUSR1.  The stereo VU meter is
    130 not available with separate channels.
    131 .TP
    132 \fI\-P\fP
    133 Playback.  This is the default if the program is invoked
    134 by typing aplay.
    135 .TP
    136 \fI\-C\fP
    137 Record.  This is the default if the program is invoked
    138 by typing arecord.
    139 .TP
    140 \fI\-i, \-\-interactive\fP
    141 Allow interactive operation via stdin.
    142 Currently only pause/resume via space or enter key is implemented.
    143 .TP
    144 \fI-m, \-\-chmap=ch1,ch2,...\fP
    145 Give the channel map to override or follow.  Pass channel position
    146 strings like \fIFL\fP, \fIFR\fP, etc.
    147 
    148 If a device supports the override of the channel map, \fBaplay\fP
    149 tries to pass the given channel map.
    150 If it doesn't support the channel map override but still it provides
    151 the channel map information, \fBaplay\fP tries to rearrange the
    152 channel order in the buffer to match with the returned channel map
    153 from the device.
    154 .TP
    155 \fI\-\-disable\-resample\fP
    156 Disable automatic rate resample.
    157 .TP
    158 \fI\-\-disable\-channels\fP
    159 Disable automatic channel conversions.
    160 .TP
    161 \fI\-\-disable\-format\fP
    162 Disable automatic format conversions.
    163 .TP
    164 \fI\-\-disable\-softvol\fP
    165 Disable software volume control (softvol).
    166 .TP
    167 \fI\-\-test\-position\fP
    168 Test ring buffer position.
    169 .TP
    170 \fI\-\-test\-coef=<coef>\fP
    171 Test coefficient for ring buffer position; default is 8.
    172 Expression for validation is: coef * (buffer_size / 2).
    173 Minimum value is 1.
    174 .TP
    175 \fI\-\-test\-nowait\fP
    176 Do not wait for the ring buffer \(hy eats the whole CPU.
    177 .TP
    178 \fI\-\-max\-file\-time\fP
    179 While recording, when the output file has been accumulating
    180 sound for this long,
    181 close it and open a new output file.  Default is the maximum
    182 size supported by the file format: 2 GiB for WAV files.
    183 This option has no effect if  \-\-separate\-channels is
    184 specified.
    185 .TP
    186 \fI\-\-process\-id\-file <file name>\fP
    187 aplay writes its process ID here, so other programs can
    188 send signals to it.
    189 .TP
    190 \fI\-\-use\-strftime\fP
    191 When recording, interpret %\-codes in the file name parameter using
    192 the strftime facility whenever the output file is opened.  The
    193 important strftime codes are: %Y is the year, %m month, %d day of
    194 the month, %H hour, %M minute and %S second.  In addition, %v is
    195 the file number, starting at 1.  When this option is specified,
    196 intermediate directories for the output file are created automatically.
    197 This option has no effect if \-\-separate\-channels is specified.
    198 .TP
    199 \fI\-\-dump\-hw\-params\fP
    200 Dump hw_params of the device preconfigured status to stderr. The dump
    201 lists capabilities of the selected device such as supported formats,
    202 sampling rates, numbers of channels, period and buffer bytes/sizes/times.
    203 For raw device hw:X this option basically lists hardware capabilities of
    204 the soundcard.
    205 .TP
    206 \fI\-\-fatal\-errors\fP
    207 Disables recovery attempts when errors (e.g. xrun) are encountered; the
    208 aplay process instead aborts immediately.
    209 
    210 .SH SIGNALS
    211 When recording, SIGINT, SIGTERM and SIGABRT will close the output 
    212 file and exit.  SIGUSR1 will close the output file, open a new one,
    213 and continue recording.  However, SIGUSR1 does not work with
    214 \-\-separate\-channels.
    215 
    216 .SH EXAMPLES
    217 
    218 .TP
    219 \fBaplay \-c 1 \-t raw \-r 22050 \-f mu_law foobar\fR
    220 will play the raw file "foobar" as a
    221 22050\-Hz, mono, 8\-bit, Mu\-Law .au file. 
    222 
    223 .TP
    224 \fBarecord \-d 10 \-f cd \-t wav \-D copy foobar.wav\fP
    225 will record foobar.wav as a 10\-second, CD\-quality wave file, using the
    226 PCM "copy" (which might be defined in the user's .asoundrc file as:
    227 .nf
    228 pcm.copy {
    229   type plug
    230   slave {
    231     pcm hw
    232   }
    233   route_policy copy
    234 }
    235 .fi
    236 
    237 .TP
    238 \fBarecord \-t wav \-\-max\-file\-time 30 mon.wav\fP
    239 Record from the default audio source in monaural, 8,000 samples
    240 per second, 8 bits per sample.  Start a new file every
    241 30 seconds.  File names are mon\-nn.wav, where nn increases
    242 from 01.  The file after mon\-99.wav is mon\-100.wav.
    243 
    244 .TP
    245 \fBarecord \-f cd \-t wav \-\-max\-file\-time 3600 \-\-use-strftime %Y/%m/%d/listen-%H-%M-%v.wav\fP
    246 Record in stereo from the default audio source.  Create a new file
    247 every hour.  The files are placed in directories based on their start dates
    248 and have names which include their start times and file numbers.
    249 
    250 .SH SEE ALSO
    251 \fB
    252 alsamixer(1),
    253 amixer(1)
    254 \fP
    255 
    256 .SH BUGS 
    257 Note that .aiff files are not currently supported.
    258 
    259 .SH AUTHOR
    260 \fBarecord\fP and \fBaplay\fP are by Jaroslav Kysela <perex@perex.cz>
    261 This document is by Paul Winkler <zarmzarm@erols.com>.
    262 Updated for Alsa 0.9 by James Tappin <james@xena.uklinux.net>
    263