加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wm8960-soundcard 734 Bytes
一键复制 编辑 原始数据 按行查看 历史
waveshare 提交于 2021-03-17 01:28 . Update wm8960-soundcard
#!/bin/bash
set -x
exec 1>/var/log/$(basename $0).log 2>&1
#enable i2c interface
dtparam i2c_arm=on
modprobe i2c-dev
sleep 1
for loop in 1 2 3 4 5
do
is_1a=$(i2cdetect -y 1 0x1a 0x1a | egrep "(1a|UU)" | awk '{print $2}')
if [ "x${is_1a}" != "x" ] ; then
echo "install wm8960-soundcard"
dtoverlay wm8960-soundcard
sleep 1
rm /etc/asound.conf
rm /var/lib/alsa/asound.state
echo "create wm8960-soundcard configure file"
ln -s /etc/wm8960-soundcard/asound.conf /etc/asound.conf
echo "create wm8960-soundcard status file"
ln -s /etc/wm8960-soundcard/wm8960_asound.state /var/lib/alsa/asound.state
break
fi
sleep 3
done
alsactl restore
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化