diff options
author | Anton Yakovlev <anton.yakovlev@opensynergy.com> | 2021-03-02 19:47:06 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-03-07 11:08:03 +0300 |
commit | da76e9f3e43a7195c69d370ee514cccae6517c76 (patch) | |
tree | 0fd9ce8748ee3ff96493e4bd8fd1918c5d13f522 /sound/virtio/virtio_pcm.h | |
parent | f40a28679e0b7cb3a9cc6627a8dbb40961990f0a (diff) | |
download | linux-da76e9f3e43a7195c69d370ee514cccae6517c76.tar.xz |
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.h | 5 |
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); |