qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]