* [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS
@ 2025-02-13 16:18 Stefano Garzarella
2025-02-14 8:28 ` Eugenio Perez Martin
2025-02-14 11:58 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Stefano Garzarella @ 2025-02-13 16:18 UTC (permalink / raw)
To: virtualization
Cc: Eugenio Pérez, Matias Ezequiel Vara Larsen, linux-sound,
Jason Wang, linux-kernel, Anton Yakovlev, Xuan Zhuo,
Michael S. Tsirkin, Stefano Garzarella
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>
---
include/uapi/linux/virtio_snd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/virtio_snd.h b/include/uapi/linux/virtio_snd.h
index 5f4100c2cf04..a4cfb9f6561a 100644
--- a/include/uapi/linux/virtio_snd.h
+++ b/include/uapi/linux/virtio_snd.h
@@ -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;
};
--
2.48.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS
2025-02-13 16:18 [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS Stefano Garzarella
@ 2025-02-14 8:28 ` Eugenio Perez Martin
2025-02-14 11:58 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Eugenio Perez Martin @ 2025-02-14 8:28 UTC (permalink / raw)
To: Stefano Garzarella
Cc: virtualization, Matias Ezequiel Vara Larsen, linux-sound,
Jason Wang, linux-kernel, Anton Yakovlev, Xuan Zhuo,
Michael S. Tsirkin
On Thu, Feb 13, 2025 at 5:18 PM Stefano Garzarella <sgarzare@redhat.com> wrote:
>
> 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>
> ---
> include/uapi/linux/virtio_snd.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/virtio_snd.h b/include/uapi/linux/virtio_snd.h
> index 5f4100c2cf04..a4cfb9f6561a 100644
> --- a/include/uapi/linux/virtio_snd.h
> +++ b/include/uapi/linux/virtio_snd.h
> @@ -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;
> };
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS
2025-02-13 16:18 [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS Stefano Garzarella
2025-02-14 8:28 ` Eugenio Perez Martin
@ 2025-02-14 11:58 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2025-02-14 11:58 UTC (permalink / raw)
To: Stefano Garzarella
Cc: virtualization, Eugenio Pérez, Matias Ezequiel Vara Larsen,
linux-sound, Jason Wang, linux-kernel, Anton Yakovlev, Xuan Zhuo,
Michael S. Tsirkin
On Thu, 13 Feb 2025 17:18:25 +0100,
Stefano Garzarella wrote:
>
> 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>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-14 11:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 16:18 [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS Stefano Garzarella
2025-02-14 8:28 ` Eugenio Perez Martin
2025-02-14 11:58 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox