summaryrefslogtreecommitdiff
path: root/sound/virtio/virtio_pcm.h
diff options
context:
space:
mode:
authorAnton Yakovlev <anton.yakovlev@opensynergy.com>2021-03-02 17:47:09 +0100
committerTakashi Iwai <tiwai@suse.de>2021-03-07 09:08:39 +0100
commit575483e90a3292c2afceb7161732046e411d6fdd (patch)
tree1cea631e4a3270130fcef89494e47ff9a05d7e03 /sound/virtio/virtio_pcm.h
parent19325fedf245ca932c58a629d3888a9a393534ab (diff)
ALSA: virtio: introduce device suspend/resume support
All running PCM substreams are stopped on device suspend and restarted on device resume. Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com> Link: https://lore.kernel.org/r/20210302164709.3142702-10-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/virtio/virtio_pcm.h b/sound/virtio/virtio_pcm.h
index 1353fdc9bd69..062eb8e8f2cf 100644
--- a/sound/virtio/virtio_pcm.h
+++ b/sound/virtio/virtio_pcm.h
@@ -31,6 +31,8 @@ struct virtio_pcm_msg;
* @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.
+ * @suspended: True if the substream is suspended and must be reconfigured on
+ * the device side at resume.
* @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.
@@ -52,6 +54,7 @@ struct virtio_pcm_substream {
bool xfer_enabled;
bool xfer_xrun;
bool stopped;
+ bool suspended;
struct virtio_pcm_msg **msgs;
unsigned int nmsgs;
int msg_last_enqueued;