From patchwork Thu Feb 13 16:18:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefano Garzarella X-Patchwork-Id: 13973603 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5391288C3E for ; Thu, 13 Feb 2025 16:18:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739463514; cv=none; b=kTTM9rTe8s1gTqqhQlO4rEwkW8co2JljUh+bWPrjKl+Fe5X6zDlp88smEBuqFdT6u53+H9DtmWebT9lR1BElZjtDEC6zPSQ7EyqMQQaVGMazvOl05WvfF85wesQsKcyjsqLbU+zbU0viXv8lsyi6HifCe4FzeHlObJm4e5RRGZM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739463514; c=relaxed/simple; bh=Vrn/4vwdmsdokkCuLMXfyT1nZ/jStbBCx0QhOmJ6E80=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:content-type; b=gxB/j/4Igc5umgWbU1jTVuEGaoFt3w1Ftfc3n24FXMQQ0+vFlUoTfk5bUCMjGrSN2jL1nP7AOOViF/dvn00fQ9ciYF5mNpU4WwS9UZnpopISkh7CJ3vltqRdnMdcjThF+rz+KNkQgpjZOy/rlPChd8wGL1TTpuNQP005LtJG3BM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JUqOtsiR; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JUqOtsiR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739463511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iKzjBSUkdHDLfZzf4JfzRiz+zb6GftCtkHoeHOHlZwU=; b=JUqOtsiR+ODQNkafGefj2w0b50pdy6/eaUZ5DLluWK5OxQq8jt4t3FMRDos5dvJS7BTxKt 7tbfdTP7tRIRIfAiI1Gsm4w85V1lZXETqYFqjEnK80bSo4+KA7FY53flJ8jDxW/+rUzAa2 8aCDSA6y3YTWXbliUHYnHWCeQgrkprI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-dn1mCjxENV-k2yGH293z1g-1; Thu, 13 Feb 2025 11:18:30 -0500 X-MC-Unique: dn1mCjxENV-k2yGH293z1g-1 X-Mimecast-MFC-AGG-ID: dn1mCjxENV-k2yGH293z1g Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4395586f952so5515735e9.2 for ; Thu, 13 Feb 2025 08:18:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739463509; x=1740068309; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iKzjBSUkdHDLfZzf4JfzRiz+zb6GftCtkHoeHOHlZwU=; b=IHHzUEEx3X0py7Xq9doxJez3uWrsJ0CxBzVvWSuo/rZ9ZFN56Kj6PgZKAH7EeTOolk gpsd37P/UzEEsUw+X73V1z91ldVU9BzPRw8f3bdLjEtrwsliLCPPViz7zqoZbpzGWgKC 5qy+CJp/9OTbgGLdYlvUVCtG6pEsyR6z/RaGwpHKcYr16S62xIB6Uc3chJAT9NZdHmjH infdnwmUHmK5cjpmZlCVVAFhoq5P5+aPzRL8RZbSh5Hky4l74H0cGEFnCR+UfbNoT3Sf 8cOVq5CcchyzhNLjFOWInQY4xpcGvanNioz6dKx0sAmDUJpyzL7iMk31Jvyfv3Q+Lr2m umog== X-Forwarded-Encrypted: i=1; AJvYcCWF+lptacL0+botLAdOrS41mobHPhmuLhY9YlSTNXQKaHTkLE4AazQbYyW80UJzmVlxocgtnB49AVnPhw==@vger.kernel.org X-Gm-Message-State: AOJu0YwToMX5jg1r2WJasfoHjnv3nZwAFHoLHgGEwtK8NdZcGZ9+HpBO UNcbVLXS4fI2v+SbLWVUpWwm0o4p+X+lEDqIVIagl8wE2WA0ETCrTd8V8wZLLgU28TDEYjRLUqN VYMZWFiCit1QRCAbDPwebSfHKIGcmDcRBlFghDbq6Ji57p82zCKfdCkecX0r+ X-Gm-Gg: ASbGnctRlsI6AoxfsKqXqwbMevy59kNqrrADTjz7e/jKzfMlQC0R8oZuiJvU9KCorF2 U+GCp6eSQGTnYKNOfSHTVuOElnoMabhJrqmG9NgJCBM/364BHpfLzhWZfYkFfKteDyP8sv2X9Ex Wc9+/YBHyl4xEbJk62DxMH8nW7ROKrr2U8mZnz8fsGPyNcMTyW71zLrTPIwo2NPYXo+iU0Hkv+B b49Gd5U29+eiZVqS6YiGUZ+Zhu0BzGfRs0d0nThzA3kfic44lweF/qGanAzRuwjs71jvs3O3BoE /yk6bgi5x7/uh/5TBcTRsVT/CT8vAMe4uQvTBhN3eLjEjfUiTM/W+/I= X-Received: by 2002:a05:600c:698d:b0:439:574c:bf76 with SMTP id 5b1f17b1804b1-43960179b7amr57710515e9.7.1739463509141; Thu, 13 Feb 2025 08:18:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFu6y21w757rvE76+QUOv51wsc6Q/8KLtoBTuUd9R2tuHYuDtc916mYTl90tlTU0umnS7sdnA== X-Received: by 2002:a05:600c:698d:b0:439:574c:bf76 with SMTP id 5b1f17b1804b1-43960179b7amr57709765e9.7.1739463508492; Thu, 13 Feb 2025 08:18:28 -0800 (PST) Received: from stex1.redhat.com (host-79-46-200-29.retail.telecomitalia.it. [79.46.200.29]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4395a06d237sm52922715e9.21.2025.02.13.08.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2025 08:18:27 -0800 (PST) From: Stefano Garzarella To: virtualization@lists.linux.dev Cc: =?utf-8?q?Eugenio_P=C3=A9rez?= , Matias Ezequiel Vara Larsen , linux-sound@vger.kernel.org, Jason Wang , linux-kernel@vger.kernel.org, Anton Yakovlev , Xuan Zhuo , "Michael S. Tsirkin" , Stefano Garzarella Subject: [PATCH] virtio_snd.h: clarify that `controls` depends on VIRTIO_SND_F_CTLS Date: Thu, 13 Feb 2025 17:18:25 +0100 Message-ID: <20250213161825.139952-1-sgarzare@redhat.com> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: O9tcM3et7nKXKlajENk2wGr3V5ODe_OGcbMt8Rz9deY_1739463509 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true 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 Acked-by: Eugenio PĂ©rez --- 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; };