summaryrefslogtreecommitdiff
path: root/sound/virtio/virtio_card.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/virtio/virtio_card.h')
-rw-r--r--sound/virtio/virtio_card.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/virtio/virtio_card.h b/sound/virtio/virtio_card.h
index 77a1b7255370..c43f9744d362 100644
--- a/sound/virtio/virtio_card.h
+++ b/sound/virtio/virtio_card.h
@@ -79,4 +79,13 @@ virtsnd_rx_queue(struct virtio_snd *snd)
return &snd->queues[VIRTIO_SND_VQ_RX];
}
+static inline struct virtio_snd_queue *
+virtsnd_pcm_queue(struct virtio_pcm_substream *vss)
+{
+ if (vss->direction == SNDRV_PCM_STREAM_PLAYBACK)
+ return virtsnd_tx_queue(vss->snd);
+ else
+ return virtsnd_rx_queue(vss->snd);
+}
+
#endif /* VIRTIO_SND_CARD_H */