Sometimes it may happen that you have a sound device that you do not use or then you are one of those people how dislike Pulseaudio and use Alsa instead. Especially with Alsa it gets very useful if you have only the sound device enabled which you actually use. Here are some notes about using Alsa instead of Pulseaudio in Linux.
1. Start with the minimal installation. When you start with the bare minimum installation (installing only the basic system components during installation) you get the power to decide what comes into the system as it gets tweaked. Remember that in order to use Alsa you should only need the basic system package libasound2.
2. Do not install Gdm or Lightdm. They usually have some Pulseaudio dependencies in them. If you want to use a display manager use Slim instead (see here: http://www.techtimejourney.net/?p=561) or use startx: (http://www.techtimejourney.net/?p=622). Generally I would recommend towards the usage of startx.
3. Ubuntu users. Currently it seems that Ubuntu has some problems with Pulseaudio and startx combination. If you decide to go with Alsa I certainly recommend remembering this. If you are using Ubuntu I would recommend using the LTS edition since there is less strange bugs that might come to your way while trying to get rid of Pulseaudio.
If you however do not want to remove Pulseaudio and you just want to blacklist a no good sound device then keep on reading as well. The blacklisting is still useful even if you use Pulseaudio. If you are an Alsa user then the following is more or less a must.
Blacklisting a sound device
Type as a root or a sudo inside a terminal:
Note: I prefer to use a text editor here but you can of course list the entries inside the file by just using a program called less or any other you prefer.
The command will open a text file with entries which might look like this:
What we have here is a list of available sound devices 0 snd_hda_intel being the default one. Also do note that if you have a webcam it will show up on this file (in the above example: 2 snd_usb_audio). You do not need to worry about the webcam since it does not have speaker qualities which in turn makes sure that it plays nicely with other devices.
In the above example we see two sound devices ca106 and hda_intel. As we want to use ca106 as a default sound provider we will blacklist the hda_intel out of the way. In a terminal as a root or a sudo:
Add the following entry to the file and then save and close it:
The above entry tells your system to ignore snd_hda_intel module and thus prevent the loading of the Intel sound card which in turn makes the ca106 the default device.
Note: you can by all means choose a different name for you blacklist file than sound.blacklist.conf as long as it is formated as something.blacklist.conf . When you remove the blacklist file or erase entries from it the system will return to its previous state. Remember to always reboot your computer after the blacklisting or erasing something from the blacklists in order to see the actual results.
Why would you want to use Alsa?
Alsa has (based on my experience) proven to be far less resource hungry than Pulseaudio when it is running. One reason of course is also the fact that Pulseaudio dependencies take a lot more hard drive space than Alsa’s. The previously mentioned might be significant if you are using an older computer and you need caution against resource over usage.
One thing that I have found to be very useful when using Alsa is that with Alsa you can actually get more control out from your sound devices. If you happen to use Skype, for example, you will get a standard device label without any adjustment chances on Skype sound setup when using Pulseaudio. With Alsa you can however adjust your devices, for example, in a way that your speaker system will give you the phone ringing sound when at the same time your headset might be working as a microphone.