AXFER-TRANSFER(1) General Commands Manual AXFER-TRANSFER(1) (NAME) axfer-transfer - (SYNOPSIS) axfer transfer direction [ common-options ] [ backend-options ] [ filepath ] axfer transfer direction [ common-options ] [ backend-options ] -I | --separate-channels filepath ... direction = capture | playback common-options = ( (OPTIONS) ) backend-options = ( (OPTIONS) ) filepaths = ( (OPTIONS) ) (DESCRIPTION) transfer axfer . API alsa-lib ( libasound) (ALSA) . (OPTIONS) (Direction) capture . playback . (Filepath) . '-' . () filepath . . . filepath -I | --separate-channels . . filepath : - /dev/null - /dev/zero - /dev/full - /dev/random - /dev/urandom (Common options) -h, --help . -q, --quiet . ( :)) -v, --verbose . . -d, --duration=# # . . . -d -s . -s, --samples=# # . . . -d -s . -f, --format=FORMAT . . : - [S8|U8|S16|U16|S32|U32][_LE|_BE] - [S24|U24][_LE|_BE] - FLOAT[_LE|_BE] - FLOAT64[_LE|_BE] - IEC958_SUBFRAME[_LE|_BE] - MU_LAW - A_LAW - [S20|U20][_LE|_BE] - [S24|U24][_3LE|_3BE] - [S20|U20][_3LE|_3BE] - [S18|U18][_3LE|_3BE] - DSD_U8 - DSD_[U16|U32][_LE|_BE] (Endianness) . : - cd (16 little endian 44100 ) [= -f S16_LE -c 2 -r 44100] - cdr (16 big endian 44100 ) [= -f S16_BE -c 2 -f 44100] - dat (16 little endian 48000 ) [= -f S16_LE -c 2 -r 48000] U8 . . . . - IMA_ADPCM - MPEG - GSM - SPECIAL - G723_24 - G723_24_1B - G723_40 - G723_40_1B -c, --channels=# . . 1 256 . 1 . -r, --rate=# ( ). . 1000 kHz . 2000 192000 . 8000 . -t, --file-type=TYPE . . : - wav: Microsoft/IBM RIFF/Wave - au, sparc: Sparc AU - voc: Creative Tech. voice - raw: filepath raw (Fallback) . -I, --separate-channels . filepath filepaths '-[.suffix]' . . --dump-hw-params . --xfer-backend=BACKEND . libasound . - libasound - libffado ( ) libasound -D, --device=NODE PCM libasound . pcm list . -N, --nonblock PCM (Non- blocking) . PCM / . --waiter-type . -M, --mmap PCM . PCM . --waiter-type . -F, --period-size=# period_size PCM . PCM . PCM PCM / PCM . / . PCM / PCM . PCM 'hw' 'irq' / . --period-time=# period_time PCM . --period-size . -B, --buffer-size=# buffer_size PCM . PCM . PCM PCM / PCM . ( ) . PCM / PCM . --buffer-time=# buffer_time PCM . --buffer-size . --waiter-type=TYPE (Waiter) . : default select poll epoll . default 'snd_pcm_wait()' . select 'select(2)' . poll 'poll(2)' . epoll 'epoll(7)' . --nonblock --mmap timer --sched-model . --test-nowait . --sched-model=MODEL . irq timer . << >> . irq . -A, --avail-min=# avail-min PCM . (Blocking) PCM / . / -EAGAIN . --mmap timer --sched-model . -R, --start-delay=# start_threshold PCM . PCM . --mmap timer --sched-model . PCM PCM snd_pcm_start() PCM . . snd_pcm_start() PCM . --mmap timer --sched-model . -T, --stop-delay=# stop_threshold PCM . PCM . --mmap timer --sched-model . PCM PCM alsa-lib PCM snd_pcm_stop() . . PCM PCM alsa-lib PCM snd_pcm_stop() . . --mmap timer --sched-model . --disable-resample 'plug' alsa-lib . --disable-channels 'plug' alsa-lib . --disable-format 'plug' alsa-lib . --disable-softvol 'softvol' alsa-lib . --fatal-errors XRUN PCM . --test-nowait (Waiter) / . / . . libffado ffado_streaming_init() libffado . -p, --port=# 1394 OHCI . 1394 OHCI 0 1 . -g . libffado IEEE 1394 1394 OHCI . -n, --node=# (Unit) . -p 1394 OHCI . -g, --guid=HEXADECIMAL . '0x' (0-9, a-f, A-F) . -p . libffado IEEE 1394 1394 OHCI . --frames-per-period=# / . . . --periods-per-buffer=# libffado . . --slave Slave () . libffado 1394 OHCI . . (Isochronous) . (Demultiplex) . --snoop Snoop () . libffado . . --sched-priority=# pthread_setschedparam() ffado_streaming_init() (Threads) . RLIMIT_RTPRIO . getrlimit(2) . (POSIX SIGNALS) SIGINT SIGTERM PCM . SIGTSTP PCM (Suspend) SIGCONT . XRUN . libffado . . (EXAMPLES) $ axfer transfer playback -d 1 something 'something' . Microsoft/IBM RIFF/Wave Sparc AU Creative Tech. voice 'something' . -r -c -f -f . $ axfer transfer playback -r 22050 -c 1 -f S16_LE -t raw something 'something' 22050 PCM little endian . SIGINT SIGTERM kill(1) . $ axfer transfer capture -d 10 -f cd something.wav 'something.wav' 44.1 PCM little endian () . filepath Microsoft/IBM RIFF/Wave . $ axfer transfer capture -s 1024 -r 48000 -c 2 -f S32_BE -I -t au channels 48.0 PCM big endian , 'channels-1.au' 'channels-2.au' () . (SCHEDULING MODEL) PCM ALSA PCM period-wakeup no-period-wakeup. . IRQ (IRQ-based scheduling model) period-wakeup . . . (Handler) ALSA PCM / (XRUN) . (IRQ) Inter-IC sound (I2S) . . (DMA) . ( hrtimer ) . PCM SDK PCM alsa-lib . PCM / . / PCM . axfer IRQ . --sched-model irq . (Timer-based scheduling model) no-period-wakeup PCM . PCM . . DMA . PCM . PCM PCM . PCM PCM . PCM ALSA PCM XRUN . axfer / no-period-wakeup . --sched-model timer . PCM PCM (Yield) . (Timeout) PCM . . / . / (Rewinding/Forwarding) PCM . (Advantages and issues) IRQ . (Interrupt context) PCM . PCM . (Race conditions) . . (Time Sharing) . . . (Granularity) . . PCM / . 4.21 ALSA PCM . APLAY (COMPATIBILITY TO APLAY) transfer axfer aplay(1) . . -I, --separate-channels . aplay(1) PCM (Non- interleaved) . PCM . -A, --avail-min=# . aplay(1) --mmap timer --sched-model . -R, --start-delay=# PCM . aplay(1) --mmap timer --sched-model . -T, --stop-delay=# PCM . aplay(1) --mmap timer --sched-model . --max-file-time=# . aplay(1) . . axfer . --use-strftime=FORMAT . aplay(1) strftime(3) . C . --process-id-file=FILEPATH . aplay(1) (PID) . aplay . aplay . -V, --vumeter=TYPE . aplay(1) (stdout) VU ( ) . PCM . -i, --interactive . aplay(1) (stdin) Enter PCM / . PCM . -m, --chmap=CH1,CH2,... PCM ALSA . (Overhead) mmap . 1.1.8 alsa-lib . . SIGTSTP, SIGCONT PCM . aplay(1) XRUN / . XRUN . . SIGUSR1 . aplay(1) . --max-file-time axfer . (DESIGN) (Modular structure) : xfer mapper container . . -------- ---------- ------------- device <-> | xfer | <-> | mapper | <-> | container | <-> file -------- ---------- ------------- libasound single wav libffado multiple au voc raw xfer . . libasound API alsa-lib . . container / / . . : Microsoft/IBM RIFF/Wave ( wav ) Sparc AU ( au ) Creative Technology voice ( voc ). ( raw ) . mapper . : single multiple . single . multiple . (Care of copying audio data frame) xfer mapper . (Interleaved) (Non-interleaved) . . . mapper container . axfer . : - xfer(mmap/interleaved), mapper(single), container(any) - xfer(mmap/non-interleaved), mapper(multiple), containers(any) (Unit test) mapper container . : $ make test . (CI) . (SEE ALSO) axfer(1), axfer-list(1), alsamixer(1), amixer(1) (AUTHOR) Takashi Sakamoto alsa-utils 28 November 2018 AXFER-TRANSFER(1)