[pve-devel] [PATCH 05/11] add soundcard device

Derumier Alexandre aderumier at odiso.com
Wed Sep 7 15:34:40 CEST 2011


Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
 PVE/QemuServer.pm |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 814e9d4..af9ab3c 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -186,6 +186,11 @@ my $confdesc = {
 	type => 'string',
 	description => "Set a name for the VM. Only used on the configuration web interface.",
     },
+    soundhw => {
+	optional => 1,
+	type => 'string',
+	description => "Sound card model",
+    },
     description => {
 	optional => 1,
 	type => 'string',
@@ -2020,9 +2025,8 @@ sub config_to_command {
     push @$cmd, '-k', $kb if $kb;
 
     # enable sound
-    #my $soundhw = $conf->{soundhw} || $defaults->{soundhw};
-    #push @$cmd, '-soundhw', 'es1370';
-    #push @$cmd, '-soundhw', $soundhw if $soundhw;
+    my $soundhw = $conf->{soundhw} || $defaults->{soundhw};
+    push @$cmd, '-device', $soundhw.',id=sound0' if $soundhw;
 
     # add scsi controllers
     my $maxdev = 7;
-- 
1.7.2.5




More information about the pve-devel mailing list