common alsa issues

I started a thread on the Gentoo Forums the other week, trying to get users to post what are common issues that they run into collectively. I’m hoping to see if I can find some patterns and either update the documentation or write a FAQ. If you have anything to share, please do.

And for the record, here is my first line of defense that I will tell anyone when they have no sound / wrong driver issues:

– Use latest ALSA (and kernel) in the tree. In this case, it’s 1.0.20, and we’ve cleaned up a lot of crap that was causing issues.

– Compile everything sound-related in the kernel as a module. Yes, everything. No, not just the stuff that you *think* you can statically compile in — *ev-e-ry-thing.* Once you’ve done that, run alsaconf. If your card doesn’t show up, it’s either completely unsupported (unlikely) or you didn’t pick the right drivers. Go back in and flip on more stuff. As modules.

– If the correct drivers are loaded (aplay -L works), and you have no sound, then your mixer levels are probably wrong.

Apologies for coming across so heavy-handed, but that’s the approach that has always worked for me, and works for most everyone when I tell them to do that: latest kernel, latest ALSA, everything as modules, alsaconf, then mixer.

Edit: Just as a postscript, the reason for the bluntness is that I recently started taking a more active role in the ALSA herd. Normally, I would just do version bumps and leave it at that. But, I’m trying to get practical issues resolved, and the one common thread I see over and over and over again on the forums and IRC is people just going off on their own little path and stabbing in the dark to see if they can get their sound to work, and then acting surprised that some random configuration didn’t work.

I want to very much find both the source of this disinformation and correct it, and make sure that setting up sound is a really simple process. The *problem* though, is that it’s always been pretty extremely easy for me, and so I am having a really difficult time understanding *why* people are hitting these issues — hence, the reason for the forum post asking people why they are running into problems, and what thoughts and conclusions lead to that direction. Once I figure that out, then I can go back and tweak the docs to clarify situations and attack the common confusion.

I keep getting the idea that we could use a really simplified version of the ALSA doc, one that is a quick basic howto get setup for people with one soundcard, and then include examples using the most popular hardware out there right now (intel-hda). Then, have a separate doc for more advanced issues, for people who need help and information on alsa plugins, or have multiple sound cards and things like that. I think that lumping them together into one, as it is now, makes it hard for people who just want to get up and running.

So, apologies if it feels like I’m browbeating here, but the reality is that I’m really motivated to streamline the process of getting sound in Linux. Nothing but love, yo.

11 comments on “common alsa issues

  1. robbat2

    I’ve got one major issue with ALSA that bites me if everything is a module, regardless of the modules.d/alsa-conf.

    Specifically, I get usb-audio loaded before intel-hda, with all the resulting mess that it causes for devices looking for the digital path on the first device.

    Worse sometimes is that I have two USB audio devices attached, and I’d like a well-defined order for them.

    Reply
    1. Steve

      Yah, I didn’t know about this specific issue until today when a friend mentioned it to me in detail. I’m going to duplicate the issue at home, and figure out a fix for it. I know that would drive me insane.

      Reply
    2. Chris

      I have the exact same issue. If I accidentally leave my USB headset plugged in while booting the machine, it ends up becoming the first alsa device and after I unplug it I can never get audacious to output correctly again without completely restating my machine (which is something that I shouldn’t have to do with Linux).

      It’s really frustrating.

      Reply
    3. Ralph

      Same problem here: I have two usb devices connected that I’m not using, and the system insists on loading them at every reboot even though they’re disabled in modprobe.d/alsa-conf. Then the loading of the two sound cards I do use fails. After every reboot I have manually rmmod the usb modules and restart alsa, which at least gets it right the second time

      Reply
  2. Olof

    ALSA not producing sound has made me go insane several times. The main issue being the mixer levels turned down as default. Is it possible to patch alsa in gentoo to set them to something more sensible?
    Also, on my last install, I tried to disable all ALSA_PCM_PLUGINS, based on a wild idea that I should only use what I really need. That didn’t turn out too well, which makes me ask for a guide to the plugins also. I read as much documentation as I could in some dark corner on the ALSA page, but I’m not sure it made me any wiser.
    Anyway, thumbs up for doing something with the ALSA mess. I’ve been trying to set up a recording environment for some time now, but always give up because of some weird issue.

    Reply
    1. Steve

      Olof, I think it’s upstream’s idea to keep them all muted, not really ours … I can’t really say I disagree, anyway, because how are we gonna know *which* one to unmute / turn up? We could guess wrong, and that would just add more confusion. It’s easier to say, they are all muted.

      And thanks for the note about PCM plugins. I’ll make sure a note goes in the docs to just leave them alone by default.

      Reply
  3. Mike Lothian

    Out of interest why do you recommend modules rather than compiled in?

    I keep a very slim kernel with everything compiled in (only the things I need)

    Is there an advantage to me changing?

    Reply
    1. Steve

      Well, to clarify, I recommend modules if people are very first setting up ALSA and they aren’t sure what they need. It’s the quickest way to get things working and troubleshoot issues since it gives you so many more options.

      Reply
  4. Peter Karlsson

    I’ve been using linux based distributions since -98 (I think it was redhat 5.something I started with) and have never had any sound problems. Maybe I’ve been lucky but I don’t recognize any of the difficulties people have with ALSA. Though, I have never bothered with onboard sound cards… I always have used sound cards (soundblaster live, currently audigy 2 ZS platinum).

    Reply
  5. Will B.

    One thing I’ll point out if you ever create a FAQ is that sometimes your speakers will not be detected properly. On my laptop using intel-hda, my laptop speakers were detected as the surround sound speakers. Took me a while to figure that out.

    Reply

Leave a Reply