summaryrefslogtreecommitdiff
path: root/sound/virtio/virtio_pcm.h
diff options
context:
space:
mode:
authorAnton Yakovlev <anton.yakovlev@opensynergy.com>2021-03-02 17:47:06 +0100
committerTakashi Iwai <tiwai@suse.de>2021-03-07 09:08:03 +0100
commitda76e9f3e43a7195c69d370ee514cccae6517c76 (patch)
tree0fd9ce8748ee3ff96493e4bd8fd1918c5d13f522 /sound/virtio/virtio_pcm.h
parentf40a28679e0b7cb3a9cc6627a8dbb40961990f0a (diff)
ALSA: virtio: PCM substream operators
Introduce the operators required for the operation of substreams. Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com> Link: https://lore.kernel.org/r/20210302164709.3142702-7-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/virtio/virtio_pcm.h')
-rw-r--r--sound/virtio/virtio_pcm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/virtio/virtio_pcm.h b/sound/virtio/virtio_pcm.h
index 6722f1139666..efd0228746cf 100644
--- a/sound/virtio/virtio_pcm.h
+++ b/sound/virtio/virtio_pcm.h
@@ -29,6 +29,8 @@ struct virtio_pcm_msg;
* @hw_ptr: Substream hardware pointer value in bytes [0 ... buffer_bytes).
* @xfer_enabled: Data transfer state (0 - off, 1 - on).
* @xfer_xrun: Data underflow/overflow state (0 - no xrun, 1 - xrun).
+ * @stopped: True if the substream is stopped and must be released on the device
+ * side.
* @msgs: Allocated I/O messages.
* @nmsgs: Number of allocated I/O messages.
* @msg_last_enqueued: Index of the last I/O message added to the virtqueue.
@@ -49,6 +51,7 @@ struct virtio_pcm_substream {
size_t hw_ptr;
bool xfer_enabled;
bool xfer_xrun;
+ bool stopped;
struct virtio_pcm_msg **msgs;
unsigned int nmsgs;
int msg_last_enqueued;
@@ -80,6 +83,8 @@ struct virtio_pcm {
struct virtio_pcm_stream streams[SNDRV_PCM_STREAM_LAST + 1];
};
+extern const struct snd_pcm_ops virtsnd_pcm_ops;
+
int virtsnd_pcm_validate(struct virtio_device *vdev);
int virtsnd_pcm_parse_cfg(struct virtio_snd *snd);