diff options
Diffstat (limited to 'abs/core-testing/alsa-utils')
-rw-r--r-- | abs/core-testing/alsa-utils/PKGBUILD | 27 | ||||
-rwxr-xr-x | abs/core-testing/alsa-utils/alsa | 48 | ||||
-rw-r--r-- | abs/core-testing/alsa-utils/alsa.conf.d | 4 | ||||
-rw-r--r-- | abs/core-testing/alsa-utils/alsaconf.patch | 21 |
4 files changed, 100 insertions, 0 deletions
diff --git a/abs/core-testing/alsa-utils/PKGBUILD b/abs/core-testing/alsa-utils/PKGBUILD new file mode 100644 index 0000000..a14e0ad --- /dev/null +++ b/abs/core-testing/alsa-utils/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $ +# Maintainer: judd <jvinet@zeroflux.org> +pkgname=alsa-utils +pkgver=1.0.16 +pkgrel=1 +pkgdesc="An alternative implementation of Linux sound support" +arch=(i686 x86_64) +url="http://www.alsa-project.org" +depends=('alsa-lib>=1.0.16' 'dialog' 'pciutils' 'ncurses') +license=('GPL') +source=(ftp://ftp.alsa-project.org/pub/utils/$pkgname-${pkgver}.tar.bz2 \ + alsa alsaconf.patch alsa.conf.d) +backup=(etc/conf.d/alsa) +md5sums=('b9f803f45e6988bb27a6bed521a949fc' + 'cce0969b0203a2bb35540fdf4f7e96ae' + '538f82650d08e901efea86c5395520df' + '366d370f874a45e67b63ce4a8b048202') + +build() { + cd $startdir/src/$pkgname-${pkgver} + patch -Np1 -i ../alsaconf.patch || return 1 + ./configure --prefix=/usr --with-curses=ncursesw + make || return 1 + make DESTDIR=$startdir/pkg install + install -D -m755 ../alsa $startdir/pkg/etc/rc.d/alsa + install -D -m644 ../alsa.conf.d $startdir/pkg/etc/conf.d/alsa +} diff --git a/abs/core-testing/alsa-utils/alsa b/abs/core-testing/alsa-utils/alsa new file mode 100755 index 0000000..2581a9a --- /dev/null +++ b/abs/core-testing/alsa-utils/alsa @@ -0,0 +1,48 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/conf.d/alsa +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Restoring ALSA Levels" + /usr/sbin/alsactl restore + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + add_daemon alsa + fi + + POWERSAVE=${POWERSAVE:-0} + if [ -e /sys/module/snd_ac97_codec/parameters/power_save \ + -a $POWERSAVE -ne 0 ]; then + echo $POWERSAVE > /sys/module/snd_ac97_codec/parameters/power_save + echo 1 > /dev/dsp + fi + + if [ -e /sys/module/snd_hda_intel/parameters/power_save \ + -a $POWERSAVE -ne 0 ]; then + echo $POWERSAVE > /sys/module/snd_hda_intel/parameters/power_save + echo 1 > /dev/dsp + fi + ;; + stop) + stat_busy "Saving ALSA Levels" + /usr/sbin/alsactl store + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + rm_daemon alsa + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/abs/core-testing/alsa-utils/alsa.conf.d b/abs/core-testing/alsa-utils/alsa.conf.d new file mode 100644 index 0000000..1fa3d38 --- /dev/null +++ b/abs/core-testing/alsa-utils/alsa.conf.d @@ -0,0 +1,4 @@ +# Enables powersaving mode for AC97 and hda_intel audio chips. +# Set to 1 to enable powersaving. +# Set to 0 to disable powersaving (default). +POWERSAVE=0 diff --git a/abs/core-testing/alsa-utils/alsaconf.patch b/abs/core-testing/alsa-utils/alsaconf.patch new file mode 100644 index 0000000..c1d2eb2 --- /dev/null +++ b/abs/core-testing/alsa-utils/alsaconf.patch @@ -0,0 +1,21 @@ +diff -Naur alsa-utils-1.0.9a-orig/alsaconf/alsaconf.in alsa-utils-1.0.9a/alsaconf/alsaconf.in +--- alsa-utils-1.0.9a-orig/alsaconf/alsaconf.in 2005-03-24 00:24:52.000000000 -0800 ++++ alsa-utils-1.0.9a/alsaconf/alsaconf.in 2005-07-18 09:25:02.000000000 -0700 +@@ -58,6 +58,8 @@ + distribution="redhat" + elif test -f /etc/fedora-release && grep -q "Fedora" /etc/fedora-release; then + distribution="fedora" ++elif test -f /etc/arch-release && grep -q "Arch" /etc/arch-release; then ++ distribution="arch" + else + distribution="unknown" + fi +@@ -382,6 +384,8 @@ + rcalsasound=/etc/rc.d/init.d/alsasound + elif [ -x /etc/init.d/alsa ]; then + rcalsasound=/etc/init.d/alsa ++elif [ -x /etc/rc.d/alsa ]; then ++ rcalsasound=/etc/rc.d/alsa + else + rcalsasound=rcalsasound + fi |