[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/25] audio: basic support for multichannel audio
From: |
Kővágó, Zoltán |
Subject: |
[Qemu-devel] [PATCH 21/25] audio: basic support for multichannel audio |
Date: |
Sun, 25 Aug 2019 20:46:23 +0200 |
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 b3b21e07a2..b201cfc736 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -495,13 +495,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 (apdo->buffer_length) {
int dir = 0;
unsigned int btime = apdo->buffer_length;
diff --git a/audio/audio.c b/audio/audio.c
index f46bd5dc3d..2fc5b0ff38 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -242,7 +242,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.22.0
- [Qemu-devel] [PATCH 13/25] audio: remove hw->samples, buffer_size_in/out pcm_ops, (continued)
- [Qemu-devel] [PATCH 13/25] audio: remove hw->samples, buffer_size_in/out pcm_ops, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 16/25] audio: add mixeng option (documentation), Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 17/25] audio: make mixeng optional, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 12/25] audio: unify input and output mixeng buffer management, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 14/25] audio: common rate control code for timer based outputs, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 15/25] audio: split ctl_* functions into enable_* and volume_*, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 19/25] audio: support more than two channels in volume setting, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 21/25] audio: basic support for multichannel audio,
Kővágó, Zoltán <=
- [Qemu-devel] [PATCH 23/25] usb-audio: do not count on avail bytes actually available, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 20/25] audio: replace shift in audio_pcm_info with bytes_per_frame, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 25/25] usbaudio: change playback counters to 64 bit, Kővágó, Zoltán, 2019/08/25
- [Qemu-devel] [PATCH 22/25] paaudio: channel-map option, Kővágó, Zoltán, 2019/08/25