#!/bin/sh # # # 07-Dec-02 amo Modified for Slack-8.1 # 12-Oct-03 amo Fixed for DFI PM10-EL # 18-Nov-03 amo Cleanup for EPIA-800 # 09-Dec-03 amo Added mpeg # 10-Dec-03 amo Renamed to rc.sound.EPIA # 30-Jul-04 amo Added midi for debian # 31-Jul-04 amo Figure out alsa vs oss # # # http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html # http://www.derkeiler.com/ # # # 2.6.5-1-386: # =========== # rmmod snd_mixer_oss ; rmmod snd ; rmmod soundcore # init 3 rc.sound.EPIA play (oss) works # init 3 rc.sound.EPIA play (alsa) no audible sound # # init 5 rc.sound.EPIA mpeg (oss) works when snd(alsa) is not loaded first # rc.sound.EPIA midi open /dev/sequencer: No such device or address # # init 5 rc.sound.EPIA play/mpeg (oss and alsa) no audible sound # # # 2.6.7: # =========== # init 1 rc.sound.EPIA play (alsa) no audible sound # # init 1 rc.sound.EPIA play (oss) works # init 5 rc.sound.EPIA play (oss) no audible sound # # # via82cxxx is also used by ide-core ( cdrw ) # ---------------------------------- # ide_disk 16768 6 # ide_core 134752 2 ide_disk,via82cxxx # # # ALSA Files # ----------- # /etc/init.d/alsa --> used by rc.d init scripts # /etc/default/alsa --> used by rc.d init scripts # /etc/modutils/alsa --> used by update-modules to create modules.conf # /etc/modutils/alsa-base # # /etc/modules # # dpkg --list | grep -i alsa # -------------------------- # rc alsa-base 1.0.5a-1 ALSA sound driver common files # rc alsa-utils 1.0.5-3 Advanced Linux Sound Architecture (utilities # rc pmidi 1.5.5-2 A command line midi player for ALSA # # # cd /lib/modules/2.6.5-1-386/kernel/sound/oss # for ko in `ls *` ; do insmod $ko ; done # # case "$1" in 'start') # # ALSA drivers start with snd_ # ----------------------------- # if [ -d "/lib/modules/`uname -r`/kernel/sound/core" ]; then echo "#" echo "# Installing ALSA drivers" echo "#" modprobe snd-via82xx # /etc/init.d/alsa start # elif [ -d "/lib/modules/`uname -r`/kernel/sound/oss" ]; then # echo "#" echo "# Installing OSS drivers" echo "#" # insmod soundcore # insmod sound # insmod uart401 # insmod ac97_codec # # insmod esssolo1 # # insmod i810_audio # insmod via82cxxx_audio # # modprobe ac97_codec modprobe via82cxxx_audio # # open /dev/sequencer: No such device or address modprobe v_midi # # playmidi: No playback device found. # ( need sound patters ?? ) # # --> fix modules.conf for mixer, sequencer # --> Yamaha FM synthesizer (YM3812/OPL-3) # modprobe sb_lib # modprobe -a sb # modprobe emu10k1 modprobe mpu401 # else echo "#" echo "# ERROR: Could NOT find ALSA no OSS sound drivers " echo "#" exit 1 fi # # show that its running $0 status # ;; 'stop') # # ALSA drivers start with snd_ # ---------------------------- if [ -d "/lib/modules/`uname -r`/kernel/sound/core" ]; then # /etc/init.d/alsa stop # rmmod snd-via82xx rmmod snd_ac97_codec rmmod snd_mpu401_uart rmmod snd_seq_midi rmmod snd_seq_oss rmmod snd_seq_midi_event rmmod snd_seq rmmod snd_rawmidi rmmod snd_pcm_oss rmmod snd_pcm rmmod snd_page_alloc rmmod snd_timer rmmod snd_mixer_oss rmmod snd_seq_device rmmod snd rmmod soundcore # elif [ -d "/lib/modules/`uname -r`/kernel/sound/oss" ]; then # rmmod sb_lib rmmod via82cxxx_audio rmmod i810_audio # rmmod esssolo1 rmmod mpu401 rmmod emu10k1 rmmod v_midi rmmod uart401 rmmod ac97_codec rmmod sound rmmod soundcore # fi # # show that its stopped $0 status # ;; # 'status') lsmod | egrep "^via8|^s|^ua|^a|^emu" ;; # 'play') # # play /usr/X11R6/share/WindowMaker/Sounds/startup.wav # # play /usr/share/sounds/phone.wav # play /opt/Src/MultiMedia/Samples/WAV/phone.wav # play /opt/Src/MultiMedia/Samples/gotspam.wav # # play /usr/share/licq/sounds/icq/Message.wav # play /opt/MM/test.wav # ;; 'mpeg') # # for debian mplayer -vo x11 /opt/MM/baby.mpg # ;; 'midi') # playmidi /opt/MM/test.mid # # no audible sound in oss w/ 2.6.7 # playmidi -e -D /dev/midi00 /opt/MM/babywalk.mid # # ;; *) echo "Usage: $0 { start | stop | status | play | mpeg | midi }" ;; esac # # End of file