Преглед изворни кода

enable audio support for qemu-x86/qemu-x86_64

Waldemar Brodkorb пре 10 година
родитељ
комит
3636773aa5

+ 12 - 0
target/config/Config.in.qemuopts

@@ -95,5 +95,17 @@ config ADK_TARGET_QEMU_WITH_VIRTIO
 	select ADK_KERNEL_VIRTIO_NET
 	select ADK_KERNEL_VIRTIO_BLK
 
+endchoice
+
+choice
+prompt "Qemu Emulation with audio support"
+depends on ADK_TARGET_SYSTEM_QEMU_X86_64 || ADK_TARGET_SYSTEM_QEMU_X86
+
+config ADK_TARGET_QEMU_WITHOUT_AUDIO
+	boolean "disabled"
+
+config ADK_TARGET_QEMU_WITH_AUDIO
+	boolean "enabled"
+
 endchoice
 endmenu

+ 3 - 2
target/linux/config/Config.in.audio

@@ -82,10 +82,11 @@ config ADK_KERNEL_SND_INTEL8X0
 	select ADK_KERNEL_SND_PCI
 	select ADK_KERNEL_SND_AC97_CODEC
 	default m if ADK_TARGET_SYSTEM_IBM_X40
+	default m if ADK_TARGET_QEMU_WITH_AUDIO
 	default n
-	depends on ADK_TARGET_WITH_PCI
+	depends on ADK_TARGET_WITH_PCI || ADK_TARGET_QEMU
 	help
-	  Driver for intel chipsets.	
+	  Driver for intel chipsets.
 
 config ADK_KERNEL_SND_VIA82XX
 	prompt "VIA82XX driver"

+ 4 - 0
target/x86/Makefile

@@ -14,6 +14,10 @@ QEMU_ARGS:=-M pc
 QEMU_ARGS+=${ADK_QEMU_ARGS}
 QEMU_ARGS+=-net user -net nic,model=e1000
 
+ifeq ($(ADK_TARGET_QEMU_WITH_AUDIO),y)
+QEMU_ARGS+=-soundhw ac97
+endif
+
 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
 ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y)
 CREATE:=./scripts/create.sh -g -t

+ 4 - 0
target/x86_64/Makefile

@@ -14,6 +14,10 @@ QEMU_ARGS:=-M pc
 QEMU_ARGS+=${ADK_QEMU_ARGS}
 QEMU_ARGS+=-net user -net nic,model=e1000
 
+ifeq ($(ADK_TARGET_QEMU_WITH_AUDIO),y)
+QEMU_ARGS+=-soundhw ac97
+endif
+
 ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y)
 ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y)
 CREATE:=./scripts/create.sh -g -t