Lines 42-47
Link Here
|
42 |
ALSACTL= |
42 |
ALSACTL= |
43 |
[ -x /usr/sbin/alsactl ] && ALSACTL=/usr/sbin/alsactl |
43 |
[ -x /usr/sbin/alsactl ] && ALSACTL=/usr/sbin/alsactl |
44 |
|
44 |
|
|
|
45 |
# Remove duplicate lines from unsorted input |
46 |
unique() |
47 |
{ |
48 |
awk '{ if (data[$0]++ == 0) |
49 |
print |
50 |
}' |
51 |
} |
52 |
|
45 |
LookupDevices() |
53 |
LookupDevices() |
46 |
{ |
54 |
{ |
47 |
egrep -qs '(sparcaudio|sound)' /proc/devices |
55 |
egrep -qs '(sparcaudio|sound)' /proc/devices |
Lines 51-57
Link Here
|
51 |
{ |
59 |
{ |
52 |
local phrase=$1 pattern=$2 m opt= |
60 |
local phrase=$1 pattern=$2 m opt= |
53 |
[ -n "$3" ] && opt='-r' |
61 |
[ -n "$3" ] && opt='-r' |
54 |
for m in `modprobe -c |egrep "^alias $pattern " |cut -d\ -f3 |uniq`; do |
62 |
for m in `modprobe -c |egrep "^alias $pattern " |cut -d\ -f3 |unique`; do |
55 |
if [ -n "$m" ] && [ "$m" != off ]; then |
63 |
if [ -n "$m" ] && [ "$m" != off ]; then |
56 |
action "$phrase ($m):" modprobe "$opt" "$m" |
64 |
action "$phrase ($m):" modprobe "$opt" "$m" |
57 |
local rc=$? |
65 |
local rc=$? |
Lines 63-69
Link Here
|
63 |
load_alsa() |
71 |
load_alsa() |
64 |
# redo with LoadModule? |
72 |
# redo with LoadModule? |
65 |
{ |
73 |
{ |
66 |
modprobe -c |egrep '^alias [^ ]+ snd-' |cut -d\ -f3 |uniq |\ |
74 |
modprobe -c |egrep '^alias [^ ]+ snd-' |cut -d\ -f3 |unique |\ |
67 |
while read line; do |
75 |
while read line; do |
68 |
L=1 |
76 |
L=1 |
69 |
action "Starting ALSA sound driver $line:" modprobe $line |
77 |
action "Starting ALSA sound driver $line:" modprobe $line |