- 积分
- 1252
- 在线时间
- 1003 小时
- 最后登录
- 2024-5-22
- 阅读权限
- 70
- 精华
- 0
- UID
- 849380
- 帖子
- 1233
- 精华
- 0
- 经验
- 1252 点
- 金钱
- 1222 ¥
- 注册时间
- 2018-6-1
|
关键来了
1. 删除pulseaudio
sudo apt-get remove pulseaudio
# You can keep `jack*`, but make sure it is not running.
# If it is running you need to stop it, disble it or remove it.
service --status-all
# Disable the running service with:
sudo systemctl disable xxxxx
2.删除自带声卡
# Edit boot config with:
sudo nano /boot/config.txt
# so that:
cat /boot/config.txt
...
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on
dtparam=audio=off
...
# You need to reboot!
sudo reboot now
3. 设置USB声卡为default
There are 3 places where you can configure your ALSA.
the user config in: ~/.asoundrc
the system config in: /usr/share/alsa/alsa.conf
the system module conf in: /lib/modprobe.d/aliases.conf
The first 2 changes the default devices, whereas the last, ensure the order of appearance.
We first fix our user specific config to use card 1. If you have more than one cards shown, then select the index of one you want to be default.
#cat ~/.asoundrc
cat << EOF | tee ~/.asoundrc
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
EOF
Next, we fix the system config, using the same card index numbers as above. We need to do this, because some system packages would never see your user config file.
sudo nano /usr/share/alsa/alsa.conf
# then replace:
#defaults.ctl.card 0
#defaults.pcm.card 0
# with:
defaults.ctl.card 1
defaults.pcm.card 1
好了,重启 |
|