I was having problems with the sound on my mac reverting to internal speakers and not using the line out on the back. Fortunately it seems that this is a problem have had before http://discussions.apple.com/message.jspa?messageID=10141072#10141072 and that deleting some config files and restarting has fixed the issue.