#echo 9 >/proc/acpi/thermal_zone/THM/polling_frequency
killall klogd 2> /dev/null
killall syslogd 2> /dev/null
killall inetd 2> /dev/null
killall tee 2> /dev/null
killall tail 2> /dev/null
#killall -USR1 cpudynd 2> /dev/null
#/temperature &


## Setup sound card ##

#IEC958 Input Connector = coaxial
amixer -c 0 cset numid=6 1
#IEC958 Output also on ADAT1 = off
amixer -c 0 cset numid=7 0
#IEC958 Professional Bit = off
amixer -c 0 cset numid=8 0
#IEC958 Emphasis Bi = off
amixer -c 0 cset numid=9 0
#IEC958 Non-audio Bit = off
amixer -c 0 cset numid=10 0

#Sample Clock Source = Autosync
amixer -c 0 cset numid=11 0
#Preferred Sync Reference = ADAT1
amixer -c 0 cset numid=13 2

#Passthru = off
amixer -c 0 cset numid=21 0
#Line Out = off
amixer -c 0 cset numid=22 0
#Analog Extension Board = off
amixer -c 0 cset numid=26 0

#Channel Connections
#clear all direct physical connections for safety 
for ichannel in $(seq 0 1 25) 
do amixer -c 0 cset numid=5 $ichannel,$ichannel,0 
done
 
#playback connections for 4 channels 
amixer -c 0 cset numid=5 26,0,32768 
amixer -c 0 cset numid=5 27,1,32768 
amixer -c 0 cset numid=5 28,2,32768 
amixer -c 0 cset numid=5 29,3,32768

while true ; do
echo
echo
echo "               BeeSound"
echo " marcV multi-amp room correction 2005 (44.1 kHz)"
echo "        (ep1 44) by Uli Brueggemann and"
/home/beesound/brutefir -nodefault /beesound/brutefir/ep1corr44
# Enable to stop script by Ctrl-c/Strg-c
sleep 3
echo
echo
echo "               BeeSound"
echo " marcV multi-amp room correction 2005 (48 kHz)"
echo "        (ep1 48) by Uli Brueggemann and"
/home/beesound/brutefir -nodefault /beesound/brutefir/correction48
sleep 3
done