[PATCH v1 Resend] virtio-sound: add latency_bytes definition

Matias Ezequiel Vara Larsen
2024-05-21T15:03:32Z

This commit aims at providing a better definition of latency_bytes. To
do so, this commit defines latency_bytes as is defined in Crosvm.

Signed-off-by: Matias Ezequiel Vara Larsen <mvaralar@redhat.com>
---
Changelog:
v0 -> v1:
* specify that the delay is due to the device implementation.
---
device-types/sound/description.tex | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/device-types/sound/description.tex b/device-types/sound/description.tex
index 54c9c8e..a138e5b 100644
--- a/device-types/sound/description.tex
+++ b/device-types/sound/description.tex
@@ -694,7 +694,10 @@ \subsubsection{PCM I/O Messages}\label{sec:Device Types / Sound Device / Device
\begin{description}
\item[\field{status}] contains VIRTIO_SND_S_OK if an operation is successful,
and VIRTIO_SND_S_IO_ERR otherwise.
-\item[\field{latency_bytes}] indicates the current device latency.
+\item[\field{latency_bytes}] indicates the current additional delay caused by
+the device's implementation. For playback, this is the amount of bytes that
+must be consumed before the current request can be played. For capture, this is
+the latency in terms of bytes that the capture buffer was recorded.
\end{description}

Since all buffers in the queue (with one exception) should be of the size
--
2.41.0