All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org,  stefanha@redhat.com,
	 BALATON Zoltan <balaton@eik.bme.hu>,
	 Gerd Hoffmann <kraxel@redhat.com>,
	 Christian Schoenebeck <qemu_oss@crudebyte.com>,
	 Eric Blake <eblake@redhat.com>
Subject: Re: [PULL 8/9] alsaaudio: Set try-poll to false by default
Date: Mon, 26 May 2025 08:27:10 +0200	[thread overview]
Message-ID: <87cybvkhtt.fsf@pond.sub.org> (raw)
In-Reply-To: <20250525132717.527392-9-marcandre.lureau@redhat.com> (marcandre lureau's message of "Sun, 25 May 2025 15:27:15 +0200")

marcandre.lureau@redhat.com writes:

> From: BALATON Zoltan <balaton@eik.bme.hu>
>
> Quoting Volker Rümelin: "try-poll=on tells the ALSA backend to try to
> use an event loop instead of the audio timer. This works most of the
> time. But the poll event handler in the ALSA backend has a bug. For
> example, if the guest can't provide enough audio frames in time, the
> ALSA buffer is only partly full and the event handler will be called
> again and again on every iteration of the main loop. This increases
> the processor load and the guest has less processor time to provide
> new audio frames in time. I have two examples where a guest can't
> recover from this situation and the guest seems to hang."
>
> One reproducer I've found is booting MorphOS demo iso on
> qemu-system-ppc -machine pegasos2 -audio alsa which should play a
> startup sound but instead it freezes. Even when it does not hang it
> plays choppy sound. Volker suggested using command line to set
> try-poll=off saying: "The try-poll=off arguments are typically
> necessary, because the alsa backend has a design issue with
> try-poll=on. If the guest can't provide enough audio frames, it's
> really unhelpful to ask for new audio frames on every main loop
> iteration until the guest can provide enough audio frames. Timer based
> playback doesn't have that problem."
>
> But users cannot easily find this option and having a non-working
> default is really unhelpful so to make life easier just set it to
> false by default which works until the issue with the alsa backend can
> be fixed.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> [ Marc-André - Updated QAPI and CLI doc ]
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Message-Id: <20250316002046.D066A4E6004@zero.eik.bme.hu>
> ---
>  qapi/audio.json   | 2 +-
>  audio/alsaaudio.c | 2 +-
>  qemu-options.hx   | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/qapi/audio.json b/qapi/audio.json
> index dd5a58d13e..49633cf317 100644
> --- a/qapi/audio.json
> +++ b/qapi/audio.json
> @@ -96,7 +96,7 @@
>  # @period-length: the period length in microseconds
>  #
>  # @try-poll: attempt to use poll mode, falling back to non-polling
> -#     access on failure (default true)
> +#     access on failure (default false)
>  #
>  # Since: 4.0
>  ##

Missed this when it was posted (it wasn't cc'ed to me).  Flipping the
default is technically an incompatible change.  I understand the
justification, and I'm not passing judgement on its validity; that's the
audio maintainers job.  I just want to ask: does this need a release
note?

We normally record incompatible changes in docs/about/deprecated.rst and
then docs/about/removed-features.rst, but these don't fit here.

[...]



  reply	other threads:[~2025-05-26  6:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25 13:27 [PULL 0/9] Audio patches marcandre.lureau
2025-05-25 13:27 ` [PULL 1/9] tests/functional: use 'none' audio driver for q800 tests marcandre.lureau
2025-05-25 13:27 ` [PULL 2/9] audio: fix SIGSEGV in AUD_get_buffer_size_out() marcandre.lureau
2025-05-25 13:27 ` [PULL 3/9] audio: fix size calculation " marcandre.lureau
2025-07-09  2:24   ` Michael Tokarev
2025-07-09  7:49     ` Volker Rümelin
2025-05-25 13:27 ` [PULL 4/9] hw/audio/asc: fix SIGSEGV in asc_realize() marcandre.lureau
2025-05-25 13:27 ` [PULL 5/9] hw/audio/asc: replace g_malloc0() with g_malloc() marcandre.lureau
2025-05-25 13:27 ` [PULL 6/9] audio/mixeng: remove unnecessary pointer type casts marcandre.lureau
2025-05-25 13:27 ` [PULL 7/9] audio: add float sample endianness converters marcandre.lureau
2025-05-25 13:27 ` [PULL 8/9] alsaaudio: Set try-poll to false by default marcandre.lureau
2025-05-26  6:27   ` Markus Armbruster [this message]
2025-05-26 10:02     ` Marc-André Lureau
2025-05-28 13:29       ` Markus Armbruster
2025-05-25 13:27 ` [PULL 9/9] audio: Reset rate control when adding bytes marcandre.lureau
2025-05-25 15:20 ` [PULL 0/9] Audio patches Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cybvkhtt.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.