Fix audio voices tests
v2 cover Fix audio voices tests
Changes for v2:
* Sent by git send-email to keep correct format
Fix to remove obsolete warning on -audiodev ...,in.voices=0 and improvement for better readability of audio out.voices test
Helge Konetzka (2):
audio: fix in.voices test
audio: improve out.voices test
audio/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.0
PATCH v2 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.
Signed-off-by Helge Konetzka <[email protected]>
Reviewed-by Marc-André Lureau <[email protected]>
--- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
audio/audio.c +1 -1
@@ -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.38.0
PATCH v2 2/2 audio: improve out.voices test
In reply to Helge KonetzkaImprove readability of audio out.voices test:
If 1 is logged and set after positive test, 1 should be tested.
Signed-off-by Helge Konetzka <[email protected]>
Reviewed-by Marc-André Lureau <[email protected]>
--- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
audio/audio.c +1 -1
@@ -1750,7 +1750,7 @@ static AudioState *audio_init(Audiodev *dev, const char *name) s->nb_hw_voices_out =audio_get_pdo_out (dev)->voices; s->nb_hw_voices_in =audio_get_pdo_in (dev)->voices; -if (s->nb_hw_voices_out <=0 ) { +if (s->nb_hw_voices_out <1 ) {dolog ("Bogus number of playback voices %d, setting to 1\n" , s->nb_hw_voices_out); s->nb_hw_voices_out =1 ;
Signature · 1 line
2.38.0