Every time I reboot my Mac Pro the sound output resets itself to internal speakers. This is quite annoying and I had no clue how to fix it. This topic on the Apple forums shows how to fix it.
First delete the audio preference folder:
$ sudo rm -r /Library/Preferences/Audio
Recreate a new one:
$ sudo mkdir /Library/Preferences/Audio
Change the permissions:
$ sudo chown -R _coreaudiod:admin /Library/Preferences/Audio
Go back to the sound preference panel and set the audio to the one you prefer. This will recreate the settings file.
Reboot the system and see if it works.