[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] qapi, audio: respect build time conditions in audio sche
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 2/3] qapi, audio: respect build time conditions in audio schema |
Date: |
Wed, 3 Mar 2021 10:09:05 +0000 |
User-agent: |
Mutt/2.0.5 (2021-01-21) |
On Tue, Mar 02, 2021 at 01:05:45PM -0600, Eric Blake wrote:
> On 3/2/21 11:55 AM, Daniel P. Berrangé wrote:
> > Currently the -audiodev accepts any audiodev type regardless of what is
> > built in to QEMU. An error only occurs later at runtime when a sound
> > device tries to use the audio backend.
> >
> > With this change QEMU will immediately reject -audiodev args that are
> > not compiled into the binary. The QMP schema will also be introspectable
> > to identify what is compiled in.
>
> Nice!
>
> >
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > audio/audio.c | 16 +++++++++++++++
> > audio/audio_legacy.c | 41 ++++++++++++++++++++++++++++++++++++++-
> > audio/audio_template.h | 16 +++++++++++++++
> > qapi/audio.json | 44 ++++++++++++++++++++++++++++++++----------
> > 4 files changed, 106 insertions(+), 11 deletions(-)
> >
>
> > +++ b/qapi/audio.json
> > @@ -386,8 +386,24 @@
> > # Since: 4.0
> > ##
> > { 'enum': 'AudiodevDriver',
> > - 'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'jack', 'oss', 'pa',
> > - 'sdl', 'spice', 'wav' ] }
> > + 'data': [ 'none',
> > + { 'name': 'alsa',
> > + 'if': 'defined(CONFIG_AUDIO_ALSA)' },
> > + { 'name': 'coreaudio',
> > + 'if': 'defined(CONFIG_AUDIO_COREAUDIO)' },
> > + { 'name': 'dsound',
> > + 'if': 'defined(CONFIG_AUDIO_DSOUND)' },
> > + { 'name': 'jack',
> > + 'if': 'defined(CONFIG_AUDIO_JACK)' },
> > + { 'name': 'oss',
> > + 'if': 'defined(CONFIG_AUDIO_OSS)' },
> > + { 'name': 'pa',
> > + 'if': 'defined(CONFIG_AUDIO_PA)' },
> > + { 'name': 'sdl',
> > + 'if': 'defined(CONFIG_AUDIO_SDL)' },
> > + { 'name': 'spice',
> > + 'if': 'defined(CONFIG_SPICE)' },
> > + 'wav' ] }
>
> I'll trust that you compiled multiple times to test the various
> interplays between options.
No, just sent it through gitlab CI which I assumed would cover it
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[PATCH 3/3] qapi: provide a friendly string representation of QAPI classes, Daniel P . Berrangé, 2021/03/02
[PATCH 1/3] qapi, audio: add query-audiodev command, Daniel P . Berrangé, 2021/03/02