diff options
Diffstat (limited to 'abs/core/LinHES-config')
-rw-r--r-- | abs/core/LinHES-config/09_mythvantge_runit_grub | 2 | ||||
-rw-r--r-- | abs/core/LinHES-config/LinHES-release | 2 | ||||
-rwxr-xr-x | abs/core/LinHES-config/PKGBUILD | 33 | ||||
-rwxr-xr-x | abs/core/LinHES-config/autocard.py | 37 | ||||
-rw-r--r-- | abs/core/LinHES-config/install_db_chroot.sh | 13 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_advanced.py | 3 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_common.py | 12 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_fileshare.py | 17 | ||||
-rw-r--r-- | abs/core/LinHES-config/mv_install.py | 2 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_ir.py | 30 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_software.py | 1 | ||||
-rwxr-xr-x | abs/core/LinHES-config/mv_webuser.py | 3 | ||||
-rwxr-xr-x | abs/core/LinHES-config/pinkNoise_3s.wav | bin | 0 -> 264646 bytes | |||
-rwxr-xr-x | abs/core/LinHES-config/soundconfig.sh | 119 | ||||
-rwxr-xr-x | abs/core/LinHES-config/xconfig.sh | 9 |
15 files changed, 173 insertions, 110 deletions
diff --git a/abs/core/LinHES-config/09_mythvantge_runit_grub b/abs/core/LinHES-config/09_mythvantge_runit_grub index 17fff2e..aef11a1 100644 --- a/abs/core/LinHES-config/09_mythvantge_runit_grub +++ b/abs/core/LinHES-config/09_mythvantge_runit_grub @@ -30,7 +30,7 @@ menuentry 'LinHES' --class arch --class gnu-linux --class gnu --class os $menuen search --no-floppy --fs-uuid --set=root $boot_device_id fi echo 'Loading Linux core repo kernel ...' - linux /boot/vmlinuz-linux root=UUID=$boot_device_id ro quiet splash init=/sbin/runit $install_modules + linux /boot/vmlinuz-linux root=UUID=$boot_device_id ro quiet splash udev.log-priority=3 init=/sbin/runit $install_modules echo 'Loading initial ramdisk ...' initrd /boot/initramfs-linux.img } diff --git a/abs/core/LinHES-config/LinHES-release b/abs/core/LinHES-config/LinHES-release index 1a4fd80..050e6a5 100644 --- a/abs/core/LinHES-config/LinHES-release +++ b/abs/core/LinHES-config/LinHES-release @@ -1 +1 @@ -LinHES R8.3 (Lorne Malvo) +LinHES R8.4 (Breaking Ground) diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD index e35f4a4..8af08e7 100755 --- a/abs/core/LinHES-config/PKGBUILD +++ b/abs/core/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config -pkgver=8.3 -pkgrel=12 +pkgver=8.4 +pkgrel=9 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' @@ -48,6 +48,7 @@ source=(mv_install.py 09_mythvantge_runit_grub mv_fileshare.py mv_locale.py systemconfig.py + pinkNoise_3s.wav myth_user_call.py mythvantage.cfg config-sudo.rules @@ -83,6 +84,7 @@ package() { # install -m 0755 restore_default_settings.sh $MVDIR/bin/restore_default_settings.sh install -m 0755 myth_settings_wrapper.sh $MVDIR/bin/myth_settings_wrapper.sh install -m 0755 soundconfig.sh $MVDIR/bin/soundconfig.sh + install -Dm 0755 pinkNoise_3s.wav $pkgdir/usr/share/sounds/pinkNoise_3s.wav install -m 0755 networkconfig.sh $MVDIR/bin/networkconfig.sh install -m 0755 create_master.sh $MVDIR/bin/create_master.sh install -m 0755 build_diskless.sh $MVDIR/bin/build_diskless.sh @@ -135,46 +137,47 @@ package() { install -o root -g root -D -m 0755 blacklist_nouveau.conf $pkgdir/etc/modprobe.d/blacklist_nouveau.conf } -md5sums=('17d9dd5a097fbbd4dae75dff8e2677ff' - '3f6855b7bb860a44f96a972c2e80f497' +md5sums=('97b810ddc35d1f441dbe8cdd6886e2af' + '51525188ac6f6034422c5d71d0c84408' 'f6e9dd7bc6cf0aaa3bd203dab4cb79b9' '2596460462cf6c889cf8f95485537b20' '985891a43f7c4c983eb2a362162f1a0f' '261ba62515edd7a13d46cbeb1b0eadca' '6821fdfacf2aac44275200d3acaadb56' 'f73d6d6f98839e900cb6685bf5dc4eae' - 'b8becf69d4309b938ceba3178c799270' + '27e4fcacca9b9662dd782fbdc92fceea' '2a7f3b34e522acfd08283b86c8926aba' 'b596d2e3779a434435bc0f0277b1ba3e' - '6e5639fff82fa2ba76113ac1ab8f2016' + '9ecf4cb455aee12372832b1e7700988c' 'f0376c98a7986897406d393186c0365e' '157e73d0f90d7b306aba8f5921aeedd3' - 'f8f803cb5738ce0021cd37c1ab514c45' - 'eef9b882ecb70648a8f253f85b73a274' + '1f58c0393a131f4a8f9a84b3fe08a7e4' + 'f9a46082c28a416ab0af730fd465ffc6' '5f890ea9bda6aef652d2560ca19dac07' 'ab2aa42c2947148c2b1cac0ade6d1d55' 'd429b59d3cfb37b0624c6a4a71a7c2c0' 'f6a935c35123fdc7c259c01cbc794a64' - 'b3ce302473883ca118d4a58f1b1306e2' + 'ccf7b6a8d0ccf2360a57384b45437e58' 'd3490e93f313bbbcbc6c3693c56b9c17' 'e959df98947eb0d2ea64ff616b61aab5' '2506860a416e1988934225d80d501c2c' - 'c0549457750c4f8e8038d904a0f3012a' - 'cb7abd558b6540bc5e2232866a2a42f8' + 'f57200b66b6cf384f2c784b3e4303503' + 'b3505d27b65a4d35e252e2d256909e80' 'b845de3e05c1734cce4b9ac5e8f1baaf' - '077ebce663edba30ba7f93e4d245d125' + '02b4378b17bca6bebdcc2258a80dfc6b' '8b7dce4a3a0a281fa6656aa8781a648e' '4b10fff21a0274f950f97f2b61e92463' '824e49d9b01fed295c704ab68908b464' 'fe5e31b833cc6707209e9d656b6eb53c' - '24ef3ad4be1bf367cca40469173f19af' - '087a0ef743bc8af915503f8773536ce4' + '336f08aed2e3c0b9fd09563933d54735' + '68ca2af6fb9dba32ed668b9ae1564a01' '38665330aeb3a8bdf7be24857fe035bb' '80685e047993b00161be29e3580f3a40' 'b79fe6ef82b0b5e71d62806e773ed556' - '595663a2cb0b43c4ea3fb3dac915a3c8' + '3cb673adb83b6afa52cffaa621b9d96b' '781f161a79c3188a31c8615b8258b241' '888a6c57f272d9fa3e77e216a421562b' + 'cdd5008ee77e67c1d51ad73a24612485' '2596460462cf6c889cf8f95485537b20' 'dc3c5270691a62600475705f4cb78b56' '4804aa93aaad3dfcfff08cd9ffd68836' diff --git a/abs/core/LinHES-config/autocard.py b/abs/core/LinHES-config/autocard.py index 19563a4..cb0a746 100755 --- a/abs/core/LinHES-config/autocard.py +++ b/abs/core/LinHES-config/autocard.py @@ -399,11 +399,12 @@ class dvb_tuners(): #self.staticdevice is set in create_udev_rule def find_description(self): - command = '/usr/bin/dvb-fe-tool -g -a %s' %self.dvb_number + command = '/usr/bin/dvb-fe-tool -a %s' %self.dvb_number results=os.popen(command,'r') line = results.readline().strip() - d = line.split('''(''') - return d[0] + d = line.split('''Frontend (''') + dd = d[0].split('''Device ''') + return dd[1] def find_full_udev_attribs(self): cmd = 'udevadm info -a -p $(udevadm info -q path -n %s)' %self.device @@ -974,19 +975,23 @@ def find_in_use_card_list(): def usuage(): help=''' - Autocard.py is a program that will take the guess work out of setting up tuner/capture cards. - There are 4 options: - help : This help screen - print: Will find and printout any detected capture cards, including network based tuners like the hdhomerun_config - udev : This option creates a set of static device nodes for the local capture cards. - Rules are based on pci/usb path so moving the card into a different expansion slot will nullify the udev rule - HDPVR devices use the serial number as the primary key for the udev rule_list - - insertdb : This option will insert any detected cards into the MythTV database using the static device generated by udev. - This option will also generate udev rules. Tuners that are already defined will not be readded. - - write_proxy: This will write out the config used by the service ceton_proxy - all : The same as using print udev insertdb write_proxy + autocard.py takes the guess work out of setting up tuner/capture cards. + + Options: + help: This help screen. + print: Find and printout any detected capture cards, including + network based tuners like the HDHomeRun. + udev: Creates a set of static device nodes for local capture cards. + Rules are based on pci/usb path so moving the card into a + different expansion slot will nullify the udev rule. + HDPVR devices use the serial number as the primary key for + the udev rule list. + insertdb: Insert any detected cards into the MythTV database using the + static device generated by udev. + insertdb will also generate udev rules. Tuners that are + already defined will not be readded. + write_proxy: Write out the config used by the service ceton_proxy. + all: The same as using: print udev insertdb write_proxy EX: diff --git a/abs/core/LinHES-config/install_db_chroot.sh b/abs/core/LinHES-config/install_db_chroot.sh index 47de18c..077481d 100644 --- a/abs/core/LinHES-config/install_db_chroot.sh +++ b/abs/core/LinHES-config/install_db_chroot.sh @@ -11,8 +11,6 @@ echo "install_db_chroot hostname is $hostname" . $MV_ROOT/bin/install_functions.sh #myhost=`cat /etc/hostname` -#mount -t proc none /proc -pacman --noconfirm -S --force mysql /etc/rc.d/mysqld status=1 @@ -49,21 +47,10 @@ do $MV_ROOT/bin/myth_settings_wrapper.sh -c USERJOBALLOW $MV_ROOT/bin/myth_settings_wrapper.sh -c ACCESSCONTROL if [ -d /data/srv/mysql/mythconverg ] - #if [ -d /var/lib/mysql/mythconverg ] then - # pacman --noconfirm -R webcalendar - # pacman --noconfirm --nodeps -S webcalendar status=0 fi -# if [ $SystemType = "Master_backend" ] -# then -# $MV_ROOT/bin/myth_settings_wrapper.sh -c BECONFIG -s master -a $dbhost -# fi fi fi done /etc/rc.d/mysqld stop -#umount /proc - - - diff --git a/abs/core/LinHES-config/mv_advanced.py b/abs/core/LinHES-config/mv_advanced.py index de10d78..d67e420 100755 --- a/abs/core/LinHES-config/mv_advanced.py +++ b/abs/core/LinHES-config/mv_advanced.py @@ -97,6 +97,9 @@ def setup_splash(Usebootsplash): #this is needed in case grub-mkconfig is run cmd = ''' sed -i "s/^GRUB_DEFAULT.*$/GRUB_DEFAULT="1"/g" /etc/default/grub''' mv_common.runcmd(cmd) + logging.info(" Running grub-mkconfig") + cmd="grub-mkconfig -o /boot/grub/grub.cfg" + mv_common.runcmd(cmd) return #def setup_rrd(UseRRD): diff --git a/abs/core/LinHES-config/mv_common.py b/abs/core/LinHES-config/mv_common.py index a009d72..367a067 100755 --- a/abs/core/LinHES-config/mv_common.py +++ b/abs/core/LinHES-config/mv_common.py @@ -224,9 +224,11 @@ def pacinstall(pkg): elif pkg == "xbmc": pacinstall("xbmc-pvr-addons") elif pkg == "kodi": - pacinstall("kodi-pvr-addons") + pacinstall("kodi-addon-pvr-mythtv-git") elif pkg == "plexhometheater": - pacinstall("plex-home-theater") + pacinstall("openpht") + elif pkg == "plexmediaserver": + pacinstall("plex-media-server") elif pkg == "mame": pacinstall("sdlmame") elif pkg == "foldingathome": @@ -266,9 +268,11 @@ def pacremove(pkg): elif pkg == "xbmc": pacremove("xbmc-pvr-addons") elif pkg == "kodi": - pacremove("kodi-pvr-addons") + pacremove("kodi-addon-pvr-mythtv-git") elif pkg == "plexhometheater": - pacremove("plex-home-theater") + pacremove("openpht") + elif pkg == "plexmediaserver": + pacremove("plex-media-server") elif pkg == "mame": pacremove("sdlmame") elif pkg == "foldingathome": diff --git a/abs/core/LinHES-config/mv_fileshare.py b/abs/core/LinHES-config/mv_fileshare.py index 58c11d8..5844a2f 100755 --- a/abs/core/LinHES-config/mv_fileshare.py +++ b/abs/core/LinHES-config/mv_fileshare.py @@ -327,7 +327,6 @@ def setup_etc_exports(shares,data_config,servername,nfslist): templine = "%s %s" %(sharename,mountpoint) nfs_map_auto.append(templine) - #create the lists for both /etc/exports and nfs_map_auto for share in shares: if share == "/myth": @@ -354,6 +353,22 @@ def setup_etc_exports(shares,data_config,servername,nfslist): templine = nfs_auto_line %(servername,tempname,tempname) nfs_map_auto.append(templine) + #read in users templates/nfs.shares + logging.debug(" processing nfs.shares file") + nfsshares_file=data_config.MYTHHOME+"/templates/nfs.shares" + try: + f = open(nfsshares_file,"r") + for line in f.read().splitlines(): + if line.startswith("#"): + continue + item = line.split() + if len(line) <= 1 : + continue + logging.debug(" %s",line) + share_list.append(line) + except : + logging.critical(" Couldn't read %s",nfsshares_file) + new_exports=[] new_exports.append("#This file was generated by systemconfig.py -m fileshare") new_exports.append("#Use exportfs -arv to reread. \n\n") diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py index 7dfbddb..ed3e342 100644 --- a/abs/core/LinHES-config/mv_install.py +++ b/abs/core/LinHES-config/mv_install.py @@ -1242,7 +1242,7 @@ def grub_it(): new_line='''GRUB_COLOR_HIGHLIGHT="black/yellow"\n''' if line.find(hidden_time) != -1 : - new_line="GRUB_HIDDEN_TIMEOUT=5\n" + new_line="GRUB_HIDDEN_TIMEOUT=3\n" newgrub.append(new_line) diff --git a/abs/core/LinHES-config/mv_ir.py b/abs/core/LinHES-config/mv_ir.py index 8eab7b0..bab77a5 100755 --- a/abs/core/LinHES-config/mv_ir.py +++ b/abs/core/LinHES-config/mv_ir.py @@ -34,13 +34,15 @@ def setup_lirc_links(mythhome): if os.path.exists("/etc/lircrc"): if not os.path.exists(mythhome+"/.mythtv/lircrc"): logging.debug(" Creating symlink for myth lircrc") - os.symlink("/etc/lircrc",mythhome+"/.mythtv/lircrc") + #os.symlink("/etc/lircrc",mythhome+"/.mythtv/lircrc") + mv_common.link_file("/etc/lircrc",mythhome+"/.mythtv/lircrc") else: logging.debug(" %s/lircrc already present",mythhome) if not os.path.exists(mythhome+"/.lircrc"): logging.debug(" Creating symlink for lircrc") - os.symlink("/etc/lircrc",mythhome+"/.lircrc") + #os.symlink("/etc/lircrc",mythhome+"/.lircrc") + mv_common.link_file("/etc/lircrc",mythhome+"/.lircrc") else: logging.debug(" %s/.lircrc already present",mythhome) else: @@ -49,7 +51,8 @@ def setup_lirc_links(mythhome): if os.path.exists("/etc/wol-lircrc"): if not os.path.exists(mythhome+"/.wol-lircrc"): logging.debug(" Creating symlink for .wol-lircrc") - os.symlink("/etc/wol-lircrc",mythhome+"/.wol-lircrc") + #os.symlink("/etc/wol-lircrc",mythhome+"/.wol-lircrc") + mv_common.link_file("/etc/wol-lircrc",mythhome+"/.wol-lircrc") else: logging.debug(" %s/.wol-lircrc already present",mythhome) else: @@ -108,6 +111,12 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket): currenttime = strftime("%b-%d-%Y-%H:%M:%S", localtime()) cmd = "mv /etc/lircd.conf /etc/lircd.conf-%s" %currenttime mv_common.runcmd(cmd) + cmd = "mv /etc/lirc/lircd.conf.d/remote_lircd.conf /etc/lirc/lircd.conf.d/remote_lircd.conf-%s" %currenttime + mv_common.runcmd(cmd) + cmd = "mv /etc/lirc/lircd.conf.d/blaster_lircd.conf /etc/lirc/lircd.conf.d/blaster_lircd.conf-%s" %currenttime + mv_common.runcmd(cmd) + cmd = "mv /etc/lirc/lircd.conf.d/lcd_lircd.conf /etc/lirc/lircd.conf.d/lcd_lircd.conf-%s" %currenttime + mv_common.runcmd(cmd) cmd = "mv /etc/lircrc /etc/lircrc-%s" %currenttime mv_common.runcmd(cmd) cmd = "mv /etc/wol-lircrc /etc/wol-lircrc-%s" %currenttime @@ -121,13 +130,14 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket): files = remote_path + "/lircd*" logging.debug(" Using %s",files) - # /etc/lircd.conf symlink + # was /etc/lircd.conf symlink + # /etc/lirc/lircd.conf.d/remote_lircd.conf symlink for filename in glob.glob(files): # Ignore subfolders if os.path.isdir (filename): logging.debug(" %s is a dir, skipping",filename) continue - os.symlink(filename,"/etc/lircd.conf") + mv_common.link_file(filename,"/etc/lirc/lircd.conf.d/remote_lircd.conf") #files = templates + "/remotes/" + Remotetype + "/lircrc*" # include lircrc @@ -198,7 +208,7 @@ def setup_ir_remote(Remotetype,templates,mythhome,HostBlasterType,remotebucket): cmd = ''' rm -f %s''' %(userLircmap) mv_common.runcmd(cmd) logging.debug(" Creating symlink for %s Lircmap.xml",app) - os.symlink(kodifile, mythhome+"/"+userdirname+"/userdata/Lircmap.xml") + mv_common.link_file(kodifile, mythhome+"/"+userdirname+"/userdata/Lircmap.xml") except: pass else: @@ -316,8 +326,9 @@ def setup_blaster_proto(HostBlasterType,Hostnumblaster,TEMPLATES,systemconfig): continue template=TEMPLATES+"/transmit/%s/lircd.conf" %proto if os.path.exists(template): - logging.debug(" include blaster template: %s",proto) - include_file("/etc/lircd.conf",template) + logging.debug(" link blaster template: %s",proto) + mv_common.link_file(template,"/etc/lirc/lircd.conf.d/blaster_lircd.conf") + #include_file("/etc/lircd.conf",template) else: logging.debug(" template: %s is not present",template) @@ -400,7 +411,8 @@ def setup_lcd(LCDtype, TEMPLATES, Remotetype, this_is_install): if os.path.isdir (filename): logging.debug(" %s is a dir, skipping",filename) continue - include_file("/etc/lircd.conf",filename) + mv_common.link_file(filename,"/etc/lirc/lircd.conf.d/lcd_lircd.conf") + #include_file("/etc/lircd.conf",filename) files = lcdlirc+"/lircrc*" logging.debug(" Using %s",files) for filename in glob.glob(files): diff --git a/abs/core/LinHES-config/mv_software.py b/abs/core/LinHES-config/mv_software.py index 102fa96..dcf95ee 100755 --- a/abs/core/LinHES-config/mv_software.py +++ b/abs/core/LinHES-config/mv_software.py @@ -73,6 +73,7 @@ def setup_software(systemconfig, data_config): "webonlinhes", "huludesktop", "plexhometheater", + "plexmediaserver", "kodi", "dvdcss", "foldingathome") diff --git a/abs/core/LinHES-config/mv_webuser.py b/abs/core/LinHES-config/mv_webuser.py index e349e0b..3fdbc35 100755 --- a/abs/core/LinHES-config/mv_webuser.py +++ b/abs/core/LinHES-config/mv_webuser.py @@ -13,7 +13,8 @@ def setup_web_auth(UseMythWEB_auth): logging.info(" Enabling authorization for mythweb") try: fo = open(include_file, "w") - out_string='''include "/etc/lighttpd/auth-inc.conf"''' + out_string='''include "/etc/lighttpd/auth-inc.conf" +''' fo.write(out_string) fo.close() except: diff --git a/abs/core/LinHES-config/pinkNoise_3s.wav b/abs/core/LinHES-config/pinkNoise_3s.wav Binary files differnew file mode 100755 index 0000000..bb75ca5 --- /dev/null +++ b/abs/core/LinHES-config/pinkNoise_3s.wav diff --git a/abs/core/LinHES-config/soundconfig.sh b/abs/core/LinHES-config/soundconfig.sh index 38687a4..e6aaa41 100755 --- a/abs/core/LinHES-config/soundconfig.sh +++ b/abs/core/LinHES-config/soundconfig.sh @@ -1,12 +1,11 @@ #!/bin/bash +MYTH_RUN_STATUS="1" . /etc/systemconfig . /etc/profile echo $@ >/tmp/audio.call BASE="" -MYTH_RUN_STATUS="1" -. /etc/profile -TESTFILE="/usr/share/sounds/alsa/Front_Center.wav" +TESTFILE="/usr/share/sounds/pinkNoise_3s.wav" OSSinstalled="false" BLACKLIST=/etc/modprobe.d/soundconfig_blacklist.conf @@ -23,26 +22,17 @@ function testaudio () { function load_alsa() { echo "Loading ALSA ..." remove_service.sh alsa-utils 1> /dev/null 2> /dev/null - KER=`uname -r` - cd /lib/modules/$KER/ - echo " uncompressing ALSA modules" - tar -xf sound-preoss.tar.bz2 - #echo " installing alsa-lib" - #pacman -S --force --noconfirm alsa-lib echo " uninstalling oss" pacman -R --noconfirm oss echo "triggering udev module load" depmod -a - cd - > /dev/null - #udevadm trigger udevadm settle udevadm trigger - + udevadm settle add_service.sh alsa-utils - } @@ -54,6 +44,7 @@ function unload_alsa () { rm -rf /dev/adsp* rm -rf /dev/snd/* rm -rf /dev/audio + remove_asound modprobe -r $(lsmod |grep ^snd |awk '{print $1}') } @@ -76,34 +67,17 @@ function installOSS { pacman --noconfirm -S --force oss fi soundon + if [ ! $? = 0 ] + then + pacman --noconfirm -S --force gcc make binutils + soundon + fi add_service.sh oss echo "blacklist soundcore" > $BLACKLIST echo "install soundcore /bin/false" >> $BLACKLIST } -function SYNCXINE { - echo "modify xine config file" - if [ -f $MYTHHOME/.xine/config ] - then - cp -f $MYTHHOME/.xine/config $TEMPLATES/xine.config - else - cp $TEMPLATES/xine.config.template $TEMPLATES/xine.config - fi - - if [ x$Audiotype = xOSS ] - then - DEVICENUMBER=`echo $SoundDevice|awk -F/ ' { print $3 } '|tr -d dsp ` - sed -e "s/^.*audio.driver.*$/audio.driver:oss/" \ - -e "s/^.audio.device.oss_device_name.*$/audio.device.oss_device_name:\/dev\/dsp/" \ - -e "s/^.audio.devic.oss_device_number.*$/audio.device.oss_device_number:$DEVICENUMER/" \ - -e "s/^.*audio.output.speaker_arrangement:.*$/Audio.output.speaker_arrangement:PassThrough/" \ - $TEMPLATES/xine.config > $MYTHHOME/.xine/config - else - cp $TEMPLATES/xine.config $MYTHHOME/.xine/config - fi -} - function SYNCMPLAYER { echo "modify mplayer config file" if [ -f /etc/mplayer/mplayer.conf ] @@ -113,7 +87,12 @@ function SYNCMPLAYER { fi if [ x$AUDIOTYPE = xALSA -o x$AUDIOTYPE = xalsa ] then - MPLAYERDEVICE=`echo $AUDIODEVICE | tr : = | tr , .` + if [ "$mixAUDIODEVICE" ] + then + MPLAYERDEVICE="plug=dmixer" + else + MPLAYERDEVICE=`echo $AUDIODEVICE | tr : = | tr , .` + fi echo "ao=alsa:device=$MPLAYERDEVICE" > /etc/mplayer/mplayer.conf echo "ac=hwac3,hwdts," >> /etc/mplayer/mplayer.conf else @@ -136,14 +115,44 @@ function checkOSSinstalled () { fi } -function write_asound { - echo "writing asound.conf file" +function backup_asound { + echo "backup 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 remove_asound { + echo "removing asound.conf file" + backup_asound +} + +function write_asound { + echo "writing asound.conf file" + backup_asound + mixAUDIODEVICE="" + if [[ $AUDIODEVICE == plughw:* ]] + then + mixAUDIODEVICE=`echo $AUDIODEVICE | sed 's/plughw:\(.\)/\1/g'` + echo 'pcm.dmixer { + type dmix + ipc_key 2048 + slave { + pcm "hw:'"$mixAUDIODEVICE"'" + period_size 512 + buffer_size 4096 + } +} + +pcm.!default { + type plug + slave.pcm "dmixer" +}' > /etc/asound.conf + else + echo 'pcm.!default "'"$AUDIODEVICE"'"' > /etc/asound.conf + fi } function sound_config_system { @@ -152,17 +161,14 @@ function sound_config_system { write_asound fi SYNCMPLAYER -# if [ x$syncXine = x1 ] -# then -# SYNCXINE -# fi } function loadsound (){ checkOSSinstalled if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ] then - while [ $OSSinstalled = "false" ] + i=1 + while [[ $OSSinstalled = "false" && $i -le 20 ]] do unload_alsa if [ -e /tmp/.alsatest ] @@ -171,6 +177,7 @@ function loadsound (){ fi installOSS checkOSSinstalled + i=$(( $i + 1 )) done else touch /tmp/.alsatest @@ -232,6 +239,28 @@ case $SOUNDOPTYPE in ;; test|TEST) echo $@ > /tmp/audio.test + + #set iec958 audio bit + if [[ $AUDIODEVICE == plughw:* ]] + then + cardName=`echo $AUDIODEVICE | sed 's/plughw:\(.*\),.*/\1/g'` + #cardDevice=`echo $AUDIODEVICE | sed 's/.*,\(.*\)/\1/g'` + iecset -c "$cardName" audio 1 + else + cardName="0" + iecset audio 1 + fi + + #unmute IEC958 + amixerControls=`amixer -c "$cardName" scontrols` + while read -r line; do + if [[ $line == *IEC958* ]] + then + amixCard=`echo "$line" | sed "s/.*\ \('.*\)/\1/g"` + amixer -c "$cardName" sset "$amixCard" unmute + fi + done <<< "$amixerControls" + #loadsound if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ] then @@ -239,7 +268,7 @@ case $SOUNDOPTYPE in ossplay -d$AUDIODEVICE $TESTFILE else echo "testing ALSA $AUDIODEVICE " - echo aplay --device=$AUDIODEVICE $TESTFILE + #echo aplay --device=$AUDIODEVICE $TESTFILE aplay --device=$AUDIODEVICE $TESTFILE fi ;; diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh index acc949c..a5ad9c2 100755 --- a/abs/core/LinHES-config/xconfig.sh +++ b/abs/core/LinHES-config/xconfig.sh @@ -65,7 +65,7 @@ function presetupX { } function nvidia_prepare { - for i in mesa-libgl nvidia nvidia-utils nvidia-libgl opencl-nvidia nvidia-304xx nvidia-304xx-utils nvidia-304xx-libgl opencl-nvidia-304xx nvidia-340xx nvidia-340xx-utils nvidia-340xx-libgl opencl-nvidia-340xx + for i in libva-intel-driver mesa-libgl nvidia nvidia-utils nvidia-libgl opencl-nvidia libglvnd nvidia-304xx nvidia-304xx-utils nvidia-304xx-libgl opencl-nvidia-304xx nvidia-340xx nvidia-340xx-utils nvidia-340xx-libgl opencl-nvidia-340xx do pacman --noconfirm -Rdd $i >> $LOGFILE 2>&1 done @@ -221,7 +221,7 @@ function intel_driver_install { echo "Installing Intel driver" >> $LOGFILE 2>&1 #this is used to remove nvidia nvidia_prepare - pacman -S --noconfirm xf86-video-intel mesa-libgl >> $LOGFILE 2>&1 + pacman -S --noconfirm xf86-video-intel libva-intel-driver mesa-libgl >> $LOGFILE 2>&1 echo "/usr/lib/libIntelXvMC.so.1" > "$XVMC_CONFIG" } @@ -350,7 +350,10 @@ if [ -f /etc/systemconfig ] then . /etc/systemconfig else - Xres="800x600" + #Xres="800x600" + Xres="Auto" + echo " Setting modeline to ${Xres}" + echo " Setting modeline to ${Xres}" >> $LOGFILE 2>&1 fi CMDLINE=$(cat /proc/cmdline) echo $CMDLINE | grep -q displayres |