OSDN Git Service

axfer: add support for blocking data transmission operation of alsa-lib PCM API
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 13 Nov 2018 06:41:28 +0000 (15:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Nov 2018 11:04:32 +0000 (12:04 +0100)
commitc2f79d9fdf425ce7ada462065bfafa5e01be2707
treec049aa2fe6b177a03f91e0d12a9b2932ca50ae50
parentae7346d110a5dd7b2670bf4aa8737936a826bc7a
axfer: add support for blocking data transmission operation of alsa-lib PCM API

In alsa-lib PCM API, snd_pcm_read[i|n]() and snd_pcm_write[i|n]() are used
to transfer data frames from/to hardware. When a handler is not opened with
specific flags, these functions perform blocking operation; i.e. the
function call doesn't return till all of request number of data frames are
actually handled, or call is interrupted by Unix signals, or PCM substeam
corrupts due to hardware reasons.

This commit adds support for this type of data transmission. For cases that
requested data frames are not processed by container interface, this commit
adds internal cache mechanism to handle rest of data frames in next timing.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
axfer/Makefile.am
axfer/frame-cache.c [new file with mode: 0644]
axfer/frame-cache.h [new file with mode: 0644]
axfer/xfer-libasound-irq-rw.c [new file with mode: 0644]
axfer/xfer-libasound.c
axfer/xfer-libasound.h