All of lore.kernel.org
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4792] Change the way audio is configured
Date: Wed, 25 Jun 2008 21:04:06 +0000	[thread overview]
Message-ID: <E1KBc9u-0002CB-DR@cvs.savannah.gnu.org> (raw)

Revision: 4792
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4792
Author:   malc
Date:     2008-06-25 21:04:05 +0000 (Wed, 25 Jun 2008)

Log Message:
-----------
Change the way audio is configured

Instead of having separate option for each card and driver use
--audio-drv-list and --audio-card-list options.

Under Linux it allows to set the default(first probed) driver
to something other than OSS.

Modified Paths:
--------------
    trunk/audio/audio.c
    trunk/configure
    trunk/qemu-doc.texi

Modified: trunk/audio/audio.c
===================================================================
--- trunk/audio/audio.c	2008-06-25 19:59:53 UTC (rev 4791)
+++ trunk/audio/audio.c	2008-06-25 21:04:05 UTC (rev 4792)
@@ -38,27 +38,7 @@
 #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown"
 
 static struct audio_driver *drvtab[] = {
-#ifdef CONFIG_OSS
-    &oss_audio_driver,
-#endif
-#ifdef CONFIG_ALSA
-    &alsa_audio_driver,
-#endif
-#ifdef CONFIG_COREAUDIO
-    &coreaudio_audio_driver,
-#endif
-#ifdef CONFIG_DSOUND
-    &dsound_audio_driver,
-#endif
-#ifdef CONFIG_FMOD
-    &fmod_audio_driver,
-#endif
-#ifdef CONFIG_SDL
-    &sdl_audio_driver,
-#endif
-#ifdef CONFIG_ESD
-    &esd_audio_driver,
-#endif
+    AUDIO_DRIVERS
     &no_audio_driver,
     &wav_audio_driver
 };

Modified: trunk/configure
===================================================================
--- trunk/configure	2008-06-25 19:59:53 UTC (rev 4791)
+++ trunk/configure	2008-06-25 21:04:05 UTC (rev 4792)
@@ -24,6 +24,8 @@
 cc="gcc"
 gcc3_search="yes"
 gcc3_list="gcc-3.4.6 gcc-3.4 gcc34 gcc-3.3.6 gcc-3.3 gcc33 gcc-3.2 gcc32"
+audio_drv_list=""
+audio_card_list=""
 host_cc="gcc"
 ar="ar"
 make="make"
@@ -87,16 +89,6 @@
 EXESUF=""
 gdbstub="yes"
 slirp="yes"
-adlib="no"
-ac97="no"
-gus="no"
-cs4231a="no"
-oss="no"
-dsound="no"
-coreaudio="no"
-alsa="no"
-esd="no"
-fmod="no"
 fmod_lib=""
 fmod_inc=""
 vnc_tls="yes"
@@ -133,32 +125,32 @@
 fi
 ;;
 GNU/kFreeBSD)
-oss="yes"
+audio_drv_list="oss"
 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     kqemu="yes"
 fi
 ;;
 FreeBSD)
 bsd="yes"
-oss="yes"
+audio_drv_list="oss"
 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     kqemu="yes"
 fi
 ;;
 NetBSD)
 bsd="yes"
-oss="yes"
+audio_drv_list="oss"
 ;;
 OpenBSD)
 bsd="yes"
-oss="yes"
+audio_drv_list="oss"
 ;;
 Darwin)
 bsd="yes"
 darwin="yes"
 darwin_user="yes"
 cocoa="yes"
-coreaudio="yes"
+audio_drv_list="coreaudio"
 OS_CFLAGS="-mdynamic-no-pic"
 OS_LDFLAGS="-framework CoreFoundation -framework IOKit"
 ;;
@@ -191,11 +183,11 @@
         fi
     fi
     if test -f /usr/include/sys/soundcard.h ; then
-        oss=yes
+        audio_drv_list="oss"
     fi
 ;;
 *)
-oss="yes"
+audio_drv_list="oss"
 linux="yes"
 linux_user="yes"
 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
