如何查看ALSA的版本:
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version k4.11.4-1.el7.centos.x86_64.
如何查看ALSA相关的驱动:
$ lsmod | grep snd
snd_hda_codec_hdmi 49152 1
snd_hda_codec_realtek 90112 1
snd_hda_codec_generic 69632 1 snd_hda_codec_realtek
snd_hda_intel 40960 0
snd_hda_codec 126976 4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core 81920 5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hwdep 16384 1 snd_hda_codec
snd_seq 65536 0
snd_seq_device 16384 1 snd_seq
snd_pcm 98304 4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
snd_timer 32768 2 snd_seq,snd_pcm
snd 77824 10 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm
soundcore 16384 1 snd
如何查看当前的声卡:
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xdf120000 irq 128
如何查看声卡里面的codec信息:
$ ls /proc/asound/card0/codec#*
/proc/asound/card0/codec#0 /proc/asound/card0/codec#2
$ cat /proc/asound/card0/codec#* | grep Codec
Codec: Realtek ALC662 rev3
Codec: Intel Skylake HDMI
如何查看PCM设备列表:
$ cat /proc/asound/pcm
00-00: ALC662 rev3 Analog : ALC662 rev3 Analog : playback 1 : capture 1
00-01: ALC662 rev3 Digital : ALC662 rev3 Digital : playback 1
00-03: HDMI 0 : HDMI 0 : playback 1
00-07: HDMI 1 : HDMI 1 : playback 1
00-08: HDMI 2 : HDMI 2 : playback 1
00-09: HDMI 3 : HDMI 3 : playback 1
00-10: HDMI 4 : HDMI 4 : playback 1
ALSA的文件系统接口:
/proc/asound
/dev/snd
/sys/class/sound