sound: Use ich9 more generally for PCIe, not just q35

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2022-02-24 15:44:53 -05:00
parent 9a93f9c949
commit 0611302448
5 changed files with 7 additions and 7 deletions

View File

@ -71,7 +71,7 @@
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich6"/>
<sound model="ich9"/>
<video>
<model type="virtio"/>
</video>
@ -151,7 +151,7 @@
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich6"/>
<sound model="ich9"/>
<video>
<model type="virtio"/>
</video>

View File

@ -63,7 +63,7 @@
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich6"/>
<sound model="ich9"/>
<video>
<model type="virtio"/>
</video>

View File

@ -63,7 +63,7 @@
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
<image compression="off"/>
</graphics>
<sound model="ich6"/>
<sound model="ich9"/>
<video>
<model type="virtio"/>
</video>

View File

@ -31,7 +31,7 @@ class DeviceSound(Device):
@staticmethod
def default_model(guest):
if guest.os.is_q35():
if guest.defaults_to_pcie():
return "ich9"
return "ich6"

View File

@ -1005,7 +1005,7 @@ class Guest(XMLBuilder):
ctrl.set_defaults(self)
self.add_device(ctrl)
def _defaults_to_pcie(self):
def defaults_to_pcie(self):
if self.os.is_q35():
return True
if self.os.is_arm_machvirt():
@ -1017,7 +1017,7 @@ class Guest(XMLBuilder):
def _add_q35_pcie_controllers(self):
if any([c for c in self.devices.controller if c.type == "pci"]):
return
if not self._defaults_to_pcie():
if not self.defaults_to_pcie():
return
added = False