Configuring Sound on Linux/ALSA/Troubleshooting

Symptom
Indicated by:
 * The virtual directory /proc/asound is not present
 * The command aplay -l returns no sound cards present
 * The sound card shows up under some hardware detection mechanism, i.e., lspci

Sometimes the cause of this is selectively pulling out modules suggested by a dist-upgrade, such as the kernel, without the kernel modules.

Solution
Add the appropriate modules to your kernel. In Ubuntu you can upgrade to the newest kernel and modules by issuing the following command:

Symptom
If you encounter the following error it simply means you are targeting a non-existent or erroneous device:

Solution
This can often be remedied by simply specifying the device explicitly.

Symptom
This is a rather complex option. Essentially, hardware expects a certain datatype for the sound sample, and you're providing the wrong one.

Solution
Specify the sample format, or amend the rate in the ALSA conf file.

Symptom
If you do not provide to ALSA the amount of channels you wish to output to, you'll get the following error:

Solution
Specify the amount of channels you wish to output too. Two is considered safe for the purpose of troubleshooting.