aboutsummaryrefslogtreecommitdiffstats
path: root/hw/usb-audio.c
AgeCommit message (Collapse)AuthorFilesLines
2012-02-15Merge remote-tracking branch 'kraxel/usb.38' into stagingAnthony Liguori1-3/+2
* kraxel/usb.38: (28 commits) xhci: handle USB_RET_NAK xhci: remote wakeup support xhci: kill port arg from xhci_setup_packet xhci: stop on errors xhci: add trb type name lookup support. xhci: signal low- and fullspeed support usb: add USBBusOps->wakeup_endpoint usb: pass USBEndpoint to usb_wakeup usb: maintain async packet list per endpoint usb: Set USBEndpoint in usb_packet_setup(). usb: add USBEndpoint->{nr,pid} usb: USBPacket: add status, rename owner -> ep usb: fold usb_generic_handle_packet into usb_handle_packet usb: kill handle_packet callback usb-xhci: switch to usb_find_device() usb-musb: switch to usb_find_device() usb-ohci: switch to usb_find_device() usb-ehci: switch to usb_find_device() usb-uhci: switch to usb_find_device() usb: handle dev == NULL in usb_handle_packet() ...
2012-02-15qom: Unify type registrationAndreas Färber1-2/+2
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-10usb: Set USBEndpoint in usb_packet_setup().Gerd Hoffmann1-2/+2
With the separation of the device lookup (via usb_find_device) and packet processing we can lookup device and endpoint before setting up the usb packet. So we can initialize USBPacket->ep early and keep it valid for the whole lifecycle of the USBPacket. Also the devaddr and devep fields are not needed any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-10usb: kill handle_packet callbackGerd Hoffmann1-1/+0
All drivers except usb-hub use usb_generic_handle_packet. The only reason the usb hub has its own function is that it used to be called with packets which are intended for downstream devices. With the new, separate device lookup step this doesn't happen any more, so the need for a different handle_packet callback is gone. So we can kill the handle_packet callback and just call usb_generic_handle_packet directly. The special hub handling in usb_handle_packet() can go away for the same reason. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori1-12/+16
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03usb: separate out legacy usb registration from type registrationAnthony Liguori1-1/+2
Type registeration is going to get turned into a QOM call so decouple the legacy support. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-27usb: convert to QEMU Object ModelAnthony Liguori1-16/+22
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-13usb: add audio device modelH. Peter Anvin1-0/+704
This brings a usb audio device to qemu. Output only, fixed at 16bit stereo @ 480000 Hz. Based on a patch from H. Peter Anvin <hpa@linux.intel.com> Usage: add '-device usb-audio' to your qemu command line. Works sorta ok on a idle machine. Known issues: * Is *very* sensitive to latencies. * Burns quite some CPU due to usb polling. In short: It brings the qemu usb emulation to its limits. Enjoy! Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>