qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Levitsky <mlevitsk@redhat.com>
To: "Kővágó, Zoltán" <dirty.ice.hu@gmail.com>, qemu-devel@nongnu.org
Cc: "reviewer:Incompatible changes" <libvir-list@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] audio: omitting audiodev= parameter is only deprecated
Date: Mon, 26 Aug 2019 11:31:15 +0300	[thread overview]
Message-ID: <6cb92688caf6514197e82f09b63d74da008b9a6f.camel@redhat.com> (raw)
In-Reply-To: <cd692232ed7a6158e5b77a483cb1d082108a9e45.1566779143.git.DirtY.iCE.hu@gmail.com>

On Mon, 2019-08-26 at 02:29 +0200, Kővágó, Zoltán wrote:
> Unfortunately, changes introduced in af2041ed2d "audio: audiodev=
> parameters no longer optional when -audiodev present" breaks backward
> compatibility.  This patch changes the error into a deprecation warning.
> 
> Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com>
> ---
>  qemu-deprecated.texi | 7 +++++++
>  audio/audio.c        | 8 ++++----
>  2 files changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 00a4b6f350..9d74a1cfc0 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -72,6 +72,13 @@ backend settings instead of environment variables.  To ease migration to
>  the new format, the ``-audiodev-help'' option can be used to convert
>  the current values of the environment variables to ``-audiodev'' options.
>  
> +@subsection Creating sound card devices and vnc without audiodev= property (since 4.2)
> +
> +When not using the deprecated legacy audio config, each sound card
> +should specify an @code{audiodev=} property.  Additionally, when using
> +vnc, you should specify an @code{audiodev=} propery if you plan to
> +transmit audio through the VNC protocol.
> +
>  @subsection -mon ...,control=readline,pretty=on|off (since 4.1)
>  
>  The @code{pretty=on|off} switch has no effect for HMP monitors, but is
> diff --git a/audio/audio.c b/audio/audio.c
> index 7d715332c9..e13addf922 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -1412,8 +1412,9 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
>          drvname = AudiodevDriver_str(dev->driver);
>      } else if (!QTAILQ_EMPTY(&audio_states)) {
>          if (!legacy_config) {
> -            dolog("You must specify an audiodev= for the device %s\n", name);
> -            exit(1);
> +            dolog("Device %s: audiodev default parameter is deprecated, please "
> +                  "specify audiodev=%s\n", name,
> +                  QTAILQ_FIRST(&audio_states)->dev->id);
>          }
>          return QTAILQ_FIRST(&audio_states);
>      } else {
> @@ -1548,8 +1549,7 @@ CaptureVoiceOut *AUD_add_capture(
>  
>      if (!s) {
>          if (!legacy_config) {
> -            dolog("You must specify audiodev when trying to capture\n");
> -            return NULL;
> +            dolog("Capturing without setting an audiodev is deprecated\n");
>          }
>          s = audio_init(NULL, NULL);
>      }


This allowed me to boot th VM with single audiodev without specifying the audiodev in the device,
but on shutdown qemu crashes with heap corruption sadly.

 -audiodev pa,id=snd1,server=/run/user/103992/pulse/native
 -device ich9-intel-hda,id=sound0,msi=on
 -device hda-micro,id=sound0-codec0,bus=sound0.0,cad=0

In qemu output:
free(): invalid next size (fast)


Best regards,
	Maxim Levitsky



  reply	other threads:[~2019-08-26  8:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  0:29 [Qemu-devel] [PATCH 0/3] Audio: misc fixes for "Audio 20190821 patches" Kővágó, Zoltán
2019-08-26  0:29 ` [Qemu-devel] [PATCH 1/3] audio: omitting audiodev= parameter is only deprecated Kővágó, Zoltán
2019-08-26  8:31   ` Maxim Levitsky [this message]
2019-08-26  0:29 ` [Qemu-devel] [PATCH 2/3] audio: paaudio: fix client name Kővágó, Zoltán
2019-08-26  8:21   ` Maxim Levitsky
2019-08-26 19:28     ` Zoltán Kővágó
2019-08-26 20:58       ` Maxim Levitsky
2019-08-26  0:29 ` [Qemu-devel] [PATCH 3/3] audio: paaudio: ability to specify stream name Kővágó, Zoltán
2019-08-26  8:14   ` Maxim Levitsky

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=6cb92688caf6514197e82f09b63d74da008b9a6f.camel@redhat.com \
    --to=mlevitsk@redhat.com \
    --cc=dirty.ice.hu@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=libvir-list@redhat.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).