remove sleep , accelerate the seeed-voicecard service startup

This commit is contained in:
Baozhu Zuo 2019-04-17 14:58:07 +08:00 committed by GitHub
parent 90d2673610
commit 11e9db79b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,8 +28,6 @@ modprobe i2c-dev
#enable spi interface #enable spi interface
dtparam spi=on dtparam spi=on
sleep 1
is_1a=$(i2cdetect -y 1 0x1a 0x1a | grep 1a | awk '{print $2}') is_1a=$(i2cdetect -y 1 0x1a 0x1a | grep 1a | awk '{print $2}')
@ -42,7 +40,6 @@ rm /var/lib/alsa/asound.state
if [ "x${is_1a}" == "x1a" ] && [ "x${is_35}" == "x" ] ; then if [ "x${is_1a}" == "x1a" ] && [ "x${is_35}" == "x" ] ; then
echo "install 2mic" echo "install 2mic"
dtoverlay seeed-2mic-voicecard dtoverlay seeed-2mic-voicecard
sleep 1
rm /etc/asound.conf rm /etc/asound.conf
rm /var/lib/alsa/asound.state rm /var/lib/alsa/asound.state
echo "create 2mic asound configure file" echo "create 2mic asound configure file"
@ -55,7 +52,6 @@ fi
if [ "x${is_3b}" == "x3b" ] && [ "x${is_35}" == "x" ] ; then if [ "x${is_3b}" == "x3b" ] && [ "x${is_35}" == "x" ] ; then
echo "install 4mic" echo "install 4mic"
dtoverlay seeed-4mic-voicecard dtoverlay seeed-4mic-voicecard
sleep 1
rm /etc/asound.conf rm /etc/asound.conf
rm /var/lib/alsa/asound.state rm /var/lib/alsa/asound.state
echo "create 4mic asound configure file" echo "create 4mic asound configure file"
@ -68,7 +64,6 @@ fi
if [ "x${is_3b}" == "x3b" ] && [ "x${is_35}" == "x35" ] ; then if [ "x${is_3b}" == "x3b" ] && [ "x${is_35}" == "x35" ] ; then
echo "install 6mic" echo "install 6mic"
dtoverlay seeed-8mic-voicecard dtoverlay seeed-8mic-voicecard
sleep 1
rm /etc/asound.conf rm /etc/asound.conf
rm /var/lib/alsa/asound.state rm /var/lib/alsa/asound.state
echo "create 6mic asound configure file" echo "create 6mic asound configure file"