]> git.ipfire.org Git - thirdparty/qemu.git/commit - hw/audio/virtio-snd.c
virtio-sound: implement audio capture (RX)
authorManos Pitsidianakis <manos.pitsidianakis@linaro.org>
Mon, 23 Oct 2023 12:03:27 +0000 (15:03 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Nov 2023 08:39:10 +0000 (03:39 -0500)
commitd8d64acbecfa131153e5b96fb24b4f95f55be881
tree5c52b8a4c6ef9635fa95421a6d6d808454b785f3
parent18a752810f04e3f1933682addd0a6c978efc5cdf
virtio-sound: implement audio capture (RX)

To perform audio capture we duplicate the TX logic of the previous
commit with the following difference: we receive data from the QEMU
audio backend and write it in the virt queue IO buffers the guest sends
to QEMU. When they are full (i.e. they have `period_bytes` amount of
data) or when recording stops in QEMU's audio backend, the buffer is
returned to the guest by notifying it.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <e56a17741a24ccadfbbea19d3c60c9406b795b23.1698062525.git.manos.pitsidianakis@linaro.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/audio/trace-events
hw/audio/virtio-snd.c