From patchwork Sun Dec 9 16:35:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 204747 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 1C8262C01FA for ; Mon, 10 Dec 2012 03:41:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E6E1AA0230; Sun, 9 Dec 2012 16:41:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LcXjGGA3oNmv; Sun, 9 Dec 2012 16:41:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id F262FA029A; Sun, 9 Dec 2012 16:37:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3C6218F74B for ; Sun, 9 Dec 2012 16:36:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2A2F7884E1 for ; Sun, 9 Dec 2012 16:36:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GoNZ115iZBt4 for ; Sun, 9 Dec 2012 16:36:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id EF32781B94 for ; Sun, 9 Dec 2012 16:36:21 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id hn14so571438wib.10 for ; Sun, 09 Dec 2012 08:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=TJ0bstlUkx3GLFm+o/UJgiJagnD8tCH5uNWvCHbZImM=; b=oP9YP5Kcdre7hBF2k4li/f+wPhcFUabuNQh+lCrnV4QIIbMM5HeOydk40RyQD/aljL yIGujyEYJdPYu9NRJ2aAanCAMwBFlapGHzSiE3wO8khoiDdu3HA/i09wi/yOsnIvbcVa gctT5/f72wz2fr40SdKB8dyVBMFRY8264fHfeZ2UqEMTBWu+95B0ORhJsttKvkaxfPw+ WkxWNmoYfvoEEQ5yU3Y6G8qmdgX17FmM1naNRdr06hj7kZXDFiHjWzb574q3tLAK8kzf e3uMAGWGKq+9QwOmKlNQMUte/SiP5Y8adgUVVmtzUN9N7S5+/vJAJNrhQ9e6pucdGxhk LIWA== Received: by 10.180.88.71 with SMTP id be7mr6924642wib.17.1355070981433; Sun, 09 Dec 2012 08:36:21 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-76-30.w90-32.abo.wanadoo.fr. [90.32.155.30]) by mx.google.com with ESMTPS id fv2sm6587947wib.4.2012.12.09.08.36.20 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Dec 2012 08:36:20 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sun, 9 Dec 2012 17:35:17 +0100 Message-Id: <1355070924-8009-45-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1355070924-8009-1-git-send-email-yann.morin.1998@free.fr> References: <1355070924-8009-1-git-send-email-yann.morin.1998@free.fr> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 44/51] package/qemu: enable sound X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: "Yann E. MORIN" --- package/qemu/Config.in | 38 ++++++++++++++++++++++++++++++++++++++ package/qemu/qemu.mk | 19 +++++++++++++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/package/qemu/Config.in b/package/qemu/Config.in index 4d8b401..20562a4 100644 --- a/package/qemu/Config.in +++ b/package/qemu/Config.in @@ -204,6 +204,44 @@ config BR2_PACKAGE_QEMU_VDE Say 'y' here to have QEMU connect to VDE (Virtual Distributed Ethernet) switches. +comment "Sound" + +config BR2_PACKAGE_QEMU_SOUND_CARDS + string "Enable sound cards" + default "ac97 es1370 hda" + help + Enter here the list of sound cards you want QEMU to emulate. + The available sound cards are: + ac97 es1370 sb16 cs4231a adlib gus hda + + The default is: ac97 es1370 hda + + Note: even if you say 'n' to both alsa and SDL drivers, below, QEMU + always include the 'wav' driver, which stores the generated sound + into a file, and the 'none' driver, which discards generated sound. + +config BR2_PACKAGE_QEMU_MIXEMU + bool "Enable mixer emulation" + help + Say 'y' here to have QEMU emulate a mixer device. + +config BR2_PACKAGE_QEMU_SOUND_SDL + bool "Enable sound via SDL" + select BR2_PACKAGE_QEMU_SDL # Requires that SDL frontend be selected + select BR2_PACKAGE_SDL + help + Say 'y' here to have QEMU play sound from the VMs via SDL. + + Note: this is only for system emulation, not user emulation. + +config BR2_PACKAGE_QEMU_SOUND_ALSA + bool "Enable sound via alsa" + select BR2_PACKAGE_ALSA_LIB + help + Say 'y' here to have QEMU play sound from the VMs via alsa. + + Note: this is only for system emulation, not user emulation. + comment "Misc. features" config BR2_PACKAGE_QEMU_UUID diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index 110bd49..abcbae7 100644 --- a/package/qemu/qemu.mk +++ b/package/qemu/qemu.mk @@ -211,6 +211,23 @@ else QEMU_OPTS += --disable-vde endif +QEMU_SND_DRV = +ifeq ($(BR2_PACKAGE_QEMU_SOUND_ALSA),y) +QEMU_SND_DRV += alsa +QEMU_DEPENDENCIES += alsa-lib +endif +ifeq ($(BR2_PACKAGE_QEMU_SOUND_SDL),y) +QEMU_SND_DRV += sdl +QEMU_DEPENDENCIES += sdl +endif +ifneq ($(QEMU_SND_DRV),) +QEMU_OPTS += --audio-drv-list="$(QEMU_SND_DRV)" +endif +QEMU_OPTS += --audio-card-list=$(BR2_PACKAGE_QEMU_SOUND_CARDS) +ifeq ($(BR2_PACKAGE_QEMU_MIXEMU),y) +QEMU_OPTS += --enable-mixemu +endif + ifeq ($(BR2_PACKAGE_QEMU_UUID),y) QEMU_OPTS += --enable-uuid QEMU_DEPENDENCIES += util-linux @@ -307,8 +324,6 @@ define QEMU_CONFIGURE_CMDS ./configure \ --prefix=/usr \ --cross-prefix=$(TARGET_CROSS) \ - --audio-drv-list= \ - --audio-card-list= \ --enable-kvm \ --enable-nptl \ --enable-vhost-net \