alsa-utils/axfer/subcmd.h
Takashi Sakamoto 3266d71c0d 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>
2018-11-13 12:04:33 +01:00

19 lines
498 B
C

// SPDX-License-Identifier: GPL-2.0
//
// subcmd.h - a header for each sub-commands.
//
// Copyright (c) 2018 Takashi Sakamoto <o-takashi@sakamocchi.jp>
//
// Licensed under the terms of the GNU General Public License, version 2.
#ifndef __ALSA_UTILS_AXFER_SUBCMD__H_
#define __ALSA_UTILS_AXFER_SUBCMD__H_
#include <alsa/asoundlib.h>
int subcmd_list(int argc, char *const *argv, snd_pcm_stream_t direction);
int subcmd_transfer(int argc, char *const *argv, snd_pcm_stream_t direction);
#endif