qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 46/50] audio: basic support for multichannel audi


From: Kővágó, Zoltán
Subject: [Qemu-devel] [PATCH v3 46/50] audio: basic support for multichannel audio
Date: Thu, 17 Jan 2019 00:37:19 +0100

Which currently only means removing some checks.  Old code won't require
more than two channels, but new code will need it.

Signed-off-by: Kővágó, Zoltán <address@hidden>
---
 audio/alsaaudio.c | 7 -------
 audio/audio.c     | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 3e5c800d38..f6fe95b557 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -497,13 +497,6 @@ static int alsa_open(bool in, struct alsa_params_req *req,
         goto err;
     }
 
-    if (nchannels != 1 && nchannels != 2) {
-        alsa_logerr2 (err, typ,
-                      "Can not handle obtained number of channels %d\n",
-                      nchannels);
-        goto err;
-    }
-
     if (pdo->buffer_count) {
         if (pdo->buffer_len) {
             int64_t req = pdo->buffer_len * pdo->buffer_count;
diff --git a/audio/audio.c b/audio/audio.c
index c89e82443d..f59dd0100f 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -240,7 +240,7 @@ static int audio_validate_settings (struct audsettings *as)
 {
     int invalid;
 
-    invalid = as->nchannels != 1 && as->nchannels != 2;
+    invalid = as->nchannels < 1;
     invalid |= as->endianness != 0 && as->endianness != 1;
 
     switch (as->fmt) {
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]