Broken sound card
May 21st, 2008My desktop is getting a little old. I got it the summer before I went to college, which means its 8th birthday is coming up in August. It’s still plugging along, though, hosting this blog, among other things with a whopping 384 MB of rambus ram. Aside from the memory, it’s starting to show its age in other ways, like the sound card going on the fritz.
It all started when I went to check out guitarati.com. I clicked on a “play” link and garbage came out the speakers. It wasn’t complete garbage, it sounded like music in the most tenuous of ways, but it wasn’t supposed to sound like that. “Too bad that website’s sound is broken,” I thought, except that everything I played after that sounded garbled in the same way. Working with sound and computers for a living, I figured I should investigate the problem. My first thought was that something was getting the endianness of the 16-bit samples wrong, like matlab did (does?) on linux. Trying a variety of endianness styles in playback, however, didn’t solve the problem.

My next thought was to record the weirdness, and the mic seemed to be working fine (although I couldn’t hear the playback to be certain). I constructed a simple chirp in the linear algebra program octave, the spectrogram of which can be seen at the left. What I recorded coming out of my speakers was very different from that, as can be seen from the spectrogram on the right. Disregard the gradual changes in color, the important thing to notice is that instead of just one line sloping up in the low frequencies, there are suddenly lines every 1380 Hz sloping up and down from common beginnings. The multiple horizontal repetitions are just repeated playbacks.
This repetition in frequency indicated that the sound coming out of the speakers had a bandwidth of only 690 Hz, instead of the requested 22050 Hz. Furthermore, playing the sound back at different sampling rates changed the bandwidth of the signal coming out of the speakers. The ratio of requested bandwidth to actual bandwidth turned out to be almost exactly 32:1. This sort of replication happens when upsampling a signal (pictures from the time and frequency domains), and seems to indicate that 31 of every 32 samples were being set to 0, with the horrible distortion coming from the resulting aliasing.
Even with a pretty good idea of what was happening, I still couldn’t figure out why it was happening. I tried resetting the various sound drivers, restarting the computer, even booting off a LiveCD, and nothing worked. I purchased a USB sound card (for $7 + $6 shipping), plugged it in, and could hear again. It’s a cute little device, basically just a USB plug on one end and a headphone and mic jack on the other. It was quite a relief to be able to watch my backlog of youtube videos, listen to music, and stream NPR while I was working out. Sound is pretty handy, as it turns out.
The question still remains, whether what happened to my internal sound card was a hardware failure or a just a bad setting. There aren’t that many reports online of the hardware on a sound card failing, it’s not like there are moving parts. If you have any insight, I’m all ears.
























