Re: [PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)
Gerd Hoffmann, le jeu. 11 mars 2021 12:37:38 +0100, a ecrit: > Which would also drop support for serial braille devices. Not sure > how much of a problem that would be these days. It is an important concern: we also need to be able to test braille devices connected through serial. Samuel
Re: [PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)
Hi, > > It is arguably the case for disk, > > serial, net, and host, yet we removed those anyway, to make the regular > > and more expressive interface the only one. > > The problem with those devices was that they used their own parameter > parsing code, Yes, that was IMHO the most important issue. Two ways to configure devices, the usual properties and the hand-crafted and often buggy device-specific parsers. Now we are down to simple aliasing without parameter support, except for braille which has the special chardev handling. Given we keep braille support anyway there is little reason to drop the aliasing support for the other devices which don't require parameters. It's literally a single line of code per device, hardly a big maintainance burden. The benefit is we don't invalidate tons of webpages which document "-usbdevice tablet" and the like. > We didn't make up our minds for three years now. In my eyes that's a > decision for keeping -usbdevice braille around. Another option could be to integrate the braille bits into the usb-braille device, then kill the separate chardev. Which would also drop support for serial braille devices. Not sure how much of a problem that would be these days. But that likewise needs someone to step up doing the work ... take care, Gerd
Re: [PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)
On 11/03/21 09:38, Markus Armbruster wrote: If we decide we want something else, keep -usbdevice braille deprecated until something else is ready, then keep it deprecated for a sensible grace period, then remove it. Flip-flopping deprecation in between is not helpful. If we can't make up our minds, keep it deprecated until we do. Only if we decide the sugar should remain -usbdevice braille, we should undeprecate it now. The road to the CLI hell we're in is paved with "convenience". A lot of the work I did in 6.0 on vl.c and friends was exactly to figure out: - which of our CLI interfaces are a maintainability issue and really need deprecation - which of our CLI interfaces can be modified to improve maintainability and simplify the addition of new interfaces - how machine creation *really* works, so that it's easy to add things at the right spot. Of course _everything_ is a maintenance cost, but you can at least make sure that the cost is not visible to most developers. This series, as well as the previous removal of parameterized -usbdevice is just doing that: keep the decent parts that do not hamper maintainability, deprecate/remove the rest. Paolo
Re: [PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)
On 11/03/2021 09.38, Markus Armbruster wrote: Thomas Huth writes: When trying to remove the -usbdevice option, there were complaints that "-usbdevice braille" is still a very useful shortcut for some people. Thus we never remove this option. Since it's not such a big burden to keep it around, and it's also convenient in the sense that you don't have to worry to enable a host controller explicitly with this option, we should remove it from he deprecation list again. However, there is one exception: "-usbdevice audio" should go away, since audio devices without "audiodev=..." parameter are also on the deprecation list and you cannot use "-usbdevice audio" with "audiodev". Signed-off-by: Thomas Huth I accept the complaint that the replacement of "-usbdevice braille" is less convenient. This is not the case for the -usbdevice tablet, mouse, keyboard, ccid, and wacom-tablet. Well, if we keep "-usbdevice braille" (which we should unless somebody comes up with another easy to use replacement for blind people), then it also does not hurt too much to keep tablet, mouse, keyboard and wacom-tablet, since the code for these is rather simple and thus not a great burden to maintain. And these are mentioned in a lot of documents, scripts and howtos out there, so users are used to them. However, searching for "-usbdevice ccid", I hardly get any results, so I guess we could also simply remove that one. It is arguably the case for disk, serial, net, and host, yet we removed those anyway, to make the regular and more expressive interface the only one. The problem with those devices was that they used their own parameter parsing code, including bugs we had to take care about, so there was a higher level of maintenance involved there. I think that alone justified their removal. However, "braille is special" is only an argument for *braille* sugar. It doesn't extend to -usbdevice tablet, mouse etc. I am against undeprecating these. If we decide we want braille sugar, we then need to decide whether it should be -usbdevice braille or something else, like -braille. I've raised that question three years ago already. Nobody stepped forward to implement -braille, so I think we should keep -usbdevice braille for now. If we can't make up our minds, keep it deprecated until we do. We didn't make up our minds for three years now. In my eyes that's a decision for keeping -usbdevice braille around. Thomas
Re: [PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)
Thomas Huth writes: > When trying to remove the -usbdevice option, there were complaints that > "-usbdevice braille" is still a very useful shortcut for some people. > Thus we never remove this option. Since it's not such a big burden to > keep it around, and it's also convenient in the sense that you don't > have to worry to enable a host controller explicitly with this option, > we should remove it from he deprecation list again. > > However, there is one exception: "-usbdevice audio" should go away, since > audio devices without "audiodev=..." parameter are also on the deprecation > list and you cannot use "-usbdevice audio" with "audiodev". > > Signed-off-by: Thomas Huth I accept the complaint that the replacement of "-usbdevice braille" is less convenient. This is not the case for the -usbdevice tablet, mouse, keyboard, ccid, and wacom-tablet. It is arguably the case for disk, serial, net, and host, yet we removed those anyway, to make the regular and more expressive interface the only one. Perhaps braille is special enough to justify sugar. Paolo wrote: Braille is worth a special case because a subset of our user base (blind people) will use it 100% of the time, plus it is not supported by libvirt and hence virt-manager I'm not against extending the grace period to give libvirt (and hence virt-manager) more time to transition to the regular interface. For libvirt, the regular (and often more expressive) interface is almost always preferable to sugared interfaces. I'm not even against braille sugar if our human users of braille truly need it, as long as it's reasonably unobtrusive. Straightforward macro expansion is. However, "braille is special" is only an argument for *braille* sugar. It doesn't extend to -usbdevice tablet, mouse etc. I am against undeprecating these. If we decide we want braille sugar, we then need to decide whether it should be -usbdevice braille or something else, like -braille. If we decide we want something else, keep -usbdevice braille deprecated until something else is ready, then keep it deprecated for a sensible grace period, then remove it. Flip-flopping deprecation in between is not helpful. If we can't make up our minds, keep it deprecated until we do. Only if we decide the sugar should remain -usbdevice braille, we should undeprecate it now. The road to the CLI hell we're in is paved with "convenience".
[PATCH 3/4] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)
When trying to remove the -usbdevice option, there were complaints that "-usbdevice braille" is still a very useful shortcut for some people. Thus we never remove this option. Since it's not such a big burden to keep it around, and it's also convenient in the sense that you don't have to worry to enable a host controller explicitly with this option, we should remove it from he deprecation list again. However, there is one exception: "-usbdevice audio" should go away, since audio devices without "audiodev=..." parameter are also on the deprecation list and you cannot use "-usbdevice audio" with "audiodev". Signed-off-by: Thomas Huth --- docs/system/deprecated.rst | 9 - docs/system/removed-features.rst | 8 hw/usb/dev-audio.c | 1 - softmmu/vl.c | 2 -- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index cfabe69846..816eb4084f 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -21,15 +21,6 @@ deprecated. System emulator command line arguments -- -``-usbdevice`` (since 2.10.0) -' - -The ``-usbdevice DEV`` argument is now a synonym for setting -the ``-device usb-DEV`` argument instead. The deprecated syntax -would automatically enable USB support on the machine type. -If using the new syntax, USB support must be explicitly -enabled via the ``-machine usb=on`` argument. - ``-drive file=json:{...{'driver':'file'}}`` (since 3.0) ''' diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst index c8481cafbd..ea28904e5f 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -38,6 +38,14 @@ or ``-display default,show-cursor=on`` instead. QEMU 5.0 introduced an alternative syntax to specify the size of the translation block cache, ``-accel tcg,tb-size=``. +``-usbdevice audio`` (removed in 6.0) +' + +This option lacked the possibility to specify an audio backend device. +Use ``-device usb-audio`` now instead (and specify a corresponding USB +host controller or ``-usb`` if necessary). + + QEMU Machine Protocol (QMP) commands diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index e1486f81e0..f5cb246792 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -1024,7 +1024,6 @@ static const TypeInfo usb_audio_info = { static void usb_audio_register_types(void) { type_register_static(&usb_audio_info); -usb_legacy_register(TYPE_USB_AUDIO, "audio", NULL); } type_init(usb_audio_register_types) diff --git a/softmmu/vl.c b/softmmu/vl.c index ff488ea3e7..76ebe7bb7a 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3180,8 +3180,6 @@ void qemu_init(int argc, char **argv, char **envp) qemu_opts_parse_noisily(olist, "usb=on", false); break; case QEMU_OPTION_usbdevice: -error_report("'-usbdevice' is deprecated, please use " - "'-device usb-...' instead"); olist = qemu_find_opts("machine"); qemu_opts_parse_noisily(olist, "usb=on", false); add_device_config(DEV_USB, optarg); -- 2.27.0