mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[HVM] Wnable sound card support for qemu.
Need a sound card to pass some benchmark check. Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
This commit is contained in:
1 parent
73bf5288a0
commit
a3188a47d8
3 files changed
+8
-9
No files matched your search
@@ -249,7 +249,7 @@ class HVMImageHandler(ImageHandler):
|
||||
# Return a list of cmd line args to the device models based on the
|
||||
# xm config file
|
||||
def parseDeviceModelArgs(self, imageConfig, deviceConfig):
|
||||
dmargs = [ 'boot', 'fda', 'fdb', 'audio',
|
||||
dmargs = [ 'boot', 'fda', 'fdb', 'soundhw',
|
||||
'localtime', 'serial', 'stdvga', 'isa', 'vcpus',
|
||||
'usb', 'usbdevice']
|
||||
ret = []
|
||||
@@ -258,10 +258,9 @@ class HVMImageHandler(ImageHandler):
|
||||
|
||||
# python doesn't allow '-' in variable names
|
||||
if a == 'stdvga': a = 'std-vga'
|
||||
if a == 'audio': a = 'enable-audio'
|
||||
|
||||
# Handle booleans gracefully
|
||||
if a in ['localtime', 'std-vga', 'isa', 'enable-audio', 'usb']:
|
||||
if a in ['localtime', 'std-vga', 'isa', 'usb']:
|
||||
if v != None: v = int(v)
|
||||
if v: ret.append("-%s" % a)
|
||||
else:
|
||||
|
||||
@@ -400,9 +400,9 @@ gopts.var('nographic', val='no|yes',
|
||||
fn=set_bool, default=0,
|
||||
use="Should device models use graphics?")
|
||||
|
||||
gopts.var('audio', val='no|yes',
|
||||
fn=set_bool, default=0,
|
||||
use="Should device models enable audio?")
|
||||
gopts.var('soundhw', val='audiodev',
|
||||
fn=set_value, default='',
|
||||
use="Should device models enable audio device?")
|
||||
|
||||
gopts.var('vnc', val='',
|
||||
fn=set_value, default=None,
|
||||
@@ -626,7 +626,7 @@ def configure_hvm(config_image, vals):
|
||||
"""Create the config for HVM devices.
|
||||
"""
|
||||
args = [ 'device_model', 'pae', 'vcpus', 'boot', 'fda', 'fdb',
|
||||
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'audio',
|
||||
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
|
||||
'vnc', 'vncdisplay', 'vncconsole', 'sdl', 'display',
|
||||
'acpi', 'apic', 'xauthority', 'usb', 'usbdevice' ]
|
||||
for a in args:
|
||||
|
||||