summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acconfig.h2
-rw-r--r--configure.in9
-rw-r--r--misc/SlackBuild.in31
-rw-r--r--misc/build_rpms.sh.in4
-rw-r--r--misc/xine-lib.spec.in13
-rw-r--r--po/fr.po2
-rw-r--r--po/xine-lib.pot2
-rw-r--r--src/audio_out/Makefile.am13
-rw-r--r--src/audio_out/audio_alsa05_out.c660
9 files changed, 7 insertions, 729 deletions
diff --git a/acconfig.h b/acconfig.h
index 59ebc7554..e3282eb08 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -71,8 +71,6 @@
/* Define this if you have Alsa (libasound) installed */
#undef HAVE_ALSA
-/* Define this if you have alsa 0.5.x installed */
-#undef HAVE_ALSA05
/* Define this if you have alsa 0.9.x and more installed */
#undef HAVE_ALSA09
diff --git a/configure.in b/configure.in
index 1a5961da6..06918f3a9 100644
--- a/configure.in
+++ b/configure.in
@@ -366,18 +366,14 @@ AM_CONDITIONAL(HAVE_OSS, test x"$have_ossaudio" = "xyes")
dnl
dnl Alsa support
dnl
-AM_PATH_ALSA(0.5.5,
+AM_PATH_ALSA(0.9.0,
[ AC_DEFINE(HAVE_ALSA)
- if test x"$have_alsa05" = "xyes"; then
- AC_DEFINE(HAVE_ALSA05)
- fi
if test x"$have_alsa09" = "xyes"; then
AC_DEFINE(HAVE_ALSA09)
fi
],
AC_MSG_RESULT(*** All of ALSA dependent parts will be disabled ***))
AM_CONDITIONAL(HAVE_ALSA, test x"$no_alsa" != "xyes")
-AM_CONDITIONAL(HAVE_ALSA05, test x"$have_alsa05" = "xyes")
AM_CONDITIONAL(HAVE_ALSA09, test x"$have_alsa09" = "xyes")
@@ -941,9 +937,6 @@ if test x"$have_ossaudio" = "xyes"; then
echo " - oss (Open Sound System)"
fi
if test x"$no_alsa" != "xyes"; then
- if test x"$have_alsa05" = "xyes"; then
- echo " - alsa05 (Alsa 0.5.x)"
- fi
if test x"$have_alsa09" = "xyes"; then
echo " - alsa09 (Alsa 0.9.x)"
fi
diff --git a/misc/SlackBuild.in b/misc/SlackBuild.in
index 6ef95e8b3..6e6b13fa9 100644
--- a/misc/SlackBuild.in
+++ b/misc/SlackBuild.in
@@ -8,7 +8,6 @@
CWD=`pwd`
PACKAGE=@PACKAGE@.tgz
@HAVE_OSS_TRUE@ossPACKAGE=@PACKAGE@-oss.tgz
-@HAVE_ALSA05_TRUE@alsa05PACKAGE=@PACKAGE@-alsa05.tgz
@HAVE_ALSA09_TRUE@alsa09PACKAGE=@PACKAGE@-alsa09.tgz
@HAVE_DXR3_TRUE@dxr3PACKAGE=@PACKAGE@-dxr3.tgz
@HAVE_ARTS_TRUE@artsPACKAGE=@PACKAGE@-arts.tgz
@@ -55,12 +54,6 @@ EOF
@HAVE_OSS_TRUE@@PACKAGE@-oss: audio plugin with oss support.
@HAVE_OSS_TRUE@EOF
-@HAVE_ALSA05_TRUE@cat > package_descriptions_alsa05 << EOF
-@HAVE_ALSA05_TRUE@@PACKAGE@-alsa05: @PACKAGE@-alsa05 @SPEC_VERSION@.
-@HAVE_ALSA05_TRUE@@PACKAGE@-alsa05:
-@HAVE_ALSA05_TRUE@@PACKAGE@-alsa05: audio plugin with alsa 0.5.x support.
-@HAVE_ALSA05_TRUE@EOF
-
@HAVE_ALSA09_TRUE@cat > package_descriptions_alsa09 << EOF
@HAVE_ALSA09_TRUE@@PACKAGE@-alsa09: @PACKAGE@-alsa09 @SPEC_VERSION@.
@HAVE_ALSA09_TRUE@@PACKAGE@-alsa09:
@@ -111,7 +104,7 @@ EOF
}
#
-# Create extra packages (alsa05, alsa09 and dxr3, etc...)
+# Create extra packages (alsa09 and dxr3, etc...)
#
do_extra_packages() {
cwd=`pwd`
@@ -125,15 +118,6 @@ do_extra_packages() {
@HAVE_OSS_TRUE@ rm -rf oss && \
@HAVE_OSS_TRUE@ rm -f $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_oss.la $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_oss.so
-## Alsa 0.5 plugin
-@HAVE_ALSA05_TRUE@ mkdir -p alsa05$PREFIX/lib/xine/plugins && \
-@HAVE_ALSA05_TRUE@ cp $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_alsa05.la $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_alsa05.so alsa05$PREFIX/lib/xine/plugins && \
-@HAVE_ALSA05_TRUE@ (cd alsa05 && \
-@HAVE_ALSA05_TRUE@ echo "n" | makepkg $alsa05PACKAGE && \
-@HAVE_ALSA05_TRUE@ echo "move $alsa05PACKAGE to $SLCK" && mv $alsa05PACKAGE $SLCK) && \
-@HAVE_ALSA05_TRUE@ rm -rf alsa05 && \
-@HAVE_ALSA05_TRUE@ rm -f $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_alsa05.la $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_alsa05.so
-
## Alsa 0.9 plugin
@HAVE_ALSA09_TRUE@ mkdir -p alsa09$PREFIX/lib/xine/plugins && \
@HAVE_ALSA09_TRUE@ cp $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_alsa.la $PKG/$PREFIX/lib/xine/plugins/xineplug_ao_out_alsa.so alsa09$PREFIX/lib/xine/plugins && \
@@ -237,7 +221,6 @@ do_clean() {
rm -rf $TMPBUILD
rm -f $PACKAGE package_descriptions
@HAVE_OSS_TRUE@ rm -f $ossPACKAGE
-@HAVE_ALSA05_TRUE@ rm -f $alsa05PACKAGE
@HAVE_ALSA09_TRUE@ rm -f $alsa09PACKAGE
@HAVE_DXR3_TRUE@ rm -f $dxr3PACKAGE
@HAVE_ARTS_TRUE@ rm -f $artsPACKAGE
@@ -270,9 +253,6 @@ build_pentiumpro() {
@HAVE_OSS_TRUE@ rm -f package_descriptions
@HAVE_OSS_TRUE@ mv package_descriptions_oss package_descriptions && \
@HAVE_OSS_TRUE@ tar -czvf @PACKAGE@-@VERSION@-oss-i686.tar.gz $ossPACKAGE package_descriptions
-@HAVE_ALSA05_TRUE@ rm -f package_descriptions
-@HAVE_ALSA05_TRUE@ mv package_descriptions_alsa05 package_descriptions && \
-@HAVE_ALSA05_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa05-i686.tar.gz $alsa05PACKAGE package_descriptions
@HAVE_ALSA09_TRUE@ rm -f package_descriptions
@HAVE_ALSA09_TRUE@ mv package_descriptions_alsa09 package_descriptions && \
@HAVE_ALSA09_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa09-i686.tar.gz $alsa09PACKAGE package_descriptions
@@ -322,9 +302,6 @@ build_pentium() {
@HAVE_OSS_TRUE@ rm -f package_descriptions
@HAVE_OSS_TRUE@ mv package_descriptions_oss package_descriptions && \
@HAVE_OSS_TRUE@ tar -czvf @PACKAGE@-@VERSION@-oss-i586.tar.gz $ossPACKAGE package_descriptions
-@HAVE_ALSA05_TRUE@ rm -f package_descriptions
-@HAVE_ALSA05_TRUE@ mv package_descriptions_alsa05 package_descriptions && \
-@HAVE_ALSA05_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa05-i586.tar.gz $alsa05PACKAGE package_descriptions
@HAVE_ALSA09_TRUE@ rm -f package_descriptions
@HAVE_ALSA09_TRUE@ mv package_descriptions_alsa09 package_descriptions && \
@HAVE_ALSA09_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa09-i586.tar.gz $alsa09PACKAGE package_descriptions
@@ -373,9 +350,6 @@ build_k6() {
@HAVE_OSS_TRUE@ rm -f package_descriptions
@HAVE_OSS_TRUE@ mv package_descriptions_oss package_descriptions && \
@HAVE_OSS_TRUE@ tar -czvf @PACKAGE@-@VERSION@-oss-k6.tar.gz $ossPACKAGE package_descriptions
-@HAVE_ALSA05_TRUE@ rm -f package_descriptions
-@HAVE_ALSA05_TRUE@ mv package_descriptions_alsa05 package_descriptions && \
-@HAVE_ALSA05_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa05-k6.tar.gz $alsa05PACKAGE package_descriptions
@HAVE_ALSA09_TRUE@ rm -f package_descriptions
@HAVE_ALSA09_TRUE@ mv package_descriptions_alsa09 package_descriptions && \
@HAVE_ALSA09_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa09-k6.tar.gz $alsa09PACKAGE package_descriptions
@@ -424,9 +398,6 @@ build_k7() {
@HAVE_OSS_TRUE@ rm -f package_descriptions
@HAVE_OSS_TRUE@ mv package_descriptions_oss package_descriptions && \
@HAVE_OSS_TRUE@ tar -czvf @PACKAGE@-@VERSION@-oss-k7.tar.gz $ossPACKAGE package_descriptions
-@HAVE_ALSA05_TRUE@ rm -f package_descriptions
-@HAVE_ALSA05_TRUE@ mv package_descriptions_alsa05 package_descriptions && \
-@HAVE_ALSA05_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa05-k7.tar.gz $alsa05PACKAGE package_descriptions
@HAVE_ALSA09_TRUE@ rm -f package_descriptions
@HAVE_ALSA09_TRUE@ mv package_descriptions_alsa09 package_descriptions && \
@HAVE_ALSA09_TRUE@ tar -czvf @PACKAGE@-@VERSION@-alsa09-k7.tar.gz $alsa09PACKAGE package_descriptions
diff --git a/misc/build_rpms.sh.in b/misc/build_rpms.sh.in
index 402343c69..b9e23d504 100644
--- a/misc/build_rpms.sh.in
+++ b/misc/build_rpms.sh.in
@@ -46,7 +46,6 @@ cp '/usr/src/redhat/SRPMS/@PACKAGE@-@SPEC_VERSION@-0.src.rpm' ./rpms/
mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-@SPEC_VERSION@-0.i686.rpm'
mv -f '/usr/src/redhat/RPMS/i386/@PACKAGE@-docs-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-docs-@SPEC_VERSION@-0.rpm'
@HAVE_OSS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-oss-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-oss-@SPEC_VERSION@-0.i686.rpm'
-@HAVE_ALSA05_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa05-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa05-@SPEC_VERSION@-0.i686.rpm'
@HAVE_ALSA09_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa09-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa09-@SPEC_VERSION@-0.i686.rpm'
@HAVE_ARTS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-arts-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-arts-@SPEC_VERSION@-0.i686.rpm'
@HAVE_ESD_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-esd-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-esd-@SPEC_VERSION@-0.i686.rpm'
@@ -72,7 +71,6 @@ eval $RPM_BB
mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-@SPEC_VERSION@-0.k6.rpm'
mv -f '/usr/src/redhat/RPMS/i386/@PACKAGE@-docs-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-docs-@SPEC_VERSION@-0.rpm'
@HAVE_OSS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-oss-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-oss-@SPEC_VERSION@-0.k6.rpm'
-@HAVE_ALSA05_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa05-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa05-@SPEC_VERSION@-0.k6.rpm'
@HAVE_ALSA09_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa09-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa09-@SPEC_VERSION@-0.k6.rpm'
@HAVE_ARTS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-arts-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-arts-@SPEC_VERSION@-0.k6.rpm'
@HAVE_ESD_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-esd-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-esd-@SPEC_VERSION@-0.k6.rpm'
@@ -98,7 +96,6 @@ eval $RPM_BB
mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-@SPEC_VERSION@-0.i586.rpm'
mv -f '/usr/src/redhat/RPMS/i386/@PACKAGE@-docs-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-docs-@SPEC_VERSION@-0.rpm'
@HAVE_OSS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-oss-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-oss-@SPEC_VERSION@-0.i586.rpm'
-@HAVE_ALSA05_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa05-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa05-@SPEC_VERSION@-0.i586.rpm'
@HAVE_ALSA09_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa09-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa09-@SPEC_VERSION@-0.i586.rpm'
@HAVE_ARTS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-arts-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-arts-@SPEC_VERSION@-0.i586.rpm'
@HAVE_ESD_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-esd-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-esd-@SPEC_VERSION@-0.i586.rpm'
@@ -124,7 +121,6 @@ eval $RPM_BB
mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-@SPEC_VERSION@-0.k7.rpm'
mv -f '/usr/src/redhat/RPMS/i386/@PACKAGE@-docs-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-docs-@SPEC_VERSION@-0.rpm'
@HAVE_OSS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-oss-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-oss-@SPEC_VERSION@-0.k7.rpm'
-@HAVE_ALSA05_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa05-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa05-@SPEC_VERSION@-0.k7.rpm'
@HAVE_ALSA09_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-alsa09-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-alsa09-@SPEC_VERSION@-0.k7.rpm'
@HAVE_ARTS_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-arts-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-arts-@SPEC_VERSION@-0.k7.rpm'
@HAVE_ESD_TRUE@mv '/usr/src/redhat/RPMS/i386/@PACKAGE@-esd-@SPEC_VERSION@-0.i386.rpm' './rpms/@PACKAGE@-esd-@SPEC_VERSION@-0.k7.rpm'
diff --git a/misc/xine-lib.spec.in b/misc/xine-lib.spec.in
index ecbeabf81..51e29a2f9 100644
--- a/misc/xine-lib.spec.in
+++ b/misc/xine-lib.spec.in
@@ -21,11 +21,6 @@ BuildRoot: /tmp/%{name}-root
@HAVE_OSS_TRUE@Group: Development/Libraries
@HAVE_OSS_TRUE@Requires: xine-lib >= %{ver}
-@HAVE_ALSA05_TRUE@%package alsa05
-@HAVE_ALSA05_TRUE@Summary: XINE - alsa 0.5.x support.
-@HAVE_ALSA05_TRUE@Group: Development/Libraries
-@HAVE_ALSA05_TRUE@Requires: xine-lib >= %{ver}
-
@HAVE_ALSA09_TRUE@%package alsa09
@HAVE_ALSA09_TRUE@Summary: XINE - alsa >= 0.9.x support.
@HAVE_ALSA09_TRUE@Group: Development/Libraries
@@ -109,9 +104,6 @@ ler qualquer vídeo com máximo desempenho.
@HAVE_OSS_TRUE@%description oss
@HAVE_OSS_TRUE@audio plugin with oss support.
-@HAVE_ALSA05_TRUE@%description alsa05
-@HAVE_ALSA05_TRUE@audio plugin with alsa 0.5.x support.
-
@HAVE_ALSA09_TRUE@%description alsa09
@HAVE_ALSA09_TRUE@audio plugin with alsa >= 0.9.x support.
@@ -278,11 +270,6 @@ rm -rf $RPM_BUILD_ROOT
@HAVE_OSS_TRUE@%{prefix}/lib/xine/plugins/xineplug_ao_out_oss.la
@HAVE_OSS_TRUE@%{prefix}/lib/xine/plugins/xineplug_ao_out_oss.so
-@HAVE_ALSA05_TRUE@%files alsa05
-@HAVE_ALSA05_TRUE@%defattr(-,root,root)
-@HAVE_ALSA05_TRUE@%{prefix}/lib/xine/plugins/xineplug_ao_out_alsa05.la
-@HAVE_ALSA05_TRUE@%{prefix}/lib/xine/plugins/xineplug_ao_out_alsa05.so
-
@HAVE_ALSA09_TRUE@%files alsa09
@HAVE_ALSA09_TRUE@%defattr(-,root,root)
@HAVE_ALSA09_TRUE@%{prefix}/lib/xine/plugins/xineplug_ao_out_alsa.la
diff --git a/po/fr.po b/po/fr.po
index 61bc374f1..566319f9a 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-01-14 22:35+0100\n"
+"POT-Creation-Date: 2002-01-14 22:43+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/po/xine-lib.pot b/po/xine-lib.pot
index 7daf28476..2b66777f4 100644
--- a/po/xine-lib.pot
+++ b/po/xine-lib.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-01-14 22:35+0100\n"
+"POT-Creation-Date: 2002-01-14 22:43+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am
index 0a2324b00..777710993 100644
--- a/src/audio_out/Makefile.am
+++ b/src/audio_out/Makefile.am
@@ -1,6 +1,6 @@
CFLAGS = @GLOBAL_CFLAGS@ -DXINE_COMPILE $(ALSA_CFLAGS) $(ESD_CFLAGS) $(IRIXAL_CFLAGS) $(ARTS_CFLAGS)
-EXTRA_DIST = audio_alsa_out.c audio_alsa05_out.c audio_esd_out.c \
+EXTRA_DIST = audio_alsa_out.c audio_esd_out.c \
audio_sun_out.c audio_arts_out.c audio_irixal_out.c
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
@@ -16,9 +16,6 @@ endif
# on the alsa project side
#
if HAVE_ALSA
-if HAVE_ALSA05
-alsa05_module = xineplug_ao_out_alsa05.la
-endif
if HAVE_ALSA09
alsa_module = xineplug_ao_out_alsa.la
endif
@@ -46,19 +43,15 @@ endif
# All of xine audio out plugins should be named like the
# scheme "xineplug_ao_out_"
#
-#lib_LTLIBRARIES = $(oss_module) $(alsa05_module) $(alsa_module) $(sun_module) \
+#lib_LTLIBRARIES = $(oss_module) $(alsa_module) $(sun_module) \
# $(arts_module) $(esd_module)
lib_LTLIBRARIES = $(oss_module) $(alsa_module) $(esd_module) $(sun_module) $(arts_module) \
- $(alsa05_module) $(irixal_module)
+ $(irixal_module)
xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c
xineplug_ao_out_oss_la_LDFLAGS = -avoid-version -module
-xineplug_ao_out_alsa05_la_SOURCES = audio_alsa05_out.c
-xineplug_ao_out_alsa05_la_LIBADD = $(ALSA_LIBS)
-xineplug_ao_out_alsa05_la_LDFLAGS = -avoid-version -module
-
xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c
xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS)
xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module
diff --git a/src/audio_out/audio_alsa05_out.c b/src/audio_out/audio_alsa05_out.c
deleted file mode 100644
index d369a90ec..000000000
--- a/src/audio_out/audio_alsa05_out.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * Copyright (C) 2000, 2001 the xine project
- *
- * This file is part of xine, a free video player.
- *
- * xine is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * xine is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- *
- * Plugin for ALSA Version 0.5.x
- *
- * Credits go
- * for the SPDIF A52 sync part
- * (c) 2000 Andy Lo A Foe <andy@alsaplayer.org>
- *
- * $Id: audio_alsa05_out.c,v 1.12 2001/11/19 13:55:03 hrm Exp $
- */
-
-/* required for swab() */
-#define _XOPEN_SOURCE 500
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <errno.h>
-#include <inttypes.h>
-#include <unistd.h>
-#include <sys/asoundlib.h>
-
-#include "xine_internal.h"
-#include "audio_out.h"
-#include "metronom.h"
-#include "resample.h"
-#include "xineutils.h"
-
-#define AO_ALSA_IFACE_VERSION 2
-
-#define AUDIO_NUM_FRAGMENTS 6
-#define AUDIO_FRAGMENT_SIZE 1536
-
-#define GAP_TOLERANCE 5000
-
-#define MAX_GAP 90000
-
-extern uint32_t xine_debug;
-
-
-typedef struct alsa_driver_s {
-
- ao_driver_t ao_driver;
-
- snd_pcm_t *front_handle;
-
- int32_t output_sample_rate, input_sample_rate;
- uint32_t num_channels;
-
- uint32_t bytes_in_buffer; /* number of bytes written to audio hardware */
- uint32_t bytes_per_frame;
-
- int pcm_default_card;
- int pcm_default_device;
-
- int direction;
- int mode;
- int start_mode;
- int stop_mode;
- int format;
- int rate;
- int voices;
- int interleave;
- int frag_size;
- int frag_count;
- int pcm_len;
- int ao_mode;
-
- int capabilities;
-
-} alsa_driver_t;
-
-
-static void alsa_set_frag(alsa_driver_t *this, int fragment_size, int fragment_count) {
- snd_pcm_channel_params_t params;
- snd_pcm_channel_setup_t setup;
- snd_pcm_format_t format;
- int err;
-
- memset(&params, 0, sizeof(params));
-
- params.mode = this->mode;
- params.channel = this->direction;
- params.start_mode = this->start_mode;
- params.stop_mode = this->stop_mode;
- params.buf.block.frag_size = fragment_size;
- params.buf.block.frags_max = fragment_count;
- params.buf.block.frags_min = 1;
-
- memset(&format, 0, sizeof(format));
- format.format = this->format;
- format.rate = this->rate;
- format.voices = this->voices;
- format.interleave = this->interleave;
- memcpy(&params.format, &format, sizeof(format));
-
- snd_pcm_playback_flush(this->front_handle);
-
- if((err = snd_pcm_channel_params(this->front_handle, &params)) < 0) {
- perr("snd_pcm_channel_params() failed: %s\n", snd_strerror(err));
- return;
- }
- if((err = snd_pcm_playback_prepare(this->front_handle)) < 0) {
- perr("snd_pcm_channel_prepare() failed: %s\n", snd_strerror(err));
- return;
- }
-
- memset(&setup, 0, sizeof(setup));
- setup.mode = this->mode;
- setup.channel = this->direction;
- if((err = snd_pcm_channel_setup(this->front_handle, &setup)) < 0) {
- perr("snd_pcm_channel_setup() failed: %s\n", snd_strerror(err));
- return;
- }
-
- this->frag_size = fragment_size;
- this->frag_count = fragment_count;
-
- /* this->pcm_len = fragment_size *
- (snd_pcm_format_width(this->format) / 8) *
- this->voices;
-
- perr("PCM len = %d\n", this->pcm_len);
- if(this->zero_space)
- free(this->zero_space);
-
- this->zero_space = (int16_t *) malloc(this->frag_size);
- memset(this->zero_space,
- (int16_t) snd_pcm_format_silence(this->format),
- this->frag_size);
- */
-}
-
-/*
- * open the audio device for writing to
- */
-static int ao_alsa_open(ao_driver_t *this_gen,uint32_t bits, uint32_t rate, int ao_mode) {
-
- int channels;
- int subdevice = 0;
- int direction = SND_PCM_OPEN_PLAYBACK;
- snd_pcm_format_t pcm_format;
- snd_pcm_channel_setup_t pcm_chan_setup;
- snd_pcm_channel_params_t pcm_chan_params;
- snd_pcm_channel_info_t pcm_chan_info;
- int err;
- int mode;
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
-
- switch (ao_mode) {
-
- case AO_CAP_MODE_STEREO:
- case AO_CAP_MODE_A52:
- case AO_CAP_MODE_AC5:
- channels = 2;
- break;
-
- case AO_CAP_MODE_MONO:
- channels = 1;
- break;
-
- default:
- return 0;
- break;
- }
-
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "bits = %d, rate = %d, channels = %d\n",
- bits, rate, channels);
-#endif
-
- if(!rate)
- return 0;
-
- if(this->front_handle != NULL) {
-
- if(rate == this->input_sample_rate)
- return this->output_sample_rate;
-
- snd_pcm_close(this->front_handle);
- }
-
- this->input_sample_rate = rate;
- this->bytes_in_buffer = 0;
- this->direction = SND_PCM_CHANNEL_PLAYBACK;
-
- if ((ao_mode == AO_CAP_MODE_A52) || (mode == AO_CAP_MODE_AC5)) {
- this->pcm_default_device = 2;
- mode = SND_PCM_MODE_BLOCK;
- }
- else {
- mode = SND_PCM_MODE_BLOCK;
- }
-
- this->mode = mode;
-
- if((err = snd_pcm_open_subdevice(&this->front_handle,
- this->pcm_default_card,
- this->pcm_default_device,
- subdevice, direction
- /* | SND_PCM_OPEN_NONBLOCK)) < 0) { */
- )) < 0) {
- perr("snd_pcm_open_subdevice() failed: %s\n", snd_strerror(err));
- return 0;
- }
-
- memset(&pcm_chan_info, 0, sizeof(snd_pcm_channel_info_t));
- if((err = snd_pcm_channel_info(this->front_handle,
- &pcm_chan_info)) < 0) {
- perr("snd_pcm_channel_info() failed: %s\n", snd_strerror(err));
- return 0;
- }
-
- memset(&pcm_chan_params, 0, sizeof(snd_pcm_channel_params_t));
- memset(&pcm_format, 0, sizeof(snd_pcm_format_t));
- /* set sample size */
- switch(bits) {
- case 8:
- pcm_format.format = SND_PCM_SFMT_S8;
- break;
-
- case 16:
- pcm_format.format = SND_PCM_SFMT_S16;
- break;
-
- case 24:
- pcm_format.format = SND_PCM_SFMT_S24;
- break;
-
- case 32:
- pcm_format.format = SND_PCM_SFMT_S32;
- break;
-
- default:
- perr("sample format %d unsupported\n", bits);
- break;
- }
- this->format = pcm_format.format;
-
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "format name = '%s'\n",
- snd_pcm_get_format_name(pcm_format.format));
-#endif
-
- pcm_format.voices = this->voices = channels;
- pcm_format.rate = this->rate = rate;
- pcm_format.interleave = this->interleave = 1;
-
- this->num_channels = channels;
- this->bytes_per_frame = (bits*this->num_channels)/8;
-
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "audio channels = %d ao_mode = %d\n",
- this->num_channels,ao_mode);
-#endif
-
- if(rate > pcm_chan_info.max_rate)
- this->output_sample_rate = pcm_chan_info.max_rate;
- else
- this->output_sample_rate = this->input_sample_rate;
-
-
- memcpy(&pcm_chan_params.format, &pcm_format, sizeof(snd_pcm_format_t));
-
- pcm_chan_params.mode = mode;
- pcm_chan_params.channel = this->direction;
-
- pcm_chan_params.start_mode = SND_PCM_START_FULL;
- /*
- pcm_chan_params.start_mode = SND_PCM_START_DATA;
- pcm_chan_params.stop_mode = SND_PCM_STOP_STOP;
- */
- pcm_chan_params.stop_mode = SND_PCM_STOP_ROLLOVER;
-
- this->start_mode = pcm_chan_params.start_mode;
- this->stop_mode = pcm_chan_params.stop_mode;
- this->ao_mode = ao_mode;
-
- if ((ao_mode == AO_CAP_MODE_A52) || (mode == AO_CAP_MODE_AC5)) {
- pcm_chan_params.digital.dig_valid = 1;
- pcm_chan_params.digital.dig_status[0] = SND_PCM_DIG0_NONAUDIO;
- pcm_chan_params.digital.dig_status[0] |= SND_PCM_DIG0_PROFESSIONAL;
- pcm_chan_params.digital.dig_status[0] |= SND_PCM_DIG0_PRO_FS_48000;
- pcm_chan_params.digital.dig_status[3] = SND_PCM_DIG3_CON_FS_48000;
- }
-
- snd_pcm_playback_flush(this->front_handle);
- if((err = snd_pcm_channel_params(this->front_handle,
- &pcm_chan_params)) < 0) {
- perr("snd_pcm_channel_params() failed: %s\n", snd_strerror(err));
- return 0;
- }
- if((err = snd_pcm_playback_prepare(this->front_handle)) < 0) {
- perr("snd_pcm_channel_prepare() failed: %s\n", snd_strerror(err));
- return 0;
- }
-
- pcm_chan_setup.mode = mode;
- pcm_chan_setup.channel = this->direction;
-
- if((err = snd_pcm_channel_setup(this->front_handle,
- &pcm_chan_setup)) < 0) {
- perr("snd_pcm_channel_setup() failed: %s\n", snd_strerror(err));
- return 0;
- }
-
- printf ("actual rate: %d\n", pcm_chan_setup.format.rate);
-
- alsa_set_frag(this, 1536, 6);
- alsa_set_frag(this,AUDIO_FRAGMENT_SIZE, AUDIO_NUM_FRAGMENTS);
-
- this->bytes_in_buffer = 0;
-
- return this->output_sample_rate;
-}
-
-static int ao_alsa_num_channels(ao_driver_t *this_gen) {
-
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
- return this->num_channels;
-
-}
-
-static int ao_alsa_bytes_per_frame(ao_driver_t *this_gen) {
-
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
- return this->bytes_per_frame;
-
-}
-
-static int ao_alsa_get_gap_tolerance (ao_driver_t *this_gen) {
- return GAP_TOLERANCE;
-}
-
-static int ao_alsa_delay(ao_driver_t *this_gen) {
-
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
- int bytes_left;
- snd_pcm_channel_status_t pcm_stat;
- int err;
-
-
- memset(&pcm_stat, 0, sizeof(snd_pcm_channel_status_t));
- pcm_stat.channel = SND_PCM_CHANNEL_PLAYBACK;
- if((err = snd_pcm_channel_status(this->front_handle,
- &pcm_stat)) < 0) {
- /* Hide error report */
- perr("snd_pcm_channel_status() failed: %s\n", snd_strerror(err));
- return 0;
- }
-
- /* calc delay */
-
- bytes_left = this->bytes_in_buffer - pcm_stat.scount;
-
- if (bytes_left<=0) { /* buffer ran dry */
- bytes_left = 0;
- this->bytes_in_buffer = pcm_stat.scount;
- }
-
- return bytes_left / this->bytes_per_frame;
-}
-
-
-static int ao_alsa_write (ao_driver_t *this_gen,
- int16_t* frame_buffer, uint32_t num_frames) {
-
-
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
-
- this->bytes_in_buffer += num_frames * this->bytes_per_frame;
-
- snd_pcm_write(this->front_handle, frame_buffer,
- num_frames * this->bytes_per_frame);
- return 1;
-}
-
-static void ao_alsa_close(ao_driver_t *this_gen) {
- int err;
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
-
- if(this->front_handle) {
- if((err = snd_pcm_playback_flush(this->front_handle)) < 0) {
- perr("snd_pcm_channel_flush() failed: %s\n", snd_strerror(err));
- }
-
- if((err = snd_pcm_close(this->front_handle)) < 0) {
- perr("snd_pcm_close() failed: %s\n", snd_strerror(err));
- }
-
- this->front_handle = NULL;
- }
-}
-
-static int ao_alsa_get_property (ao_driver_t *this_gen, int property) {
- /* alsa_driver_t *this = (alsa_driver_t *) this_gen; */
-
- /* FIXME: implement some properties
- switch(property) {
- case AO_PROP_MIXER_VOL:
- break;
- case AO_PROP_PCM_VOL:
- break;
- case AO_PROP_MUTE_VOL:
- break;
- }
- */
- return 0;
-}
-
-static int ao_alsa_set_property (ao_driver_t *this_gen, int property, int value) {
- /* alsa_driver_t *this = (alsa_driver_t *) this_gen; */
-
- /* FIXME: Implement property support.
- switch(property) {
- case AO_PROP_MIXER_VOL:
- break;
- case AO_PROP_PCM_VOL:
- break;
- case AO_PROP_MUTE_VOL:
- break;
- }
- */
-
- return ~value;
-}
-
-static uint32_t ao_alsa_get_capabilities (ao_driver_t *this_gen) {
- alsa_driver_t *this = (alsa_driver_t *) this_gen;
- return this->capabilities;
-}
-
-
-static void ao_alsa_exit(ao_driver_t *this_gen) {
- /* alsa_driver_t *this = (alsa_driver_t *) this_gen; */
-}
-
-
-static ao_info_t ao_info_alsa = {
- AO_ALSA_IFACE_VERSION,
- "alsa05",
- "xine audio output plugin using alsa-compliant audio devices/drivers",
- 10
-};
-
-ao_info_t *get_audio_out_plugin_info() {
- return &ao_info_alsa;
-}
-
-static void sighandler(int signum) {
-}
-
-ao_driver_t *init_audio_out_plugin(config_values_t *config) {
- alsa_driver_t *this;
- int best_rate;
- int devnum;
- int err;
- int direction = SND_PCM_OPEN_PLAYBACK;
- int snd_default_card;
- int snd_default_mixer_card;
- int snd_default_mixer_device;
- snd_pcm_info_t pcm_info;
- snd_pcm_channel_info_t pcm_chan_info;
- struct sigaction action;
-
- this = (alsa_driver_t *) malloc (sizeof (alsa_driver_t));
-
- /* Check if, at least, one card is installed */
- if((devnum = snd_cards()) == 0) {
- return NULL;
- }
- else {
- snd_default_card = snd_defaults_card();
- if((err = snd_card_load(snd_default_card)) < 0) {
- perr("snd_card_load() failed: %s\n", snd_strerror(err));
- }
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "%d card(s) installed. Default = %d\n",
- devnum, snd_default_card);
-#endif
-
- if((snd_default_mixer_card = snd_defaults_mixer_card()) < 0) {
- perr("snd_defaults_mixer_card() failed: %s\n",
- snd_strerror(snd_default_mixer_card));
- }
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "default mixer card = %d\n",
- snd_default_mixer_card);
-#endif
-
- if((snd_default_mixer_device = snd_defaults_mixer_device()) < 0) {
- perr("snd_defaults_mixer_device() failed: %s\n",
- snd_strerror(snd_default_mixer_device));
- }
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "default mixer device = %d\n",
- snd_default_mixer_device);
-#endif
- }
-
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "Opening audio device...");
-#endif
-
- if((this->pcm_default_card = snd_defaults_pcm_card()) < 0) {
- perr("There is no default pcm card.\n");
- exit(1);
- }
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "snd_defaults_pcm_card() return %d\n",
- this->pcm_default_card);
-#endif
-
- if((this->pcm_default_device = snd_defaults_pcm_device()) < 0) {
- perr("There is no default pcm device.\n");
- exit(1);
- }
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "snd_defaults_pcm_device() return %d\n",
- this->pcm_default_device);
-#endif
-
- this->capabilities = AO_CAP_MODE_STEREO;
- if (config->register_bool (config,
- "audio.a52_pass_through",
- 0,
- "used to inform xine about what the sound card can do",
- NULL,
- NULL,
- NULL) ) {
- this->capabilities |= AO_CAP_MODE_A52;
- this->capabilities |= AO_CAP_MODE_AC5;
- }
-
- this->ao_driver.get_capabilities = ao_alsa_get_capabilities;
- this->ao_driver.get_property = ao_alsa_get_property;
- this->ao_driver.set_property = ao_alsa_set_property;
- this->ao_driver.open = ao_alsa_open;
- this->ao_driver.num_channels = ao_alsa_num_channels;
- this->ao_driver.bytes_per_frame = ao_alsa_bytes_per_frame;
- this->ao_driver.delay = ao_alsa_delay;
- this->ao_driver.write = ao_alsa_write;
- this->ao_driver.close = ao_alsa_close;
- this->ao_driver.exit = ao_alsa_exit;
- this->ao_driver.get_gap_tolerance = ao_alsa_get_gap_tolerance;
-
-
- action.sa_handler = sighandler;
- sigemptyset(&(action.sa_mask));
- action.sa_flags = 0;
- if(sigaction(SIGALRM, &action, NULL) != 0) {
- perr("sigaction(SIGALRM) failed: %s\n", strerror(errno));
- }
- alarm(2);
-
- if((err = snd_pcm_open(&this->front_handle, this->pcm_default_card,
- this->pcm_default_device, direction)) < 0) {
- perr("snd_pcm_open() failed: %s\n", snd_strerror(err));
- perr(">>> Check if another program don't already use PCM <<<\n");
- return NULL;
- }
-
- memset(&pcm_info, 0, sizeof(snd_pcm_info_t));
- if((err = snd_pcm_info(this->front_handle, &pcm_info)) < 0) {
- perr("snd_pcm_info() failed: %s\n", snd_strerror(err));
- exit(1);
- }
-
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "snd_pcm_info():\n");
- xprintf (VERBOSE|AUDIO, "---------------\n");
- xprintf (VERBOSE|AUDIO, "type = 0x%x\n", pcm_info.type);
- xprintf (VERBOSE|AUDIO, "flags = 0x%x\n", pcm_info.flags);
- xprintf (VERBOSE|AUDIO, "id = '%s'\n", pcm_info.id);
- xprintf (VERBOSE|AUDIO, "name = '%s'\n", pcm_info.name);
- xprintf (VERBOSE|AUDIO, "playback = %d\n", pcm_info.playback);
- xprintf (VERBOSE|AUDIO, "capture = %d\n", pcm_info.capture);
-#endif
-
- memset(&pcm_chan_info, 0, sizeof(snd_pcm_channel_info_t));
- pcm_chan_info.channel = SND_PCM_CHANNEL_PLAYBACK;
- if((err = snd_pcm_channel_info(this->front_handle,
- &pcm_chan_info)) < 0) {
- perr("snd_pcm_channel_info() failed: %s\n", snd_strerror(err));
- exit(1);
- }
-
- best_rate = pcm_chan_info.rates;
-
-#ifdef LOG_DEBUG
- xprintf (VERBOSE|AUDIO, "best_rate = %d\n", best_rate);
- xprintf (VERBOSE|AUDIO, "snd_pcm_channel_info(PLAYBACK):\n");
- xprintf (VERBOSE|AUDIO, "-------------------------------\n");
- xprintf (VERBOSE|AUDIO, "subdevice = %d\n",
- pcm_chan_info.subdevice);
- xprintf (VERBOSE|AUDIO, "subname = %s\n",
- pcm_chan_info.subname);
- xprintf (VERBOSE|AUDIO, "channel = %d\n",
- pcm_chan_info.channel);
- xprintf (VERBOSE|AUDIO, "mode = %d\n",
- pcm_chan_info.mode);
- xprintf (VERBOSE|AUDIO, "flags = 0x%x\n",
- pcm_chan_info.flags);
- xprintf (VERBOSE|AUDIO, "formats = %d\n",
- pcm_chan_info.formats);
- xprintf (VERBOSE|AUDIO, "rates = %d\n",
- pcm_chan_info.rates);
- xprintf (VERBOSE|AUDIO, "min_rate = %d\n",
- pcm_chan_info.min_rate);
- xprintf (VERBOSE|AUDIO, "max_rate = %d\n",
- pcm_chan_info.max_rate);
- xprintf (VERBOSE|AUDIO, "min_voices = %d\n",
- pcm_chan_info.min_voices);
- xprintf (VERBOSE|AUDIO, "max_voices = %d\n",
- pcm_chan_info.max_voices);
- xprintf (VERBOSE|AUDIO, "buffer_size = %d\n",
- pcm_chan_info.buffer_size);
- xprintf (VERBOSE|AUDIO, "min_fragment_size = %d\n",
- pcm_chan_info.min_fragment_size);
- xprintf (VERBOSE|AUDIO, "max_fragment_size = %d\n",
- pcm_chan_info.max_fragment_size);
- xprintf (VERBOSE|AUDIO, "fragment_align = %d\n",
- pcm_chan_info.fragment_align);
- xprintf (VERBOSE|AUDIO, "fifo_size = %d\n",
- pcm_chan_info.fifo_size);
- xprintf (VERBOSE|AUDIO, "transfer_block_size = %d\n",
- pcm_chan_info.transfer_block_size);
- xprintf (VERBOSE|AUDIO, "mmap_size = %ld\n",
- pcm_chan_info.mmap_size);
- xprintf (VERBOSE|AUDIO, "mixer_device = %d\n",
- pcm_chan_info.mixer_device);
-#endif
- snd_pcm_close (this->front_handle);
- this->front_handle = NULL;
-
- return &this->ao_driver;
-}