~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to setup/Linux/oss/scripts/setup-alsa.sh

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# This script will restgore selected ALSA modules that were earlier removed by
 
4
# remove_drv.sh
 
5
 
 
6
if test -d /proc/asound
 
7
then
 
8
# ALSA is already loaded
 
9
  exit 0
 
10
fi
 
11
 
 
12
if ! test -f /lib/modules/`uname -r`/sound-preoss.tar.bz2
 
13
then
 
14
  echo ALSA backup archive /lib/modules/`uname -r`/sound-preoss.tar.bz2 not found. Cannot continue.
 
15
  exit 1
 
16
fi
 
17
 
 
18
RESTORE=kernel/sound/soundcore.ko
 
19
 
 
20
for n in snd snd-pcm snd-timer snd-page-alloc
 
21
do
 
22
  RESTORE="$RESTORE kernel/sound/core/$n.ko kernel/sound/acore/$n.ko"
 
23
done
 
24
 
 
25
(cd /lib/modules/`uname -r` && tar xvfj sound-preoss.tar.bz2 $RESTORE)
 
26
 
 
27
if test -d /dev/snd.save && ! test -d /dev/snd
 
28
then
 
29
  mv /dev/snd.save /dev/snd
 
30
fi
 
31
 
 
32
exit 0