From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSD4I-0001Df-81 for qemu-devel@nongnu.org; Wed, 19 Aug 2015 19:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSD4D-000665-6I for qemu-devel@nongnu.org; Wed, 19 Aug 2015 19:46:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSD4D-00065s-0A for qemu-devel@nongnu.org; Wed, 19 Aug 2015 19:46:49 -0400 Message-ID: <1440028003.28369.11.camel@redhat.com> From: Gerd Hoffmann Date: Thu, 20 Aug 2015 01:46:43 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/5] audio: multi channel audio support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?K=C5=91v=C3=A1g=C3=B3=2C_Zolt=C3=A1n?= Cc: qemu-devel@nongnu.org Hi, > Currently you have to specify the number of channels you want to use > when creating the usb-audio device, see the last commit for details. > To do this I currently dynamically allocate the whole USBDesc structure, > which looks ugly. If there's a better way, please let me know! You can have multiple USBDesc stuctures defined and pick one at device initialization time (see hw/usb/dev-hid.c, there are usb 1.1 and usb 2.0 versions of all hid devices). For usb-audio I think we need two: the current one (stereo) and a new one with stereo + 5.1 and 7.1 support. Then for the new one have 4 alternative interface configurations (off, stereo, 5.1, 7.1) instead of only two (off, stereo). Or possibly we need 3 interfaces (stereo, 5.1, 7.1) with on and off alternatives for each of them. Didn't check usb-audio spec. cheers, Gerd