On Fri, 7 Jan 2000 18:29:10 +0800, Roy Tan
>Another newbies question...
>I am using SuSE 6.2 and have got ALSA 0.4.1h installed. At the moment, I have
>to run the following command to activate the sound:
>/sbin/modprobe snd-card-cs4232 snd_port=0x534 snd_cport=0x90 snd_mpu_port=0x330
>snd_fm_port=0x388 snd_irq=5 snd_dma1=0 snd_dma1_size=8 snd_dma2=1
>snd_dma2_size=8
>I would like to have this automated at startup. I have been playing with the
>post-install at /etc/.conf.modules file but could not get it working anyhow.
>Can somebody help?
>Here is a portion from the /etc/conf.modules file:
>alias char-major-116 snd
>options snd snd_major=116 snd_cards_limit=1
>alias snd-card-0 snd-card-cs4232
>options snd-card-cs4232 snd_index=1 snd_id="cs4232"
>alias char-major-14 cs4232
>alias sound-slot-0 snd-card-0
>alias sound-service-0-0 snd-mixer-oss
>alias sound-service-0-1 snd-seq-oss
>alias sound-service-0-3 snd-pcm1-oss
>alias sound-service-0-12 snd-pcm1-oss
>options cs4232 io=0x534 irq=5 dma=1 dma2=0 mpuio=0x330 mpuirq=9
>options opl3 io=0x388
>post-install snd-card-cs4232 modprobe "-k" opl3
>Many thanks.
>Roy
Perhaps this adapted copy of /etc/rc.d/sendmail (called /etc/rc.d/sound)
is something for you:
note that it loads a different driver. Also note that you should link
this like the other files in /etc/rc.d/rc2.d, /etc/rc.d/rc3.d
(do a ls -l there sometimes and see what it's like)
#! /bin/sh
# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved.
#
#
. /etc/rc.config
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
test $link = $base && SMTP=yes
test "$SMTP" = yes || exit 0
if test -z "$SENDMAIL_ARGS" ; then
SENDMAIL_ARGS="-bd -q30m -om"
fi
# The echo return value for success (defined in /etc/rc.config).
return=$rc_done
case "$1" in
start)
echo -n "Starting sound system: "
/sbin/modprobe snd-card-ens1370
if [ `/sbin/lsmod | grep -c "snd\-card\-ens1370"` -lt 1 ]
then
echo -n "retrying sound system: "
/sbin/modprobe snd-card-ens1370 || return=$rc_failed
fi
alsactl restore 0
echo -e "$return"
;;
stop)
echo -n "Stopping sound system: "
/sbin/modprobe -r snd-card-ens1370 || return=$rc_failed
echo -e "$return"
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
reload)
echo -n "Reload service sound - not supported"
echo -e "$rc_failed"
;;
status)
echo -n "Checking for service sound: "
test -f /proc/asound/cards && cat /proc/asound/cards || return=$rc_failed
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
esac
# Inform the caller not only verbosely and set an exit status.
test "$return" = "$rc_done" || exit 1
exit 0
--
Whenever you find yourself on the side of the majority, it is time to
reform.
Mark Twain