History | View | Annotate | Download (39 kB)
qom: Unify type registration
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 wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
qdev: kill off DeviceInfo
It is no longer used in the tree since everything is done natively throughQEMU Object Model.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: convert to QEMU Object Model
hda-codec: convert to QEMU Object Model
qdev: use a wrapper to access reset and promote reset to a class method
qdev: don't access name through info
We already have a QOM interface for this so let's use it.
qdev: move qdev->info to class
Right now, DeviceInfo acts as the class for qdev. In order to switch to aproper ObjectClass derivative, we need to ween all of the callers off ofinteracting directly with the info pointer.
intel-hda: fix stream search
commit ba43d28916c4f51c19bd7366089155ce81bee058 introduces a bug:The stream-not-found case doesn't error out any more, instead thecode silently uses the first stream. Fix it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
intel-hda: Use PCI DMA stub functions
This updates the intel-hda device emulation to use the explicit PCI DMAfunctions, instead of directly calling physical memory access functions.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
qdev: switch children device list to QTAILQ
SCSI buses will need to read the children list first-to-last. Thisrequires using a QTAILQ, because hell breaks loose if you just tryinserting at the tail (thus reversing the order of all existingvisits from last-to-first to first-to-tail)....
hda: do not mix output and input stream states, RHBZ #740493
Windows 7 may use the same stream number for input and output.Current code will confuse streams.
Changes since v1:- keep running_compat[] for migration version 1- add running_real[] for migration version 2...
hda: do not mix output and input streams, RHBZ #740493
Windows 7 may use the same stream number for input and output.That will result in lot of garbage on playback.
The hardcoded value of 4 needs to be in sync with GCAP streamsdescription and IN/OUT registers....
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
pci: rename pci_register_bar_region() to pci_register_bar()
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
intel-hda: convert to memory API
intel-hda: use specific endian ld/st_phys
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/intel-hda.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
MSI: Robust resource release
msi_init may fail, so we need to check on uninit if the cap wasactually installed. This also avoids that the users need to check.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hda-intel: convert to pci_register_bar_simple()
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
change all other clock references to use nanosecond resolution accessors
This was done with:
sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' )...
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
intel-hda: fix codec addressing.
The HDA bus supports up to 15 codecs, with addresses 0 ... 14.We get that wrong in two places:
Revert "intel-hda: fix codec addressing."
Misses braces
This reverts commit acc086837e49b44f15eff6007bb1726844df7aec.
intel-hda: Honor WAKEEN bits.
HDA: Honor WAKEEN bits when deciding to raise an interrupt on codecstatus change. This prevents an interrupt storm with the Haiku HDAdriver which does not handle codec status changes in the irq handler.
Signed-off-by: François Revol <revol@free.fr>...
intel-hda: update irq status on WAKEEN changes.
When the guest updates the WAKEEN register wemust re-calculate the IRQ status.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: malc <av1474@comtv.ru>
intel-hda: add msi support
This patch adds MSI support to the intel hda audio driver. It isenabled by default, use '-device intel-hda,msi=0' to disable it.
[ v2: codestyle: add braces ]
intel-hda: exit cleanup
Add pci exit callback for the intel-hda device and cleanup properly.Also add an exit callback to the HDA bus implementation and make sureit is called on qdev_free().
Add Intel HD Audio support to qemu.
This patch adds three devices to qemu:
intel-hda Intel HD Audio Controller, the PCI device. Provides a HDA bus. Emulates ICH6 at the moment. Adding a ICH9 PCIE variant shouldn't be hard.
hda-duplex HDA Codec. Attaches to the HDA bus. Supports 16bit stereo,...