#!/bin/bash #a script to load/unload the sound modules #on an IBM ThinkPad 600e #1999 Ben Brillat - brillb@rpi.edu #thanks to the linux kernel people for their instructions on the CS4232 chip. #this file should be named: # /root/scripts/sound_control #this should ONLY be called from the APM scripts # REMOVE ALL /etc/rc.d/rcN.d/S85sound files!!! (check rc3.d and rc5.d) #source function library . /etc/rc.d/init.d/functions case "$1" in start) /sbin/modprobe sound dmabuf=1 /sbin/insmod ad1848 /sbin/insmod uart401 /sbin/insmod cs4232 io=0x530 irq=5 dma=0 dma2=1 sleep 1 /usr/bin/aumix -f /etc/aumixrc -L > /dev/null ;; stop) /usr/bin/aumix -f /etc/aumixrc -S /sbin/rmmod cs4232 /sbin/rmmod uart401 /sbin/rmmod ad1848 /sbin/rmmod sound /sbin/rmmod soundcore ;; restart) $0 stop sleep 5 $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0