Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-10 Thread Gerd Hoffmann
> > Can we just drop the nesting? > > > > Have a look at DisplayOptions (qapi struct used to store -display > > options). It's a union, has some common base fields, and the > > discriminator field (type in that case) decides which of the data > > branches is used. And on the command line I can d

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-10 Thread Zoltán Kővágó
On 2019-01-10 08:25, Gerd Hoffmann wrote: > Hi, > >> I was thinking about creating an Audiodev (the qapi type) directly would >> be better, then somehow print it with reflection. While this is not a >> typical use of qapi, at least qmp_qom_list creates qapi objects >> directly, so I assume it's

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-09 Thread Gerd Hoffmann
Hi, > I was thinking about creating an Audiodev (the qapi type) directly would > be better, then somehow print it with reflection. While this is not a > typical use of qapi, at least qmp_qom_list creates qapi objects > directly, so I assume it's ok. Yes, it's perfectly fine. > The second prob

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-09 Thread Zoltán Kővágó
On 2019-01-08 04:42, Markus Armbruster wrote: > "Zoltán Kővágó" writes: > >> On 2019-01-07 14:13, Markus Armbruster wrote: >>> "Kővágó, Zoltán" writes: >>> Audio drivers now get an Audiodev * as config paramters, instead of the global audio_option structs. There is some code in audio/

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-07 Thread Gerd Hoffmann
Hi, > > I suspect your series uses the options visitor only because back when > > you started, qobject_input_visitor_new_str() didn't exist. > > Yes, this patch series is a bit old, and at that time this was the best > I could do. I can look into it this (probably only on the weekend > though),

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-07 Thread Markus Armbruster
"Zoltán Kővágó" writes: > On 2019-01-07 14:13, Markus Armbruster wrote: >> "Kővágó, Zoltán" writes: >> >>> Audio drivers now get an Audiodev * as config paramters, instead of the >>> global audio_option structs. There is some code in audio/audio_legacy.c >>> that converts the old environment v

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-07 Thread Zoltán Kővágó
On 2019-01-07 14:13, Markus Armbruster wrote: > "Kővágó, Zoltán" writes: > >> Audio drivers now get an Audiodev * as config paramters, instead of the >> global audio_option structs. There is some code in audio/audio_legacy.c >> that converts the old environment variables to audiodev options (thi

Re: [Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2019-01-07 Thread Markus Armbruster
"Kővágó, Zoltán" writes: > Audio drivers now get an Audiodev * as config paramters, instead of the > global audio_option structs. There is some code in audio/audio_legacy.c > that converts the old environment variables to audiodev options (this > way backends do not have to worry about legacy op

[Qemu-devel] [PATCH v2 06/52] audio: -audiodev command line option basic implementation

2018-12-23 Thread Kővágó, Zoltán
Audio drivers now get an Audiodev * as config paramters, instead of the global audio_option structs. There is some code in audio/audio_legacy.c that converts the old environment variables to audiodev options (this way backends do not have to worry about legacy options). It also contains a replace