1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

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
This commit is contained in:
Stefano Garzarella 2025-02-13 17:18:25 +01:00 committed by Takashi Iwai
parent 822b7ec657
commit 362ff1e7c6

View file

@ -25,7 +25,7 @@ struct virtio_snd_config {
__le32 streams;
/* # of available channel maps */
__le32 chmaps;
/* # of available control elements */
/* # of available control elements (if VIRTIO_SND_F_CTLS) */
__le32 controls;
};