]> git.proxmox.com Git - qemu.git/commitdiff
audio: remove HAS_AUDIO
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Apr 2013 16:43:59 +0000 (18:43 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 29 Apr 2013 17:16:36 +0000 (12:16 -0500)
Several targets can have wavcapture/-soundhw support via PCI cards.
HAS_AUDIO is a useless limitation, remove it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1366303444-24620-4-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
arch_init.c
configure
hmp-commands.hx
include/sysemu/arch_init.h
monitor.c
vl.c

index 050418485c7547b14328a28292375afaedbaf87d..655dfa5d3bc1ffbbdd9e0b14eccf22a299ece886 100644 (file)
@@ -887,7 +887,6 @@ SaveVMHandlers savevm_ram_handlers = {
     .cancel = ram_migration_cancel,
 };
 
-#ifdef HAS_AUDIO
 struct soundhw {
     const char *name;
     const char *descr;
@@ -1006,14 +1005,6 @@ void audio_init(ISABus *isa_bus, PCIBus *pci_bus)
         }
     }
 }
-#else
-void select_soundhw(const char *optarg)
-{
-}
-void audio_init(ISABus *isa_bus, PCIBus *pci_bus)
-{
-}
-#endif
 
 int qemu_uuid_parse(const char *str, uint8_t *uuid)
 {
@@ -1069,15 +1060,6 @@ void cpudef_init(void)
 #endif
 }
 
-int audio_available(void)
-{
-#ifdef HAS_AUDIO
-    return 1;
-#else
-    return 0;
-#endif
-}
-
 int tcg_available(void)
 {
     return 1;
index 34e8cbb42db6f584133d2872628e42ea2739f472..09b3c30d68f04cc64c52a4bb0439c0790b661129 100755 (executable)
--- a/configure
+++ b/configure
@@ -4457,14 +4457,6 @@ alpha)
 ;;
 esac
 
-if test "$target_softmmu" = "yes" ; then
-  case "$TARGET_BASE_ARCH" in
-  arm|lm32|i386|mips|ppc)
-    cflags="-DHAS_AUDIO $cflags"
-  ;;
-  esac
-fi
-
 if test "$gprof" = "yes" ; then
   echo "TARGET_GPROF=yes" >> $config_target_mak
   if test "$target_linux_user" = "yes" ; then
index df44906ef94ba8da74565044bb21430d301264b7..9cea4151b9cdb929e4235a255948ff61698c965b 100644 (file)
@@ -736,7 +736,6 @@ info mice
 @end example
 ETEXI
 
-#ifdef HAS_AUDIO
     {
         .name       = "wavcapture",
         .args_type  = "path:F,freq:i?,bits:i?,nchannels:i?",
@@ -744,7 +743,6 @@ ETEXI
         .help       = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
         .mhandler.cmd = do_wav_capture,
     },
-#endif
 STEXI
 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
 @findex wavcapture
@@ -759,7 +757,6 @@ Defaults:
 @end itemize
 ETEXI
 
-#ifdef HAS_AUDIO
     {
         .name       = "stopcapture",
         .args_type  = "n:i",
@@ -767,7 +764,6 @@ ETEXI
         .help       = "stop capture",
         .mhandler.cmd = do_stop_capture,
     },
-#endif
 STEXI
 @item stopcapture @var{index}
 @findex stopcapture
index aed3d1d9a7c53558c3d96f76e3b0f5e36efcc37a..f18de333a2f20a6334ec95e9540589f2b3ac1bb3 100644 (file)
@@ -30,7 +30,6 @@ void select_soundhw(const char *optarg);
 void do_acpitable_option(const QemuOpts *opts);
 void do_smbios_option(const char *optarg);
 void cpudef_init(void);
-int audio_available(void);
 void audio_init(ISABus *isa_bus, PCIBus *pci_bus);
 int tcg_available(void);
 int kvm_available(void);
index 332abe76f3f2f373e3504878976b85597e95855e..8f828d4cbe1a1c2898fe4526d35f81652d6daf7b 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -1862,7 +1862,6 @@ static void do_info_capture(Monitor *mon, const QDict *qdict)
     }
 }
 
-#ifdef HAS_AUDIO
 static void do_stop_capture(Monitor *mon, const QDict *qdict)
 {
     int i;
@@ -1903,7 +1902,6 @@ static void do_wav_capture(Monitor *mon, const QDict *qdict)
     }
     QLIST_INSERT_HEAD (&capture_head, s, entries);
 }
-#endif
 
 static qemu_acl *find_acl(Monitor *mon, const char *name)
 {
diff --git a/vl.c b/vl.c
index 322ea804f9985aaf0fa39f046c7dbe92290b4071..6668b12014dbf46d3164fd257b9e405ca9e1a692 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3232,18 +3232,10 @@ int main(int argc, char **argv, char **envp)
                 add_device_config(DEV_BT, optarg);
                 break;
             case QEMU_OPTION_audio_help:
-                if (!(audio_available())) {
-                    printf("Option %s not supported for this target\n", popt->name);
-                    exit(1);
-                }
                 AUD_help ();
                 exit (0);
                 break;
             case QEMU_OPTION_soundhw:
-                if (!(audio_available())) {
-                    printf("Option %s not supported for this target\n", popt->name);
-                    exit(1);
-                }
                 select_soundhw (optarg);
                 break;
             case QEMU_OPTION_h: