[MPlayer-cvslog] r34347 - in trunk: configure libao2/ao_alsa.c

diego subversion at mplayerhq.hu
Mon Nov 14 10:58:26 CET 2011


Author: diego
Date: Mon Nov 14 10:58:26 2011
New Revision: 34347

Log:
ao_alsa: drop check for sys/asoundlib.h and ALSA version

The ALSA output driver uses some parts of the ALSA API that were introduced
after the switch to alsa/asoundlib.h, so checking for the deprecated header
location is pointless as it has no chance of working anyway.

Also, now that both ALSA output and input work with the 0.9 and 1.0 series,
there is no need to keep checking for the ALSA version.

Modified:
   trunk/configure
   trunk/libao2/ao_alsa.c

Modified: trunk/configure
==============================================================================
--- trunk/configure	Mon Nov 14 10:58:24 2011	(r34346)
+++ trunk/configure	Mon Nov 14 10:58:26 2011	(r34347)
@@ -5487,50 +5487,19 @@ else
 fi
 echores "$_openal"
 
+
 echocheck "ALSA audio"
-if test "$_alloca" != yes ; then
-  _alsa=no
-  res_comment="alloca missing"
-fi
-if test "$_alsa" != no ; then
+if test "$_alloca" = yes && test "$_alsa" = auto ; then
   _alsa=no
-  cpp_condition_check 'sys/asoundlib.h'  '(SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9)' -lasound $ld_dl $ld_pthread && _alsaver='0.9.x-sys'
-  cpp_condition_check 'alsa/asoundlib.h' '(SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9)' -lasound $ld_dl $ld_pthread && _alsaver='0.9.x-alsa'
-  cpp_condition_check 'sys/asoundlib.h'  '(SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0)' -lasound $ld_dl $ld_pthread && _alsaver='1.0.x-sys'
-  cpp_condition_check 'alsa/asoundlib.h' '(SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0)' -lasound $ld_dl $ld_pthread && _alsaver='1.0.x-alsa'
+  header_check alsa/asoundlib.h -lasound $ld_dl $ld_pthread && _alsa=yes
 fi
-def_alsa='#undef CONFIG_ALSA'
-def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H'
-def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H'
-if test "$_alsaver" ; then
-  _alsa=yes
-  if test "$_alsaver" = '0.9.x-sys' ; then
-    aomodules="alsa $aomodules"
-    def_alsa='#define CONFIG_ALSA 1'
-    def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
-    res_comment="using alsa 0.9.x and sys/asoundlib.h"
-  elif test "$_alsaver" = '0.9.x-alsa' ; then
-    aomodules="alsa $aomodules"
-    def_alsa='#define CONFIG_ALSA 1'
-    def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
-    res_comment="using alsa 0.9.x and alsa/asoundlib.h"
-  elif test "$_alsaver" = '1.0.x-sys' ; then
-    aomodules="alsa $aomodules"
-    def_alsa='#define CONFIG_ALSA 1'
-    def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
-    res_comment="using alsa 1.0.x and sys/asoundlib.h"
-  elif test "$_alsaver" = '1.0.x-alsa' ; then
-    aomodules="alsa $aomodules"
-    def_alsa='#define CONFIG_ALSA 1'
-    def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
-    res_comment="using alsa 1.0.x and alsa/asoundlib.h"
-  else
-    _alsa=no
-    res_comment="unknown version"
-  fi
+if test "$_alsa" = yes ; then
+  aomodules="alsa $aomodules"
+  def_alsa='#define CONFIG_ALSA 1'
   extra_ldflags="$extra_ldflags -lasound $ld_dl $ld_pthread"
 else
   noaomodules="alsa $noaomodules"
+  def_alsa='#undef CONFIG_ALSA'
 fi
 echores "$_alsa"
 
@@ -8349,13 +8318,11 @@ $def_dvdcss
 
 /* system headers */
 $def_alloca_h
-$def_alsa_asoundlib_h
 $def_altivec_h
 $def_malloc_h
 $def_mman_h
 $def_mman_has_map_failed
 $def_soundcard_h
-$def_sys_asoundlib_h
 $def_sys_soundcard_h
 $def_sys_sysinfo_h
 $def_sys_videoio_h

Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c	Mon Nov 14 10:58:24 2011	(r34346)
+++ trunk/libao2/ao_alsa.c	Mon Nov 14 10:58:26 2011	(r34347)
@@ -34,25 +34,15 @@
 #include <math.h>
 #include <string.h>
 #include <alloca.h>
+#define ALSA_PCM_NEW_HW_PARAMS_API
+#define ALSA_PCM_NEW_SW_PARAMS_API
+#include <alsa/asoundlib.h>
 
 #include "config.h"
 #include "subopt-helper.h"
 #include "mixer.h"
 #include "mp_msg.h"
 #include "help_mp.h"
-
-#define ALSA_PCM_NEW_HW_PARAMS_API
-#define ALSA_PCM_NEW_SW_PARAMS_API
-
-#ifdef HAVE_SYS_ASOUNDLIB_H
-#include <sys/asoundlib.h>
-#elif defined(HAVE_ALSA_ASOUNDLIB_H)
-#include <alsa/asoundlib.h>
-#else
-#error "asoundlib.h is not in sys/ or alsa/ - please bugreport"
-#endif
-
-
 #include "audio_out.h"
 #include "audio_out_internal.h"
 #include "libaf/af_format.h"


More information about the MPlayer-cvslog mailing list