summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config')
-rwxr-xr-xabs/core/LinHES-config/PKGBUILD6
-rwxr-xr-xabs/core/LinHES-config/soundconfig.sh220
-rwxr-xr-xabs/core/LinHES-config/systemconfig.py26
3 files changed, 112 insertions, 140 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index a47d7ea..9b0f11a 100755
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=8.1
-pkgrel=11
+pkgrel=12
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
@@ -146,7 +146,7 @@ md5sums=('e4faaa3d5f180d796e200b701048b008'
'b596d2e3779a434435bc0f0277b1ba3e'
'5012fbd31d205a6d6b0a1d8caf3eba8f'
'157e73d0f90d7b306aba8f5921aeedd3'
- 'a805504b6593eaa416fe5f32cd4d1b9e'
+ 'f8f803cb5738ce0021cd37c1ab514c45'
'952af1c0a44579c04a405ffce9aed264'
'5f890ea9bda6aef652d2560ca19dac07'
'ab2aa42c2947148c2b1cac0ade6d1d55'
@@ -171,7 +171,7 @@ md5sums=('e4faaa3d5f180d796e200b701048b008'
'299c24c0820fc9c483c820db2595e3cb'
'cf51cb22e23218ae7e9b55cac1ba3a7f'
'781f161a79c3188a31c8615b8258b241'
- '70749be12c98d4b8fd283bd5dd9182bb'
+ '18370d92ba6b467bcc4996c377e1fa1f'
'2596460462cf6c889cf8f95485537b20'
'dc3c5270691a62600475705f4cb78b56'
'4804aa93aaad3dfcfff08cd9ffd68836'
diff --git a/abs/core/LinHES-config/soundconfig.sh b/abs/core/LinHES-config/soundconfig.sh
index f682465..38687a4 100755
--- a/abs/core/LinHES-config/soundconfig.sh
+++ b/abs/core/LinHES-config/soundconfig.sh
@@ -17,9 +17,7 @@ echo "---------------------------------------"
function testaudio () {
-
-ossplay -d$AUDIODEVICE $TESTFILE
-
+ ossplay -d$AUDIODEVICE $TESTFILE
}
function load_alsa() {
@@ -29,7 +27,7 @@ function load_alsa() {
cd /lib/modules/$KER/
echo " uncompressing ALSA modules"
tar -xf sound-preoss.tar.bz2
-# echo " installing alsa-lib"
+ #echo " installing alsa-lib"
#pacman -S --force --noconfirm alsa-lib
echo " uninstalling oss"
@@ -50,7 +48,7 @@ function load_alsa() {
function unload_alsa () {
echo "unloading ALSA ..."
-#kill $(lsof -t /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*) && modprobe -r $(lsmod |grep ^snd |awk '{print $1}')
+ #kill $(lsof -t /dev/dsp* /dev/audio* /dev/mixer* /dev/snd/*) && modprobe -r $(lsmod |grep ^snd |awk '{print $1}')
sv stop alsa-utils
remove_service.sh alsa-utils
rm -rf /dev/adsp*
@@ -81,13 +79,11 @@ function installOSS {
add_service.sh oss
echo "blacklist soundcore" > $BLACKLIST
echo "install soundcore /bin/false" >> $BLACKLIST
-
-
}
function SYNCXINE {
-echo "modify xine config file"
+ echo "modify xine config file"
if [ -f $MYTHHOME/.xine/config ]
then
cp -f $MYTHHOME/.xine/config $TEMPLATES/xine.config
@@ -106,85 +102,82 @@ echo "modify xine config file"
else
cp $TEMPLATES/xine.config $MYTHHOME/.xine/config
fi
-
}
function SYNCMPLAYER {
-echo "modify mplayer not implmented yet"
+ echo "modify mplayer config file"
+ if [ -f /etc/mplayer/mplayer.conf ]
+ then
+ backdate=`date +%b-%d-%Y-%H:%M:%S`
+ mv /etc/mplayer/mplayer.conf /etc/mplayer/mplayer.conf-$backdate
+ fi
+ if [ x$AUDIOTYPE = xALSA -o x$AUDIOTYPE = xalsa ]
+ then
+ MPLAYERDEVICE=`echo $AUDIODEVICE | tr : = | tr , .`
+ echo "ao=alsa:device=$MPLAYERDEVICE" > /etc/mplayer/mplayer.conf
+ echo "ac=hwac3,hwdts," >> /etc/mplayer/mplayer.conf
+ else
+ echo "ao=oss:$AUDIODEVICE" > /etc/mplayer/mplayer.conf
+ fi
}
-function SYNCMYTHMUSIC {
-echo "sync mythmusic"
-$MV_ROOT/bin/restore_default_settings.sh -c MUSICMYTH
-}
+function checkOSSinstalled () {
+ echo "Checking if OSS is installed"
+ ossinfo |grep Version |grep -q OSS >/dev/null
+ resultcode=$?
-function SYNCMYTHFRONTEND {
-echo "sync mythfrontend"
-$MV_ROOT/bin/restore_default_settings.sh -c MUSICFRONT
+ if [ $resultcode = 0 ]
+ then
+ OSSinstalled='true'
+ echo " OSS is loaded"
+ else
+ OSSinstalled='false'
+ echo " OSS is NOT loaded"
+ fi
}
-
-function checkOSSinstalled () {
- echo "Checking if OSS is installed"
- ossinfo |grep Version |grep -q OSS >/dev/null
- resultcode=$?
-
- if [ $resultcode = 0 ]
- then
- OSSinstalled='true'
- echo " OSS is loaded"
- else
- OSSinstalled='false'
- echo " OSS is NOT loaded"
- fi
+function write_asound {
+ echo "writing asound.conf file"
+ if [ -f /etc/asound.conf ]
+ then
+ backdate=`date +%b-%d-%Y-%H:%M:%S`
+ mv /etc/asound.conf /etc/asound.conf-$backdate
+ fi
+ echo 'pcm.!default "'"$AUDIODEVICE"'"' > /etc/asound.conf
}
function sound_config_system {
-
- SYNCMYTHFRONTEND
+ if [ x$AUDIOTYPE = xALSA -o x$AUDIOTYPE = xalsa ]
+ then
+ write_asound
+ fi
+ SYNCMPLAYER
# if [ x$syncXine = x1 ]
# then
# SYNCXINE
# fi
-# if [ x$syncMplayer = x1 ]
-# then
-# SYNCMPLAYER
-# fi
-# if [ x$syncMythMusic = x1 ]
-# then
-# SYNCMYTHMUSIC
-# fi
-# if [ x$syncMythFrontend = x1 ]
-# then
-# SYNCMYTHFRONTEND
-# fi
-
}
function loadsound (){
- checkOSSinstalled
- if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ]
+ checkOSSinstalled
+ if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ]
+ then
+ while [ $OSSinstalled = "false" ]
+ do
+ unload_alsa
+ if [ -e /tmp/.alsatest ]
then
- while [ $OSSinstalled = "false" ]
- do
- unload_alsa
- if [ -e /tmp/.alsatest ]
- then
- rm /tmp/.alsatest
- fi
- installOSS
- checkOSSinstalled
- done
- # fi
- else
- touch /tmp/.alsatest
- unload_oss
- load_alsa
- #load_alsa
- rm /tmp/.alsatest
-
- fi
-
+ rm /tmp/.alsatest
+ fi
+ installOSS
+ checkOSSinstalled
+ done
+ else
+ touch /tmp/.alsatest
+ unload_oss
+ load_alsa
+ rm /tmp/.alsatest
+ fi
}
@@ -209,67 +202,50 @@ fi
while getopts "$OPTSTRING" SWITCH
do
case $SWITCH in
- \?) echo "unknown option"
- exit 11 ;;
- i) #echo "$SWITCH" "$OPTARG"
- AUDIOTYPE="$OPTARG"
- ;;
- d) #echo "$SWITCH" "$OPTARG"
- AUDIODEVICE=$OPTARG
- ;;
- t) #echo "$SWITCH" "$OPTARG"
- SOUNDOPTYPE="$OPTARG"
- if [ x"$OPTARG" = xtest ]
- then
- TEST=true
- else
- TEST=false
- fi
-
-
- ;;
-
- esac
+ \?) echo "unknown option"
+ exit 11
+ ;;
+ i) #echo "$SWITCH" "$OPTARG"
+ AUDIOTYPE="$OPTARG"
+ ;;
+ d) #echo "$SWITCH" "$OPTARG"
+ AUDIODEVICE=$OPTARG
+ ;;
+ t) #echo "$SWITCH" "$OPTARG"
+ SOUNDOPTYPE="$OPTARG"
+ if [ x"$OPTARG" = xtest ]
+ then
+ TEST=true
+ else
+ TEST=false
+ fi
+ ;;
+ esac
done
-
case $SOUNDOPTYPE in
REAL|real )
- # loadsound
- sound_config_system
- ;;
+ #loadsound
+ sound_config_system
+ ;;
test|TEST)
- echo $@ > /tmp/audio.test
- #loadsound
- if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ]
- then
- echo "testing OSS $AUDIODEVICE "
- ossplay -d$AUDIODEVICE $TESTFILE
- else
- echo "testing ALSA $AUDIODEVICE "
- echo aplay --device=$AUDIODEVICE $TESTFILE
- aplay -d=$AUDIODEVICE $TESTFILE
- fi
-
- ;;
-
+ echo $@ > /tmp/audio.test
+ #loadsound
+ if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ]
+ then
+ echo "testing OSS $AUDIODEVICE "
+ ossplay -d$AUDIODEVICE $TESTFILE
+ else
+ echo "testing ALSA $AUDIODEVICE "
+ echo aplay --device=$AUDIODEVICE $TESTFILE
+ aplay --device=$AUDIODEVICE $TESTFILE
+ fi
+ ;;
LOAD|load)
- loadsound
- ;;
- esac
-
+ loadsound
+ ;;
+esac
exit 0
-
-
-
-
-
-
-
-
-
-
-
diff --git a/abs/core/LinHES-config/systemconfig.py b/abs/core/LinHES-config/systemconfig.py
index 1af9daf..ed19675 100755
--- a/abs/core/LinHES-config/systemconfig.py
+++ b/abs/core/LinHES-config/systemconfig.py
@@ -296,21 +296,17 @@ def main(argv):
logging.info("____Skipping of Audio, config disabled____")
else:
logging.debug("______Start of Audio Configuration______")
- if not systemconfig.get("Audiotype") == "tinker":
- if cmdmodule["this_is_install"]:
- if systemconfig.get("Audiotype") == "OSS":
- mv_common.pacinstall("oss")
- mv_common.add_service("oss")
-
- cmd="%s/bin/soundconfig.sh -t real -i %s -d %s" %(MVROOT,
- systemconfig.get("Audiotype"),
- systemconfig["SoundDevice"])
- mv_common.runcmd(cmd)
-
- mv_common.reloadfe(systemconfig.get("dbhost"),restartlcd)
- else:
- logging.debug(" Tinker mode(audio), not changing configuration")
- logging.debug("__End of audio")
+ if cmdmodule["this_is_install"]:
+ if systemconfig.get("Audiotype") == "OSS":
+ mv_common.pacinstall("oss")
+ mv_common.add_service("oss")
+
+ cmd="%s/bin/soundconfig.sh -t real -i %s -d %s" %(MVROOT,
+ systemconfig.get("Audiotype"),
+ systemconfig["SoundDevice"])
+ mv_common.runcmd(cmd)
+ mv_common.reloadfe(systemconfig.get("dbhost"),restartlcd)
+ logging.debug("__End of audio")
if cmdmodule["misc"]:
if mv_common.read_config(mv_common.module_config,"misc") == False :