[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/51] qapi: qapi for audio backends
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 03/51] qapi: qapi for audio backends |
Date: |
Thu, 14 Jan 2016 09:51:35 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 01/14/2016 06:45 AM, Kővágó, Zoltán 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).
>
> 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.
>
> 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 more
> user friendly than samples or bytes.
> * try-poll is now an alsa backend specific option (as all other backends
> currently ignore it)
>
> Signed-off-by: Kővágó, Zoltán <address@hidden>
> ---
> +
> +##
> +# @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:
... '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.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/51] audio 5.1 patches, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 03/51] qapi: qapi for audio backends, Kővágó, Zoltán, 2016/01/14
- Re: [Qemu-devel] [PATCH 03/51] qapi: qapi for audio backends,
Eric Blake <=
- [Qemu-devel] [PATCH 01/51] qapi: support implicit structs in OptsVisitor, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 02/51] qapi: support nested structs in OptsVisitor, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 05/51] audio: -audiodev command line option: documentation, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 04/51] audio: use qapi AudioFormat instead of audfmt_e, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 08/51] coreaudio: port to -audiodev config, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 13/51] sdlaudio: port to -audiodev config, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 16/51] audio: -audiodev command line option: cleanup, Kővágó, Zoltán, 2016/01/14
- [Qemu-devel] [PATCH 15/51] wavaudio: port to -audiodev config, Kővágó, Zoltán, 2016/01/14