]> git.alsa-project.org Git - alsa-utils.git/commit
axfer: add a sub-command to transfer data frames
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 13 Nov 2018 06:41:29 +0000 (15:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Nov 2018 11:04:33 +0000 (12:04 +0100)
commit3266d71c0d939b0b291910eb7ba0b600d8b3fbc1
tree362b188aadb767c5068f5622da33999912fefee5
parentc2f79d9fdf425ce7ada462065bfafa5e01be2707
axfer: add a sub-command to transfer data frames

In current aplay, default action is to transfer data frames from/to
devices. This commit adds support for this functionality.

Event loop is included in an added file. In the loop, the number of
handled data frames is manipulated by an appropriate way. As a result, users
can stop data transmission frames by frame.

Unlike aplay, when catching SIGSTP, this application performs to suspend
PCM substream. When catching SIGCONT, it performs to resume the PCM
substream. The aim of this design is to avoid XRUN state of the PCM
substream. If users/developers need to any XRUN-recovery test, it's
better to work for the other ways.

Below lines are examples to execute:
$ axfer transfer -P -D hw:0,3 /dev/urandom -f dat -vvv
$ axfer transfer -C -D hw:1,0 /dev/null -r 48000 -vvv

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
axfer/Makefile.am
axfer/main.c
axfer/subcmd-transfer.c [new file with mode: 0644]
axfer/subcmd.h