@@ -264,18 +256,12 @@
   ;;
   --disable-sdl) sdl="no"
   ;;
-  --enable-coreaudio) coreaudio="yes"
+  --fmod-lib=*) fmod_lib="$optarg"
   ;;
-  --enable-alsa) alsa="yes"
+  --audio-card-list=*) audio_card_list="$optarg"
   ;;
-  --enable-esd) esd="yes"
+  --audio-drv-list=*) audio_drv_list="$optarg"
   ;;
-  --enable-dsound) dsound="yes"
-  ;;
-  --enable-fmod) fmod="yes"
-  ;;
-  --fmod-lib=*) fmod_lib="$optarg"
-  ;;
   --fmod-inc=*) fmod_inc="$optarg"
   ;;
   --disable-vnc-tls) vnc_tls="no"
@@ -284,21 +270,13 @@
   ;;
   --disable-slirp) slirp="no"
   ;;
-  --enable-adlib) adlib="yes"
-  ;;
-  --enable-ac97) ac97="yes"
-  ;;
-  --enable-gus) gus="yes"
-  ;;
-  --enable-cs4231a) cs4231a="yes"
-  ;;
   --disable-kqemu) kqemu="no"
   ;;
   --disable-brlapi) brlapi="no"
   ;;
   --enable-profiler) profiler="yes"
   ;;
-  --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"
+  --enable-cocoa) cocoa="yes" ; sdl="no" ;
   ;;
   --disable-gfx-check) check_gfx="no"
   ;;
@@ -422,15 +400,8 @@
 echo "  --disable-sdl            disable SDL"
 echo "  --enable-cocoa           enable COCOA (Mac OS X only)"
 echo "  --enable-mingw32         enable Win32 cross compilation with mingw32"
-echo "  --enable-adlib           enable Adlib emulation"
-echo "  --enable-ac97            enable AC97 emulation"
-echo "  --enable-gus             enable Gravis Ultrasound emulation"
-echo "  --enable-cs4231a         enable CS4231A emulation"
-echo "  --enable-coreaudio       enable Coreaudio audio driver"
-echo "  --enable-alsa            enable ALSA audio driver"
-echo "  --enable-esd             enable EsoundD audio driver"
-echo "  --enable-fmod            enable FMOD audio driver"
-echo "  --enable-dsound          enable DirectSound audio driver"
+echo "  --audio-drv-list         set audio drivers list"
+echo "  --audio-card-list        set list of additional emulated audio cards"
 echo "  --enable-mixemu          enable mixer emulation"
 echo "  --disable-brlapi         disable BrlAPI"
 echo "  --disable-vnc-tls        disable TLS encryption for VNC server"
@@ -721,7 +692,7 @@
     # Make sure to disable cocoa if sdl was set
     if test "$sdl" = "yes" ; then
        cocoa="no"
-       coreaudio="no"
+       audio_drv_list="echo $audio_drv_list | sed s,coreaudio,,g"
     fi
 fi # -z $sdl
 
@@ -835,14 +806,8 @@
 fi
 echo "curses support    $curses"
 echo "mingw32 support   $mingw32"
-echo "Adlib support     $adlib"
-echo "AC97 support      $ac97"
-echo "GUS support       $gus"
-echo "CS4231A support   $cs4231a"
-echo "CoreAudio support $coreaudio"
-echo "ALSA support      $alsa"
-echo "EsounD support    $esd"
-echo "DSound support    $dsound"
+echo "Audio drivers     $audio_drv_list"
+echo "Extra audio cards $audio_card_list"
 echo "Mixer emulation   $mixemu"
 if test "$fmod" = "yes"; then
     if test -z $fmod_lib || test -z $fmod_inc; then
@@ -1036,52 +1001,26 @@
   echo "CONFIG_SLIRP=yes" >> $config_mak
   echo "#define CONFIG_SLIRP 1" >> $config_h
 fi
