you could try from the terminal/ssh to list your sound cards:
aplay -l
Then assign the correct card accordingly (either from ES or Kodi as @joinski has suggested)
Archlinux wiki is has great info on troubleshooting alsa: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Unmute_with_amixer
Here is my example from my box: (aplay -l)
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0