[gnome-boxes] installer-media: Implement prefers_ich9



commit 36151bd11fc0d48691fd7dbfa8eeef9f51b60802
Author: Fabiano FidĂȘncio <fidencio redhat com>
Date:   Thu Oct 11 18:32:33 2018 +0200

    installer-media: Implement prefers_ich9
    
    We should prefer ICH9 sound device in any case where using q35 as
    machine type.
    
    Related: https://bugzilla.redhat.com/show_bug.cgi?id=1581422
    
    Signed-off-by: Fabiano FidĂȘncio <fidencio redhat com>

 src/installer-media.vala | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/installer-media.vala b/src/installer-media.vala
index ba6bfc89..4a8d913e 100644
--- a/src/installer-media.vala
+++ b/src/installer-media.vala
@@ -57,7 +57,14 @@
 
     public bool prefers_ich9 {
         get {
-            return false;
+            if (!prefers_q35)
+                return false;
+
+            var device = find_device_by_prop (supported_devices, DEVICE_PROP_NAME, "ich9-hda");
+            if (device == null)
+                return false;
+
+            return true;
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]