qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 01/50] qapi: qapi for audio backends


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v3 01/50] qapi: qapi for audio backends
Date: Thu, 17 Jan 2019 09:54:08 +0100
User-agent: NeoMutt/20180716

  Hi,

> +##
> +# @AudiodevAlsaPerDirectionOptions:
> +#
> +# Options of the alsa backend that are used for both playback and recording.
> +#
> +# @dev: the name of the alsa device to use (default 'default')
> +#
> +# @try-poll: attempt to use poll mode, falling back to non polling access on
> +#            failure (default on)
> +#
> +# Since: 4.0
> +##
> +{ 'struct': 'AudiodevAlsaPerDirectionOptions',
> +  'data': {
> +    '*dev':      'str',
> +    '*try-poll': 'bool' } }
> +
> +##
> +# @AudiodevAlsaOptions:
> +#
> +# Options of the alsa audio backend.
> +#
> +# @alsa-in: options of the capture stream
> +#
> +# @alsa-out: options of the playback stream
> +#
> +# @threshold: set the threshold (in microseconds) when playback starts
> +#
> +# Since: 4.0
> +##
> +{ 'struct': 'AudiodevAlsaOptions',
> +  'data': {
> +    '*alsa-in':   'AudiodevAlsaPerDirectionOptions',
> +    '*alsa-out':  'AudiodevAlsaPerDirectionOptions',
> +    '*threshold': 'uint32' } }

Hmm, do we need try-poll as per-direction option?  If not we could
simplify AudiodevAlsaOptions this way ...

{ 'struct': 'AudiodevAlsaOptions',
  'data': {
    '*dev-in':    'str',
    '*dev-out':   'str',
    '*threshold': 'uint32'
    '*try-poll':  'bool' } }

... eliminating some nesting.

> +##
> +# @AudiodevOssPerDirectionOptions:
> +#
> +# Options of the oss backend that are used for both playback and recording.
> +#
> +# @dev: file name of the oss device (default '/dev/dsp')
> +#
> +# @try-poll: attempt to use poll mode, falling back to non polling access on
> +#            failure (default on)
> +#
> +# Since: 4.0
> +##
> +{ 'struct': 'AudiodevOssPerDirectionOptions',
> +  'data': {
> +    '*dev':      'str',
> +    '*try-poll': 'bool' } }

Same here.

> +##
> +# @AudiodevPaOptions:
> +#
> +# Options of the pa (PulseAudio) audio backend.
> +#
> +# @server: PulseAudio server address (default: let PulseAudio choose)
> +#
> +# @sink: name of the sink to use
> +#
> +# @source: name of the source to use
> +#
> +# Since: 4.0
> +##
> +{ 'struct': 'AudiodevPaOptions',
> +  'data': {
> +    '*server': 'str',
> +    '*sink':   'AudiodevPaPerDirectionOptions',
> +    '*source': 'AudiodevPaPerDirectionOptions' } }

AudiodevPaPerDirectionOptions has only the name field, so we can drop
the struct and just use '*sink' : 'str' ...

cheers,
  Gerd




reply via email to

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