[arch-commits] Commit in alsa-utils/trunk (90alsa PKGBUILD alsa)

Tobias Powalowski tpowa at archlinux.org
Mon Feb 21 13:04:50 EST 2011


    Date: Monday, February 21, 2011 @ 13:04:49
  Author: tpowa
Revision: 110704

upgpkg: alsa-utils 1.0.24.2-1
bump to latest version, fix #21297 and fix #17239

Added:
  alsa-utils/trunk/90alsa
Modified:
  alsa-utils/trunk/PKGBUILD
  alsa-utils/trunk/alsa

----------+
 90alsa   |   13 +++++++++++++
 PKGBUILD |   18 ++++++++++--------
 alsa     |   48 +++++++++++++++++++++++++++---------------------
 3 files changed, 50 insertions(+), 29 deletions(-)

Added: 90alsa
===================================================================
--- 90alsa	                        (rev 0)
+++ 90alsa	2011-02-21 18:04:49 UTC (rev 110704)
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# 90alsa: suspend/wakeup ALSA devices
+
+case "$1" in
+hibernate|suspend)
+;;
+thaw|resume)
+aplay -d 1 /dev/zero
+;;
+*) exit $NA
+;;
+esac


Property changes on: alsa-utils/trunk/90alsa
___________________________________________________________________
Added: svn:executable
   + *

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-02-21 17:55:33 UTC (rev 110703)
+++ PKGBUILD	2011-02-21 18:04:49 UTC (rev 110704)
@@ -3,19 +3,20 @@
 # Contributor: judd <jvinet at zeroflux.org>
 
 pkgname=alsa-utils
-pkgver=1.0.23
-pkgrel=3
+pkgver=1.0.24.2
+pkgrel=1
 pkgdesc="An alternative implementation of Linux sound support"
 arch=('i686' 'x86_64')
 url="http://www.alsa-project.org"
 #can not use >=$pkgver due to use of letters in alsa-lib update versioning
-depends=("alsa-lib>1.0.22.99" 'dialog' 'pciutils' 'ncurses')
+depends=("alsa-lib>1.0.24" 'dialog' 'pciutils' 'ncurses' 'psmisc')
 makedepends=('xmlto' 'docbook-xsl')
 license=('GPL')
 source=(ftp://ftp.alsa-project.org/pub/utils/$pkgname-${pkgver}.tar.bz2
         alsa
         alsaconf.patch
-        alsa.conf.d)
+        alsa.conf.d
+        90alsa)
 backup=(etc/conf.d/alsa)
 
 build() {
@@ -30,11 +31,12 @@
   make DESTDIR=${pkgdir} install
   install -D -m755 ../alsa ${pkgdir}/etc/rc.d/alsa
   install -D -m644 ../alsa.conf.d ${pkgdir}/etc/conf.d/alsa
-
+  install -D -m755 ../90alsa ${pkgdir}/etc/pm/sleep.d/90alsa
   # dir where to save ALSA state
   install -d ${pkgdir}/var/lib/alsa
 }
-md5sums=('cb0cf46029ac9549cf3a31bff6a4f4e1'
-         '3ef812cae83053d01cd560284efad71f'
+md5sums=('8238cd57cb301d1c36bcf0ecb59ce6b2'
+         '2ba1a1cbf653bf1a69f8a720fd6549da'
          '62ebef77d5617d0036012cc541dcf23c'
-         '4c8ae9f976c7df5e271a4cb91ccc7767')
+         '4c8ae9f976c7df5e271a4cb91ccc7767'
+         '529216f6a46e61a546640e08ea7a0879')

Modified: alsa
===================================================================
--- alsa	2011-02-21 17:55:33 UTC (rev 110703)
+++ alsa	2011-02-21 18:04:49 UTC (rev 110704)
@@ -7,50 +7,56 @@
 case "$1" in
   start)
     stat_busy "Restoring ALSA Levels"
-    /usr/sbin/alsactl $ALSA_ARGS restore
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
+    if [[ ! -e /var/lib/alsa/asound.state ]]; then
+      /usr/sbin/alsactl $ALSA_ARGS store || { stat_fail; exit 1; }
+    fi
+    if /usr/sbin/alsactl $ALSA_ARGS restore; then
       stat_done
       add_daemon alsa
+    else
+      stat_fail
+      exit 1
     fi
 
     POWERSAVE=${POWERSAVE:-0}
-    if [ -e /sys/module/snd_ac97_codec/parameters/power_save \
-	  -a $POWERSAVE -ne 0 ]; then
+    if [[ -e /sys/module/snd_ac97_codec/parameters/power_save ]] \
+	  && (( $POWERSAVE )); then
       echo $POWERSAVE > /sys/module/snd_ac97_codec/parameters/power_save
-      [ -c /dev/dsp ] && echo 1 > /dev/dsp
+      [[ -c /dev/dsp ]] && echo 1 > /dev/dsp
     fi
-
-    if [ -e /sys/module/snd_hda_intel/parameters/power_save \
-      -a $POWERSAVE -ne 0 ]; then
+    if [[ -e /sys/module/snd_hda_intel/parameters/power_save ]] \
+	  && (( $POWERSAVE )); then
       echo $POWERSAVE > /sys/module/snd_hda_intel/parameters/power_save
-      [ -c /dev/dsp ] && echo 1 > /dev/dsp
+      [[ -c /dev/dsp ]] && echo 1 > /dev/dsp
     fi
     ;;
   stop)
     SAVE_VOLUME=${SAVE_VOLUME:-yes}
-    if [ "$SAVE_VOLUME" == "yes" ]; then
+    if [[ "$SAVE_VOLUME" = "yes" ]]; then
       stat_busy "Saving ALSA Levels"
-      /usr/sbin/alsactl $ALSA_ARGS store
+      /usr/sbin/alsactl $ALSA_ARGS store || { stat_fail; exit 1; }
     else
       stat_busy "Stopping ALSA"
     fi
     if [ "$MUTE_VOLUME" == "yes" ]; then
-      /usr/bin/amixer -q set Master 0 mute
+      /usr/bin/amixer -q set Master 0 mute || { stat_fail; exit 1; }
     fi
-    if [ $? -gt 0 ]; then
-      stat_fail
-    else
-      stat_done
-      rm_daemon alsa
-    fi
+    stat_done
+    rm_daemon alsa
     ;;
   restart)
     $0 stop
     sleep 1
     $0 start
     ;;
+  force-restart)
+    stat_busy "Trying to TERM or KILL processes that are blocking ALSA..."
+    FILES="$(ls -1 /dev/snd/* | grep -vi control)"
+    fuser -k -SIGTERM $FILES
+    fuser -k $FILES
+    stat_done
+    $0 restart
+    ;;
   *)
-    echo "usage: $0 {start|stop|restart}"
+    echo "usage: $0 {start|stop|restart|force-restart}"
 esac



More information about the arch-commits mailing list