diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
commit | 1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch) | |
tree | 4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/Linux/oss/scripts/setup-alsa.sh | |
download | oss4-upstream.tar.gz |
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/Linux/oss/scripts/setup-alsa.sh')
-rw-r--r-- | setup/Linux/oss/scripts/setup-alsa.sh | 32 |
1 files changed, 32 insertions, 0 deletions
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 |