From wikipost


arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav

---> 48,000Hz

check volume:

sox recordedfile.wav -n stat

near-realtime audio levels:

arecord -Dhw:0 -c2 -d 0 -fdat /dev/null -vvv

find out the alsa device id's:

root@raspberrypi:/home/map# cat /proc/asound/cards

0 [Device         ]: USB-Audio - USB Sound Device
                     USB Sound Device at usb-bcm2708_usb-1.3, full speed
1 [ALSA           ]: BRCM bcm2835 ALSbcm2835 ALSA - bcm2835 ALSA
                     bcm2835 ALSA

Therefore, the hardware device id for the BRCM device is: $hw:1

To specify a recording device, first find out which device id is set for the input device:

root@raspberrypi:/home/map# arecord -l

        • List of CAPTURE Hardware Devices ****

card 0: Device [USB Sound Device], device 0: USB Audio [USB Audio]

 Subdevices: 1/1
 Subdevice #0: subdevice #0


Therefore, the alsa hardware device id for the capture device on the USB Sound Device (there is only one) is: $hw:0,0

CLI setting of audio parameters

The command line can be used to set many values of the sound device. Most options are to set volume, capture device, balance, etc..

For example, lets say we want to Unmute and then Set the Master Volume.

First, find out what your sound card device is capable of:

amixer -L


arecord: set_params:1145: Unable to install hw params:

Seems to be a fault with the usb stack or something silly, a reboot fixed this problem for me.