Like many others, I'm trying to get sound through HDMI to work, using my HDTV as my monitor and running Ubuntu 18.04 on a Cherry-trail Z83V mini-pc. I've put a lot of research and time into this and am missing "something" in my configuration and understanding. At this point I'm just trying to play a music sound file, to test. It "seems" like my issue is that the default sound card is hw:0,1 but if I try speaker-test -c 2 -r 48000 -D hw:0,2 I do hear the white noise alternating from each speaker and see that the test is running correctly. Pulseaudio has never worked correctly as far as I can tell (much of the time reported via CLI as not running), and at this point is removed. In the graphical "settings" menu, under sound, there is nothing showing under outputs or inputs - I've assumed this is somehow pulseaudio derived.
My questions are: How can I make the default ALSA card hw:0,2 and how are the sound cards (I have 2) automatically found by Linux? Maybe the question concerns "device" and not "card" ?
UPDATE: Have installed pasystray which appears to have pulseaudio back which has populated the devices in system settings - sound. I've proved that I can get sound over HDMI by opening terminal and typing "speaker-test -c 2 -r 48000 -D hw:0,2" which correctly outputs white noise first in the left speaker then in the right etc until I issue CTRL-C to end the command; however I can't get audio from either a downloaded test music file or from any browser-visited websites (youtube or online courses etc). I have been able to get audio via the physical audio jack on the miniPC now but would like to be able to use HDMI as intended. What am I missing in my configuration?