I have a strange different behaviour in raspbian showing up between two TVs. A Sony Bravia 32W670A and a Samsung LA32A650A1F
The simplest demonstration for this problem is to build the
hello_audio.bin over and over in one console with this command
$ while date; do ./hello_audio.bin 1; done
That part works the same - the annoying sound will come from whichever TV is plugged into the HDMI at the time.
The difference is when I open Python in another console
Python 2.7.3 (default, Jan 13 2013, 11:20:46) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pygame import mixer >>> mixer.init() >>> mixer.music.load("foo.mp3") >>> mixer.music.play()
The Samsung continues to play the annoying sound from the first console in addition to "foo.mp3"
The Sony goes silent as soon as
mixer.init() is executed, and remains silent until Python exits (ie. you don't get to hear "foo.mp3" either!)
I only have the two TVs to test on at this moment, but I hope to add the results for a Panasonic to the list in the next couple of days.
Is it possible that the TV is changing the output of the PI? Or is something just confuddling the Sony?
Edit: I found another way to reproduce. Instead of using pygame, simply
$ mpg123 foo.mp3
Again - either
mpg123 work fine on their own, but playing both at once gives silence from the Sony. The Samsung plays both sources simultaneously.