qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks
@ 2019-09-11 14:58 Stefan Hajnoczi
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-09-11 14:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Gerd Hoffmann, Stefan Hajnoczi, Zoltán Kővágó

Small fixes to the -audiodev documentation.

Stefan Hajnoczi (2):
  audio: fix buffer-length typo in documentation
  audio: add -audiodev pa,in|out.latency= to documentation

 qemu-options.hx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation
  2019-09-11 14:58 [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi
@ 2019-09-11 14:58 ` Stefan Hajnoczi
  2019-09-17 19:29   ` Zoltán Kővágó
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation Stefan Hajnoczi
  2019-09-17 15:58 ` [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-09-11 14:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Gerd Hoffmann, Stefan Hajnoczi, Zoltán Kővágó

Fixes: f0b3d811529 ("audio: -audiodev command line option: documentation")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 qemu-options.hx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index bbfd936d29..a4f9f74f52 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -439,7 +439,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
     "                in|out.format= sample format to use with fixed settings\n"
     "                valid values: s8, s16, s32, u8, u16, u32\n"
     "                in|out.voices= number of voices to use\n"
-    "                in|out.buffer-len= length of buffer in microseconds\n"
+    "                in|out.buffer-length= length of buffer in microseconds\n"
     "-audiodev none,id=id,[,prop[=value][,...]]\n"
     "                dummy driver that discards all output\n"
 #ifdef CONFIG_AUDIO_ALSA
@@ -524,7 +524,7 @@ Valid values are: @code{s8}, @code{s16}, @code{s32}, @code{u8},
 @item in|out.voices=@var{voices}
 Specify the number of @var{voices} to use.  Default is 1.
 
-@item in|out.buffer=@var{usecs}
+@item in|out.buffer-length=@var{usecs}
 Sets the size of the buffer in microseconds.
 
 @end table
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation
  2019-09-11 14:58 [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation Stefan Hajnoczi
@ 2019-09-11 14:58 ` Stefan Hajnoczi
  2019-09-17 19:47   ` Zoltán Kővágó
  2019-09-17 15:58 ` [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-09-11 14:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Gerd Hoffmann, Stefan Hajnoczi, Zoltán Kővágó

The "latency" parameter wasn't covered by the documentation.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
How is this parameter related to buffer-length?
---
 qemu-options.hx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qemu-options.hx b/qemu-options.hx
index a4f9f74f52..82154cecf8 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -470,6 +470,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
     "-audiodev pa,id=id[,prop[=value][,...]]\n"
     "                server= PulseAudio server address\n"
     "                in|out.name= source/sink device name\n"
+    "                in|out.latency= desired latency in microseconds\n"
 #endif
 #ifdef CONFIG_AUDIO_SDL
     "-audiodev sdl,id=id[,prop[=value][,...]]\n"
@@ -630,6 +631,9 @@ Sets the PulseAudio @var{server} to connect to.
 @item in|out.name=@var{sink}
 Use the specified source/sink for recording/playback.
 
+@item in|out.latency=@var{usecs}
+Desired latency in microseconds.
+
 @end table
 
 @item -audiodev sdl,id=@var{id}[,@var{prop}[=@var{value}][,...]]
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks
  2019-09-11 14:58 [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation Stefan Hajnoczi
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation Stefan Hajnoczi
@ 2019-09-17 15:58 ` Stefan Hajnoczi
  2 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-09-17 15:58 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Zoltán Kővágó, qemu-devel, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

On Wed, Sep 11, 2019 at 04:58:16PM +0200, Stefan Hajnoczi wrote:
> Small fixes to the -audiodev documentation.
> 
> Stefan Hajnoczi (2):
>   audio: fix buffer-length typo in documentation
>   audio: add -audiodev pa,in|out.latency= to documentation
> 
>  qemu-options.hx | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Ping

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation Stefan Hajnoczi
@ 2019-09-17 19:29   ` Zoltán Kővágó
  2019-09-18  9:47     ` Stefan Hajnoczi
  0 siblings, 1 reply; 8+ messages in thread
From: Zoltán Kővágó @ 2019-09-17 19:29 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Gerd Hoffmann

On 2019-09-11 16:58, Stefan Hajnoczi wrote:
> Fixes: f0b3d811529 ("audio: -audiodev command line option: documentation")
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>   qemu-options.hx | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index bbfd936d29..a4f9f74f52 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -439,7 +439,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
>       "                in|out.format= sample format to use with fixed settings\n"
>       "                valid values: s8, s16, s32, u8, u16, u32\n"
>       "                in|out.voices= number of voices to use\n"
> -    "                in|out.buffer-len= length of buffer in microseconds\n"
> +    "                in|out.buffer-length= length of buffer in microseconds\n"
>       "-audiodev none,id=id,[,prop[=value][,...]]\n"
>       "                dummy driver that discards all output\n"
>   #ifdef CONFIG_AUDIO_ALSA
> @@ -524,7 +524,7 @@ Valid values are: @code{s8}, @code{s16}, @code{s32}, @code{u8},
>   @item in|out.voices=@var{voices}
>   Specify the number of @var{voices} to use.  Default is 1.
>   
> -@item in|out.buffer=@var{usecs}
> +@item in|out.buffer-length=@var{usecs}
>   Sets the size of the buffer in microseconds.
>   
>   @end table
> 

Double checking it's indeed "buffer-length" in qapi.  Also I spot a 
different bug: the alsa documentation qemu-options.hx has "period-len" 
but according to qapi it should be "period-length".  Care to fix it or 
should I submit a different patch?

Regards,
Zoltan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation
  2019-09-11 14:58 ` [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation Stefan Hajnoczi
@ 2019-09-17 19:47   ` Zoltán Kővágó
  2019-09-18  9:48     ` Stefan Hajnoczi
  0 siblings, 1 reply; 8+ messages in thread
From: Zoltán Kővágó @ 2019-09-17 19:47 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Gerd Hoffmann

On 2019-09-11 16:58, Stefan Hajnoczi wrote:
> The "latency" parameter wasn't covered by the documentation.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Zoltán Kővágó <DirtY.iCE.hu@gmail.com>
> ---
> How is this parameter related to buffer-length?

Pulseaudio being a client-server architecture is a bit different than 
the other backends, plus it also has to mix multiple streams. 
buffer-length corresponds to the buffer inside qemu, while latency 
corresponds to pulseaudio.  For playback, the latency should be "maximum 
latency that the application can deal with", if a different client 
request a lower latency, our latency will decrease too.  It's up to the 
server to figure out an optimal buffer size on the server side of the 
things.
For recording it's the size of the buffer we will read at a time from 
pulseaudio.

> ---
>   qemu-options.hx | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/qemu-options.hx b/qemu-options.hx
> index a4f9f74f52..82154cecf8 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -470,6 +470,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
>       "-audiodev pa,id=id[,prop[=value][,...]]\n"
>       "                server= PulseAudio server address\n"
>       "                in|out.name= source/sink device name\n"
> +    "                in|out.latency= desired latency in microseconds\n"
>   #endif
>   #ifdef CONFIG_AUDIO_SDL
>       "-audiodev sdl,id=id[,prop[=value][,...]]\n"
> @@ -630,6 +631,9 @@ Sets the PulseAudio @var{server} to connect to.
>   @item in|out.name=@var{sink}
>   Use the specified source/sink for recording/playback.
>   
> +@item in|out.latency=@var{usecs}
> +Desired latency in microseconds.
> +
>   @end table
>   
>   @item -audiodev sdl,id=@var{id}[,@var{prop}[=@var{value}][,...]]
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation
  2019-09-17 19:29   ` Zoltán Kővágó
@ 2019-09-18  9:47     ` Stefan Hajnoczi
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-09-18  9:47 UTC (permalink / raw)
  To: Zoltán Kővágó
  Cc: qemu-devel, Stefan Hajnoczi, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

On Tue, Sep 17, 2019 at 09:29:34PM +0200, Zoltán Kővágó wrote:
> On 2019-09-11 16:58, Stefan Hajnoczi wrote:
> > Fixes: f0b3d811529 ("audio: -audiodev command line option: documentation")
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >   qemu-options.hx | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/qemu-options.hx b/qemu-options.hx
> > index bbfd936d29..a4f9f74f52 100644
> > --- a/qemu-options.hx
> > +++ b/qemu-options.hx
> > @@ -439,7 +439,7 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
> >       "                in|out.format= sample format to use with fixed settings\n"
> >       "                valid values: s8, s16, s32, u8, u16, u32\n"
> >       "                in|out.voices= number of voices to use\n"
> > -    "                in|out.buffer-len= length of buffer in microseconds\n"
> > +    "                in|out.buffer-length= length of buffer in microseconds\n"
> >       "-audiodev none,id=id,[,prop[=value][,...]]\n"
> >       "                dummy driver that discards all output\n"
> >   #ifdef CONFIG_AUDIO_ALSA
> > @@ -524,7 +524,7 @@ Valid values are: @code{s8}, @code{s16}, @code{s32}, @code{u8},
> >   @item in|out.voices=@var{voices}
> >   Specify the number of @var{voices} to use.  Default is 1.
> > -@item in|out.buffer=@var{usecs}
> > +@item in|out.buffer-length=@var{usecs}
> >   Sets the size of the buffer in microseconds.
> >   @end table
> > 
> 
> Double checking it's indeed "buffer-length" in qapi.  Also I spot a
> different bug: the alsa documentation qemu-options.hx has "period-len" but
> according to qapi it should be "period-length".  Care to fix it or should I
> submit a different patch?

Thanks.  I will send another revision.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation
  2019-09-17 19:47   ` Zoltán Kővágó
@ 2019-09-18  9:48     ` Stefan Hajnoczi
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2019-09-18  9:48 UTC (permalink / raw)
  To: Zoltán Kővágó
  Cc: qemu-devel, Stefan Hajnoczi, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

On Tue, Sep 17, 2019 at 09:47:11PM +0200, Zoltán Kővágó wrote:
> On 2019-09-11 16:58, Stefan Hajnoczi wrote:
> > The "latency" parameter wasn't covered by the documentation.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Zoltán Kővágó <DirtY.iCE.hu@gmail.com>
> > ---
> > How is this parameter related to buffer-length?
> 
> Pulseaudio being a client-server architecture is a bit different than the
> other backends, plus it also has to mix multiple streams. buffer-length
> corresponds to the buffer inside qemu, while latency corresponds to
> pulseaudio.  For playback, the latency should be "maximum latency that the
> application can deal with", if a different client request a lower latency,
> our latency will decrease too.  It's up to the server to figure out an
> optimal buffer size on the server side of the things.
> For recording it's the size of the buffer we will read at a time from
> pulseaudio.

Thanks for explaining.  I will expand the help text in v2.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-18  9:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 14:58 [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi
2019-09-11 14:58 ` [Qemu-devel] [PATCH 1/2] audio: fix buffer-length typo in documentation Stefan Hajnoczi
2019-09-17 19:29   ` Zoltán Kővágó
2019-09-18  9:47     ` Stefan Hajnoczi
2019-09-11 14:58 ` [Qemu-devel] [PATCH 2/2] audio: add -audiodev pa, in|out.latency= to documentation Stefan Hajnoczi
2019-09-17 19:47   ` Zoltán Kővágó
2019-09-18  9:48     ` Stefan Hajnoczi
2019-09-17 15:58 ` [Qemu-devel] [PATCH 0/2] audio: -audiodev documentation tweaks Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).