From 1058def8e7827e56ce4a70afb4aeacb5dc44148f Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 3 May 2013 21:08:42 +0400 Subject: Imported Upstream version 4.2-build2006 --- setup/Linux/oss/scripts/setup-alsa.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 setup/Linux/oss/scripts/setup-alsa.sh (limited to 'setup/Linux/oss/scripts/setup-alsa.sh') diff --git a/setup/Linux/oss/scripts/setup-alsa.sh b/setup/Linux/oss/scripts/setup-alsa.sh new file mode 100644 index 0000000..fdcf4ff --- /dev/null +++ b/setup/Linux/oss/scripts/setup-alsa.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# This script will restgore selected ALSA modules that were earlier removed by +# remove_drv.sh + +if test -d /proc/asound +then +# ALSA is already loaded + exit 0 +fi + +if ! test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2 +then + echo ALSA backup archive /lib/modules/`uname -r`/sound-preoss.tar.bz2 not found. Cannot continue. + exit 1 +fi + +RESTORE=kernel/sound/soundcore.ko + +for n in snd snd-pcm snd-timer snd-page-alloc +do + RESTORE="$RESTORE kernel/sound/core/$n.ko kernel/sound/acore/$n.ko" +done + +(cd /lib/modules/`uname -r` && tar xvfj sound-preoss.tar.bz2 $RESTORE) + +if test -d /dev/snd.save && ! test -d /dev/snd +then + mv /dev/snd.save /dev/snd +fi + +exit 0 -- cgit v1.2.3