sim-card
/
qemu
Archived
10
0
Fork 0

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.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4792 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
malc 2008-06-25 21:04:05 +00:00
parent a214c59855
commit 0c58ac1c76
3 changed files with 38 additions and 119 deletions

View File

@ -38,27 +38,7 @@
#define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown" #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown"
static struct audio_driver *drvtab[] = { static struct audio_driver *drvtab[] = {
#ifdef CONFIG_OSS AUDIO_DRIVERS
&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
&no_audio_driver, &no_audio_driver,
&wav_audio_driver &wav_audio_driver
}; };

131
configure vendored
View File

@ -24,6 +24,8 @@ cross_prefix=""
cc="gcc" cc="gcc"
gcc3_search="yes" 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" 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" host_cc="gcc"
ar="ar" ar="ar"
make="make" make="make"
@ -87,16 +89,6 @@ mingw32="no"
EXESUF="" EXESUF=""
gdbstub="yes" gdbstub="yes"
slirp="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_lib=""
fmod_inc="" fmod_inc=""
vnc_tls="yes" vnc_tls="yes"
@ -133,32 +125,32 @@ if [ "$cpu" = "i386" ] ; then
fi fi
;; ;;
GNU/kFreeBSD) GNU/kFreeBSD)
oss="yes" audio_drv_list="oss"
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
kqemu="yes" kqemu="yes"
fi fi
;; ;;
FreeBSD) FreeBSD)
bsd="yes" bsd="yes"
oss="yes" audio_drv_list="oss"
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
kqemu="yes" kqemu="yes"
fi fi
;; ;;
NetBSD) NetBSD)
bsd="yes" bsd="yes"
oss="yes" audio_drv_list="oss"
;; ;;
OpenBSD) OpenBSD)
bsd="yes" bsd="yes"
oss="yes" audio_drv_list="oss"
;; ;;
Darwin) Darwin)
bsd="yes" bsd="yes"
darwin="yes" darwin="yes"
darwin_user="yes" darwin_user="yes"
cocoa="yes" cocoa="yes"
coreaudio="yes" audio_drv_list="coreaudio"
OS_CFLAGS="-mdynamic-no-pic" OS_CFLAGS="-mdynamic-no-pic"
OS_LDFLAGS="-framework CoreFoundation -framework IOKit" OS_LDFLAGS="-framework CoreFoundation -framework IOKit"
;; ;;
@ -191,11 +183,11 @@ SunOS)
fi fi
fi fi
if test -f /usr/include/sys/soundcard.h ; then if test -f /usr/include/sys/soundcard.h ; then
oss=yes audio_drv_list="oss"
fi fi
;; ;;
*) *)
oss="yes" audio_drv_list="oss"
linux="yes" linux="yes"
linux_user="yes" linux_user="yes"
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
@ -264,18 +256,12 @@ for opt do
;; ;;
--disable-sdl) sdl="no" --disable-sdl) sdl="no"
;; ;;
--enable-coreaudio) coreaudio="yes"
;;
--enable-alsa) alsa="yes"
;;
--enable-esd) esd="yes"
;;
--enable-dsound) dsound="yes"
;;
--enable-fmod) fmod="yes"
;;
--fmod-lib=*) fmod_lib="$optarg" --fmod-lib=*) fmod_lib="$optarg"
;; ;;
--audio-card-list=*) audio_card_list="$optarg"
;;
--audio-drv-list=*) audio_drv_list="$optarg"
;;
--fmod-inc=*) fmod_inc="$optarg" --fmod-inc=*) fmod_inc="$optarg"
;; ;;
--disable-vnc-tls) vnc_tls="no" --disable-vnc-tls) vnc_tls="no"
@ -284,21 +270,13 @@ for opt do
;; ;;
--disable-slirp) slirp="no" --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-kqemu) kqemu="no"
;; ;;
--disable-brlapi) brlapi="no" --disable-brlapi) brlapi="no"
;; ;;
--enable-profiler) profiler="yes" --enable-profiler) profiler="yes"
;; ;;
--enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" --enable-cocoa) cocoa="yes" ; sdl="no" ;
;; ;;
--disable-gfx-check) check_gfx="no" --disable-gfx-check) check_gfx="no"
;; ;;
@ -422,15 +400,8 @@ echo " --disable-werror disable compilation abort on warning"
echo " --disable-sdl disable SDL" echo " --disable-sdl disable SDL"
echo " --enable-cocoa enable COCOA (Mac OS X only)" echo " --enable-cocoa enable COCOA (Mac OS X only)"
echo " --enable-mingw32 enable Win32 cross compilation with mingw32" echo " --enable-mingw32 enable Win32 cross compilation with mingw32"
echo " --enable-adlib enable Adlib emulation" echo " --audio-drv-list set audio drivers list"
echo " --enable-ac97 enable AC97 emulation" echo " --audio-card-list set list of additional emulated audio cards"
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 " --enable-mixemu enable mixer emulation" echo " --enable-mixemu enable mixer emulation"
echo " --disable-brlapi disable BrlAPI" echo " --disable-brlapi disable BrlAPI"
echo " --disable-vnc-tls disable TLS encryption for VNC server" echo " --disable-vnc-tls disable TLS encryption for VNC server"
@ -721,7 +692,7 @@ else
# Make sure to disable cocoa if sdl was set # Make sure to disable cocoa if sdl was set
if test "$sdl" = "yes" ; then if test "$sdl" = "yes" ; then
cocoa="no" cocoa="no"
coreaudio="no" audio_drv_list="echo $audio_drv_list | sed s,coreaudio,,g"
fi fi
fi # -z $sdl fi # -z $sdl
@ -835,14 +806,8 @@ if test "$sdl" != "no" ; then
fi fi
echo "curses support $curses" echo "curses support $curses"
echo "mingw32 support $mingw32" echo "mingw32 support $mingw32"
echo "Adlib support $adlib" echo "Audio drivers $audio_drv_list"
echo "AC97 support $ac97" echo "Extra audio cards $audio_card_list"
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 "Mixer emulation $mixemu" echo "Mixer emulation $mixemu"
if test "$fmod" = "yes"; then if test "$fmod" = "yes"; then
if test -z $fmod_lib || test -z $fmod_inc; then if test -z $fmod_lib || test -z $fmod_inc; then
@ -1036,52 +1001,26 @@ if test "$slirp" = "yes" ; then
echo "CONFIG_SLIRP=yes" >> $config_mak echo "CONFIG_SLIRP=yes" >> $config_mak
echo "#define CONFIG_SLIRP 1" >> $config_h echo "#define CONFIG_SLIRP 1" >> $config_h
fi fi
if test "$adlib" = "yes" ; then for card in $audio_card_list; do
echo "CONFIG_ADLIB=yes" >> $config_mak def=CONFIG_`echo $card | tr [:lower:] [:upper:]`
echo "#define CONFIG_ADLIB 1" >> $config_h echo "$def=yes" >> $config_mak
fi echo "#define $def 1" >> $config_h
if test "$ac97" = "yes" ; then done
echo "CONFIG_AC97=yes" >> $config_mak echo "#define AUDIO_DRIVERS \\" >> $config_h
echo "#define CONFIG_AC97 1" >> $config_h for drv in $audio_drv_list; do
fi echo " &${drv}_audio_driver, \\" >>$config_h
if test "$gus" = "yes" ; then def=CONFIG_`echo $drv | tr [:lower:] [:upper:]`
echo "CONFIG_GUS=yes" >> $config_mak echo "$def=yes" >> $config_mak
echo "#define CONFIG_GUS 1" >> $config_h if test "$drv" == "fmod"; then
fi echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
if test "$cs4231a" = "yes" ; then echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
echo "CONFIG_CS4231A=yes" >> $config_mak fi
echo "#define CONFIG_CS4231A 1" >> $config_h done
fi echo "" >>$config_h
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
if test "$mixemu" = "yes" ; then if test "$mixemu" = "yes" ; then
echo "CONFIG_MIXEMU=yes" >> $config_mak echo "CONFIG_MIXEMU=yes" >> $config_mak
echo "#define CONFIG_MIXEMU 1" >> $config_h echo "#define CONFIG_MIXEMU 1" >> $config_h
fi 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 if test "$vnc_tls" = "yes" ; then
echo "CONFIG_VNC_TLS=yes" >> $config_mak echo "CONFIG_VNC_TLS=yes" >> $config_mak
echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak

View File

@ -183,8 +183,8 @@ PCI UHCI USB controller and a virtual USB hub.
SMP is supported with up to 255 CPUs. SMP is supported with up to 255 CPUs.
Note that adlib, ac97, gus and cs4231a are only available when QEMU Note that adlib, ac97, gus and cs4231a are only available when QEMU
was configured with --enable-adlib, --enable-ac97, --enable-gus or was configured with --audio-card-list option containing the name(s) of
--enable-cs4231a respectively. required cards.
QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
VGA BIOS. VGA BIOS.