From 35fed0af42df729431cd60548fb7dbf06bd80458 Mon Sep 17 00:00:00 2001 From: RedBug Date: Wed, 22 Feb 2017 21:45:38 +0100 Subject: [PATCH 1/8] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acfbc1d41d..9598eaaa2dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Bumped virtualgamepads version - virtualkeyboard now available - Add usb encoder 3H-Dual-Arcade, Mayflash dreamcast adapter - Add support for smb and upnp protocols in Kodi +- Use the sound settings from the configuration file for the splash screen at boot ## [4.0.0-beta5] - 2016-08-13hs the ratio issue in mame. From 697979a36df6d2b355f06a994aa77619d1a22062 Mon Sep 17 00:00:00 2001 From: RedBug Date: Wed, 22 Feb 2017 21:48:40 +0100 Subject: [PATCH 2/8] Update S02splash Use the sound settings from the configuration file --- board/recalbox/fsoverlay/etc/init.d/S02splash | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/board/recalbox/fsoverlay/etc/init.d/S02splash b/board/recalbox/fsoverlay/etc/init.d/S02splash index 48deb61acd3..eabedeb01e8 100755 --- a/board/recalbox/fsoverlay/etc/init.d/S02splash +++ b/board/recalbox/fsoverlay/etc/init.d/S02splash @@ -26,7 +26,24 @@ do_start () omx_fnt="" omx_opt="--no-keys --layer=10000 --aspect-mode=fill" omx_srt="--no-ghost-box --lines=1 --align=left $omx_fnt --font-size=20 --subtitles=/recalbox/system/resources/splash/recalboxintro.srt" - /usr/bin/omxplayer.bin $omx_opt $omx_srt $video & + + # Use the sound settings from the configuration file + audiovolume=`grep audio.volume= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` + audiodevice=`grep audio.device= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` + + if [ "$audiodevice" == "jack" ]; then + omx_opt=$omx_opt" --adev local" + fi + + if [ "$audiodevice" == "hdmi" ]; then + omx_opt=$omx_opt" --adev hdmi" + fi + + if [ ! -z $audiovolume ]; then + omx_opt=$omx_opt" --vol $audiovolume" + fi + + /usr/bin/omxplayer.bin $omx_opt $omx_srt $video & PID=$! # Stop the video when ready From f0a987935902763893ca3ea52e081a1c3fd5c435 Mon Sep 17 00:00:00 2001 From: RedBug Date: Fri, 24 Feb 2017 16:37:34 +0100 Subject: [PATCH 3/8] Create K99cache --- board/recalbox/fsoverlay/etc/init.d/K99cache | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 board/recalbox/fsoverlay/etc/init.d/K99cache diff --git a/board/recalbox/fsoverlay/etc/init.d/K99cache b/board/recalbox/fsoverlay/etc/init.d/K99cache new file mode 100644 index 00000000000..ebe7f5b15f9 --- /dev/null +++ b/board/recalbox/fsoverlay/etc/init.d/K99cache @@ -0,0 +1,26 @@ +#!/bin/bash + +CONFIG=/boot/recalbox-boot.conf + +function set_config(){ + + oldvalue=`grep $1= $CONFIG | cut -d "=" -f 2` + if [ -z $oldvalue ]; then + echo $1=$2 >> $CONFIG + else + cat $CONFIG | sed "s/^\($1\s*=\s*\).*\$/\1$2/" >$CONFIG.new + cp $CONFIG.new $CONFIG + rm $CONFIG.new + fi +} + +audiovolume=`grep audio.volume= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` +audiodevice=`grep audio.device= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` + +if [ ! -z $audiovolume ]; then + set_config audio.volume ${audiovolume} +fi + +if [ ! -z $audiodevice ]; then + set_config audio.device ${audiodevice} +fi From 7745caa4710feb48127107087226de092402da82 Mon Sep 17 00:00:00 2001 From: RedBug Date: Fri, 24 Feb 2017 16:38:42 +0100 Subject: [PATCH 4/8] Update S02splash --- board/recalbox/fsoverlay/etc/init.d/S02splash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/recalbox/fsoverlay/etc/init.d/S02splash b/board/recalbox/fsoverlay/etc/init.d/S02splash index eabedeb01e8..7601ac797c0 100755 --- a/board/recalbox/fsoverlay/etc/init.d/S02splash +++ b/board/recalbox/fsoverlay/etc/init.d/S02splash @@ -28,8 +28,8 @@ do_start () omx_srt="--no-ghost-box --lines=1 --align=left $omx_fnt --font-size=20 --subtitles=/recalbox/system/resources/splash/recalboxintro.srt" # Use the sound settings from the configuration file - audiovolume=`grep audio.volume= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` - audiodevice=`grep audio.device= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` + audiovolume=`grep audio.volume= /boot/recalbox-boot.conf | cut -d "=" -f 2` + audiodevice=`grep audio.device= /boot/recalbox-boot.conf | cut -d "=" -f 2` if [ "$audiodevice" == "jack" ]; then omx_opt=$omx_opt" --adev local" From bc78f5c3c528c970c3f25a77a6548fdd9e8693c3 Mon Sep 17 00:00:00 2001 From: RedBug Date: Fri, 24 Feb 2017 16:40:46 +0100 Subject: [PATCH 5/8] Rename S02splash to S05splash --- board/recalbox/fsoverlay/etc/init.d/{S02splash => S05splash} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename board/recalbox/fsoverlay/etc/init.d/{S02splash => S05splash} (100%) diff --git a/board/recalbox/fsoverlay/etc/init.d/S02splash b/board/recalbox/fsoverlay/etc/init.d/S05splash similarity index 100% rename from board/recalbox/fsoverlay/etc/init.d/S02splash rename to board/recalbox/fsoverlay/etc/init.d/S05splash From 173920aecb72c54c090d808f3b156a64ea7c7369 Mon Sep 17 00:00:00 2001 From: RedBug Date: Fri, 24 Feb 2017 16:46:14 +0100 Subject: [PATCH 6/8] Rename S05splash to S02splash --- board/recalbox/fsoverlay/etc/init.d/{S05splash => S02splash} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename board/recalbox/fsoverlay/etc/init.d/{S05splash => S02splash} (100%) diff --git a/board/recalbox/fsoverlay/etc/init.d/S05splash b/board/recalbox/fsoverlay/etc/init.d/S02splash similarity index 100% rename from board/recalbox/fsoverlay/etc/init.d/S05splash rename to board/recalbox/fsoverlay/etc/init.d/S02splash From 79ce074d02b724c9308d83bbd0070ef7ffbd0a77 Mon Sep 17 00:00:00 2001 From: RedBug Date: Fri, 24 Feb 2017 18:47:35 +0100 Subject: [PATCH 7/8] Delete K99cache --- board/recalbox/fsoverlay/etc/init.d/K99cache | 26 -------------------- 1 file changed, 26 deletions(-) delete mode 100644 board/recalbox/fsoverlay/etc/init.d/K99cache diff --git a/board/recalbox/fsoverlay/etc/init.d/K99cache b/board/recalbox/fsoverlay/etc/init.d/K99cache deleted file mode 100644 index ebe7f5b15f9..00000000000 --- a/board/recalbox/fsoverlay/etc/init.d/K99cache +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -CONFIG=/boot/recalbox-boot.conf - -function set_config(){ - - oldvalue=`grep $1= $CONFIG | cut -d "=" -f 2` - if [ -z $oldvalue ]; then - echo $1=$2 >> $CONFIG - else - cat $CONFIG | sed "s/^\($1\s*=\s*\).*\$/\1$2/" >$CONFIG.new - cp $CONFIG.new $CONFIG - rm $CONFIG.new - fi -} - -audiovolume=`grep audio.volume= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` -audiodevice=`grep audio.device= /recalbox/share/system/recalbox.conf | cut -d "=" -f 2` - -if [ ! -z $audiovolume ]; then - set_config audio.volume ${audiovolume} -fi - -if [ ! -z $audiodevice ]; then - set_config audio.device ${audiodevice} -fi From bd4c3a25643cd1a9c47facc6a766b6d3e88e3f27 Mon Sep 17 00:00:00 2001 From: RedBug Date: Fri, 24 Feb 2017 18:57:46 +0100 Subject: [PATCH 8/8] Update S02splash --- board/recalbox/fsoverlay/etc/init.d/S02splash | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/board/recalbox/fsoverlay/etc/init.d/S02splash b/board/recalbox/fsoverlay/etc/init.d/S02splash index 7601ac797c0..d2565de0fa2 100755 --- a/board/recalbox/fsoverlay/etc/init.d/S02splash +++ b/board/recalbox/fsoverlay/etc/init.d/S02splash @@ -79,14 +79,47 @@ do_start () test -e /dev/fb0 && fbv -f -i /recalbox/system/resources/splash/logo-version.png } +do_stop () +{ + +systemsetting="python /usr/lib/python2.7/site-packages/configgen/settings/recalboxSettings.pyc" + +CONFIG=/boot/recalbox-boot.conf + +function set_config(){ + + oldvalue=`grep $1= $CONFIG | cut -d "=" -f 2` + if [ -z $oldvalue ]; then + echo $1=$2 >> $CONFIG + else + cat $CONFIG | sed "s/^\($1\s*=\s*\).*\$/\1$2/" >$CONFIG.new + cp $CONFIG.new $CONFIG + rm $CONFIG.new + fi +} + +audiovolume="`$systemsetting -command load -key audio.volume`" +audiodevice="`$systemsetting -command load -key audio.volume`" + +if [ ! -z $audiovolume ]; then + set_config audio.volume ${audiovolume} +fi + +if [ ! -z $audiodevice ]; then + set_config audio.device ${audiodevice} +fi + +} + case "$1" in start) do_start & ;; stop) - ;; + do_stop & + ;; restart|reload) - ;; + ;; *) esac