-if test "$adlib" = "yes" ; then
-  echo "CONFIG_ADLIB=yes" >> $config_mak
-  echo "#define CONFIG_ADLIB 1" >> $config_h
-fi
-if test "$ac97" = "yes" ; then
-  echo "CONFIG_AC97=yes" >> $config_mak
-  echo "#define CONFIG_AC97 1" >> $config_h
-fi
-if test "$gus" = "yes" ; then
-  echo "CONFIG_GUS=yes" >> $config_mak
-  echo "#define CONFIG_GUS 1" >> $config_h
-fi
-if test "$cs4231a" = "yes" ; then
-  echo "CONFIG_CS4231A=yes" >> $config_mak
-  echo "#define CONFIG_CS4231A 1" >> $config_h
-fi
-if test "$oss" = "yes" ; then
-  echo "CONFIG_OSS=yes" >> $config_mak
-  echo "#define CONFIG_OSS 1" >> $config_h
-fi
-if test "$coreaudio" = "yes" ; then
-  echo "CONFIG_COREAUDIO=yes" >> $config_mak
-  echo "#define CONFIG_COREAUDIO 1" >> $config_h
-fi
-if test "$alsa" = "yes" ; then
-  echo "CONFIG_ALSA=yes" >> $config_mak
-  echo "#define CONFIG_ALSA 1" >> $config_h
-fi
-if test "$esd" = "yes" ; then
-  echo "CONFIG_ESD=yes" >> $config_mak
-  echo "#define CONFIG_ESD 1" >> $config_h
-fi
-if test "$dsound" = "yes" ; then
-  echo "CONFIG_DSOUND=yes" >> $config_mak
-  echo "#define CONFIG_DSOUND 1" >> $config_h
-fi
+for card in $audio_card_list; do
+    def=CONFIG_`echo $card | tr [:lower:] [:upper:]`
+    echo "$def=yes" >> $config_mak
+    echo "#define $def 1" >> $config_h
+done
+echo "#define AUDIO_DRIVERS \\" >> $config_h
+for drv in $audio_drv_list; do
+    echo "    &${drv}_audio_driver, \\" >>$config_h
+    def=CONFIG_`echo $drv | tr [:lower:] [:upper:]`
+    echo "$def=yes" >> $config_mak
+    if test "$drv" == "fmod"; then
+        echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
+        echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
+    fi
+done
+echo "" >>$config_h
 if test "$mixemu" = "yes" ; then
   echo "CONFIG_MIXEMU=yes" >> $config_mak
   echo "#define CONFIG_MIXEMU 1" >> $config_h
 fi
-if test "$fmod" = "yes" ; then
-  echo "CONFIG_FMOD=yes" >> $config_mak
-  echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
-  echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
-  echo "#define CONFIG_FMOD 1" >> $config_h
-fi
 if test "$vnc_tls" = "yes" ; then
   echo "CONFIG_VNC_TLS=yes" >> $config_mak
   echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak

Modified: trunk/qemu-doc.texi
===================================================================
--- trunk/qemu-doc.texi	2008-06-25 19:59:53 UTC (rev 4791)
+++ trunk/qemu-doc.texi	2008-06-25 21:04:05 UTC (rev 4792)
@@ -183,8 +183,8 @@
 SMP is supported with up to 255 CPUs.
 
 Note that adlib, ac97, gus and cs4231a are only available when QEMU
-was configured with --enable-adlib, --enable-ac97, --enable-gus or
---enable-cs4231a respectively.
+was configured with --audio-card-list option containing the name(s) of
+required cards.
 
 QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
 VGA BIOS.

             reply	other threads:[~2008-06-25 21:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25 21:04 malc [this message]
2008-06-27 15:34 ` [Qemu-devel] Re: [4792] Change the way audio is configured consul
2008-06-27 15:46   ` Laurent Vivier
2008-06-27 16:00     ` [Qemu-devel] " consul
2008-06-27 20:03     ` [Qemu-devel][PATCH] " Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1KBc9u-0002CB-DR@cvs.savannah.gnu.org \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.