Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Configuring Sound on Linux/ALSA/Troubleshooting

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Errors and Solutions Kernel lacks appropriate modules 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: $ sudo apt-get install linux-generic Invalid card specified Symptom If you encounter the following error it simply means you are targeting a non-existent or erroneous device: $ cat /dev/urandom | aplay ALSA lib pcm_hw.c:1207:(_snd_pcm_hw_open) Invalid value for card aplay: main:546: audio open error: No such file or directory Solution This can often be remedied by simply specifying the device explicitly. cat /dev/urandom | aplay -D hw:0,3 Bad sample Symptom This is a rather complex option . Essentially, hardware expects a certain datatype for the sound sample, and you're providing the wrong one. aplay: set_params:901: Sample format non available Solution Specify the sample format, or amend the rate in the ALSA conf file. cat /dev/urandom | aplay -f S16_LE ## Where S16_LE is your desired rate No channel count Symptom If you do not provide to ALSA the amount of channels you wish to output to, you'll get the following error: aplay: set_params:901: Channels count non available Solution Specify the amount of channels you wish to output too. Two is considered safe for the purpose of troubleshooting. cat /dev/urandom | aplay -c 2 ## Two channels is stereo sound