I have my Mid 2011 iMac linked to a Samsung monitor via MDP to HDMI. My own speakers are linked to the monitor via Digital Optical Cable. So the sound goes through the monitor, I set the sound output to HDMI.

This all works fine until my Mac display is automatically turned to standby after so long. Once this happens no sound comes through my monitor, but can be changed back to Apple built in speakers and they are working fine. I've tried relaunching the app, unplugging the MDP and replugging it. The only way to get the sound back through my monitor is to restart my Mac.

Is there a way of sorting this aside from restarting or stopping the automatic display standby?