Yes, its another HDMI audio puzzle
Pi3 RecalBox up and running.
Keyboard and mouse attached with multiport usb hub
Connected to Yamaha 5.1 via HDMI
Audio is working in Kodi. Audio not working in RecalBox.
Have used the Pi with retrosmc, and retropie builds. No issue with HDMI (on other SD cards obvioulsy) Scoured forums for some ideas; haven't found any solution in 3 days. I am now here lol
Done so far:
- edited recalbox.conf - ensured the following is here:
------------ C - Audio ------------
Set the audio device (auto, hdmi, jack)
Set system volume (0..100)
Enable or disable system sounds in ES (0,1)
- edited /boot/config.txt, ensured the following is here:
uncomment if you get no picture on HDMI for a default "safe" mode
uncomment to force a specific HDMI mode (this will force VGA)
Sound output. Set to 0 or comment for autodetect, 1 for DVI, 2 to force HDMI.
Using /etc/modules is deprecated and no longer supported on 4.4 kernel
So manually enable audio
force hdmi while the tv can take time before sending the signal on the hdmi output
0 [ALSA ]: bcm2835 - bcm2835 ALSA
- fiddled with /etc/retroarch.cfg (dont know whether 'hw 0,3' is in fact correct here as cannot install 'aplay' to determine what is what...) - question: how can I determine this without aplay?
really just guessing here:
grep audio /etc/retroarch.cfg | grep -v "#"
audio_enable = true
audio_out_rate = 44100
audio_driver = alsa
audio_device = hw:0,3
audio_sync = true
- however have noticed that a custom .cfg is in use, so assume this is not being read anyway...
lsmod | grep snd
snd_bcm2835 20511 2
snd_pcm 75698 2 snd_bcm2835
snd_timer 19156 1 snd_pcm
snd 51908 6 snd_bcm2835,snd_pcm,snd_timer
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback 400 [100%] [4.00dB] [on]
dmeg, /var/log/messages and things of interest that the support_script presents, but cannot find any specific error related to why HDMI doesnt work with the build. was thinking of attempting to run the retroarch with --verbose and get some logging somewhere or is that too granular?
hugely appreciate any help from some learned people out there - I think RecalBox is superb, but obviously not for me if I cant get audio working
Thought another update was needed after finding a very interesting thread about passthrough multichannel stuff over hdmi. this poor guy was configuring mythtv, but the setup from pi -> receiver over hdmi is identical and it appears its down to the "apparently unrelated device bcm2835 IEC958/HDMI"; my scenario exactly:
Having then gone back into osmc(retrosmc), I navigated here, which to me appears to be the reason why the pcm stuff is working ; as soon as I load emulation station and a rom, the receiver kicks in to PCM mode and I hear sound:
root@osmc-gee:/usr/share/alsa/pcm# head -20 hdmi.conf
Hardware output from HDMI
@args [ CARD DEV AES0 AES1 AES2 AES3 ]
name defaults.pcm.iec958.card <-------------------------
My setup in osmc uses 0,1 as below (aplay -L)
bcm2835 ALSA, bcm2835 IEC958/HDMI
Hardware device with all software conversions
So, learned gurus out there ---- what can I do to emulate this puzzle on RecalBox? I'd gladly have a play if I was able to mount stuff in / but this appears not possible without potentially breaking something. Not a problem in itself, but I'm out of SD cards and I dont have a backup.
Tried various things with .conf files above after getting root (/) filesystem mounted as rw, but still unable to get things working.
Used retroarch directly after stopping emulationstation manually, i.e.
retroarch --menu --verbose ; customretroarch definitely being read-in including the following audio settings. have confirmed that audio_device is @ 0,1 and modified the audio_driver with alsa too.
retroarch --features compiled with ALSA as expected, nothing else valid to use:
audio_enable = "true"
audio_driver = "alsa"
audio_device = "hw:0,1"
audio_sync = "true"
simply getting an "failed to initialize audio" error from retroarch log:
[ERROR] [ALSA]: Failed to initialize...
[ERROR] Failed to initialize audio driver. Will continue without audio.
decided to take a good look at osmc config with retro and what its using:
audio_driver = "alsathread"
audio_resampler = "sinc"
audio_device = ""
audio_sync = "true"
I emulated this in recalbox, and the errors in retroarch stop with the following in the retroarch startup as in osmc
[INFO] ALSA: Using signed 16-bit format.
[INFO] ALSA: Period size: 384 frames
[INFO] ALSA: Buffer size: 1536 frames
so figured I was onto something, however still no sound.
really just clueless now. remember, I launch emulation in osmc (from kodi) and I start up a game... audio just works.
i suppose my next question is: is there something in kodi that launches stuff correctly or emulation station, or is this simply a recalbox 'startup driver problem' that doesnt recognize the audio correctly. can anyone shed light on this for me?