From: Vincent Hanquez Date: Wed, 27 May 2009 06:59:48 +0000 (+0100) Subject: add sound option passing to qemu X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c470f34db027d259faf865a582d29f389bdf0d1b;p=xenclient%2Ftoolstack.git add sound option passing to qemu --- diff --git a/xenops/device.ml b/xenops/device.ml index 539159f..08491fd 100644 --- a/xenops/device.ml +++ b/xenops/device.ml @@ -1150,6 +1150,11 @@ let __start ~xs ~dmpath ~restore ?(timeout=qemu_dm_ready_timeout) info domid = then [ "-vncunused"; "-k"; keymap ], true else [ "-vnc"; string_of_int port; "-k"; keymap ], true in + let sound_options = + match info.sound with + | None -> [] + | Some device -> [ "-soundhw"; device ] + in let l = [ string_of_int domid; (* absorbed by qemu-dm-wrapper *) log; (* absorbed by qemu-dm-wrapper *) @@ -1159,7 +1164,7 @@ let __start ~xs ~dmpath ~restore ?(timeout=qemu_dm_ready_timeout) info domid = "-boot"; info.boot; "-serial"; info.serial; "-vcpus"; string_of_int info.vcpus; ] - @ disp_options @ usb' @ (List.concat nics') + @ disp_options @ sound_options @ usb' @ (List.concat nics') @ (if info.acpi then [ "-acpi" ] else []) @ (if restore then [ "-loadvm"; restorefile ] else []) @ (List.fold_left (fun l pci -> "-pciemulation" :: pci :: l) [] (List.rev info.pci_emulations))