You could create a file called .asoundrc in your home directory.
Code:
pcm.!default {
type hw
card 1
device 7
}
You'll have to change the values to what need for sound over HDMI. You'll probably also have to remove/rename the file and login again when you want sound on the internal speakers instead.