From patchwork Mon Aug 17 16:55:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?B?Wm9sdMOhbiBLxZF2w6Fnw7M=?= X-Patchwork-Id: 508028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 30F29140134 for ; Tue, 18 Aug 2015 02:56:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZwSY713d; dkim-atps=neutral Received: from localhost ([::1]:60544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRNhj-0001f2-GS for incoming@patchwork.ozlabs.org; Mon, 17 Aug 2015 12:56:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRNgq-0000tQ-3e for qemu-devel@nongnu.org; Mon, 17 Aug 2015 12:55:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRNgm-00005z-Qx for qemu-devel@nongnu.org; Mon, 17 Aug 2015 12:55:15 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:36235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRNgm-00005v-LO for qemu-devel@nongnu.org; Mon, 17 Aug 2015 12:55:12 -0400 Received: by wicja10 with SMTP id ja10so75122238wic.1 for ; Mon, 17 Aug 2015 09:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=/UF6bNLQX9lcdjTQgrDwbVvMPeP7C9XVkQbXPdDO3lE=; b=ZwSY713d2hN1JCZjpI8vllL7ETensIXWTUWQsi3TNZJSv0XPuSkEVb/80ZRnt3bXmc +4thAt2Bs14RhxH7SxIWRMPm8MzZqpslAMfpyHsKEHtJWOz/exPBnRizZn9d8FoSZt5z mvFnmraoYc8ROTt6nVUaUODWGhZ1hET02uBGYsXZ93JMfls3VUzB+TljVF8gUUyOnncH JEJTWhcAwBShg9VNOZerP2FKTaE3ESR3wYMBxyFV6Hv2zDxT+0bZ1wGpnWq3XXIwr38I qzvMUIJQ60c2+BuFygVxJyTTVuEDe19goj/GQKlYF3/GtG6MmjaVK10is/BM7LbG9e7g oTIw== X-Received: by 10.194.90.225 with SMTP id bz1mr4276471wjb.110.1439830511788; Mon, 17 Aug 2015 09:55:11 -0700 (PDT) Received: from nullptr.home.dirty-ice.org (178-164-172-216.pool.digikabel.hu. [178.164.172.216]) by smtp.gmail.com with ESMTPSA id s16sm17489162wib.16.2015.08.17.09.55.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Aug 2015 09:55:11 -0700 (PDT) From: "=?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?=" X-Google-Original-From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= To: qemu-devel@nongnu.org Date: Mon, 17 Aug 2015 18:55:10 +0200 Message-Id: <5bc5f442ae77921ba60caaa8aeff9828cc6e1623.1439821260.git.DirtY.iCE.hu@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::234 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/5] audio: basic support for multichannel audio X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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 148df13..0e3fa1a 100644 --- a/audio/alsaaudio.c +++ b/audio/alsaaudio.c @@ -499,13 +499,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 bc32312..2aaedd4 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -210,7 +210,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) {