From patchwork Tue Jan 29 22:44:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 216711 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 9EAF22C0096 for ; Wed, 30 Jan 2013 09:47:50 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A6D5CA025D; Tue, 29 Jan 2013 22:47:51 +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 6b7wLVvpoFf5; Tue, 29 Jan 2013 22:47:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D23EDA02B2; Tue, 29 Jan 2013 22:46:20 +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 09D328F753 for ; Tue, 29 Jan 2013 22:45:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 98BBE8CA1C for ; Tue, 29 Jan 2013 22:45:08 +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 y1Vk1R1L3Ege for ; Tue, 29 Jan 2013 22:45:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by whitealder.osuosl.org (Postfix) with ESMTPS id 09FF78CA37 for ; Tue, 29 Jan 2013 22:45:00 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id d7so719382wer.36 for ; Tue, 29 Jan 2013 14:44:59 -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=LhQ7AcsNRvVxD4P2qH2bLYaXfMtglBmt5okE0DsYdKs=; b=K4HV2YyGR24KQCkm4+vXsJFil5L8K/hFDeBzx2ReEm8WZqvDJGR7JO7pfZ7JVe5+VS tSe4CiWNZBzQ7TIfpSgZ982KfiMdqA9QYSr1GOWaXgpWZIiDGFNJQIE6pqIqfMyAeWPi 76Azb2gasxl12xnu/VcGyRaKS9xbkTgVk9ssrYQRc+r6/QzdV1m2r0Z0hrsK5RGEChqi L6sntF8CXz7wlPkw6p3lPmynIw/UtPJ132rASK39Vumt1WzA1AeTESaImsP8JXRgzDMv yjCrd/LmeF0DCO3gppk2dJ3jMYVIICr93/YymGPHa0F1aJTpAtnxCH5DXpSHy7lyInwt xPhg== X-Received: by 10.180.82.41 with SMTP id f9mr5103044wiy.25.1359499499120; Tue, 29 Jan 2013 14:44:59 -0800 (PST) Received: from localhost.localdomain (ARennes-256-1-39-23.w90-32.abo.wanadoo.fr. [90.32.22.23]) by mx.google.com with ESMTPS id ge2sm5826459wib.4.2013.01.29.14.44.57 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 29 Jan 2013 14:44:58 -0800 (PST) From: "Yann E. MORIN" To: buildroot@busybox.net Date: Tue, 29 Jan 2013 23:44:07 +0100 Message-Id: <29b13779bd73a7688bc4bb0230a2f7db6158b2d8.1359498903.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 23/29] 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 0e45b18..d6b2f95 100644 --- a/package/qemu/Config.in +++ b/package/qemu/Config.in @@ -201,6 +201,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 8a082b4..0cd1a37 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 @@ -308,8 +325,6 @@ define QEMU_CONFIGURE_CMDS --prefix=/usr \ --cross-prefix=$(TARGET_CROSS) \ --with-system-pixman \ - --audio-drv-list= \ - --audio-card-list= \ --enable-kvm \ --enable-nptl \ --enable-vhost-net \