arecord: Linux Command to List all Soundcards and Digital Audio Devices

by on January 15, 2008 · 1 comment· LAST UPDATED January 15, 2008

in , ,

Here is a quick way to list all detected and working soundcards. Use arecord command line sound recorder and player for ALSA soundcard driver. The -l option List all soundcards and digital audio devices. The -L option list all PCMs defined.

The information obtained from following command can be used to play various media files or digital stream such as radio, tv etc.

Display all soundcards and digital audio devices

Type the command:
$ arecord -l
Output:

**** 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
card 1: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

You need to use card number and device number while playing various media. For example, to play a radiostation (FM freq # 98.3) from card #1 and device 0 (hw=.), enter:
$ mplayer radio://98.3 -radio driver=v4l2:device=/dev/radio0:adevice=hw=1.0

Display all PCMs defined

Type the command:
$ record -L
Output:

default:CARD=Intel
    HDA Intel, STAC92xx Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
    HDA Intel
    IEC958 (S/PDIF) Digital Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)

/proc file system

You can obtained more information from /proc/asound directory. For example, to list all cards, enter:
$ cat /proc/asound/cards
Output:

0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0x93300000 irq 22
 1 [SAA7134        ]: SAA7134 - SAA7134
                      saa7133[0] at 0x9300c800 irq 21

You can use gui tools to configure mixer and other settings:
$ alsamixergui

How do I select soundcard from GUI?

Ubuntu and most other distro allows you to select and control soundcard properties from GUI. The GNOME Volume Control application is an audio mixer that enables you to mix audio for two-channel sound cards. Just double click Volume Control to open mixer. Click on File > Change Device:
Linux GUI to List all Soundcards and Digital Audio Devices

You can also start GNOME Volume Control in the following ways:
a) Click on Applications menu > Choose Multimedia > Volume Control.
b) Open terminal / command line and enter:
$ gnome-volume-control &

Updated for accuracy.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 SHAYAN November 29, 2010 at 9:14 am

hello.sir i need GUI of SOUNDCARD on LINUX .if u have such type of GUI .then plz send me

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , ,

Previous post:

Next post: