我安装了 droidcam 以便通过手机观看视频,但它也在我的系统中安装了一些我想删除的音频输入/输出设备。
Droidcam 通过此脚本添加了音频设备,有人可以帮我将这些设备列入黑名单吗?
#!/bin/bash
#
etc_modules() {
echo "Adding driver to /etc/modules"
cp /etc/modules /tmp/etc_modules_bak
prevperm=`stat -c %a /etc/modules`
chmod 666 /etc/modules
[[ ! $(egrep "^snd-aloop$" /etc/modules) ]] && echo "snd-aloop" >> /etc/modules
chmod $prevperm /etc/modules
}
if [ ! -s "/etc/modprobe.d/droidcam.conf" ]
then
echo "Error: droidcam not installed"
exit 1
fi
echo "Loading Loopback device"
modprobe snd-aloop || exit 1
LOOPBACK_CARD_ID=$(grep -F "[Loopback" < /proc/asound/cards | awk '{print $1}')
if [[ ! $(echo "$LOOPBACK_CARD_ID" | grep -E "^[0-9]$") ]]
then
echo "Error: Could not determine Loopback card number"
exit 1
fi
grep -v "snd-aloop" < /etc/modprobe.d/droidcam.conf > /tmp/modprobe.d_droidcam.conf
echo "options snd-aloop index=$LOOPBACK_CARD_ID" >> /tmp/modprobe.d_droidcam.conf
mv /tmp/modprobe.d_droidcam.conf /etc/modprobe.d/droidcam.conf
if [ -f "/etc/modules-load.d/droidcam.conf" ]
then
echo "snd-aloop" >> /etc/modules-load.d/droidcam.conf
elif [ -e "/etc/modules" ]; then
etc_modules
else
echo "Warning: Unknown distro. Sound card may not load after a reboot."
fi
echo "Done"
echo "Use 'pacmd load-module module-alsa-source device=hw:Loopback,1,0' to load the card into PulseAudio while droidcam is running"
非常感谢!
答案1
面对同样的问题,它帮助我从文件snd-aloop
中删除了该行 /etc/modules-load.d/droidcam.conf
,以避免在启动时加载环回模块。重启后,设备就消失了。