There was something strange about SPDIF (a.k.a. IEC958) support in Ubuntu. This past Sunday, I was grappling with a visit from another nasty Gremlin (will post the full story another day).
It all started while trying to fix an annoying problem with the SPDIF. Actually, I discovered later the problem turned out to be unrelated to Ubuntu. But along the way, I managed to trigger a strange unresolved Ubuntu bug, which took me hours to workaround.
I have my Ubuntu PC connected to two sound systems. The first is connected to the stereo analog audio output. This one worked perfectly, and I have never had any problem with it.
The second is connected to the digital audio output. On Sunday, I triggered something in my tinkering, which resulted in Ubuntu absolutely refused to output PCM to the SPDIF. No amount of restart, toggling the IEC958 checkbox in gnome-volume-control, cursing and screaming were able to fix this. AC3 output to SPDIF worked fine, so it was not a connection problem.
Google failed to reveal it’s magic and showed a solution. Finally, at 4am, I called it a day and went to bed.
The next day, I gave it one more try. I even boot into Intrepid LiveCD to check if some hardware is broken, but sure enough, PCM SPDIF worked in LiveCD.
This time, I tried even more variety of keywords in Google, and finally stumbled upon this bug. So:
speaker-test -D spdif -c 2
This command seemed to give the Ubuntu sound configuration a big whack. Suddenly, PCM SPDIF is working again. In fact, it worked so well, I am unable to whack it back to non-working state. Running an AC3 stream through the SPDIF did not make it non-working again, unlike what was reported in the bug report.
Strange indeed.
Update (1 Dec 2008):
I encountered this problem again, but this time running:
speaker-test -D spdif -c 2is not enough to fix the problem.
Instead, I have to run these:
speaker-test -D spdif -c 2 speaker-test -c 2

Post a Comment