]> git.proxmox.com Git - mirror_qemu.git/commitdiff
audio: fix in.voices test
authorHelge Konetzka <hk@zapateado.de>
Wed, 12 Oct 2022 11:49:24 +0000 (13:49 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Oct 2022 18:36:17 +0000 (20:36 +0200)
Calling qemu with valid -audiodev ...,in.voices=0 results in an obsolete
warning:
  audio: Bogus number of capture voices 0, setting to 0
This patch fixes the in.voices test.

Signed-off-by: Helge Konetzka <hk@zapateado.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20221012114925.5084-2-hk@zapateado.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
audio/audio.c

index 886725747bdaec8e74742d0a9928d943bbc28b7d..1ecdbc4191f2baf18b672b4137fd5ca00ceb0e09 100644 (file)
@@ -1778,7 +1778,7 @@ static AudioState *audio_init(Audiodev *dev, const char *name)
         s->nb_hw_voices_out = 1;
     }
 
-    if (s->nb_hw_voices_in <= 0) {
+    if (s->nb_hw_voices_in < 0) {
         dolog ("Bogus number of capture voices %d, setting to 0\n",
                s->nb_hw_voices_in);
         s->nb_hw_voices_in = 0;