Skip to contentSkip to conversation

audio: fix in.voices test

PATCH Superseded Helge Konetzka 3 participants 3 messages Sep 25, 2022 – Oct 11, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 audio: fix in.voices test

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.

---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
audio/audio.c +1 -1
index cfa4119c05..8a0ade4052 100644
@@ -1756,7 +1756,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;
Signature · 1 line
2.37.3
Reviewed-by on v1 1/2
#1 lore raw
Quoted 8 lines · Helge Konetzka

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.

weird case, ok :)

Quoted 22 lines
---
  audio/audio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
audio/audio.c +1 -1
index cfa4119c05..8a0ade4052 100644
@@ -1756,7 +1756,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;

--
2.37.3

Signature · 1 line
Marc-André Lureau
#2 lore raw
In reply to Helge Konetzka
Quoted 16 lines · Helge Konetzka

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.

---
 audio/audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
audio/audio.c +0 -0
index cfa4119c05..8a0ade4052 100644

audio/audio.c static AudioState *audio_init(Audiodev *dev, const · line 1756

Quoted 1 line
audio/audio.c +0 -0
@@ -1756,7 +1756,7 @@ static AudioState *audio_init(Audiodev *dev, const
 char *name)

Patch is mangled (line-wrapped) here, 'git am' refuses to accept it. Please use 'git send-email' to post patches,

thanks & take care,
Gerd