I tried all versions from 3.0 up to 4.5 of emuelec and none of them seems to work.
I get sound only on the first boot and only on the intro video. When everything is finished i get no sound on games nor on the emuelec itself.
My tvbox is amlogic s905W and the dtb file used is the gxl_281 and it boots fine.
Is there a fix or some workaround I can try?
Are you using HDMI video+audio, or HDMI video+analog audio, or analog video+audio? If spdif is involved then things can get more complicated.
The sound of intro video will be played on all audio output devices, but after you get into EmulationStation the a-out device will be auto-recognized by PulseAudio and only one of them will be used.
So I guess there’s something wrong in figuring out which audio output device should be used.
You can manually set the audio output device, by press start in the main menu, then choose EmuELEC Setting->Audio device. Change it from auto to the one that works for you, reboot to verify. E.g. Analog aout is usually “0.1”, but since you have audio issues I think the number might be different from ordinary Amlogic devices and you have to try each of them.
Actually I just had a weird thing with 4.6 test where the demo videos have no sound. It is switched on. I assume it is a bug.
No sound in EmulationStation? Try switch the Sound Device in Start, EmuELEC Settings >> Audio Device from Auto to one of the others starting from the top (trial and error).
Otherwise it may be an issue with your ALSA settings or drivers. google for support on how to debug that.