From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJl7a-0001WI-Jz for qemu-devel@nongnu.org; Thu, 14 Jan 2016 11:51:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJl7Z-0002NE-6t for qemu-devel@nongnu.org; Thu, 14 Jan 2016 11:51:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJl7Y-0002Ls-Vt for qemu-devel@nongnu.org; Thu, 14 Jan 2016 11:51:37 -0500 References: From: Eric Blake Message-ID: <5697D217.1080907@redhat.com> Date: Thu, 14 Jan 2016 09:51:35 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V0rQXPjMW1IvaXVgapJFWklSAew7hpOID" Subject: Re: [Qemu-devel] [PATCH 03/51] qapi: qapi for audio backends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?S8WRdsOhZ8OzLCBab2x0w6Fu?= , qemu-devel@nongnu.org Cc: Gerd Hoffmann , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V0rQXPjMW1IvaXVgapJFWklSAew7hpOID Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/14/2016 06:45 AM, K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n wrote: > This patch adds structures into qapi to replace the existing > configuration structures used by audio backends currently. This qapi > will be the base of the -audiodev command line parameter (that replaces= > the old environment variables based config). >=20 > This is not a 1:1 translation of the old options, I've tried to make > them much more consistent (e.g. almost every backend had an option to > specify buffer size, but the name was different for every backend, and > some backends required usecs, while some other required frames, samples= > or bytes). Also tried to reduce the number of abbreviations used by the= > config keys. >=20 > Some of the more important changes: > * use `in` and `out` instead of `ADC` and `DAC`, as the former is more > user friendly imho > * moved buffer settings into the global setting area (so it's the same > for all backends that support it. Backends that can't change buffer > size will simply ignore them). Also using usecs, as it's probably mor= e > user friendly than samples or bytes. > * try-poll is now an alsa backend specific option (as all other backend= s > currently ignore it) >=20 > Signed-off-by: K=C5=91v=C3=A1g=C3=B3, Zolt=C3=A1n > --- > + > +## > +# @AudiodevNoOptions > +# > +# The none, coreaudio, sdl and spice audio backend have no options. > +# > +# Since: 2.6 > +## > +{ 'struct': 'AudiodevNoOptions', > + 'data': { } } I've got pending patches that will let us write a flat union as: =2E.. 'data': { 'none': {}, 'coreaudio': {}, 'foo': 'FooType', ... but until that lands, your explicit empty-type placeholder is fine. > +## > +{ 'struct': 'AudiodevCommonOptions', > + 'data': { > + 'id': 'str', > + 'driver': 'AudiodevDriver', > + 'in': 'AudiodevPerDirectionOptions', > + 'out': 'AudiodevPerDirectionOptions', > + '*timer-period': 'int' } } > + > +## > +# @AudiodevBackendOptions > +# > +# Options of an audio backend. > +# > +# Since: 2.6 > +## > +{ 'union': 'Audiodev', > + 'base': 'AudiodevCommonOptions', My pending patches will also allow an anonymous base class, so that we don't have to specify an intermediate AudiodevCommonOptions class. Not a show-stopper, though. Overall looks rather sane (I think we've done the bulk of the reviewing last summer), although I didn't read it closely enough for a R-b tag at this time. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --V0rQXPjMW1IvaXVgapJFWklSAew7hpOID Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWl9IXAAoJEKeha0olJ0NqYWIIAJSyPgnd5i0egxgtS9lbHLle 5KwYDWP2KOwcJ9CpqRJx70W6gsAQzt/J8ygfIMAmqk13/rFSm5+UIYsF1LvF0CRD YJTXUFQhPsFQVe6IWdU09yCmWsC2Oxt8BO5+IlMFOW9/OkWEwXpjx+tApl+/V+hp 5N2hPThKvtnl4I1q8sxICxFPJdOWWFFWJrj/oc3OcEAT0wYU1JvjknWdCeL5R3vh mjXt2/mM7+fnpF+tyWAJMV48/MhS60SBFbh4yp/pV/tMVnB5ZFFn9fym1N/pNpVy DLQRZnSlNTUH5yMdo9aW8hnzE/HwmasX2UjPlCh3EMrgSjArqw2K0dGBvYu9wcI= =ldId -----END PGP SIGNATURE----- --V0rQXPjMW1IvaXVgapJFWklSAew7hpOID--