Linux : How to test microphone with Audio Linux Sound Architecture

How to test microphone with Audio Linux Sound Architecture – ALSA

1. List of sound devices
2. Test MIC
3. Play test-mic.wav

Sometime a need comes to test microphone for use with VOIP applications such us Skype. The simplest and easiest way to test microphone ( MIC ) on your linux system is to use default alsa tools which come with alsa sound system package. First we need to check if alsa had recognized and our sound device.

1. List of sound devices

kartook@Nilas:~$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel – HDA Intel
HDA Intel at 0xf6ffc000 irq 21

you may get bunch of devices but we are interested in the one which seems to familiar to you or the one which has IRQ. Another command to use to check which sound devices are recognized by your alsa system is arecord -l:

kartook@Nilas:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog] Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1

2. Test MIC

to test microphone we would used arecord on the command line. This small utility will record sound from your default alsa default sound device. No special arguments as device name are not required since we I have only one sound card.

kartook@Nilas:~$ arecord -d 10 /tmp/test-mic.wav
Recording WAVE ‘/tmp/test-mic.wav’ : Unsigned 8 bit, Rate 8000 Hz, Mono

this will record 10 seconds.
3. Play test-mic.wav

Now it is easy to play your wav file with another simple alsa utility a play:

kartook@Nilas:~$ aplay /tmp/test-mic.wav
Playing WAVE ‘/tmp/test-mic.wav’ : Unsigned 8 bit, Rate 8000 Hz, Mono

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.