no sound for splash videos - change omxplayer audio device to Alsa (Recalbox 6.0)
-
@ian57 Thanks I tried --adev alsa:hw:1,0 and got no sound, but the video was playing.
I moved S02Splash to S13Splash with --adve alsa:hw:0,0 and it kind of works:
The video plays now with sound after some some delay, but back in emulationstation the menu music would not work anymore.
I also tried S03Splash, S08Splash, … and so on but the outcome would not improve. Either the intro splash would not play or it would play but then there was no Emulationstation music.
-
@teufelskrapfen after ES is started, can you go the sound config menu and select another audio device, exit, return in the sound config menu and select you usb device again.
-
@ian57 yes that works... as soon as I select a different audio device, the music plays again.
Also (without doing the above) when I start a game and return to Emulationstation, the music will play again as well.
-
@teufelskrapfen ok, I think the problem comes from the delayed playing... the video is not finished when /etc/init.d/S26recalboxsystem is runned aand configure the sound for ES. As omxplayer uses the sound output, I think that the function rb_volume_configure ; rb_audio_configure do not finish succesfully... I think a workaround is to put audio configuration later for example in S99Custom
-
@ian57 Thanks I made backups of the files, then tried to copy / move the functions to S99Custom but didn't get it to work. Do you have a suggestion what parts of the script need to be copied/moved or what parts need to be present in S99Custom?
I restored my backups and also temporarily renamed S26recalboxsystem to S99recalboxsystem, but this also didnt work.
I was thinking of a workaround: maybe I can add a line to S13Splash that after the video has finished, the the output will be toggled to i.e. HDMI and immediately back to USB Audio.
-
create the file /recalbox/share/system/custom.sh and put the following in it. try to run it through SSH before, to see if it works :
#!/bin/bash systemsetting="recalbox_settings" config_script=/recalbox/scripts/recalbox-config.sh rb_volume_configure() { settingsVolume="`$systemsetting -command load -key audio.volume`" if [ "$settingsVolume" != "" ];then recallog "setting audio volume to $settingsVolume" eval $config_script "volume" "$settingsVolume" 2>&1 | recallog fi } rb_audio_configure() { recallog "Restoring ALSA mixers configuration" alsactl -f /recalbox/share/system/configs/asound.state restore settingsAudio="`$systemsetting -command load -key audio.device`" if [[ "$settingsAudio" == "" ]];then settingsAudio="auto" fi recallog "setting audio to $settingsAudio" eval $config_script "audio" "$settingsAudio" 2>&1 | recallog } ( rb_volume_configure ; rb_audio_configure ) & # 1.0
-
@ian57 Thanks and sorry for my late answer.
For the script to run I had to change
systemsetting="recalbox_settings"
to
systemsetting="python /usr/lib/python2.7/site-packages/configgen/settings/recalboxSettings.pyc"
I put S02Splash to S13Splash and added --adev alsa:hw:0,0
But I would only get sound from the splash intro but no music in Emulationstation.
-
@teufelskrapfen ok that's strange, did you test the S99custom alone to see if it is working. I made this thing in blind..; so perhaps I missed something.
-
@ian57 sorry havent got around testing it again but will try with S99custom this evening.
So I would:
- rename to S13Splash and add "--adev alsa:hw:0,0"
- copy/paste your text into S99custom
- do I need remove anything from S26recalboxsystem ?
-
OK so I copy-pasted the text below into S99custom, but its the same behavior as before (splash screen has sound, emulationstation no sound). Do you know the command to trigger the output-device change? I.e. from USB Audio to HDMI … would like to try something
#!/bin/bash
test -e "/recalbox/share/system/custom.sh" && /recalbox/share/system/custom.sh $1
systemsetting="python /usr/lib/python2.7/site-packages/configgen/settings/recalboxSettings.pyc"
config_script=/recalbox/scripts/recalbox-config.shrb_volume_configure() {
settingsVolume="$systemsetting -command load -key audio.volume
"
if [ "$settingsVolume" != "" ];then
recallog "setting audio volume to $settingsVolume"
eval $config_script "volume" "$settingsVolume" 2>&1 | recallog
fi
}rb_audio_configure() {
recallog "Restoring ALSA mixers configuration"
alsactl -f /recalbox/share/system/configs/asound.state restore
settingsAudio="$systemsetting -command load -key audio.device
"
if [[ "$settingsAudio" == "" ]];then
settingsAudio="auto"
fi
recallog "setting audio to $settingsAudio"
eval $config_script "audio" "$settingsAudio" 2>&1 | recallog
}( rb_volume_configure ; rb_audio_configure ) & # 1.0
-
Hi,
I had the same issue with my system and your post gave me an idea.
In the latsest version of recalbox (6.1), I did this:- go to /etc/init.d
- enter command: mount -o remount,rw /
- open file splash03
- change line 88 as follows:
omx_opt="--adev both --no-keys --layer=10000 --aspect-mode=fill"
omx_opt="--adev local --no-keys --layer=10000 --aspect-mode=fill"- save
Actually, "adev" must be followed by one these options: hdmi/local/both.
Hope it might help.