按照archlinux wiki的说明,执行
#amixer sset Master unmute
取消静音时,显示如下错误消息:
amixer: Unable to find simple control 'Master',0
执行
#speaker-test -c 2
测试声音时,显示错误:
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
-------------------------------------------------------------------------------------------------
问题就在默认声卡不对,需要修改默认声卡。
解决如下:
执行
#aplay -l
显示如下(因声卡型号而异):
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC269VC Analog [ALC269VC Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
此处选择声卡1,设备ID为0的声卡 (card 1, deice 0)
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
重启ok
本文完全参考自_nplus 的博客,感谢作者