History | View | Annotate | Download (37.9 kB)
hw/ac97: Make a bunch of mixer registers read only
The Linux ac97 driver tries to see if optional things like video inputvolume control are available in 2 ways:1) See if the mute bit is set after reset, if it is no further tests are done2) If the mute bit is not set it does a write/read test of the mute bit...
hw/ac97: Use AC97_Record_Gain_Mute not AC97_Line_In_Volume_Mute
After commit 19677a380a70348134ed7650b294522617eb03fc:"hw/ac97: add support for volume control"
We are (correctly) using AC97_Record_Gain_Mute and not AC97_Line_In_Volume_Mutefor recording volume, but various places in hw/ac97 were still assumimg that...
hw/ac97: Mask out unused bits of volume controls
The Linux ac97 drivers does a number of register read/write tests tosee how much resolution a volume control actually has.
This patch takes this into account by masking out any bits written toa volume control reg which should not be there according to the spec....
hw/ac97: Mask out the EAPD bit on Powerdown Ctrl/Stat writes
The Linux AC97 driver tests this bit to decide wether or not to showan External amplifier toggle control.
This patch was also tested with a Windows XP guest without any issues.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
hw/ac97: Fix log message in mixer_load
Fix a small copy and paste error in logging.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: malc <av1474@comtv.ru>
hw/ac97: the volume mask is not only 0x1f
It's a case by case (see Table 66. AC ?97 Baseline Audio Register Map)
Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com>Signed-off-by: malc <av1474@comtv.ru>
hw/ac97: add support for volume control
Combine output volume with Master and PCM registers values.Use default values in mixer_reset ().Set volume on post-load to update backend values.
v4,v5:- fix some code style
Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com>...
hw/ac97: remove USE_MIXER code
That code doesn't compile. The interesting bits for volume control aregoing to be rewritten in the following patch.
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....
Restore consistent formatting
Signed-off-by: malc <av1474@comtv.ru>
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...
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
ac97: don't override the pci subsystem id
This patch removes the code lines which set the subsystem id for theemulated ac97 card to 8086:0000. Due to the device id being zero thesubsystem id isn't vaild anyway. With the patch applied the sound cardgets the default qemu subsystem id (1af4:1100) instead....
ac97: Use PCI DMA stub functions
This updates the ac97 device emulation to use the explicit PCI DMAfunctions, instead of directly calling physical memory access functions.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>Signed-off-by: David Gibson <david@gibson.dropbear.id.au>...
pci: interrupt pin documentation update
Fix up some erroneous comments in code:interrupt pins are named A-D, theinterrupt pin register is always readonlyand isn't zeroed out on reset.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
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>
ac97: convert to memory API
fixes BAR sizing as well.
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
hw/ac97.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>
ac97: Remove unused local variables
cppcheck report:hw/ac97.c:1004: style: Variable 'written' is assigned a value that is never usedhw/ac97.c:1072: style: Variable 'written' is assigned a value that is never used
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
ac97: symbolic names for pci registers
No functional changes. I verified that the generated binarydoes not change.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Acked-by: Glauber Costa <glommer@gmail.com>
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ac97: port to vmstate
ac97: sizeof needs %zd
This change makes DEBUG_AC97 to compile again
ac97: recalculate active after loadvm
ac97: up savevm version and remove active from state
pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t
This patch is preliminary for 64 bit BAR support.Introduce dedicated type, pcibus_t, to represent pci bus address/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Remove unneded ac97 indirection accessing its state
Searching for "inspiration" to convert another device to qdev, I gotac97. Once I understood a bit of qdev, found that ac97 used a not neededindirection. To protect the unaware, just fixed it.
Later, Juan....
qdev: es1370+ac97 description
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Indent ac97 and es1370 according to audio formatting
For the sake of consistency. I pulled in the wrong patches from Gerd whenhe did the qdev conversion.
qdev: convert ac97.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Restore consistent formatting of audio devices
Rename pci_register_io_region() to pci_register_bar()
This function is used to manage a PCI BAR, so make the more genericpci_register_io_region() available to other uses.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
Remove any pretense that there can be more than one AudioState
Push AUD_init down to devices
Now we can safely call AUD_init multiple times we can push it down toindividual audio devices, rather than having to pass it from the boardinit.
Signed-off-by: Paul Brook <paul@codesourcery.com>
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
Use the ARRAY_SIZE() macro where appropriate.
Change from v1: Avoid changing the existing coding style in certain files.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
Make audio violate POSIX less
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5864 c046a42c-6fe2-441c-8c8c-71466251a162
Add calls to pci_device_save/load
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4766 c046a42c-6fe2-441c-8c8c-71466251a162
Do not scare users with ominous error messages from AUD_open*
Apparently Windows Server 2003 sets the frequency for either mc or pivoice to zero, which in turn triggers a call to audio_bug from thischain:
open_voice -> AUD_open_in -> audio_bug (audio_validate_settings):...
PCI AC97 emulation by malc.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3918 c046a42c-6fe2-441c-8c8c-71466251a162