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
**** 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=
$ mplayer radio://98.3 -radio driver=v4l2:device=/dev/radio0:adevice=hw=1.0
Display all PCMs defined
Type the command:
$ record -L
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
0 [Intel ]: HDA-Intel - HDA Intel HDA Intel at 0x93300000 irq 22 1 [SAA7134 ]: SAA7134 - SAA7134 saa7133 at 0x9300c800 irq 21
You can use gui tools to configure mixer and other settings:
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:
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.
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop