Here the manual workaround method via Kodi explained in more detail:
Launch Kodi from the main menu, go to Settings, System, Audio, Audio output device.
Here you will see a list of all available audio output devices.
If your TV is connected via HDMI / Displayport, the name/brand/model-no of the TV usually appears in the middle of the name of the audio output device.
E.g. "HD Audio, Generic, SAM SyncMaster on HDMI #1" (SAM SyncMaster is the model name of the TV).
You can test within Kodi if the sound works by playing a media file, or navigating with a keyboard through the menu (you should hear click-sounds while navigating).
If you have found the working audio output device in kodi, remember it's name (or the #HDMI number (in our example HDMI #1)), exit Kodi and go into main menu from Batocera, then go to System Settings, Audio Output and select the audio output device, with the same #HDMI number or where the name matches the most to the one in Kodi.
If it is the correct audio output device, you will hear a "jingle-sound", when you exit System Settings.
The sound within games should now work and after a reboot you should also hear Frontend Music (if not turned off in Sound Settings).