I suffer exactly same issue (about ALSA "underrun occurred", not 5.1 vs 2.0 speakers).
OS: Gentoo Linux x86_64, kernel 3.6.8.
Soundcard: HDA ATI SB (Realtek ALC662, driver module: snd_hda_intel).
I fixed audible ALSA underruns by removing my ~/.asoundrc. This of course might not be an option for people who need to personalize their ALSA settings - my ~/.asoundrc only contained small experiments, which I didn't actually need (but they were obviously causing issues).
OS: Arch Linux
Soundcard: Intel 82801H (ICH8 Family) HD Audio Controller
Issue transferred to ValveSoftware/Source-1-Games#65.
This issue is closed - continue conversation there.
SDL_AUDIODRIVER=alsa</code>),x1 2013-01
This may not strictly be a bug since I understand PulseAudio is the officially supported backend, but in case there are any plans to support bare ALSA, there is an issue to report. Starting the game with ALSA (by setting environmental variable
SDL_AUDIODRIVER=alsa), all sounds crackle and, when there multiple simultaneous sources of sound, cause game stuttering. This line appears in the terminal output repeatedly:ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurredThe issue appears to be related to buffer size / sampling rate since setting different values of those in ~/.asoundrc changes the amount of crackling (although I couldn't manage to find a combination that would eliminate it completely).
Also, the game does not recognize my speaker setup - I use 5.1 surround speakers, but the game only offers the option of 2 speakers in the audio options tab.
OS: Arch Linux, kernel 3.3.7-1-ck
Soundcard: Creative Audigy LS (driver module:
snd-ca0106)