Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In my office I have a surround-sound receiver, and I have my MacBook Pro (6,1) hooked up via a TOSLink cable and adapter, and it works beautifully, except this: if there are no sounds playing for a short time, the optical out port 'times out', and then the optical signal to the stereo receiver is shut off.

It's immediately re-established if something happens to make a sound (I start a song in iTunes, receive an IM or mail, etc) but it takes about 1.5 seconds to sync up with the stereo receiver, so the first 1.5 sec of sound is lost. After that the optical out port stays up for about 60 seconds, and then goes down again. So I tend to miss IM/email if I'm not looking at the screen when they come in, which is why I have sound turned on in the first place.

Obviously I could unplug the TOSLink when not looking at the screen, but this is very inconvenient, and seems silly. I would prefer the connection to just stay on when idle. Is there a plist setting buried somewhere to accomplish this? The system preference pane for optical out is very sparse, reading only "The selected device has no output controls." Presumably this is a power-saving gesture but the Energy Saver Preference pane is similarly devoid of properties for this feature.

Where can I find more properties?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Playing a one-second silent sound every 50 seconds or so might help. Try this:

  • download 1 second silent .wav file here to desktop (or make your own)
  • in Terminal, change Directory to Desktop: cd ~/Desktop/
  • Try the following one-line command and see if your problem is alleviated:

while true; do afplay afplay silence-1sec.wav ; sleep 50; done

The command above enters an infinite loop which plays the empty sound every 50 seconds. This should keep your output busy. You can exit the loop by pressing +.

NB: afplayis frequently overlooked for terminal sound playback, but is hugely useful.

If that works, one could convert the command to a command that invisibly runs in the background.

share|improve this answer
    
Huh. This works (as tactics if not strategy) and I would have never thought of it. It seems to timeout even with 50 seconds, so I adjusted the timeout to 30 and that kept everything going. Thanks for a great idea. –  atroon Oct 30 '12 at 19:34
    
You are welcome! –  myhd Oct 30 '12 at 19:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.