From patchwork Sun Dec 16 17:01:51 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: 206728 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 ADDB52C009B for ; Mon, 17 Dec 2012 04:04:12 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9D9DCA00D6; Sun, 16 Dec 2012 17:04:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 92PyfgjuixT3; Sun, 16 Dec 2012 17:04:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 48EF6A0110; Sun, 16 Dec 2012 17:03:12 +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 CD5AB8F74B for ; Sun, 16 Dec 2012 17:02:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 54B2680C10 for ; Sun, 16 Dec 2012 17:02:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PogCnMqfBxDI for ; Sun, 16 Dec 2012 17:02:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2367280C0E for ; Sun, 16 Dec 2012 17:02:40 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id e12so2204752wge.10 for ; Sun, 16 Dec 2012 09:02:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references; bh=i6qDwLz+XNocgb58UIIudTanfrvctpwEA2yPg2zYi7U=; b=wSXNOulvpnMGcUeSXvqBBJcItnaFspnsTzCgHSTHHj0uKFE1jDbioyCFGKj+6rywZ0 eNxkAabbWwZ5nIe99hzqM+6GpXSDuFUPQIWtyujdBXeJGekQ85GB2VM1GKN5bnApEfzC 0F0UX6dFPqsd/5vgHLtVP7ClAY9Ehs4e0yySKr8m6X9SsVSR3TuLMsMsFOK+mKa/Hq8Q cT7MvQG8F1Uj2IRPTz2L2JdDCJbSGdhn6EKM4pp94w2zVvWWPuWqX+pKIjAawH6suVg7 Gu3pYkgDQyPZ3zNN/7IknCKTfm04GwKGjGPc2NFEEtWGZFB6+bC0q7nZdM4LAfXGMOBA oXXA== X-Received: by 10.180.24.9 with SMTP id q9mr11579654wif.14.1355677359533; Sun, 16 Dec 2012 09:02:39 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-41-119.w90-32.abo.wanadoo.fr. [90.32.24.119]) by mx.google.com with ESMTPS id w5sm7363031wif.11.2012.12.16.09.02.37 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 16 Dec 2012 09:02:38 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sun, 16 Dec 2012 18:01:51 +0100 Message-Id: <3be46bb09c3a8eee5f7a71850c27d94d96f27949.1355677144.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 22/27] 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 deabb6f..dad72a8 100644 --- a/package/qemu/Config.in +++ b/package/qemu/Config.in @@ -200,6 +200,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_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. + +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. + comment "Misc. features" config BR2_PACKAGE_QEMU_UUID diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk index f16a03b..7144377 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 \