From patchwork Mon Dec 10 23:45:05 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: 205098 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 4466C2C00F8 for ; Tue, 11 Dec 2012 10:51:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 03358A015D; Mon, 10 Dec 2012 23:51:10 +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 GZUjAt--oZGc; Mon, 10 Dec 2012 23:51:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 3E357A01AF; Mon, 10 Dec 2012 23:48:32 +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 25D4B8F74B for ; Mon, 10 Dec 2012 23:47:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AD95A8A224 for ; Mon, 10 Dec 2012 23:47:07 +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 oM4NhBSNWGkq for ; Mon, 10 Dec 2012 23:46:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5238E89FF5 for ; Mon, 10 Dec 2012 23:46:03 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id u3so1789834wey.16 for ; Mon, 10 Dec 2012 15:46:03 -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=b3H3HqajOc2C/b97drCIT/Jp+Rp8IvuvPrr41GHU0Kw=; b=dXaVk7uigR/wJjH6YFmqz4XgBJ8lf4P1x2DAj/tEIovUen2XKzEQWqJTCCFUuNasdR 6UkD5KyfVcax7HgQcyxXE0iQCDS1jqhoorf6oHdIdiJCY02wMkqVbrSAXekuBBownYx6 EnNs8dHw0un1ANim3ejW/Vg3yBGb7sQ7wl6JMPSjCLtqA94ivUYKr9fmwM0Vbu+7rol4 +x30tb/9ZHPMURjZSrddr0N/Z7qWYKvVQFeSzoZyAXAxhoV+MtjLrJfe9UD2OKw9tjm5 cG2OYbuasdpZZjS7w9tbvMjmKnPn4jP5JyjMqKSmm6AVhuJKmEylW9xKU1Ak0mcUx07c +60g== Received: by 10.180.92.71 with SMTP id ck7mr13666518wib.20.1355183163097; Mon, 10 Dec 2012 15:46:03 -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 bz12sm13895257wib.5.2012.12.10.15.46.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 15:46:02 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Tue, 11 Dec 2012 00:45:05 +0100 Message-Id: <1355183112-10735-46-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1355183112-10735-1-git-send-email-yann.morin.1998@free.fr> References: <1355183112-10735-1-git-send-email-yann.morin.1998@free.fr> Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 45/52] 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 34a3a04..dfe9cbb 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 \