Sound card is a hardware device which will give a machine the capability to play audio files and audio in video file for us. In this post we will see how to get sound card hardware and sound card driver details. We already covered following stuff in this "Know your hardware in Linux" series.
Example 1 : Find number of sound cards present in your machine
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xc2600000 irq 45
If you see there is only one sound card which is HDA-Intel sound card which is an inbuilt one.
Where X indicate no of cards, if you see card0, card1 then indicates you have two sound cards.
to see number of cards available
dr-xr-xr-x 5 root root 0 Jun 9 12:08 /proc/asound/card0
Example 2 : How to get card manufacture details using lspci command.
lspci -v | grep -i audio
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
Example 3: How can I check how many number of devices attached to sound card like speakers, mic, woofers etc
1: : sequencer
2: [ 0- 3]: digital audio playback
3: [ 0- 0]: digital audio playback
4: [ 0- 0]: digital audio capture
5: [ 0- 3]: hardware dependent
6: [ 0- 0]: hardware dependent
7: [ 0] : control
33: : timer
From the above output we can see that there are two audio playback devices(Speakers) and an audio capture device(A mic) to this machine. And remaining details are sound card related information. Or we can use aplay command as well to get device details
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC270 Analog [ALC270 Analog]
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevice #0: subdevice #0
Example 4 : How can I get which Kernel module or sound driver details for my sound card. The module related to sound card is represented snd string in it’s name. So if we can search /proc/asound/modules file or lsmod command output we can easily find which sound card driver is in use as shown below
grep snd /proc/asound/modules
lsmod | grep snd
snd_hda_codec_hdmi 32049 1
snd_hda_codec_realtek 78147 1
snd_hda_intel 33492 3
snd_hda_codec 134213 3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep 17699 1 snd_hda_codec
snd_pcm 96668 3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_seq_midi 13325 0
snd_rawmidi 30513 1 snd_seq_midi
snd_seq_midi_event 14900 1 snd_seq_midi
snd_seq 61555 2 snd_seq_midi_event,snd_seq_midi
snd_timer 29426 2 snd_pcm,snd_seq
snd_seq_device 14498 3 snd_seq,snd_rawmidi,snd_seq_midi
snd 78921 16 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore 15048 1 snd
snd_page_alloc 18485 2 snd_pcm,snd_hda_intel
Example 5: How can I find sound card software version in Linux?
Advanced Linux Sound Architecture Driver Version 1.0.25.
A good documentation about /proc/asound folder can be found at http://alsa.opensrc.org/Proc_asound_documentation
In our next post we will see how to find details about network card like network card manufacture, MAC address, drivers etc. Stay tuned.
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
Anisble: ERROR! unexpected parameter type in action:
Fix- June 29, 2020
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018