Blame axfer/axfer-transfer.1

Packit Service a9274b
.TH AXFER\-TRANSFER 1 "28 November 2018" "alsa\-utils"
Packit Service a9274b
Packit Service a9274b
.SH NAME
Packit Service a9274b
axfer\-transfer \- transferrer of audio data frame for sound devices and nodes.
Packit Service a9274b
Packit Service a9274b
.SH SYNOPSIS
Packit Service a9274b
Packit Service a9274b
.B axfer transfer
Packit Service a9274b
.I direction
Packit Service a9274b
[
Packit Service a9274b
.I common\-options
Packit Service a9274b
] [
Packit Service a9274b
.I backend\-options
Packit Service a9274b
] [
Packit Service a9274b
.I filepath
Packit Service a9274b
]
Packit Service a9274b
Packit Service a9274b
.B axfer transfer
Packit Service a9274b
.I direction
Packit Service a9274b
[
Packit Service a9274b
.I common\-options
Packit Service a9274b
] [
Packit Service a9274b
.I backend\-options
Packit Service a9274b
]
Packit Service a9274b
.I \-I
Packit Service a9274b
|
Packit Service a9274b
.I \-\-separate\-channels filepath ...
Packit Service a9274b
Packit Service a9274b
direction =
Packit Service a9274b
.B capture
Packit Service a9274b
|
Packit Service a9274b
.B playback
Packit Service a9274b
Packit Service a9274b
common\-options = ( read
Packit Service a9274b
.I OPTIONS
Packit Service a9274b
section )
Packit Service a9274b
Packit Service a9274b
backend\-options = ( read
Packit Service a9274b
.I OPTIONS
Packit Service a9274b
section )
Packit Service a9274b
Packit Service a9274b
filepaths = ( read
Packit Service a9274b
.I OPTIONS
Packit Service a9274b
section )
Packit Service a9274b
Packit Service a9274b
.SH DESCRIPTION
Packit Service a9274b
The
Packit Service a9274b
.B transfer
Packit Service a9274b
subcommand of
Packit Service a9274b
.B axfer
Packit Service a9274b
performs transmission of audio data frames for devices available in supported
Packit Service a9274b
backends. This program is essentially designed to use alsa\-lib APIs
Packit Service a9274b
(libasound backend) to handle sound devices supported by Linux sound subsystem
Packit Service a9274b
(ALSA).
Packit Service a9274b
Packit Service a9274b
.SH OPTIONS
Packit Service a9274b
Packit Service a9274b
.SS Direction
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B capture
Packit Service a9274b
Operates for capture transmission.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B playback
Packit Service a9274b
Operates for playback transmission.
Packit Service a9274b
Packit Service a9274b
.SS Filepath
Packit Service a9274b
Packit Service a9274b
Filepath is handled as a path relative to current working directory of run time
Packit Service a9274b
if it\(aqs not full path from root directory.
Packit Service a9274b
Packit Service a9274b
The standard input or output is used if filepath is not specified or given as
Packit Service a9274b
.I \(aq\-\(aq
Packit Service a9274b
\&.
Packit Service a9274b
Packit Service a9274b
For playback transmission, container format of given
Packit Service a9274b
.I filepath
Packit Service a9274b
is detected automatically and metadata is used for parameters of sample format,
Packit Service a9274b
channels, rate, duration. If nothing detected, content of given file path is
Packit Service a9274b
handled as raw data. In this case, the parameters should be indicated as
Packit Service a9274b
options.
Packit Service a9274b
Packit Service a9274b
Multiple
Packit Service a9274b
.I filepaths
Packit Service a9274b
are allowed with
Packit Service a9274b
.I \-I
Packit Service a9274b
|
Packit Service a9274b
.I \-\-separate\-channels
Packit Service a9274b
option. In this case, standard input and output is not available. The same
Packit Service a9274b
.I filepath
Packit Service a9274b
is not allowed except for paths listed below:
Packit Service a9274b
 \- /dev/null
Packit Service a9274b
 \- /dev/zero
Packit Service a9274b
 \- /dev/full
Packit Service a9274b
 \- /dev/random
Packit Service a9274b
 \- /dev/urandom
Packit Service a9274b
Packit Service a9274b
.SS Common options
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-h, \-\-help
Packit Service a9274b
Print help messages and finish run time.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-q, \-\-quiet
Packit Service a9274b
Quiet mode. Suppress messages (not sound :))
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-v, \-\-verbose
Packit Service a9274b
Verbose mode. Runtime dumps supplemental information according to the number of
Packit Service a9274b
this option given in command line.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-d, \-\-duration=#
Packit Service a9274b
Interrupt after # seconds. A value of zero means infinity. The default is zero,
Packit Service a9274b
so if this option is omitted then the transmission process will run until it is
Packit Service a9274b
killed. Either
Packit Service a9274b
.I \-d
Packit Service a9274b
or
Packit Service a9274b
.I \-s
Packit Service a9274b
option is available exclusively.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-s, \-\-samples=#
Packit Service a9274b
Interrupt after transmission of # number of data frames. A value of zero means
Packit Service a9274b
infinity. The default is zero, so if this options is omitted then the
Packit Service a9274b
transmission process will run until it is killed. Either
Packit Service a9274b
.I \-d
Packit Service a9274b
or
Packit Service a9274b
.I \-s
Packit Service a9274b
option is available exclusively.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-f, \-\-format=FORMAT
Packit Service a9274b
Indicate format of audio sample. This is required for capture transmission, or
Packit Service a9274b
playback transmission with files including raw audio data.
Packit Service a9274b
Packit Service a9274b
Available sample format is listed below:
Packit Service a9274b
 - [S8|U8|S16|U16|S32|U32][_LE|_BE]
Packit Service a9274b
 - [S24|U24][_LE|_BE]
Packit Service a9274b
 - FLOAT[_LE|_BE]
Packit Service a9274b
 - FLOAT64[_LE|_BE]
Packit Service a9274b
 - IEC958_SUBFRAME[_LE|_BE]
Packit Service a9274b
 - MU_LAW
Packit Service a9274b
 - A_LAW
Packit Service a9274b
 - [S20|U20][_LE|_BE]
Packit Service a9274b
 - [S24|U24][_3LE|_3BE]
Packit Service a9274b
 - [S20|U20][_3LE|_3BE]
Packit Service a9274b
 - [S18|U18][_3LE|_3BE]
Packit Service a9274b
 - DSD_U8
Packit Service a9274b
 - DSD_[U16|U32][_LE|_BE]
Packit Service a9274b
Packit Service a9274b
If endian\-ness is omitted, host endian\-ness is used.
Packit Service a9274b
Packit Service a9274b
Some special formats are available:
Packit Service a9274b
 - cd (16 bit little endian, 44100, stereo) [= \-f S16_LE \-c 2 \-r 44100]
Packit Service a9274b
 - cdr (16 bit big endian, 44100, stereo) [= \-f S16_BE \-c 2 \-f 44100]
Packit Service a9274b
 - dat (16 bit little endian, 48000, stereo) [= \-f S16_LE \-c 2 \-r 48000]
Packit Service a9274b
Packit Service a9274b
If omitted,
Packit Service a9274b
.I U8
Packit Service a9274b
is used as a default. Actual available formats are restricted by each
Packit Service a9274b
transmission backend.
Packit Service a9274b
Packit Service a9274b
Unavailable sample format is listed below. These format has size of data frame
Packit Service a9274b
unaligned to byte unit.
Packit Service a9274b
Packit Service a9274b
 - IMA_ADPCM
Packit Service a9274b
 - MPEG
Packit Service a9274b
 - GSM
Packit Service a9274b
 - SPECIAL
Packit Service a9274b
 - G723_24
Packit Service a9274b
 - G723_24_1B
Packit Service a9274b
 - G723_40
Packit Service a9274b
 - G723_40_1B
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-c, \-\-channels=#
Packit Service a9274b
Indicate the number of audio data samples per frame. This is required for
Packit Service a9274b
capture transmission, or playback transmission with files including raw audio
Packit Service a9274b
data. The value should be between
Packit Service a9274b
.I 1 to
Packit Service a9274b
.I 256
Packit Service a9274b
\&. If omitted,
Packit Service a9274b
.I 1
Packit Service a9274b
is used as a default.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-r, \-\-rate=#
Packit Service a9274b
Indicate the number of audio data frame per second. This is required for
Packit Service a9274b
capture transmission, or playback transmission with files including raw audio
Packit Service a9274b
data. If the value is less than
Packit Service a9274b
.I 1000
Packit Service a9274b
, it\(aqs interpreted by
Packit Service a9274b
.I kHz
Packit Service a9274b
unit. The value should be between
Packit Service a9274b
.I 2000
Packit Service a9274b
and
Packit Service a9274b
.I 192000
Packit Service a9274b
\&. If omitted,
Packit Service a9274b
.I 8000
Packit Service a9274b
is used as a default.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-t, \-\-file\-type=TYPE
Packit Service a9274b
Indicate the type of file. This is required for capture transmission. Available
Packit Service a9274b
types are listed below:
Packit Service a9274b
 - wav: Microsoft/IBM RIFF/Wave format
Packit Service a9274b
 - au, sparc: Sparc AU format
Packit Service a9274b
 - voc: Creative Tech. voice format
Packit Service a9274b
 - raw: raw data
Packit Service a9274b
Packit Service a9274b
When nothing is indicated, for capture transmission, the type is decided
Packit Service a9274b
according to suffix of
Packit Service a9274b
.I filepath
Packit Service a9274b
, and
Packit Service a9274b
.I raw
Packit Service a9274b
type is used for fallback.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-I, \-\-separate\-channels
Packit Service a9274b
Indicate this option when several files are going to be handled. For capture
Packit Service a9274b
transmission, if one filepath is given as
Packit Service a9274b
.I filepath
Packit Service a9274b
, a list of
Packit Service a9274b
.I filepaths
Packit Service a9274b
is generated in a formula \(aq<filepath>\-<sequential number>[.suffix]\(aq.
Packit Service a9274b
The suffix is omitted when raw format of container is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-dump\-hw\-params
Packit Service a9274b
Dump hardware parameters and finish run time if backend supports it.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-xfer\-backend=BACKEND
Packit Service a9274b
Select backend of transmission from a list below. The default is libasound.
Packit Service a9274b
.br
Packit Service a9274b
 - libasound
Packit Service a9274b
 - libffado (optional if compiled)
Packit Service a9274b
Packit Service a9274b
.SS Backend options for libasound
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-D, \-\-device=NODE
Packit Service a9274b
Packit Service a9274b
This option is used to select PCM node in libasound configuration space.
Packit Service a9274b
Available nodes are listed by
Packit Service a9274b
.I pcm
Packit Service a9274b
operation of
Packit Service a9274b
.I list
Packit Service a9274b
subcommand.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-N, \-\-nonblock
Packit Service a9274b
Packit Service a9274b
With this option, PCM substream is opened in non\-blocking mode. When audio
Packit Service a9274b
data frame is not available in buffer of the PCM substream, I/O operation
Packit Service a9274b
immediately returns without blocking process. This option implicitly uses
Packit Service a9274b
.I \-\-waiter\-type
Packit Service a9274b
option as well to prevent heavy consumption of CPU time.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-M, \-\-mmap
Packit Service a9274b
Packit Service a9274b
With this option, audio data frame is processed directly in buffer of PCM
Packit Service a9274b
substream if selected node supports this operation. Without the option,
Packit Service a9274b
temporary buffers are used to copy audio data frame for buffer of PCM substream.
Packit Service a9274b
This option implicitly uses
Packit Service a9274b
.I \-\-waiter\-type
Packit Service a9274b
option as well to prevent heavy consumption of CPU time.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-F, \-\-period\-size=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I period_size
Packit Service a9274b
hardware parameter of PCM substream. The parameter indicates the number of audio
Packit Service a9274b
data frame per period in buffer of the PCM substream. Actual number is decided
Packit Service a9274b
as a result of interaction between each implementation of PCM plugin chained
Packit Service a9274b
from the selected PCM node, and in\-kernel driver or PCM I/O plugins.
Packit Service a9274b
Packit Service a9274b
Ideally, the same amount of audio data frame as the value should be handled in
Packit Service a9274b
one I/O operation. Actually, it is not, depending on implementation of the PCM
Packit Service a9274b
plugins, in\-kernel driver, PCM I/O plugins and scheduling model. For \(aqhw\(aq
Packit Service a9274b
PCM plugin in \(aqirq\(aq scheduling model, the value is used to decide
Packit Service a9274b
intervals of hardware interrupt, thus the same amount of audio data frame as
Packit Service a9274b
the value is expected to be available for one I/O operation.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-period\-time=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I period_time
Packit Service a9274b
hardware parameter of PCM substream. This option is similar to
Packit Service a9274b
.I \-\-period\-size
Packit Service a9274b
option, however its unit is micro\-second.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-B, \-\-buffer\-size=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I buffer_size
Packit Service a9274b
hardware parameter of PCM substream. The parameter indicates the number of audio
Packit Service a9274b
data frame in buffer of PCM substream. Actual number is decided as a result of
Packit Service a9274b
interaction between each implementation of PCM plugin chained from the selected
Packit Service a9274b
PCM node, and in\-kernel driver or PCM I/O plugins.
Packit Service a9274b
Packit Service a9274b
Ideally, this is multiples of the number of audio data frame per period, thus
Packit Service a9274b
the size of period. Actually, it is not, depending on implementation of the PCM
Packit Service a9274b
plugins, in\-kernel driver and PCM I/O plugins.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-buffer\-time=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I buffer_time
Packit Service a9274b
hardware parameter of PCM substream. This option is similar to
Packit Service a9274b
.I \-\-buffer\-size
Packit Service a9274b
option, however its unit is micro\-second.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-waiter\-type=TYPE
Packit Service a9274b
Packit Service a9274b
This option indicates the type of waiter for event notification. At present,
Packit Service a9274b
four types are available;
Packit Service a9274b
.I default
Packit Service a9274b
,
Packit Service a9274b
.I select
Packit Service a9274b
,
Packit Service a9274b
.I poll
Packit Service a9274b
and
Packit Service a9274b
.I epoll
Packit Service a9274b
\&. With
Packit Service a9274b
.I default
Packit Service a9274b
type, \(aqsnd_pcm_wait()\(aq is used. With
Packit Service a9274b
.I select
Packit Service a9274b
type, \(aqselect(2)\(aq system call is used. With
Packit Service a9274b
.I poll
Packit Service a9274b
type, \(aqpoll(2)\(aq system call is used. With
Packit Service a9274b
.I epoll
Packit Service a9274b
type, Linux\-specific \(aqepoll(7)\(aq system call is used.
Packit Service a9274b
Packit Service a9274b
This option should correspond to one of
Packit Service a9274b
.I \-\-nonblock
Packit Service a9274b
or
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
options, or
Packit Service a9274b
.I timer
Packit Service a9274b
value of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option.
Packit Service a9274b
Neither this option nor
Packit Service a9274b
.I \-\-test\-nowait
Packit Service a9274b
is available at the same time.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-sched\-model=MODEL
Packit Service a9274b
Packit Service a9274b
This option selects scheduling model for process of this program. One of
Packit Service a9274b
.I irq
Packit Service a9274b
or
Packit Service a9274b
.I timer
Packit Service a9274b
is available. In detail, please read \(aqSCHEDULING MODEL\(aq section.
Packit Service a9274b
Packit Service a9274b
When nothing specified,
Packit Service a9274b
.I irq
Packit Service a9274b
model is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-A, \-\-avail\-min=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I avail\-min
Packit Service a9274b
software parameter of PCM substream. In blocking mode, the value is used as
Packit Service a9274b
threshold of the number of available audio data frames in buffer of PCM
Packit Service a9274b
substream to wake up process blocked by I/O operation. In non\-blocking mode,
Packit Service a9274b
any I/O operation returns \-EAGAIN until the available number of audio data frame reaches the threshold.
Packit Service a9274b
Packit Service a9274b
This option has an effect in cases neither
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
nor
Packit Service a9274b
.I timer
Packit Service a9274b
value of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-R, \-\-start\-delay=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I start_threshold
Packit Service a9274b
software parameter of PCM substream. The value is used as threshold to start
Packit Service a9274b
PCM substream automatically. At present, this option has an effect in cases
Packit Service a9274b
neither
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
nor
Packit Service a9274b
.I timer
Packit Service a9274b
value of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option is used.
Packit Service a9274b
Packit Service a9274b
For playback transmission, when the number of accumulated audio data frame
Packit Service a9274b
in buffer of PCM substream to which this program writes out reaches the
Packit Service a9274b
threshold, the PCM substream starts automatically without an explicit call of
Packit Service a9274b
.I snd_pcm_start()
Packit Service a9274b
to the PCM substream.
Packit Service a9274b
Packit Service a9274b
For capture transmission, this option is useless. The number of
Packit Service a9274b
accumulated audio data frame is not increased without an explicit call of
Packit Service a9274b
.I snd_pcm_start()
Packit Service a9274b
to the PCM substream.
Packit Service a9274b
Packit Service a9274b
This option has an effect in cases neither
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
nor
Packit Service a9274b
.I timer
Packit Service a9274b
value of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-T, \-\-stop\-delay=#
Packit Service a9274b
Packit Service a9274b
This option configures given value to
Packit Service a9274b
.I stop_threshold
Packit Service a9274b
software parameter of PCM substream. The value is used as threshold to stop PCM
Packit Service a9274b
substream automatically. At present, this option has an effect in cases neither
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
nor
Packit Service a9274b
.I timer
Packit Service a9274b
value of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option is used.
Packit Service a9274b
Packit Service a9274b
For capture transmission, when the number of accumulated audio data frame
Packit Service a9274b
in buffer of PCM substream to which a driver or alsa\-lib PCM plugins write
Packit Service a9274b
reaches the threshold, the PCM substream stops automatically without an explicit
Packit Service a9274b
call of
Packit Service a9274b
.I snd_pcm_stop()
Packit Service a9274b
to the PCM substream. This is a case that this program leaves the audio data
Packit Service a9274b
frames without reading for a while.
Packit Service a9274b
Packit Service a9274b
For playback transmission, when the number available audio data frame in buffer
Packit Service a9274b
of PCM substream from which a driver or alsa\-lib PCM plugins read reaches the
Packit Service a9274b
threshold, the PCM substream stops automatically without an explicit call of
Packit Service a9274b
.I snd_pcm_stop()
Packit Service a9274b
to the PCM substream. This is a case that this program leaves the audio data
Packit Service a9274b
frames without writing for a while.
Packit Service a9274b
Packit Service a9274b
This option has an effect in cases neither
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
nor
Packit Service a9274b
.I timer
Packit Service a9274b
value of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-disable\-resample
Packit Service a9274b
Packit Service a9274b
This option has an effect for \(aqplug\(aq plugin in alsa\-lib to suppress
Packit Service a9274b
conversion of sampling rate for audio data frame.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-disable\-channels
Packit Service a9274b
Packit Service a9274b
This option has an effect for \(aqplug\(aq plugin in alsa\-lib to suppress
Packit Service a9274b
conversion of channels for audio data frame.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-disable\-format
Packit Service a9274b
Packit Service a9274b
This option has an effect for \(aqplug\(aq plugin in alsa\-lib to suppress
Packit Service a9274b
conversion of sample format for audio data frame.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-disable\-softvol
Packit Service a9274b
Packit Service a9274b
This option has an effect for \(aqsoftvol\(aq plugin in alsa\-lib to suppress
Packit Service a9274b
conversion of samples for audio data frame via additional control element.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-fatal\-errors
Packit Service a9274b
Packit Service a9274b
This option suppresses recovery operation from XRUN state of running PCM
Packit Service a9274b
substream, then process of this program is going to finish as usual.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-test\-nowait
Packit Service a9274b
Packit Service a9274b
This option disables any waiter for I/O event notification. I/O operations are
Packit Service a9274b
iterated till any of audio data frame is available. The option brings heavy
Packit Service a9274b
load in consumption of CPU time.
Packit Service a9274b
Packit Service a9274b
.SS Backend options for libffado
Packit Service a9274b
Packit Service a9274b
This backend is automatically available when configure script detects
Packit Service a9274b
.I ffado_streaming_init()
Packit Service a9274b
symbol in libffado shared object.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-p, \-\-port=#
Packit Service a9274b
Packit Service a9274b
This option uses given value to decide which 1394 OHCI controller is used to
Packit Service a9274b
communicate. When Linux system has two 1394 OHCI controllers,
Packit Service a9274b
.I 0
Packit Service a9274b
or
Packit Service a9274b
.I 1
Packit Service a9274b
are available. Neither this option nor
Packit Service a9274b
.I \-g
Packit Service a9274b
is available at the same time. If nothing specified, libffado performs to
Packit Service a9274b
communicate to units on IEEE 1394 bus managed by all of 1394 OHCI controller available in Linux system.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-n, \-\-node=#
Packit Service a9274b
Packit Service a9274b
This option uses given value to decide which unit is used to communicate. This
Packit Service a9274b
option requires
Packit Service a9274b
.I \-p
Packit Service a9274b
option to indicate which 1394 OHCI controller is used to communicate to the
Packit Service a9274b
specified unit.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-g, \-\-guid=HEXADECIMAL
Packit Service a9274b
Packit Service a9274b
This option uses given value to decide a target unit to communicate. The value
Packit Service a9274b
should be prefixed with '0x' and consists of hexadecimal literal letters
Packit Service a9274b
(0\-9, a\-f, A\-F). Neither this option nor
Packit Service a9274b
.I \-p
Packit Service a9274b
is available at the same time. If nothing specified, libffado performs to
Packit Service a9274b
communicate to units on IEEE 1394 bus managed by all of 1394 OHCI controller
Packit Service a9274b
available in Linux system.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-frames\-per\-period=#
Packit Service a9274b
Packit Service a9274b
This option uses given value to decide the number of audio data frame in one
Packit Service a9274b
read/write operation. The operation is blocked till the number of available
Packit Service a9274b
audio data frame exceeds the given value. As a default, 512 audio data frames
Packit Service a9274b
is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-periods\-per\-buffer=#
Packit Service a9274b
Packit Service a9274b
This option uses given value to decide the size of intermediate buffer between
Packit Service a9274b
this program and libffado. As a default, 2 periods per buffer is used.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-slave
Packit Service a9274b
Packit Service a9274b
This option allows this program to run slave mode. In this mode, libffado
Packit Service a9274b
adds unit directory into configuration ROM of 1394 OHCI controller where Linux
Packit Service a9274b
system runs. The unit directory can be found by the other node on the same bus.
Packit Service a9274b
Linux system running on the node can transfer isochronous packet with audio
Packit Service a9274b
data frame to the unit. This program can receive the packet and demultiplex the
Packit Service a9274b
audio data frame.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-snoop
Packit Service a9274b
Packit Service a9274b
This option allows this program to run snoop mode. In this mode, libffado
Packit Service a9274b
listens isochronous channels to which device transfers isochronous packet. When
Packit Service a9274b
isochronous communication starts by any unit on the same bus, the packets can
Packit Service a9274b
be handled by this program.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.B \-\-sched\-priority=#
Packit Service a9274b
Packit Service a9274b
This option executes
Packit Service a9274b
.I pthread_setschedparam()
Packit Service a9274b
in a call of
Packit Service a9274b
.I ffado_streaming_init()
Packit Service a9274b
to configure
Packit Service a9274b
scheduling policy and given value as its priority for threads related to
Packit Service a9274b
isochronous communication.
Packit Service a9274b
The given value should be within
Packit Service a9274b
.I RLIMIT_RTPRIO
Packit Service a9274b
parameter of process. Please read
Packit Service a9274b
.I getrlimit(2)
Packit Service a9274b
for details.
Packit Service a9274b
Packit Service a9274b
.SH POSIX SIGNALS
Packit Service a9274b
During transmission,
Packit Service a9274b
.I SIGINT
Packit Service a9274b
and
Packit Service a9274b
.I SIGTERM
Packit Service a9274b
will close handled files and PCM substream to be going to finish run time.
Packit Service a9274b
Packit Service a9274b
.I SIGTSTP
Packit Service a9274b
will suspend PCM substream and
Packit Service a9274b
.I SIGCONT
Packit Service a9274b
will resume it. No XRUNs are expected. With libffado backend, the suspend/resume
Packit Service a9274b
is not supported and runtime is aboeted immediately.
Packit Service a9274b
Packit Service a9274b
The other signals perform default behaviours.
Packit Service a9274b
Packit Service a9274b
.SH EXAMPLES
Packit Service a9274b
Packit Service a9274b
.PP
Packit Service a9274b
.in +4n
Packit Service a9274b
.EX
Packit Service a9274b
.B $ axfer transfer playback \-d 1 something
Packit Service a9274b
.EE
Packit Service a9274b
.in
Packit Service a9274b
.PP
Packit Service a9274b
Packit Service a9274b
The above will transfer audio data frame in \(aqsomething\(aq file for playback
Packit Service a9274b
during 1 second.  The sample format is detected automatically as a result to
Packit Service a9274b
parse \(aqsomething\(aq as long as it\(aqs compliant to one of Microsoft/IBM
Packit Service a9274b
RIFF/Wave, Sparc AU, Creative Tech. voice formats. If nothing detected,
Packit Service a9274b
.I \-r
Packit Service a9274b
,
Packit Service a9274b
.I \-c
Packit Service a9274b
and
Packit Service a9274b
.I \-f
Packit Service a9274b
should be given,
Packit Service a9274b
or
Packit Service a9274b
.I \-f
Packit Service a9274b
should be given with special format.
Packit Service a9274b
Packit Service a9274b
.PP
Packit Service a9274b
.in +4n
Packit Service a9274b
.EX
Packit Service a9274b
.B $ axfer transfer playback \-r 22050 \-c 1 \-f S16_LE \-t raw something
Packit Service a9274b
.EE
Packit Service a9274b
.in
Packit Service a9274b
.PP
Packit Service a9274b
Packit Service a9274b
The above will transfer audio data frame in \(aqsomething\(aq file including no
Packit Service a9274b
information of sample format, as sample format of 22050 Hz, monaural, signed 16
Packit Service a9274b
bit little endian PCM for playback. The transmission continues till catching
Packit Service a9274b
.I SIGINT
Packit Service a9274b
from keyboard or
Packit Service a9274b
.I SIGTERM
Packit Service a9274b
by
Packit Service a9274b
.I kill(1)
Packit Service a9274b
\&.
Packit Service a9274b
Packit Service a9274b
.PP
Packit Service a9274b
.in +4n
Packit Service a9274b
.EX
Packit Service a9274b
.B $ axfer transfer capture \-d 10 \-f cd something.wav
Packit Service a9274b
.EE
Packit Service a9274b
.in
Packit Service a9274b
.PP
Packit Service a9274b
Packit Service a9274b
The above will transfer audio data frame to \(aqsomething.wav\(aq file as
Packit Service a9274b
sample format of 44.1 kHz, 2 channels, signed 16 bit little endian PCM, during
Packit Service a9274b
10 seconds. The file format is Microsoft/IBM RIFF/Wave according to suffix of
Packit Service a9274b
the given
Packit Service a9274b
.I filepath
Packit Service a9274b
\&.
Packit Service a9274b
Packit Service a9274b
.PP
Packit Service a9274b
.in +4n
Packit Service a9274b
.EX
Packit Service a9274b
.B $ axfer transfer capture \-s 1024 \-r 48000 \-c 2 \-f S32_BE \-I \-t au channels
Packit Service a9274b
.EE
Packit Service a9274b
.in
Packit Service a9274b
.PP
Packit Service a9274b
Packit Service a9274b
The above will transfer audio data frame as sample format of 48.0 kHz, 2
Packit Service a9274b
channels, signed 32 bit big endian PCM for 1,024 number of data frames to files
Packit Service a9274b
named \(aqchannels\-1.au\(aq and \(aqchannels\-2.au\(aq.
Packit Service a9274b
Packit Service a9274b
.SH SCHEDULING MODEL
Packit Service a9274b
Packit Service a9274b
In a design of ALSA PCM core, runtime of PCM substream supports two modes;
Packit Service a9274b
.I period\-wakeup
Packit Service a9274b
and
Packit Service a9274b
.I no\-period\-wakeup.
Packit Service a9274b
These two modes are for different scheduling models.
Packit Service a9274b
Packit Service a9274b
.SS IRQ\-based scheduling model
Packit Service a9274b
Packit Service a9274b
As a default,
Packit Service a9274b
.I period\-wakeup
Packit Service a9274b
mode is used. In this mode, in\-kernel drivers should operate hardware to
Packit Service a9274b
generate periodical notification for transmission of audio data frame. The
Packit Service a9274b
interval of notification is equivalent to the same amount of audio data frame
Packit Service a9274b
as one period of buffer, against actual time.
Packit Service a9274b
Packit Service a9274b
In a handler assigned to the notification, a helper function of ALSA PCM core
Packit Service a9274b
is called to update a position to head of hardware transmission, then compare
Packit Service a9274b
it with a position to head of application operation to judge overrun/underrun
Packit Service a9274b
(XRUN) and to wake up blocked processes.
Packit Service a9274b
Packit Service a9274b
For this purpose, hardware IRQ of controller for serial audio bus such as
Packit Service a9274b
Inter\-IC sound is typically used. In this case, the controller generates the
Packit Service a9274b
IRQ according to transmission on the serial audio bus. In the handler assigned
Packit Service a9274b
to the IRQ, direct media access (DMA) transmission is requested between
Packit Service a9274b
dedicated host memory and device memory.
Packit Service a9274b
Packit Service a9274b
If target hardware doesn't support this kind of mechanism, the periodical
Packit Service a9274b
notification should be emulated by any timer; e.g. hrtimer, kernel timer.
Packit Service a9274b
External PCM plugins generated by PCM plugin SDK in alsa\-lib should also
Packit Service a9274b
emulate the above behaviour.
Packit Service a9274b
Packit Service a9274b
In this mode, PCM applications are programmed according to typical way of I/O
Packit Service a9274b
operations. They execute blocking system calls to read/write audio data frame
Packit Service a9274b
in buffer of PCM substream, or blocking system calls to wait until any audio
Packit Service a9274b
data frame is available. In
Packit Service a9274b
.I axfer
Packit Service a9274b
, this is called
Packit Service a9274b
.I IRQ\-based
Packit Service a9274b
scheduling model and a default behaviour. Users can explicitly configure this
Packit Service a9274b
mode by usage of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option with
Packit Service a9274b
.I irq
Packit Service a9274b
value.
Packit Service a9274b
Packit Service a9274b
.SS Timer\-based scheduling model
Packit Service a9274b
Packit Service a9274b
The
Packit Service a9274b
.I no\-period\-wakeup
Packit Service a9274b
mode is an optional mode of runtime of PCM substream. The mode assumes a
Packit Service a9274b
specific feature of hardware and assist of in\-kernel driver and PCM
Packit Service a9274b
applications. In this mode, in\-kernel drivers don't operate hardware to
Packit Service a9274b
generate periodical notification for transmission of audio data frame.
Packit Service a9274b
The hardware should automatically continue transmission of audio data frame
Packit Service a9274b
without periodical operation of the drivers; e.g. according to auto\-triggered
Packit Service a9274b
DMA transmission, a chain of registered descriptors.
Packit Service a9274b
Packit Service a9274b
In this mode, nothing wakes up blocked processes, therefore PCM applications
Packit Service a9274b
should be programmed without any blocking operation. For this reason, this mode
Packit Service a9274b
is enabled when the PCM applications explicitly configure hardware parameter to
Packit Service a9274b
runtime of PCM substream, to prevent disorder of existing applications.
Packit Service a9274b
Additionally, nothing maintains timing for transmission of audio data frame,
Packit Service a9274b
therefore the PCM applications should voluntarily handle any timer to queue
Packit Service a9274b
audio data frame in buffer of the PCM substream for lapse of time. Furthermore,
Packit Service a9274b
instead of driver, the PCM application should call a helper function of ALSA
Packit Service a9274b
PCM core to update a position to head of hardware transmission and to check
Packit Service a9274b
XRUN.
Packit Service a9274b
Packit Service a9274b
In
Packit Service a9274b
.I axfer
Packit Service a9274b
, this is called
Packit Service a9274b
.I timer\-based
Packit Service a9274b
scheduling model and available as long as hardware/driver assists
Packit Service a9274b
.I no\-period\-wakeup
Packit Service a9274b
runtime. Users should explicitly set this mode by usage of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option with
Packit Service a9274b
.I timer
Packit Service a9274b
value.
Packit Service a9274b
Packit Service a9274b
In the scheduling model, PCM applications need to care of available space on
Packit Service a9274b
PCM buffer by lapse of time, typically by yielding CPU and wait for
Packit Service a9274b
rescheduling. For the yielding, timeout is calculated for preferable amount of
Packit Service a9274b
PCM frames to process. This is convenient to a kind of applications, like sound
Packit Service a9274b
servers. when an I/O thread of the server wait for the timeout, the other
Packit Service a9274b
threads can process audio data frames for server clients. Furthermore, with
Packit Service a9274b
usage of rewinding/forwarding, applications can achieve low latency between
Packit Service a9274b
transmission position and handling position even if they uses large size of
Packit Service a9274b
PCM buffers.
Packit Service a9274b
Packit Service a9274b
.SS Advantages and issues
Packit Service a9274b
Packit Service a9274b
Ideally, timer\-based scheduling model has some advantages than IRQ\-based
Packit Service a9274b
scheduling model. At first, no interrupt context runs for PCM substream. The
Packit Service a9274b
PCM substream is handled in any process context only. No need to care of race
Packit Service a9274b
conditions between IRQ and process contexts. This reduces some concerns for
Packit Service a9274b
some developers of drivers and applications. Secondary, CPU time is not used
Packit Service a9274b
for handlers on the interrupt context. The CPU time can be dedicated for the
Packit Service a9274b
other tasks. This is good in a point of Time Sharing System. Thirdly, hardware
Packit Service a9274b
is not configured to generate interrupts. This is good in a point of reduction
Packit Service a9274b
of overall power consumption possibly.
Packit Service a9274b
Packit Service a9274b
In either scheduling model, the hardware should allow drivers to read the
Packit Service a9274b
number of audio data frame transferred between the dedicated memory and the
Packit Service a9274b
device memory for audio serial bus. However, in timer\-based scheduling model,
Packit Service a9274b
fine granularity and accuracy of the value is important. Actually hardware
Packit Service a9274b
performs transmission between dedicated memory and device memory for a small
Packit Service a9274b
batch of audio data frames or bytes. In a view of PCM applications, the
Packit Service a9274b
granularity in current transmission is required to decide correct timeout for
Packit Service a9274b
each I/O operation. As of Linux kernel v4.21, ALSA PCM interface between
Packit Service a9274b
kernel/userspace has no feature to report it.
Packit Service a9274b
Packit Service a9274b
.SH COMPATIBILITY TO APLAY
Packit Service a9274b
Packit Service a9274b
The
Packit Service a9274b
.B transfer
Packit Service a9274b
subcommand of
Packit Service a9274b
.B axfer
Packit Service a9274b
is designed to keep compatibility to aplay(1). However some options below are
Packit Service a9274b
not compatible due to several technical reasons.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-I, \-\-separate\-channels
Packit Service a9274b
This option is supported just for files to store audio data frames corresponding
Packit Service a9274b
to each channel. In aplay(1) implementation, this option has an additional
Packit Service a9274b
effect to use PCM buffer aligned to non\-interleaved order if a target device
Packit Service a9274b
supports. As of 2018, PCM buffer of non\-interleaved order is hardly used by
Packit Service a9274b
sound devices.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-A, \-\-avail\-min=#
Packit Service a9274b
This option indicates threshold to wake up blocked process in a unit of
Packit Service a9274b
audio data frame. Against aplay(1) implementation, this option has no effect
Packit Service a9274b
with
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
option as well as
Packit Service a9274b
.I timer
Packit Service a9274b
of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-R, \-\-start\-delay=#
Packit Service a9274b
This option indicates threshold to start prepared PCM substream in a unit of
Packit Service a9274b
audio data frame. Against aplay(1) implementation, this option has no effect
Packit Service a9274b
with
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
option as well as
Packit Service a9274b
.I timer
Packit Service a9274b
of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-T, \-\-stop\-delay=#
Packit Service a9274b
This option indicates threshold to stop running PCM substream in a unit of
Packit Service a9274b
audio data frame. Against aplay(1) implementation, this option has no effect
Packit Service a9274b
with
Packit Service a9274b
.I \-\-mmap
Packit Service a9274b
option as well as
Packit Service a9274b
.I timer
Packit Service a9274b
of
Packit Service a9274b
.I \-\-sched\-model
Packit Service a9274b
option.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-\-max\-file\-time=#
Packit Service a9274b
This option is unsupported. In aplay(1) implementation, the option has an
Packit Service a9274b
effect for capture transmission to save files up to the same number of data
Packit Service a9274b
frames as the given value by second unit, or the maximum number of data frames
Packit Service a9274b
supported by used file format. When reaching to the limitation, used file is
Packit Service a9274b
closed, then new file is opened and audio data frames are written. However, this
Packit Service a9274b
option requires extra handling of files and shall increase complexity of main
Packit Service a9274b
loop of axfer.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-\-use\-strftime=FORMAT
Packit Service a9274b
This option is unsupported. In aplay(1) implementation, the option has an effect
Packit Service a9274b
for capture transmission to generate file paths according to given format in
Packit Service a9274b
which some extra formats are available as well as formats supported by
Packit Service a9274b
strftime(3). However, this option requires extra string processing for file
Packit Service a9274b
paths and it\(aqs bothersome if written in C language.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-\-process\-id\-file=FILEPATH
Packit Service a9274b
This option is unsupported. In aplay(1) implementation, the option has an effect
Packit Service a9274b
to create a file for given value and write out process ID to it. This file
Packit Service a9274b
allows users to get process ID and send any POSIX signal to aplay process.
Packit Service a9274b
However, this idea has some troubles for file locking when multiple aplay
Packit Service a9274b
processes run with the same file.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-V, \-\-vumeter=TYPE
Packit Service a9274b
This option is not supported at present. In aplay(1) implementation, this option
Packit Service a9274b
has an effect to occupy stdout with some terminal control characters and display
Packit Service a9274b
vumeter for monaural and stereo channels. However, some problems lay; this
Packit Service a9274b
feature is just for audio data frames with PCM format, this feature brings
Packit Service a9274b
disorder of terminal after aborting, stdout is not available for pipeline.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-i, \-\-interactive
Packit Service a9274b
This option is not supported at present. In aplay(1) implementation, this option
Packit Service a9274b
has an effect to occupy stdin for key input and suspend/resume PCM substream
Packit Service a9274b
according to pushed enter key. However, this feature requires an additional
Packit Service a9274b
input handling in main loop and leave bothersome operation to maintain PCM
Packit Service a9274b
substream.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I \-m, \-\-chmap=CH1,CH2,...
Packit Service a9274b
ALSA PCM core and control core doesn't support this feature, therefore
Packit Service a9274b
remapping should be done in userspace. This brings overhead to align audio
Packit Service a9274b
data frames, especially for mmap operation. Furthermore, as of alsa-lib v1.1.8,
Packit Service a9274b
some plugins don't support this feature expectedly, thus this option is a lack
Packit Service a9274b
of transparent operation. At present, this option is not supported yet not to
Packit Service a9274b
confuse users.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I SIGTSTP, SIGCONT
Packit Service a9274b
This performs suspend/resume of PCM substream. In aplay(1) implementation,
Packit Service a9274b
these operations bring XRUN state to the substream, and suspend/resume is done
Packit Service a9274b
in interactive mode in the above. Some developers use the signal for recovery
Packit Service a9274b
test from XRUN. At present, no alternative is supported for the test.
Packit Service a9274b
Packit Service a9274b
.TP
Packit Service a9274b
.I SIGUSR1
Packit Service a9274b
This is not supported. In aplay(1) implementation, this signal is assigned to a
Packit Service a9274b
handler to close a current file to store audio data frame and open a new file
Packit Service a9274b
to continue processing. However, as well as
Packit Service a9274b
.I \-\-max\-file\-time
Packit Service a9274b
option, this option should increase complexity of main loop of axfer.
Packit Service a9274b
Packit Service a9274b
.SH DESIGN
Packit Service a9274b
Packit Service a9274b
.SS Modular structure
Packit Service a9274b
Packit Service a9274b
This program consists of three modules;
Packit Service a9274b
.I xfer
Packit Service a9274b
,
Packit Service a9274b
.I mapper
Packit Service a9274b
and
Packit Service a9274b
.I container
Packit Service a9274b
\&.
Packit Service a9274b
Each module has an abstraction layer to enable actual implementation.
Packit Service a9274b
Packit Service a9274b
.nf
Packit Service a9274b
           --------     ----------     -------------
Packit Service a9274b
device <-> | xfer | <-> | mapper | <-> | container | <-> file
Packit Service a9274b
           --------     ----------     -------------
Packit Service a9274b
            libasound    single         wav
Packit Service a9274b
            libffado     multiple       au
Packit Service a9274b
                                        voc
Packit Service a9274b
                                        raw
Packit Service a9274b
.fi
Packit Service a9274b
Packit Service a9274b
The
Packit Service a9274b
.I xfer
Packit Service a9274b
module performs actual transmission to devices and nodes. The module can have
Packit Service a9274b
several transmission backends. As a default backend,
Packit Service a9274b
.I libasound
Packit Service a9274b
backend is used to perform transmission via alsa\-lib APIs. The module allows
Packit Service a9274b
each backend to parse own command line options.
Packit Service a9274b
Packit Service a9274b
The
Packit Service a9274b
.I container
Packit Service a9274b
module performs to read/write audio data frame via descriptor for file/stream
Packit Service a9274b
of multimedia container or raw data. The module automatically detect type of
Packit Service a9274b
multimedia container and parse parameters in its metadata of data header. At
Packit Service a9274b
present, three types of multimedia containers are supported; Microsoft/IBM
Packit Service a9274b
RIFF/Wave (
Packit Service a9274b
.I wav
Packit Service a9274b
), Sparc AU (
Packit Service a9274b
.I au
Packit Service a9274b
) and Creative Technology voice (
Packit Service a9274b
.I voc
Packit Service a9274b
). Additionally, a special container is prepared for raw audio data (
Packit Service a9274b
.I raw
Packit Service a9274b
).
Packit Service a9274b
Packit Service a9274b
The
Packit Service a9274b
.I mapper
Packit Service a9274b
module handles buffer layout and alignment for transmission of audio data frame.
Packit Service a9274b
The module has two implementations;
Packit Service a9274b
.I single
Packit Service a9274b
and
Packit Service a9274b
.I multiple
Packit Service a9274b
\&.
Packit Service a9274b
The
Packit Service a9274b
.I single
Packit Service a9274b
backend uses one container to construct the buffer. The
Packit Service a9274b
.I multiple
Packit Service a9274b
backend uses several containers to construct it.
Packit Service a9274b
Packit Service a9274b
.SS Care of copying audio data frame
Packit Service a9274b
Packit Service a9274b
Between the
Packit Service a9274b
.I xfer
Packit Service a9274b
module and
Packit Service a9274b
.I mapper
Packit Service a9274b
module, a pointer to buffer including audio data frames is passed. This buffer
Packit Service a9274b
has two shapes for interleaved and non\-interleaved order. For the former, the
Packit Service a9274b
pointer points to one buffer. For the latter, the pointer points to an array in
Packit Service a9274b
which each element points to one buffer. Between the
Packit Service a9274b
.I mapper
Packit Service a9274b
module and
Packit Service a9274b
.I container
Packit Service a9274b
module, a pointer to one buffer is passed because supported media containers
Packit Service a9274b
including raw type store audio data frames in interleaved order.
Packit Service a9274b
Packit Service a9274b
In passing audio data frame between the modules, axfer is programmed to avoid
Packit Service a9274b
copying between a buffer to another buffer as much as possible. For example, in
Packit Service a9274b
some scenarios below, no copying occurs between modules.
Packit Service a9274b
Packit Service a9274b
 - xfer(mmap/interleaved), mapper(single), container(any)
Packit Service a9274b
 - xfer(mmap/non\-interleaved), mapper(multiple), containers(any)
Packit Service a9274b
Packit Service a9274b
.SS Unit test
Packit Service a9274b
Packit Service a9274b
For each of the
Packit Service a9274b
.I mapper
Packit Service a9274b
and
Packit Service a9274b
.I container
Packit Service a9274b
module, unit test is available. To run the tests, execute below command:
Packit Service a9274b
Packit Service a9274b
.nf
Packit Service a9274b
$ make test
Packit Service a9274b
.fi
Packit Service a9274b
Packit Service a9274b
Each test iterates writing to file and reading to the file for many times and it
Packit Service a9274b
takes long time to finish. Please take care of the execution time if running on
Packit Service a9274b
any CI environment.
Packit Service a9274b
Packit Service a9274b
.SH SEE ALSO
Packit Service a9274b
\fB
Packit Service a9274b
axfer(1),
Packit Service a9274b
axfer\-list(1),
Packit Service a9274b
alsamixer(1),
Packit Service a9274b
amixer(1)
Packit Service a9274b
\fP
Packit Service a9274b
Packit Service a9274b
.SH AUTHOR
Packit Service a9274b
Takashi Sakamoto <o\-takashi@sakamocchi.jp>