Skip to content

Commit 362ff1e

Browse files
stefano-garzarellatiwai
authored andcommitted
virtio_snd.h: clarify that controls depends on VIRTIO_SND_F_CTLS
As defined in the specification, the `controls` field in the configuration space is only valid/present if VIRTIO_SND_F_CTLS is negotiated. From https://docs.oasis-open.org/virtio/virtio/v1.3/virtio-v1.3.html: 5.14.4 Device Configuration Layout ... controls (driver-read-only) indicates a total number of all available control elements if VIRTIO_SND_F_CTLS has been negotiated. Let's use the same style used in virtio_blk.h to clarify this and to avoid confusion as happened in QEMU (see link). Link: https://gitlab.com/qemu-project/qemu/-/issues/2805 Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Acked-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250213161825.139952-1-sgarzare@redhat.com
1 parent 822b7ec commit 362ff1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/uapi/linux/virtio_snd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct virtio_snd_config {
2525
__le32 streams;
2626
/* # of available channel maps */
2727
__le32 chmaps;
28-
/* # of available control elements */
28+
/* # of available control elements (if VIRTIO_SND_F_CTLS) */
2929
__le32 controls;
3030
};
3131

0 commit comments

Comments
 (0)