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é <berra...@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 <ebl...@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 :|