[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Let's remove some deprecated stuff
From: |
Gerd Hoffmann |
Subject: |
Re: Let's remove some deprecated stuff |
Date: |
Thu, 29 Apr 2021 14:40:49 +0200 |
Hi,
> For this to go away, I'd rather have something like the -nic option that
> provides an easy way to set up the front end and back end.
>
> In other words you would do something like -audiohw
> <audiodev-args>,model=xxx and it gets desugared automatically to either
>
> -audiodev <audiodev-args>,id=foo -device devname,audiodev=xxx
>
> or
>
> -audiodev <audiodev-args>,id=foo -M propname=foo
Suggestions how to do that in a clean way?
Given that -audiodev is qapi-based I tried it this way:
--- a/qapi/audio.json
+++ b/qapi/audio.json
@@ -419,3 +419,22 @@
'sdl': 'AudiodevSdlOptions',
'spice': 'AudiodevGenericOptions',
'wav': 'AudiodevWavOptions' } }
+
+##
+# @AudioDevice:
+#
+# TODO
+##
+{ 'enum': 'AudioDevice',
+ 'data': [ 'pcspk', 'ac97', 'hda' ] }
+
+##
+# @AudioConfig:
+#
+# TODO
+##
+{ 'struct': 'AudioConfig',
+ 'base': 'Audiodev',
+ 'data': {
+ 'model': 'AudioDevice'
+}}
But qemu doesn't like the schema:
qapi/audio.json: In struct 'AudioConfig':
qapi/audio.json:436: 'base' requires a struct type, union type 'Audiodev' isn't
We could easily support the case that no additional options are
specified, like this:
+{ 'struct': 'AudioConfig',
+ 'data': {
+ 'driver': 'AudiodevDriver',
+ 'model': 'AudioDevice'
+}}
But then you have to switch to the long form as soon as you want
specify any audiodev config option. Maybe that is ok, dunno how
much configuration options -nic supports.
take care,
Gerd
- Re: Let's remove some deprecated stuff, (continued)
Re: Let's remove some deprecated stuff, Peter Maydell, 2021/04/29
Re: Let's remove some deprecated stuff, Daniel P . Berrangé, 2021/04/29
Re: Let's remove some deprecated stuff, Paolo Bonzini, 2021/04/29
- Re: Let's remove some deprecated stuff,
Gerd Hoffmann <=
- Re: Let's remove some deprecated stuff, Kevin Wolf, 2021/04/29
- Re: Let's remove some deprecated stuff, Gerd Hoffmann, 2021/04/29
- Re: Let's remove some deprecated stuff, Philippe Mathieu-Daudé, 2021/04/29
- Re: Let's remove some deprecated stuff, Markus Armbruster, 2021/04/30
- Re: Let's remove some deprecated stuff, Gerd Hoffmann, 2021/04/30
Re: Let's remove some deprecated stuff, Thomas Huth, 2021/04/29
Re: Let's remove some deprecated stuff, Stefan Hajnoczi, 2021/04/29
Re: Let's remove some deprecated stuff, Eduardo Habkost, 2021/04/29
Re: Let's remove some deprecated stuff, Robert Hoo, 2021/04/29