diff options
Diffstat (limited to 'abs/extra/oss')
-rw-r--r-- | abs/extra/oss/PKGBUILD | 225 | ||||
-rw-r--r-- | abs/extra/oss/hg-fix-devc.diff | 397 | ||||
-rw-r--r-- | abs/extra/oss/hg-latest-fixes.diff | 104 | ||||
-rw-r--r-- | abs/extra/oss/oss.install | 38 | ||||
-rw-r--r-- | abs/extra/oss/oss.rc | 32 | ||||
-rw-r--r-- | abs/extra/oss/oss.rm-init-scripts.patch | 52 |
6 files changed, 848 insertions, 0 deletions
diff --git a/abs/extra/oss/PKGBUILD b/abs/extra/oss/PKGBUILD new file mode 100644 index 0000000..d568ff3 --- /dev/null +++ b/abs/extra/oss/PKGBUILD @@ -0,0 +1,225 @@ +# $Id: PKGBUILD,v 1.8 2009/02/11 17:22:38 thotypous Exp $ +# Maintainer: Paulo Matias <matiasΘarchlinux-br·org> + +pkgname="oss" +pkgver="4.1_1051" +pkgrel=7 +pkgdesc="Open Sound System UNIX audio architecture" +arch=('i686' 'x86_64') +url="http://developer.opensound.com/" +license=('GPL2') +depends=('gcc' 'make' 'kernel-headers' 'module-init-tools' 'libtool' 'sed') +makedepends=('pkgconfig' 'gawk' 'gtk2') +conflicts=('oss-linux' 'oss-linux-free' 'oss-testing') +install='oss.install' +source=("http://www.4front-tech.com/developer/sources/stable/gpl/oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl.tar.bz2" + 'oss.rm-init-scripts.patch' 'oss.rc' 'oss.install' 'hg-latest-fixes.diff') + + +optdepends=('gtk2: for graphical mixer (ossxmix)' + 'hal: for automatic USB audio configuration' + 'libflashsupport-oss: for Flash plugin support') + +build() { + _dir="oss-v${pkgver/_*}-build${pkgver/*_}-src-gpl" + + cd "$srcdir/$_dir" + + # Apply patchs from hg. + msg "Applying latest fixes from hg." + patch -p1 < "$srcdir/hg-latest-fixes.diff" || return 1 + + cd "$srcdir" + + # Avoid these flags conflicting with OSS build system. + unset CFLAGS + unset OSFLAGS + unset LIBRARIES + + # Remove libflashsupport, as it belongs to a separate package. + rm -f "$srcdir/$_dir/oss/lib/flashsupport.c" &> /dev/null + + msg "Preparing the build environment." + + if [ ! -d build ]; then + # Create build directory and configure + mkdir build && cd build + "$srcdir/$_dir/configure" --enable-libsalsa=NO || return 1 + else + # Change to existing build directory + cd build + fi + + msg "Building OSS." + make build || return 1 + + msg "Patching init scripts." + cd "$srcdir/build/prototype" + rm usr/lib/oss/etc/S89oss + patch -b -p0 < "$srcdir/oss.rm-init-scripts.patch" || return 1 + + msg "Copying files." + cp -R * "$pkgdir" + install -D -m755 "$srcdir/oss.rc" "$pkgdir/etc/rc.d/oss" +################################ +PREFIX=$startdir/pkg +OSSLIBDIR=$PREFIX/usr/lib/oss +UNAME=2.6.28-LinHES +KERNELDIR=/lib/modules/$UNAME/build +mkdir -p ${PREFIX}/lib/modules/$UNAME/kernel/oss + +cd $OSSLIBDIR/build +rm -f $OSSLIBDIR/.cuckoo_installed + REGPARM=REGPARM + rm -rf $OSSLIBDIR/objects + ln -s $OSSLIBDIR/objects.regparm $OSSLIBDIR/objects + rm -rf $OSSLIBDIR/modules + ln -s $OSSLIBDIR/modules.regparm $OSSLIBDIR/modules + +echo OSS build environment set up for $REGPARM kernels + +if ! test -f $OSSLIBDIR/objects/osscore.o +then + echo Error: OSS core module for $REGPARM kernel is not available in $OSSLIBDIR/objects + exit 1 +fi +OK=1 + +if ! test -d /lib/modules/$UNAME +then + echo Error: Kernel directory /lib/modules/$UNAME does not exist + exit 1 +fi + +cp -f ../objects/osscore.o osscore_mainline.o + +ln -sf ../include/sys/*.h ../include/sys/ossddk . + +rm -f Makefile +ln -s Makefile.osscore Makefile + +echo Building module osscore + +if ! make KERNELDIR=$KERNELDIR> build.list 2>&1 +then + echo Failed to compile OSS + cat build.list + exit 2 +fi + +if ! test -d /lib/modules/$UNAME/kernel/oss +then + mkdir /lib/modules/$UNAME/kernel/oss +fi + +if ! test -d /lib/modules/$UNAME/kernel/oss +then + echo OSS module directory /lib/modules/$UNAME/kernel/oss does not exist. + exit 3 +fi + +if ! ld -r osscore.ko osscore_mainline.o -o /lib/modules/$UNAME/kernel/oss/osscore.ko +then + echo Linking the osscore module failed + exit 5 +fi + +if test -f Module.symvers +then + #Take generated symbol information and add it to module.inc + rm -f osscore_symbols.inc + echo "static const struct modversion_info ____versions[]" >> osscore_symbols.inc + echo " __attribute__((used))" >> osscore_symbols.inc + echo "__attribute__((section(\"__versions\"))) = {" >> osscore_symbols.inc + sed -e "s:^:{:" -e "s:\t:, \":" -e "s:\t\(.\)*:\"},:" < Module.symvers >> osscore_symbols.inc + echo "};" >> osscore_symbols.inc +else + echo > osscore_symbols.inc +fi + +#depmod -a + +for n in ../modules/*.o +do + N=`basename $n .o` + echo Building module $N + + rm -f $N_mainline.o Makefile + + sed "s/MODNAME/$N/" < Makefile.tmpl > Makefile + ln -s $n $N_mainline.o + + if ! make KERNELDIR=$KERNELDIR > build.list 2>&1 + then + echo Compiling module $N failed + cat build.list + exit 4 + fi + + if ! ld -r $N.ko $N_mainline.o -o /lib/modules/$UNAME/kernel/oss/$N.ko + then + echo Linking $N module failed + exit 6 + fi + + rm -f $N_mainline.o + make clean + +done +rm -f Makefile + +cp -rp /lib/modules/$UNAME/kernel/oss/* ${PREFIX}/lib/modules/$UNAME/kernel/oss/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + diff --git a/abs/extra/oss/hg-fix-devc.diff b/abs/extra/oss/hg-fix-devc.diff new file mode 100644 index 0000000..8e8b4cf --- /dev/null +++ b/abs/extra/oss/hg-fix-devc.diff @@ -0,0 +1,397 @@ + +# HG changeset patch +# User Hannu Savolainen <hannu@opensound.com> +# Date 1227908228 -7200 +# Node ID 5a75f44925143c924a51dc474119035f4b08bf06 +# Parent e138663cd973a1e35950fddf299017bfefd16bdc +Fixed devc=NULL problems left after changeset 502 + +--- a/attic/drv/oss_allegro/oss_allegro.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_allegro/oss_allegro.c Fri Nov 28 23:37:08 2008 +0200 +@@ -876,7 +876,7 @@ init_allegro (allegro_devc * devc) + &allegro_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/attic/drv/oss_als3xx/oss_als3xx.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_als3xx/oss_als3xx.c Fri Nov 28 23:37:08 2008 +0200 +@@ -740,7 +740,7 @@ init_als300 (als300_devc * devc) + &als300_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/attic/drv/oss_als4k/oss_als4k.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_als4k/oss_als4k.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1018,7 +1018,7 @@ init_als4000 (als4000_devc * devc) + &als4000_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/attic/drv/oss_maestro/oss_maestro.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_maestro/oss_maestro.c Fri Nov 28 23:37:08 2008 +0200 +@@ -2181,7 +2181,7 @@ init_maestro (maestro_devc * devc) + &maestro_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/attic/drv/oss_neomagic/oss_neomagic.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_neomagic/oss_neomagic.c Fri Nov 28 23:37:08 2008 +0200 +@@ -730,7 +730,7 @@ neomagic_install (neomagic_devc * devc, + devc->chip_name, + &neomagic_audio_driver, + sizeof (audiodrv_t), +- 0, AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ 0, AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/attic/drv/oss_vortex/oss_vortex.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_vortex/oss_vortex.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1449,7 +1449,7 @@ attach_channel (vortex_devc * devc, int + &vortex_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return; +--- a/attic/drv/oss_vortex/oss_vortex2.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/attic/drv/oss_vortex/oss_vortex2.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1601,7 +1601,7 @@ attach_channel_vortex2 (vortex_devc * de + &vortex2_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return; +--- a/kernel/drv/oss_ali5455/oss_ali5455.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_ali5455/oss_ali5455.c Fri Nov 28 23:37:08 2008 +0200 +@@ -835,7 +835,7 @@ init_ALI (ALI_devc * devc) + tmp_name, + &ALI_audio_driver, + sizeof (audiodrv_t), opts, +- formats, NULL, -1)) < 0) ++ formats, devc, -1)) < 0) + { + my_dev = -1; + return 0; +--- a/kernel/drv/oss_atiaudio/oss_atiaudio.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_atiaudio/oss_atiaudio.c Fri Nov 28 23:37:08 2008 +0200 +@@ -946,7 +946,7 @@ init_ATI (ATI_devc * devc) + tmp_name, + &ATI_audio_driver, + sizeof (audiodrv_t), +- opts, formats, NULL, -1, ++ opts, formats, devc, -1, + devfile_name)) < 0) + { + my_dev = -1; +--- a/kernel/drv/oss_audigyls/oss_audigyls.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_audigyls/oss_audigyls.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1470,7 +1470,7 @@ install_audio_devices (audigyls_devc * d + names[i], + &audigyls_audio_driver, + sizeof (audiodrv_t), +- flags, fmts, NULL, -1)) < 0) ++ flags, fmts, devc, -1)) < 0) + { + return 0; + } +@@ -1484,6 +1484,7 @@ install_audio_devices (audigyls_devc * d + audio_engines[adev]->rate_source = frontdev; + audio_engines[adev]->mixer_dev = devc->mixer_dev; + audio_engines[adev]->binding = bindings[i]; ++ audio_engines[adev]->dmabuf_maxaddr = MEMLIMIT_ISA; + if (audio_engines[adev]->flags & ADEV_FIXEDRATE) + { + audio_engines[adev]->fixed_rate = DEFAULT_RATE; +--- a/kernel/drv/oss_audiopci/oss_audiopci.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_audiopci/oss_audiopci.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1384,7 +1384,7 @@ init_apci (apci_devc * devc) + &apci_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_cmi878x/oss_cmi878x.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_cmi878x/oss_cmi878x.c Fri Nov 28 23:37:08 2008 +0200 +@@ -2396,7 +2396,7 @@ init_cmi8788 (cmi8788_devc * devc) + devc->osdev, tmp_name, + &cmi8788_audio_driver, + sizeof (audiodrv_t), caps, fmt, +- NULL, -1)) < 0) ++ devc, -1)) < 0) + { + return 0; + } +--- a/kernel/drv/oss_cmpci/oss_cmpci.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_cmpci/oss_cmpci.c Fri Nov 28 23:37:08 2008 +0200 +@@ -2212,7 +2212,7 @@ init_cmpci (cmpci_devc * devc) + sizeof (audiodrv_t), + caps, + AFMT_U8 | AFMT_S16_LE | +- AFMT_AC3, NULL, -1)) < 0) ++ AFMT_AC3, devc, -1)) < 0) + { + return 0; + } +--- a/kernel/drv/oss_cs4281/oss_cs4281.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_cs4281/oss_cs4281.c Fri Nov 28 23:37:08 2008 +0200 +@@ -909,7 +909,7 @@ init_cs4281 (cs4281_devc * devc) + &cs4281_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_S16_LE | AFMT_U8, NULL, -1)) < 0) ++ AFMT_S16_LE | AFMT_U8, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_cs461x/oss_cs461x.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_cs461x/oss_cs461x.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1719,7 +1719,7 @@ init_cs461x (cs461x_devc * devc) + &cs461x_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_S16_LE | AFMT_U8, NULL, -1)) < 0) ++ AFMT_S16_LE | AFMT_U8, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_emu10k1x/oss_emu10k1x.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_emu10k1x/oss_emu10k1x.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1038,7 +1038,7 @@ install_audio_devices (emu10k1x_devc * d + name, + &emu10k1x_audio_driver, + sizeof (audiodrv_t), +- flags, AFMT_S16_LE | AFMT_AC3, NULL, ++ flags, AFMT_S16_LE | AFMT_AC3, devc, + -1)) < 0) + { + return; +--- a/kernel/drv/oss_envy24/envy24_direct.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_envy24/envy24_direct.c Fri Nov 28 23:37:08 2008 +0200 +@@ -342,7 +342,7 @@ envy24d_install (envy24_devc * devc) + sizeof (audiodrv_t), + ADEV_NOVIRTUAL | ADEV_NOINPUT | ADEV_COLD + | ADEV_SPECIAL | ADEV_32BITONLY, +- AFMT_S32_LE, NULL, -1, ++ AFMT_S32_LE, devc, -1, + "10ch_out")) >= 0) + { + portc = &devc->direct_portc_out; +@@ -379,7 +379,7 @@ envy24d_install (envy24_devc * devc) + sizeof (audiodrv_t), + ADEV_NOVIRTUAL | ADEV_NOOUTPUT | ADEV_COLD + | ADEV_SPECIAL | ADEV_32BITONLY, +- AFMT_S32_LE, NULL, -1, ++ AFMT_S32_LE, devc, -1, + "12ch_in")) >= 0) + { + portc = &devc->direct_portc_in; +--- a/kernel/drv/oss_envy24/oss_envy24.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_envy24/oss_envy24.c Fri Nov 28 23:37:08 2008 +0200 +@@ -3114,7 +3114,7 @@ install_adev (envy24_devc * devc, char * + ADEV_AUTOMODE | ADEV_NOMMAP | + flags | ADEV_NOVIRTUAL, + fmts | AFMT_S16_LE | AFMT_S32_LE | +- AFMT_S24_LE, NULL, -1, ++ AFMT_S24_LE, devc, -1, + devfile_name)) < 0) + { + dev = -1; +--- a/kernel/drv/oss_fmedia/oss_fmedia.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_fmedia/oss_fmedia.c Fri Nov 28 23:37:08 2008 +0200 +@@ -925,7 +925,7 @@ init_fm801 (fm801_devc * devc) + &fm801_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 1; +--- a/kernel/drv/oss_geode/oss_geode.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_geode/oss_geode.c Fri Nov 28 23:37:08 2008 +0200 +@@ -750,7 +750,7 @@ init_geode (geode_devc * devc) + tmp_name, + &geode_audio_driver, + sizeof (audiodrv_t), +- caps, AFMT_S16_LE, NULL, -1)) < 0) ++ caps, AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_hdaudio/oss_hdaudio.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1442,7 +1442,7 @@ install_outputdevs (hda_devc_t * devc) + tmp_name, + &hda_audio_driver, + sizeof (audiodrv_t), +- opts, formats, NULL, -1, ++ opts, formats, devc, -1, + devfile_name)) < 0) + { + return; +@@ -1564,7 +1564,7 @@ install_inputdevs (hda_devc_t * devc) + tmp_name, + &hda_audio_driver, + sizeof (audiodrv_t), +- opts, formats, NULL, -1, ++ opts, formats, devc, -1, + devfile_name)) < 0) + { + return; +--- a/kernel/drv/oss_sblive/oss_sblive.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_sblive/oss_sblive.c Fri Nov 28 23:37:08 2008 +0200 +@@ -3806,7 +3806,7 @@ oss_sblive_attach (oss_device_t * osdev) + tmp, + &sblive_audio_driver, + sizeof (audiodrv_t), caps, +- fmts | AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ fmts | AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + portc->audiodev = -1; + return (i > 0); +--- a/kernel/drv/oss_sbpci/oss_sbpci.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_sbpci/oss_sbpci.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1231,7 +1231,7 @@ init_apci97 (apci97_devc * devc, int dev + tmp_name, + &apci97_audio_driver, + sizeof (audiodrv_t), +- caps, fmts, NULL, -1)) < 0) ++ caps, fmts, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_solo/oss_solo.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_solo/oss_solo.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1051,7 +1051,7 @@ init_solo (solo_devc * devc) + &solo_audio_driver, + sizeof (audiodrv_t), + caps, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_trident/oss_trident.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_trident/oss_trident.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1348,7 +1348,7 @@ init_trident (trident_devc * devc) + sizeof (audiodrv_t), + caps, + AFMT_U8 | AFMT_S16_LE | AFMT_AC3, +- NULL, -1)) < 0) ++ devc, -1)) < 0) + + { + adev = -1; +--- a/kernel/drv/oss_userdev/oss_userdev.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_userdev/oss_userdev.c Fri Nov 28 23:37:08 2008 +0200 +@@ -268,6 +268,7 @@ attach_control_device(void) + * Create the control device files that are used to create client/server + * device pairs and to redirect access to them. + */ ++ userdev_devc_t *devc = (userdev_devc_t*)0xdeadcafe; /* This should never get referenced */ + + if ((client_dev = oss_install_audiodev_with_devname (OSS_AUDIO_DRIVER_VERSION, + userdev_osdev, +@@ -275,7 +276,7 @@ attach_control_device(void) + "User space audio device client side", + &userdev_client_control_driver, + sizeof (audiodrv_t), +- ADEV_AUTOMODE, AFMT_S16_NE, NULL, -1, ++ ADEV_AUTOMODE, AFMT_S16_NE, devc, -1, + "client")) < 0) + { + return; +@@ -289,7 +290,7 @@ attach_control_device(void) + "User space audio device server side", + &userdev_server_control_driver, + sizeof (audiodrv_t), +- ADEV_AUTOMODE, AFMT_S16_NE, NULL, -1, ++ ADEV_AUTOMODE, AFMT_S16_NE, devc, -1, + "server")) < 0) + { + return; +--- a/kernel/drv/oss_via823x/oss_via823x.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_via823x/oss_via823x.c Fri Nov 28 23:37:08 2008 +0200 +@@ -813,7 +813,7 @@ via8233_init (via8233_devc * devc) + sizeof (audiodrv_t), + opts, + AFMT_U8 | AFMT_S16_LE | AFMT_AC3, +- NULL, -1)) < 0) ++ devc, -1)) < 0) + { + adev = -1; + return 1; +--- a/kernel/drv/oss_via97/oss_via97.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_via97/oss_via97.c Fri Nov 28 23:37:08 2008 +0200 +@@ -742,7 +742,7 @@ init_via97 (via97_devc * devc) + &via97_audio_driver, + sizeof (audiodrv_t), + opts, +- AFMT_U8 | AFMT_S16_LE, NULL, -1)) < 0) ++ AFMT_U8 | AFMT_S16_LE, devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/drv/oss_ymf7xx/oss_ymf7xx.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/drv/oss_ymf7xx/oss_ymf7xx.c Fri Nov 28 23:37:08 2008 +0200 +@@ -1314,7 +1314,7 @@ init_ymf7xx (ymf7xx_devc * devc) + sizeof (audiodrv_t), + caps, + AFMT_U8 | AFMT_S16_LE | AFMT_AC3, +- NULL, -1)) < 0) ++ devc, -1)) < 0) + { + adev = -1; + return 0; +--- a/kernel/framework/audio/oss_audio_core.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/framework/audio/oss_audio_core.c Fri Nov 28 23:37:08 2008 +0200 +@@ -6242,6 +6242,12 @@ oss_install_audiodev_with_devname (int v + int chdev_flags = 0; + int devfile_num = 0; + ++ if (devc == NULL) ++ { ++ cmn_err(CE_WARN, "devc==NULL for %s. Cannot install audio device\n", name); ++ return OSS_EINVAL; ++ } ++ + if (name == NULL) + cmn_err (CE_CONT, "Name is really NULL\n"); + if (master_osdev == NULL) +--- a/kernel/framework/remux/oss_remux.c Thu Nov 27 19:36:57 2008 +0200 ++++ b/kernel/framework/remux/oss_remux.c Fri Nov 28 23:37:08 2008 +0200 +@@ -508,7 +508,7 @@ remux_install (char *name, oss_device_t + sizeof (audiodrv_t), + ADEV_NOINPUT | ADEV_SPECIAL | + ADEV_DISABLE_VIRTUAL | +- ADEV_NOSRC, AFMT_S16_NE, NULL, ++ ADEV_NOSRC, AFMT_S16_NE, devc, + -1)) < 0) + { + devc->audio_dev = -1; + diff --git a/abs/extra/oss/hg-latest-fixes.diff b/abs/extra/oss/hg-latest-fixes.diff new file mode 100644 index 0000000..15da42d --- /dev/null +++ b/abs/extra/oss/hg-latest-fixes.diff @@ -0,0 +1,104 @@ +--- a/kernel/drv/oss_hdaudio/.devices Fri Feb 06 00:36:29 2009 +0200 ++++ b/kernel/drv/oss_hdaudio/.devices Fri Feb 06 17:00:26 2009 +0200 +@@ -13,6 +13,7 @@ oss_hdaudio pci10de,44a Nvidia High Defi + oss_hdaudio pci10de,44a Nvidia High Definition Audio (MCP65) + oss_hdaudio pci10de,55c Nvidia High Definition Audio (MCP67) + oss_hdaudio pci10de,774 Nvidia High Definition Audio (MCP78S) ++oss_hdaudio pci10de,ac0 Nvidia High Definition Audio (MCP79) + oss_hdaudio pci1002,437b ATI High Definition Audio (SB450) + oss_hdaudio pci1002,4383 ATI High Definition Audio (SB600) + oss_hdaudio pci1106,3288 VIA High Definition Audio +--- a/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Feb 06 00:36:29 2009 +0200 ++++ b/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Feb 06 17:00:26 2009 +0200 +@@ -30,6 +30,7 @@ + #define NVIDIA_DEVICE_MCP65 0x044a + #define NVIDIA_DEVICE_MCP67 0x055c + #define NVIDIA_DEVICE_MCP78S 0x0774 ++#define NVIDIA_DEVICE_MCP79 0x0ac0 + + #define ATI_VENDOR_ID 0x1002 + #define ATI_DEVICE_SB450 0x437b +@@ -1720,7 +1721,7 @@ oss_hdaudio_attach (oss_device_t * osdev + device != NVIDIA_DEVICE_MCP51 && device != NVIDIA_DEVICE_MCP55 && + device != NVIDIA_DEVICE_MCP61 && device != NVIDIA_DEVICE_MCP61A && + device != NVIDIA_DEVICE_MCP65 && device != NVIDIA_DEVICE_MCP67 && +- device != NVIDIA_DEVICE_MCP78S && ++ device != NVIDIA_DEVICE_MCP78S && device != NVIDIA_DEVICE_MCP79 && + device != VIA_DEVICE_HDA && + device != SIS_DEVICE_HDA && + device != ULI_DEVICE_HDA && +@@ -1776,6 +1777,7 @@ oss_hdaudio_attach (oss_device_t * osdev + case NVIDIA_DEVICE_MCP65: + case NVIDIA_DEVICE_MCP67: + case NVIDIA_DEVICE_MCP78S: ++ case NVIDIA_DEVICE_MCP79: + devc->chip_name = "nVidia HD Audio"; + pci_read_config_byte (osdev, 0x4e, &btmp); + pci_write_config_byte (osdev, 0x4e, (btmp & 0xf0) | 0x0f); +--- a/kernel/drv/oss_hdaudio/.devices Fri Feb 06 17:05:21 2009 +0200 ++++ b/kernel/drv/oss_hdaudio/.devices Sat Feb 07 11:10:36 2009 +0200 +@@ -12,6 +12,7 @@ oss_hdaudio pci10de,3f0 Nvidia High Defi + oss_hdaudio pci10de,3f0 Nvidia High Definition Audio (MCP61) + oss_hdaudio pci10de,44a Nvidia High Definition Audio (MCP65) + oss_hdaudio pci10de,55c Nvidia High Definition Audio (MCP67) ++oss_hdaudio pci10de,7fc Nvidia High Definition Audio (MCP73) + oss_hdaudio pci10de,774 Nvidia High Definition Audio (MCP78S) + oss_hdaudio pci10de,ac0 Nvidia High Definition Audio (MCP79) + oss_hdaudio pci1002,437b ATI High Definition Audio (SB450) +--- a/kernel/drv/oss_hdaudio/oss_hdaudio.c Fri Feb 06 17:05:21 2009 +0200 ++++ b/kernel/drv/oss_hdaudio/oss_hdaudio.c Sat Feb 07 11:10:36 2009 +0200 +@@ -29,6 +29,7 @@ + #define NVIDIA_DEVICE_MCP61A 0x03f0 + #define NVIDIA_DEVICE_MCP65 0x044a + #define NVIDIA_DEVICE_MCP67 0x055c ++#define NVIDIA_DEVICE_MCP73 0x07fc + #define NVIDIA_DEVICE_MCP78S 0x0774 + #define NVIDIA_DEVICE_MCP79 0x0ac0 + +@@ -1721,7 +1722,8 @@ oss_hdaudio_attach (oss_device_t * osdev + device != NVIDIA_DEVICE_MCP51 && device != NVIDIA_DEVICE_MCP55 && + device != NVIDIA_DEVICE_MCP61 && device != NVIDIA_DEVICE_MCP61A && + device != NVIDIA_DEVICE_MCP65 && device != NVIDIA_DEVICE_MCP67 && +- device != NVIDIA_DEVICE_MCP78S && device != NVIDIA_DEVICE_MCP79 && ++ device != NVIDIA_DEVICE_MCP73 && device != NVIDIA_DEVICE_MCP78S && ++ device != NVIDIA_DEVICE_MCP79 && + device != VIA_DEVICE_HDA && + device != SIS_DEVICE_HDA && + device != ULI_DEVICE_HDA && +@@ -1776,6 +1778,7 @@ oss_hdaudio_attach (oss_device_t * osdev + case NVIDIA_DEVICE_MCP61A: + case NVIDIA_DEVICE_MCP65: + case NVIDIA_DEVICE_MCP67: ++ case NVIDIA_DEVICE_MCP73: + case NVIDIA_DEVICE_MCP78S: + case NVIDIA_DEVICE_MCP79: + devc->chip_name = "nVidia HD Audio"; +--- a/kernel/framework/vmix_core/vmix_core.c Mon Feb 09 21:21:39 2009 +0200 ++++ b/kernel/framework/vmix_core/vmix_core.c Mon Feb 09 19:52:22 2009 -0200 +@@ -1590,7 +1590,7 @@ create_vmix_engine (vmix_mixer_t * mixer + adev_t *adev, *master_adev; + int opts = ADEV_VIRTUAL | ADEV_DEFAULT | ADEV_VMIX; + +- n = mixer->num_clientdevs++; ++ n = mixer->num_clientdevs; + + /* + * ADEV_HIDDEN is used for the VMIX devices because they should not be +@@ -1611,7 +1611,7 @@ create_vmix_engine (vmix_mixer_t * mixer + if (mixer->masterdev == -1) + return OSS_ENXIO; + +- if (mixer->num_clientdevs >= MAX_CLIENTS) /* Cannot create more client engines */ ++ if (n + 1 >= MAX_CLIENTS) /* Cannot create more client engines */ + return OSS_EBUSY; + + /* +@@ -1628,6 +1628,8 @@ create_vmix_engine (vmix_mixer_t * mixer + } + memset (portc, 0, sizeof (*portc)); + portc->open_pending = 1; /* Reserve this engine to the client it was created for */ ++ ++ mixer->num_clientdevs++; + + portc->num = n; + diff --git a/abs/extra/oss/oss.install b/abs/extra/oss/oss.install new file mode 100644 index 0000000..8c4bd0a --- /dev/null +++ b/abs/extra/oss/oss.install @@ -0,0 +1,38 @@ +_MSG_LIBOSSDIR=" Please note that OSS stores some of its configuration files + at /usr/lib/oss. If you are upgrading from an older OSS + release and it doesn't work properly, try removing that + directory and reinstall this package." + +post_install() { + echo "Creating backup of alsa modules" + KER=`uname -r` + cd /lib/modules/$KER/kernel + tar -cvf /lib/modules/alsa-$KER.tar sound + rm -rf sound +# /bin/sh /usr/lib/oss/build/install.sh &> /dev/null + depmod -a + +} + +post_upgrade() { + echo "Running OSS update script..." + KER=`uname -r` + cd /lib/modules/$KER/kernel + if [ -f sound/soundcore.ko ] + then + tar -cvf /lib/modules/alsa-$KER.tar sound + rm -rf sound + /bin/true + fi + depmod -a +} + +pre_remove() { + +} + +post_remove() { + + /bin/true +} + diff --git a/abs/extra/oss/oss.rc b/abs/extra/oss/oss.rc new file mode 100644 index 0000000..3f63378 --- /dev/null +++ b/abs/extra/oss/oss.rc @@ -0,0 +1,32 @@ +#!/bin/bash +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy 'Starting Open Sound System' + if /usr/sbin/soundon + then + add_daemon oss + stat_done + else + stat_fail + fi + ;; + stop) + stat_busy 'Stopping Open Sound System' + if /usr/sbin/soundoff + then + rm_daemon oss + stat_done + else + stat_fail + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" +esac diff --git a/abs/extra/oss/oss.rm-init-scripts.patch b/abs/extra/oss/oss.rm-init-scripts.patch new file mode 100644 index 0000000..981ff60 --- /dev/null +++ b/abs/extra/oss/oss.rm-init-scripts.patch @@ -0,0 +1,52 @@ +--- usr/lib/oss/build/install.sh.orig 2008-09-25 11:41:47.180167692 -0300 ++++ usr/lib/oss/build/install.sh 2008-09-25 11:41:47.180167692 -0300 +@@ -290,38 +290,6 @@ + echo + fi + +-if ! test -d /etc/init.d +-then +- mkdir /etc/init.d +-fi +- +-rm -f /etc/init.d/oss /etc/rc.d/rc3.d/S89oss /etc/rc3.d/S89oss +-cp -f $OSSLIBDIR/etc/S89oss /etc/init.d/oss +- +-chmod 744 /etc/init.d/oss +- +-if test -x /sbin/chkconfig +-then +- /sbin/chkconfig oss on > /dev/null 2>&1 +-else +- if test -x /usr/sbin/update-rc.d +- then +- /usr/sbin/update-rc.d oss defaults > /dev/null 2>&1 +- else +- if test -d etc/rc.d/rc3.d +- then +- rm -f /etc/rc.d/rc3.d/S89oss +- ln -s /etc/init.d/oss /etc/rc.d/rc3.d/S89oss +- else +- if test -d /etc/rc3.d +- then +- rm -f /etc/rc3.d/S89oss +- ln -s /etc/init.d/oss /etc/rc3.d/S89oss +- fi +- fi +- fi +-fi +- + # Install ALSA interface module (Cuckoo) + #(cd $OSSLIBDIR/cuckoo && make clean) > /dev/null 2>&1 + #if (cd $OSSLIBDIR/cuckoo && make install) > /var/log/cuckoo.log 2>&1 +--- usr/lib/oss/scripts/restore_drv.sh.orig 2008-09-25 11:41:47.210168487 -0300 ++++ usr/lib/oss/scripts/restore_drv.sh 2008-09-25 11:41:47.210168487 -0300 +@@ -18,8 +18,6 @@ + fi + fi + +-rm -f /etc/init.d/oss +- + if ! test -d /lib/modules/`uname -r`/kernel/sound + then + if test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2 |