Received: from eggs.gnu.org ([2001:4830:134:3::10]:43662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRSUr-0005jy-Ed for qemu-devel@nongnu.org; Mon, 17 Aug 2015 18:03:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRSUn-00045r-V4 for qemu-devel@nongnu.org; Mon, 17 Aug 2015 18:03:13 -0400 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <5C0ED803-5F1C-4165-8BC4-CB6598BE233B@gmail.com> Date: Mon, 17 Aug 2015 18:03:07 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87a8u29uyf.fsf@blackfin.pond.sub.org> <5C0ED803-5F1C-4165-8BC4-CB6598BE233B@gmail.com> Subject: [Qemu-devel] qemu-doc.texi: Improve USB documentation... and maybe even QEMU also List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Peter Maydell Cc: qemu-devel qemu-devel On Aug 8, 2015, at 8:48 AM, Programmingkid wrote: >=20 > On Aug 8, 2015, at 2:04 AM, Markus Armbruster wrote: >>>=20 >>> USB devices can be connected with the @option{-usbdevice} = commandline option >>> -or the @code{usb_add} monitor command. Available devices are: >>> +or the @code{usb_add} monitor command. Note: some devices may only = work if >>> +added like this: -usb -device . Available devices are: >>=20 >> I'm afraid "may only work" is a bit misleading. All of them work = with >> -device. Old ones are also supported by -usbdevice for backward >> compatibility. The whole section should be rewritten to point to >> -device instead of legacy -usbdevice, but that's no reason to hold up >> your patch. >=20 > I did not know -usbdevice was considered legacy. If that is the case, = then it should probably > be removed from the documentation in favor for -usb -device .=20 Right now using "-usb -device mouse" doesn't work. Neither does = "-usbdevice usb-audio". I think we can all agree that consistency among all the USB devices is a = good thing. Should all USB devices be added like this: -usb -device ?=20= This is an experimental patch of not how QEMU currently works, but how I = think it should work.=20 This documentation adds an "usb_remove" monitor command. This isn't = available right now,=20 but a patch could be made to change this. Any suggestions or additions = are welcomed. Signed-off-by: John Arbuckle --- qemu-doc.texi | 34 ++++++++++++++++++++++++++++++---- 1 files changed, 30 insertions(+), 4 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index 94af8c0..e265d72 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -1316,10 +1316,19 @@ monitor (@pxref{pcsys_keys}). @section USB emulation =20 QEMU emulates a PCI UHCI USB controller. You can virtually plug -virtual USB devices or real host USB devices (experimental, works only -on Linux hosts). QEMU will automatically create and connect virtual = USB hubs +virtual USB devices or real host USB devices. QEMU will automatically +create and connect virtual USB hubs as necessary to connect multiple USB devices. =20 +@subsection USB Monitor Commands: +@table @option +@item usb_add +Adds an usb device. +@item usb_remove +Removes an usb device. +@item info usb +Prints info on all connected usb devices. +@end table @menu * usb_devices:: * host_usb_devices:: @@ -1327,8 +1336,19 @@ as necessary to connect multiple USB devices. @node usb_devices @subsection Connecting USB devices =20 -USB devices can be connected with the @option{-usbdevice} commandline = option -or the @code{usb_add} monitor command. Available devices are: + +To add an USB device from the command-line: +-usb -device + +To add an USB device from the monitor: +usb_add + +Examples: +@example +usb_add mouse +-usb -device mouse -device keyboard -device usb-audio +@end example +*note: the -usb option only needs to be used once. =20 @table @code @item mouse @@ -1381,8 +1401,14 @@ usage: @example qemu-system-i386 [...OPTIONS...] -usbdevice bt:hci,vlan=3D3 -bt = device:keyboard,vlan=3D3 @end example +@item usb-audio +USB sound card. @end table =20 +Legacy note: +USB devices use to be connected with the @option{-usbdevice} = command-line option. +Not all usb devices work with this option now. + @node host_usb_devices @subsection Using host USB devices on a Linux host =20 --=20 1.7.5.4