From: Gerd Hoffmann <kraxel@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1.1] audio: Always call fini on exit
Date: Thu, 24 May 2012 09:11:51 +0200 [thread overview]
Message-ID: <4FBDDF37.1080405@redhat.com> (raw)
In-Reply-To: <4FA2D4C8.7010007@siemens.com>
On 05/03/12 20:56, Jan Kiszka wrote:
> Not only clean up enabled voices but any registered one. Backends like
> pulsaudio rely on unconditional fini handler invocations.
>
> This fixes "Memory pool destroyed but not all memory blocks freed!"
> warnings on VM shutdowns when pa is used.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> audio/audio.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/audio/audio.c b/audio/audio.c
> index bd9237e..4b6e06c 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -1775,7 +1775,7 @@ static void audio_atexit (void)
> HWVoiceOut *hwo = NULL;
> HWVoiceIn *hwi = NULL;
>
> - while ((hwo = audio_pcm_hw_find_any_enabled_out (hwo))) {
> + while ((hwo = audio_pcm_hw_find_any_out (hwo))) {
> SWVoiceCap *sc;
>
> hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE);
I think you better call VOICE_DISABLE only in case the voice is actually
enabled.
> @@ -1791,7 +1791,7 @@ static void audio_atexit (void)
> }
> }
>
> - while ((hwi = audio_pcm_hw_find_any_enabled_in (hwi))) {
> + while ((hwi = audio_pcm_hw_find_any_in (hwi))) {
> hwi->pcm_ops->ctl_in (hwi, VOICE_DISABLE);
Likewise.
> hwi->pcm_ops->fini_in (hwi);
> }
cheers,
Gerd
prev parent reply other threads:[~2012-05-24 7:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 18:56 [Qemu-devel] [PATCH 1.1] audio: Always call fini on exit Jan Kiszka
2012-05-03 19:32 ` malc
2012-05-03 20:02 ` Jan Kiszka
2012-05-03 23:51 ` malc
2012-05-09 19:27 ` Jan Kiszka
2012-05-09 19:33 ` malc
2012-05-16 18:01 ` Jan Kiszka
2012-05-24 7:10 ` Gerd Hoffmann
2012-05-24 7:11 ` Gerd Hoffmann [this message]
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=4FBDDF37.1080405@redhat.com \
--to=kraxel@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
/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 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).