summaryrefslogtreecommitdiff
path: root/community-testing
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-04 12:33:13 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-04 12:33:13 -0300
commitb6c59f3d5bcae3f0b61856c1bea145c25c02a6f7 (patch)
treedfc5defd8f0a8c6e64d7c41cfddfb0721b7e865c /community-testing
parent4919be024064582a1f552f864d6f230ed58d4485 (diff)
Removed files
Diffstat (limited to 'community-testing')
-rw-r--r--community-testing/catalyst-utils/PKGBUILD128
-rw-r--r--community-testing/catalyst-utils/atieventsd41
-rw-r--r--community-testing/catalyst-utils/atieventsd.service9
-rw-r--r--community-testing/catalyst/3.5-do_mmap.patch50
-rw-r--r--community-testing/catalyst/PKGBUILD63
-rw-r--r--community-testing/catalyst/catalyst.install16
-rw-r--r--community-testing/jack2/40-hpet-permissions.rules2
-rw-r--r--community-testing/jack2/99-audio.conf2
-rw-r--r--community-testing/jack2/PKGBUILD135
-rw-r--r--community-testing/jack2/ffado_setbuffsize-jack2.patch139
10 files changed, 0 insertions, 585 deletions
diff --git a/community-testing/catalyst-utils/PKGBUILD b/community-testing/catalyst-utils/PKGBUILD
deleted file mode 100644
index 2a05774b3..000000000
--- a/community-testing/catalyst-utils/PKGBUILD
+++ /dev/null
@@ -1,128 +0,0 @@
-# $Id: PKGBUILD 76582 2012-09-23 23:07:57Z lcarlier $
-# Maintainer: idontknow
-# Contributor: to fill with a lot of people
-
-pkgbase=catalyst-utils
-pkgname=('catalyst-utils' 'opencl-catalyst')
-pkgver=12.8
-pkgrel=0.2
-pkgdesc="AMD Catalyst drivers utilities and libraries with OpenCL implementation."
-arch=('i686' 'x86_64')
-url="http://www.amd.com"
-license=('custom')
-source=("http://www2.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.zip"
- atieventsd
- atieventsd.service)
-md5sums=('41c5478322b13be6909eeb46412a3aa0'
- 'f729bf913613f49b0b9759c246058a87'
- '14beb8cc8f59c06d5ef998e222779dae')
-
-if [ "${CARCH}" = "i686" ]; then
- _ARCHDIR="x86"
- _ARCHLIB=""
- _ARCHXPIC=""
-else
- _ARCHDIR="x86_64"
- _ARCHLIB="64"
- _ARCHXPIC="_64a"
-fi
-
-build() {
- cd ${srcdir}
-
- sh ./amd-driver-installer*.run --extract fglrx-install
-}
-
-package_catalyst-utils() {
- pkgdesc="AMD Catalyst drivers utilities and libraries."
- provides=('libgl')
- conflicts=('libgl' 'nvidia-utils')
- depends=('xorg-server>=1.7.0' 'xorg-server<1.13.0' 'gcc-libs' 'libxinerama' \
- 'libxcursor' 'libxxf86vm' 'libxrandr' 'libsm' 'fontconfig' 'libxi' 'netkit-bsd-finger')
- optdepends=('qt: amdcccle')
-
- install -dm755 "${pkgdir}"/usr/{bin,sbin}
- install -dm755 "${pkgdir}"/usr/lib/{dri,xorg/modules/{dri,drivers,extensions/fglrx,linux},systemd/system}
- install -dm755 "${pkgdir}"/usr/include/GL
- install -dm755 "${pkgdir}"/etc/{ati,acpi/events,security/console.apps,rc.d}
- install -dm755 "${pkgdir}"/usr/share/{applications,ati/amdcccle,man/man8,pixmaps}
-
- # binaries
- cd ${srcdir}/fglrx-install
- install -m755 common/usr/sbin/* "${pkgdir}/usr/sbin/"
- install -m755 common/usr/X11R6/bin/* "${pkgdir}/usr/bin/"
- install -m755 arch/${_ARCHDIR}/usr/sbin/* "${pkgdir}/usr/sbin/"
- install -m755 arch/${_ARCHDIR}/usr/X11R6/bin/* "${pkgdir}/usr/bin/"
-
- # headers
- install -m644 common/usr/include/GL/* "${pkgdir}/usr/include/GL/"
-
- # xorg/dri/gl/... drivers
- cd ${srcdir}/fglrx-install/xpic${_ARCHXPIC}/usr/X11R6/lib${_ARCHLIB}/modules
- install -m755 *.so "${pkgdir}/usr/lib/xorg/modules/"
- install -m755 drivers/*.so "${pkgdir}/usr/lib/xorg/modules/drivers/"
- install -m755 linux/*.so "${pkgdir}/usr/lib/xorg/modules/linux/"
- install -m755 extensions/fglrx/fglrx-libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/fglrx/"
- ln -s fglrx/fglrx-libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so"
- cd ${srcdir}/fglrx-install/arch/${_ARCHDIR}/usr/X11R6/lib${_ARCHLIB}
- install -m755 modules/dri/fglrx_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/"
- ln -s /usr/lib/xorg/modules/dri/fglrx_dri.so "${pkgdir}/usr/lib/dri/"
- install -m755 fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/"
- install -m755 *.so* "${pkgdir}/usr/lib/"
- install -m644 libAMDXvBA.cap "${pkgdir}/usr/lib/"
- cd ${srcdir}/fglrx-install/arch/${_ARCHDIR}/usr/lib${_ARCHLIB}
- install -m755 *.so* "${pkgdir}/usr/lib/"
- # needed symlinks
- ln -s libatiuki.so.1.0 "${pkgdir}/usr/lib/libatiuki.so.1"
- ln -s fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1"
- ln -s fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so"
- ln -s libAMDXvBA.so.1.0 "${pkgdir}/usr/lib/libAMDXvBA.so.1"
- ln -s libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1"
-
- # various files
- cd ${srcdir}/fglrx-install/common
- install -m644 usr/share/man/man8/* "${pkgdir}/usr/share/man/man8/"
- install -m644 usr/share/applications/* "${pkgdir}/usr/share/applications/"
- install -m644 usr/share/icons/* "${pkgdir}/usr/share/pixmaps/"
- install -m644 usr/share/ati/amdcccle/* "${pkgdir}/usr/share/ati/amdcccle/"
- install -m644 etc/ati/* "${pkgdir}/etc/ati/"
- chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh"
- install -m644 etc/security/console.apps/amdcccle-su "${pkgdir}/etc/security/console.apps/"
- install -m644 usr/share/applications/*.desktop "${pkgdir}/usr/share/applications/"
- # use ACPI example files
- install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh "${pkgdir}/etc/acpi/"
- install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* "${pkgdir}/etc/acpi/events/"
- # systemd and rc.d scripts
- install -m755 "${srcdir}/atieventsd" "${pkgdir}/etc/rc.d/"
- install -m644 "${srcdir}/atieventsd.service" "${pkgdir}/usr/lib/systemd/system/"
-
- # provided in opencl-catalyst package
- rm "${pkgdir}"/usr/lib/lib{amdocl*,OpenCL}.so*
-
- # licenses
- install -Dm644 "${srcdir}/fglrx-install/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
- install -Dm644 "${srcdir}/fglrx-install/common/usr/share/doc/amdcccle/ccc_copyrights.txt" \
- "${pkgdir}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt"
-}
-
-package_opencl-catalyst() {
- pkgdesc="OpenCL implemention from AMD"
- provides=('libcl')
- conflicts=('libcl')
- depends=('gcc-libs')
- optdepends=('opencl-headers: headers necessary for OpenCL development')
-
- install -dm755 "${pkgdir}"/usr/{bin,lib}
- install -dm755 "${pkgdir}/etc/OpenCL/vendors"
-
- cd ${srcdir}/fglrx-install/arch/${_ARCHDIR}
-
- install -m755 usr/bin/clinfo "${pkgdir}/usr/bin/"
- install -m644 etc/OpenCL/vendors/amdocl*.icd "${pkgdir}/etc/OpenCL/vendors/"
- install -m755 usr/lib${_ARCHLIB}/libamdocl*.so "${pkgdir}/usr/lib/"
- install -m755 usr/lib${_ARCHLIB}/libOpenCL.so.1 "${pkgdir}/usr/lib/"
- ln -s libOpenCL.so.1 "${pkgdir}/usr/lib/libOpenCL.so"
-
- # license
- install -Dm644 "${srcdir}/fglrx-install/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
-}
diff --git a/community-testing/catalyst-utils/atieventsd b/community-testing/catalyst-utils/atieventsd
deleted file mode 100644
index 16bd9a4fa..000000000
--- a/community-testing/catalyst-utils/atieventsd
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-ATID_PID=`pidof -o %PPID /usr/sbin/atieventsd`
-
-case "$1" in
- start)
- rc=0
- stat_busy "Starting ATI Events Daemon"
- [ -z "$ATID_PID" ] && /usr/sbin/atieventsd
- rc=$(($rc+$?))
- if [ $rc -gt 0 ]; then
- stat_fail
- else
- add_daemon atieventsd
- stat_done
- fi
- ;;
- stop)
- rc=0
- stat_busy "Stopping ATI Events Daemon"
- kill $ATID_PID &>/dev/null
- rc=$(($rc+$?))
- if [ $rc -gt 0 ]; then
- stat_fail
- else
- rm_daemon atieventsd
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
diff --git a/community-testing/catalyst-utils/atieventsd.service b/community-testing/catalyst-utils/atieventsd.service
deleted file mode 100644
index 14dd7e210..000000000
--- a/community-testing/catalyst-utils/atieventsd.service
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=Catalyst event Daemon
-
-[Service]
-ExecStart=/usr/sbin/atieventsd --nodaemon
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/community-testing/catalyst/3.5-do_mmap.patch b/community-testing/catalyst/3.5-do_mmap.patch
deleted file mode 100644
index 04248eb7b..000000000
--- a/community-testing/catalyst/3.5-do_mmap.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-15 18:30:13.483762070 +0200
-+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2012-06-17 17:47:36.543041869 +0200
-@@ -2106,6 +2106,12 @@
- }
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
-+# define NO_DO_MMAP
-+# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f)
-+# define do_munmap(a,b,c) vm_munmap(b, c)
-+#endif
-+
- unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval(
- KCL_IO_FILE_Handle file,
- unsigned long addr,
-@@ -2117,10 +2123,13 @@
-
- flags = MAP_SHARED;
- prot = PROT_READ|PROT_WRITE;
--
-+#ifdef NO_DO_MMAP
-+ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);
-+#else
- down_write(&current->mm->mmap_sem);
- vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
- up_write(&current->mm->mmap_sem);
-+#endif
- if (IS_ERR(vaddr))
- return 0;
- else
-@@ -2131,7 +2140,9 @@
- {
- int retcode = 0;
-
-+#ifndef NO_DO_MMAP
- down_write(&current->mm->mmap_sem);
-+#endif
- #ifdef FGL_LINUX_RHEL_MUNMAP_API
- retcode = do_munmap(current->mm,
- addr,
-@@ -2142,7 +2153,9 @@
- addr,
- len);
- #endif
-+#ifndef NO_DO_MMAP
- up_write(&current->mm->mmap_sem);
-+#endif
- return retcode;
- }
-
diff --git a/community-testing/catalyst/PKGBUILD b/community-testing/catalyst/PKGBUILD
deleted file mode 100644
index 80652f726..000000000
--- a/community-testing/catalyst/PKGBUILD
+++ /dev/null
@@ -1,63 +0,0 @@
-# $Id: PKGBUILD 76561 2012-09-23 08:26:49Z lcarlier $
-# Maintainer: idontknow
-# Contributor: to fill with a lot of people
-
-pkgname=catalyst
-pkgver=12.8
-pkgrel=0.1
-_extramodules=extramodules-3.5-ARCH
-pkgdesc="AMD proprietary gpu drivers"
-arch=('i686' 'x86_64')
-url="http://www.amd.com"
-license=('custom')
-depends=('linux>=3.5' 'linux<3.6')
-makedepends=('linux-headers>=3.5' 'linux-headers<3.6')
-#conflicts=('nvidia' 'xf86-video-ati' 'ati-dri')
-source=(http://www2.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.zip
- 3.5-do_mmap.patch)
-md5sums=('41c5478322b13be6909eeb46412a3aa0'
- 'a450e2e3db61994b09e9d99d95bee837')
-install=catalyst.install
-
-build() {
- cd ${srcdir}
-
- if [ "${CARCH}" = "x86_64" ]; then
- BUILDARCH=x86_64
- _archdir=x86_64
- else
- BUILDARCH=i386
- _archdir=x86
- fi
-
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
- sh ./amd-driver-installer*.run --extract fglrx-install
-
- cd fglrx-install
- patch -Np1 -i ../3.5-do_mmap.patch
-
- cd common/lib/modules/fglrx/build_mod
- ln -s "${srcdir}/fglrx-install/arch/${_archdir}"/lib/modules/fglrx/build_mod/libfglrx_ip.a
- ln -s 2.6.x/Makefile
-
- CFLAGS_MODULE="-DMODULE -DATI -DFGL -DPAGE_ATTR_FIX=0 -DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space -D__SMP__ -DMODVERSIONS"
-
- make -C /usr/lib/modules/${_kernver}/build SUBDIRS="`pwd`" ARCH=${BUILDARCH} \
- MODFLAGS="$CFLAGS_MODULE" CFLAGS_MODULE="$CFLAGS_MODULE" \
- KVER=${_kernver} PAGE_ATTR_FIX=0 modules
-}
-
-package() {
- depends=(${depends[@]} "catalyst-utils=${pkgver}")
-
- cd ${srcdir}/fglrx-install/common/lib/modules/fglrx/build_mod
-
- install -Dm644 fglrx.ko "${pkgdir}/usr/lib/modules/${_extramodules}/fglrx.ko"
- install -dm755 "${pkgdir}/usr/lib/modprobe.d"
- echo "blacklist radeon" >> "${pkgdir}/usr/lib/modprobe.d/catalyst.conf"
- sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/catalyst.install"
- gzip "${pkgdir}/usr/lib/modules/${_extramodules}/fglrx.ko"
-
- # license
- install -Dm644 "${srcdir}/fglrx-install/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
-}
diff --git a/community-testing/catalyst/catalyst.install b/community-testing/catalyst/catalyst.install
deleted file mode 100644
index 22b72ea84..000000000
--- a/community-testing/catalyst/catalyst.install
+++ /dev/null
@@ -1,16 +0,0 @@
-post_install() {
- EXTRAMODULES='extramodules-3.5-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
- echo 'In order to use the catalyst module, reboot the system.'
-}
-
-post_upgrade() {
- EXTRAMODULES='extramodules-3.5-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
-}
-
-post_remove() {
- EXTRAMODULES='extramodules-3.5-ARCH'
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
-}
-
diff --git a/community-testing/jack2/40-hpet-permissions.rules b/community-testing/jack2/40-hpet-permissions.rules
deleted file mode 100644
index 7af3780f9..000000000
--- a/community-testing/jack2/40-hpet-permissions.rules
+++ /dev/null
@@ -1,2 +0,0 @@
-KERNEL=="rtc0", GROUP="audio"
-KERNEL=="hpet", GROUP="audio"
diff --git a/community-testing/jack2/99-audio.conf b/community-testing/jack2/99-audio.conf
deleted file mode 100644
index eb76ef920..000000000
--- a/community-testing/jack2/99-audio.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-@audio - rtprio 99
-@audio - memlock unlimited
diff --git a/community-testing/jack2/PKGBUILD b/community-testing/jack2/PKGBUILD
deleted file mode 100644
index dd3ab36e0..000000000
--- a/community-testing/jack2/PKGBUILD
+++ /dev/null
@@ -1,135 +0,0 @@
-# $Id: PKGBUILD 76735 2012-09-28 16:17:58Z schiv $
-# Maintainer: Ray Rashif <schiv@archlinux.org>
-# Contributor: Daniele Paolella <danielepaolella@email.it>
-# Contributor: Philipp Überbacher <hollunder at gmx dot at>
-# Contributor: Thomas Bahn <thomas-bahn at gmx dot net>
-
-pkgbase=jack2
-pkgname=('jack2' 'jack2-dbus')
-#pkgname= # single build (overrides split)
-_tarname=jack
-pkgver=1.9.8
-pkgrel=4
-arch=('i686' 'x86_64')
-url="http://jackaudio.org/"
-backup=(etc/security/limits.d/99-audio.conf)
-license=('GPL')
-makedepends=('python2' 'doxygen' 'libffado'
- 'libsamplerate' 'dbus-core' 'celt')
-source=("http://www.grame.fr/~letz/$_tarname-$pkgver.tgz"
- '99-audio.conf'
- '40-hpet-permissions.rules'
- 'ffado_setbuffsize-jack2.patch')
-md5sums=('1dd2ff054cab79dfc11d134756f27165'
- 'ae65b7c9ebe0fff6c918ba9d97ae342d'
- '471aad533ff56c5d3cbbf65ce32cadef'
- '1502d82fe2276d6f224fff6467a0b6f9')
-
-_pyfix() {
- sed -i 's:bin/env python:bin/env python2:' \
- "$pkgdir/usr/bin/jack_control"
-}
-
-_wafconf() {
- python2 waf configure --prefix=/usr \
- --alsa \
- --firewire \
- --doxygen $@
-}
-
-_isbuild() {
- printf "%s\n" ${pkgname[@]} | grep -qx $1
-}
-
-build() {
- cd "$srcdir/$_tarname-$pkgver"
-
- # backport firewire stuff
- # - needed for setbuffsize feature in latest stable ffado
- # from https://github.com/jackaudio/jack2/commit/96e0251
- (
- cd $_tarname-$pkgver
- patch -Np1 -i "$srcdir/ffado_setbuffsize-jack2.patch"
- )
-
- # Some optimisation bug exists for current GCC
- # see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53663
- export CFLAGS="${CFLAGS/-O[0-9]/-O0}"
- export CXXFLAGS="$CFLAGS"
-
- # fix doxygen building
- sed -i 's:build/default/html:html:' $_tarname-$pkgver/wscript
-
- # we may do 2 different builds
- cp -r $_tarname-$pkgver $_tarname-dbus-$pkgver
-
- # mixed dbus/classic build
- if _isbuild jack2; then
- cd $_tarname-$pkgver
- msg2 "Running Mixed D-Bus/Classic build"
- _wafconf --classic --dbus
- python2 waf build $MAKEFLAGS
- cd ..
- fi
-
- # dbus-ONLY build
- if _isbuild jack2-dbus; then
- cd $_tarname-dbus-$pkgver
- msg2 "Running D-Bus-only build"
- _wafconf --dbus
- python2 waf build $MAKEFLAGS
- cd ..
- fi
-}
-
-package_jack2() {
- ! _isbuild jack2 && return 0
-
- pkgdesc="The next-generation JACK with SMP support"
- depends=('libsamplerate' 'celt')
- optdepends=('libffado: FireWire support'
- 'dbus-core: jackdbus'
- 'python2: jack_control')
- conflicts=('jack')
- provides=('jack' 'jackmp' 'jackdmp' 'jackdbus')
-
- cd "$srcdir/$_tarname-$pkgver/$_tarname-$pkgver"
-
- python2 waf install --destdir="$pkgdir"
-
- # fix for major python transition
- _pyfix
-
- # configure realtime access/scheduling
- # see https://bugs.archlinux.org/task/26343
- install -Dm644 "$srcdir/99-audio.conf" \
- "$pkgdir/etc/security/limits.d/99-audio.conf"
-
- install -Dm644 "$srcdir/40-hpet-permissions.rules" \
- "$pkgdir/usr/lib/udev/rules.d/40-hpet-permissions.rules"
-}
-
-package_jack2-dbus() {
- ! _isbuild jack2-dbus && return 0
-
- pkgdesc="The next-generation JACK with SMP support (for D-BUS interaction only)"
- depends=('libsamplerate' 'celt' 'dbus-core')
- optdepends=('libffado: FireWire support'
- 'python2: jack_control')
- conflicts=('jack' 'jack2')
- provides=('jack' 'jack2' 'jackmp' 'jackdmp' 'jackdbus')
-
- cd "$srcdir/$_tarname-$pkgver/$_tarname-dbus-$pkgver"
-
- python2 waf install --destdir="$pkgdir"
-
- _pyfix
-
- install -Dm644 "$srcdir/99-audio.conf" \
- "$pkgdir/etc/security/limits.d/99-audio.conf"
-
- install -Dm644 "$srcdir/40-hpet-permissions.rules" \
- "$pkgdir/usr/lib/udev/rules.d/40-hpet-permissions.rules"
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/community-testing/jack2/ffado_setbuffsize-jack2.patch b/community-testing/jack2/ffado_setbuffsize-jack2.patch
deleted file mode 100644
index 0c74aad24..000000000
--- a/community-testing/jack2/ffado_setbuffsize-jack2.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 96e0251234a29a1360c05d5d7dc98b83436b8183 Mon Sep 17 00:00:00 2001
-From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
-Date: Sat, 17 Mar 2012 22:36:30 +0100
-Subject: [PATCH] [firewire] Allow FFADO backend to change the buffer size
-
-This is a port of Jonathan Woithe's patch from jackd1.
-With sufficiently recent versions of FFADO, it allows to change
-the buffersize at runtime.
----
- linux/firewire/JackFFADODriver.cpp | 65 ++++++++++++++++++++++++++++++++----
- linux/firewire/JackFFADODriver.h | 6 ++++
- 2 files changed, 65 insertions(+), 6 deletions(-)
-
-diff --git a/linux/firewire/JackFFADODriver.cpp b/linux/firewire/JackFFADODriver.cpp
-index b33e1cd..085b78a 100644
---- a/linux/firewire/JackFFADODriver.cpp
-+++ b/linux/firewire/JackFFADODriver.cpp
-@@ -3,6 +3,7 @@
- Copyright (C) 2004 Grame
- Copyright (C) 2007 Pieter Palmers
- Copyright (C) 2009 Devin Anderson
-+Copyright (C) 2012 Jonathan Woithe, Adrian Knoth
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
-@@ -48,7 +49,10 @@
- namespace Jack
- {
-
-+// Basic functionality requires API version 8. If version 9 or later
-+// is present the buffers can be resized at runtime.
- #define FIREWIRE_REQUIRED_FFADO_API_VERSION 8
-+#define FIREWIRE_REQUIRED_FFADO_API_VERSION_FOR_SETBUFSIZE 9
-
- #define jack_get_microseconds GetMicroSeconds
-
-@@ -281,19 +285,68 @@
- int
- JackFFADODriver::SetBufferSize (jack_nframes_t nframes)
- {
-- printError("Buffer size change requested but not supported!!!");
-+ ffado_driver_t* driver = (ffado_driver_t*)fDriver;
-+ signed int chn;
-+
-+ // The speed of this function isn't critical; we can afford the
-+ // time to check the FFADO API version.
-+ if (ffado_get_api_version() < FIREWIRE_REQUIRED_FFADO_API_VERSION_FOR_SETBUFSIZE ||
-+ ffado_streaming_set_period_size == NULL) {
-+ printError("unsupported on current version of FFADO; please upgrade FFADO");
-+ return -1;
-+ }
-
-- /*
- driver->period_size = nframes;
- driver->period_usecs =
- (jack_time_t) floor ((((float) nframes) / driver->sample_rate)
- * 1000000.0f);
-- */
-+
-+
-+ // Reallocate the null and scratch buffers.
-+ driver->nullbuffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(ffado_sample_t));
-+ if(driver->nullbuffer == NULL) {
-+ printError("could not allocate memory for null buffer");
-+ return -1;
-+ }
-+ driver->scratchbuffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(ffado_sample_t));
-+ if(driver->scratchbuffer == NULL) {
-+ printError("could not allocate memory for scratch buffer");
-+ return -1;
-+ }
-+
-+ // MIDI buffers need reallocating
-+ for (chn = 0; chn < driver->capture_nchannels; chn++) {
-+ if(driver->capture_channels[chn].stream_type == ffado_stream_type_midi) {
-+ // setup the midi buffer
-+ if (driver->capture_channels[chn].midi_buffer != NULL)
-+ free(driver->capture_channels[chn].midi_buffer);
-+ driver->capture_channels[chn].midi_buffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(uint32_t));
-+ }
-+ }
-+ for (chn = 0; chn < driver->playback_nchannels; chn++) {
-+ if(driver->playback_channels[chn].stream_type == ffado_stream_type_midi) {
-+ if (driver->playback_channels[chn].midi_buffer != NULL)
-+ free(driver->playback_channels[chn].midi_buffer);
-+ driver->playback_channels[chn].midi_buffer = (ffado_sample_t*) calloc(driver->period_size, sizeof(uint32_t));
-+ }
-+ }
-+
-+ // Notify FFADO of the period size change
-+ if (ffado_streaming_set_period_size(driver->dev, nframes) != 0) {
-+ printError("could not alter FFADO device period size");
-+ return -1;
-+ }
-+
-+ // This is needed to give the shadow variables a chance to
-+ // properly update to the changes.
-+ sleep(1);
-
- /* tell the engine to change its buffer size */
-- //driver->engine->set_buffer_size (driver->engine, nframes);
-+ JackAudioDriver::SetBufferSize(nframes); // Generic change, never fails
-
-- return -1; // unsupported
-+ UpdateLatencies();
-+
-+ return 0;
- }
-
- typedef void (*JackDriverFinishFunction) (jack_driver_t *);
-@@ -306,7 +359,7 @@
-
- assert(params);
-
-- if (ffado_get_api_version() != FIREWIRE_REQUIRED_FFADO_API_VERSION) {
-+ if (ffado_get_api_version() < FIREWIRE_REQUIRED_FFADO_API_VERSION) {
- printError("Incompatible libffado version! (%s)", ffado_get_version());
- return NULL;
- }
-diff --git a/linux/firewire/JackFFADODriver.h b/linux/firewire/JackFFADODriver.h
-index cb2a45d..790f4dd 100644
---- a/linux/firewire/JackFFADODriver.h
-+++ b/linux/firewire/JackFFADODriver.h
-@@ -82,6 +82,12 @@ class JackFFADODriver : public JackAudioDriver
- int Read();
- int Write();
-
-+ // BufferSize can be changed
-+ bool IsFixedBufferSize()
-+ {
-+ return false;
-+ }
-+
- int SetBufferSize(jack_nframes_t nframes);
- };
-
---
-1.7.10
-