If you go into the retroarch menu under sound you can change the option by using left or right on the joystick. Pick the correct item then exit save the settings (also in the menu) and exit retroarch. Can be done on a game by game basis.
OR
ssh in while your in kody use aplay -L (not the capital L) find you what sound card your using. copy that to the asound.conf file.
i.e. in asound.conf
# Device name can be found using the command 'aplay -L'
default "hdmi:CARD=PCH,DEV=0"
Now find the retroarch.cfg file and change the audio device to the same info.
i.e. audio_device = "hdmi:CARD=PCH,DEV=0"
Then give it a try.
Display More
that is one of the things i said i tried, sorry if i didn't explain it properly.
with L or l this is what it outputs : "
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
LibreELEC:~ # aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device"
that would make the device "hdmi:CARD=ALSA,DEV=1" correct? placing that as the variable in the asound.conf and the as the retroarch.cfg still produces no sound, also the command you stated to use specifically while in Kodi gives the same results as listed above regardless of when i use the command, that would seem to indicate they are using the same devices.
Edit: the emulation station log outputs this line of text as well "AudioManager Error - Unable to open SDL audio: ALSA: Couldn't open audio device: No such file or directory"