* [PATCH v1 Resend] virtio-sound: add latency_bytes definition @ 2024-05-21 15:03 Matias Ezequiel Vara Larsen 2024-05-23 10:52 ` Stefano Garzarella 2024-06-21 13:37 ` Matias Ezequiel Vara Larsen 0 siblings, 2 replies; 5+ messages in thread From: Matias Ezequiel Vara Larsen @ 2024-05-21 15:03 UTC (permalink / raw) To: virtio-comment; +Cc: anton.yakovlev, mvaralar 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 Resend] virtio-sound: add latency_bytes definition 2024-05-21 15:03 [PATCH v1 Resend] virtio-sound: add latency_bytes definition Matias Ezequiel Vara Larsen @ 2024-05-23 10:52 ` Stefano Garzarella 2024-06-21 13:37 ` Matias Ezequiel Vara Larsen 1 sibling, 0 replies; 5+ messages in thread From: Stefano Garzarella @ 2024-05-23 10:52 UTC (permalink / raw) To: Matias Ezequiel Vara Larsen; +Cc: virtio-comment, anton.yakovlev On Tue, May 21, 2024 at 05:03:25PM GMT, Matias Ezequiel Vara Larsen wrote: >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(-) LGTM! Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> > >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 > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 Resend] virtio-sound: add latency_bytes definition 2024-05-21 15:03 [PATCH v1 Resend] virtio-sound: add latency_bytes definition Matias Ezequiel Vara Larsen 2024-05-23 10:52 ` Stefano Garzarella @ 2024-06-21 13:37 ` Matias Ezequiel Vara Larsen 2024-06-21 13:56 ` Michael S. Tsirkin 1 sibling, 1 reply; 5+ messages in thread From: Matias Ezequiel Vara Larsen @ 2024-06-21 13:37 UTC (permalink / raw) To: virtio-comment; +Cc: anton.yakovlev, sgarzare On Tue, May 21, 2024 at 05:03:25PM +0200, Matias Ezequiel Vara Larsen wrote: > 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 > Dear TC, I'd like to request a vote on solving issue 198. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/198 Matias ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 Resend] virtio-sound: add latency_bytes definition 2024-06-21 13:37 ` Matias Ezequiel Vara Larsen @ 2024-06-21 13:56 ` Michael S. Tsirkin 2024-06-25 10:43 ` Matias Ezequiel Vara Larsen 0 siblings, 1 reply; 5+ messages in thread From: Michael S. Tsirkin @ 2024-06-21 13:56 UTC (permalink / raw) To: Matias Ezequiel Vara Larsen; +Cc: virtio-comment, anton.yakovlev, sgarzare On Fri, Jun 21, 2024 at 03:37:29PM +0200, Matias Ezequiel Vara Larsen wrote: > On Tue, May 21, 2024 at 05:03:25PM +0200, Matias Ezequiel Vara Larsen wrote: > > 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. the last "was recorded" seems agrammatical. Do you mean "has recorded"? > > \end{description} > > > > Since all buffers in the queue (with one exception) should be of the size > > -- > > 2.41.0 > > > Dear TC, > > I'd like to request a vote on solving issue 198. > > Fixes: https://github.com/oasis-tcs/virtio-spec/issues/198 > > Matias OK. Can you pls add a bit more detail about the issue and the proposal in github? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 Resend] virtio-sound: add latency_bytes definition 2024-06-21 13:56 ` Michael S. Tsirkin @ 2024-06-25 10:43 ` Matias Ezequiel Vara Larsen 0 siblings, 0 replies; 5+ messages in thread From: Matias Ezequiel Vara Larsen @ 2024-06-25 10:43 UTC (permalink / raw) To: Michael S. Tsirkin; +Cc: virtio-comment, anton.yakovlev, sgarzare On Fri, Jun 21, 2024 at 09:56:16AM -0400, Michael S. Tsirkin wrote: > On Fri, Jun 21, 2024 at 03:37:29PM +0200, Matias Ezequiel Vara Larsen wrote: > > On Tue, May 21, 2024 at 05:03:25PM +0200, Matias Ezequiel Vara Larsen wrote: > > > 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. > > > the last "was recorded" seems agrammatical. Do you mean "has recorded"? > When the device processes a period, e.g. multiples descriptors, it puts it in the used queue, sets the latency_bytes and notifies the driver. For playback, the latency_bytes contains the number of bytes until the buffer is actually played, e.g., if the device notifies the driver just before playing it the value would be 0. For capture, the latency_bytes is the number of bytes that `has elapsed` since the buffer has been recorded. Coming back to your comment, I could rephrase it as: `During capture, this is the number of bytes since the buffer was recorded.` WDYT? > > > \end{description} > > > > > > Since all buffers in the queue (with one exception) should be of the size > > > -- > > > 2.41.0 > > > > > Dear TC, > > > > I'd like to request a vote on solving issue 198. > > > > Fixes: https://github.com/oasis-tcs/virtio-spec/issues/198 > > > > Matias > > > OK. Can you pls add a bit more detail about the issue and > the proposal in github? > Yes, I can. Thanks. Matias. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-25 10:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-05-21 15:03 [PATCH v1 Resend] virtio-sound: add latency_bytes definition Matias Ezequiel Vara Larsen 2024-05-23 10:52 ` Stefano Garzarella 2024-06-21 13:37 ` Matias Ezequiel Vara Larsen 2024-06-21 13:56 ` Michael S. Tsirkin 2024-06-25 10:43 ` Matias Ezequiel Vara Larsen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox