Sometimes the user config breaks down and HDMI does not get sound anymore.
To reread the config files ~/.config/pulse/daemon.conf and /etc/pulse/daemon.conf, do this:
pulseaudio --kill
pulseaudio --start
When missing audio playback or capture devices this might do the trick.
To reset the audio user config do this:
rm -r ~/.config/pulse /tmp/pulse-*
pulseaudio --kill
pulseaudio --start
Module module-switch-on-connect.so
can cause the pulse daemon not to start.
Remove module-switch-on-connect.so
from file /etc/pulse/default.pa
.