diff --git a/install.sh b/install.sh index 2665d29..1d8370b 100755 --- a/install.sh +++ b/install.sh @@ -80,6 +80,10 @@ function check_kernel_headers() { [ "X$VER_RUN" == "X$VER_HDR" ] && { return 0 } + VER_HDR=$(dpkg -L linux-headers-$VER_RUN | egrep -m1 "/lib/modules/[[:print:]]+/build" | awk -F'/' '{ print $4; }') + [ "X$VER_RUN" == "X$VER_HDR" ] && { + return 0 + } # echo RUN=$VER_RUN HDR=$VER_HDR echo " !!! Your kernel version is $VER_RUN" @@ -100,7 +104,10 @@ function check_kernel_headers() { which apt &>/dev/null if [[ $? -eq 0 ]]; then apt update -y + # Raspbian kernel packages apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel + # Ubuntu kernel packages + apt-get -y install linux-raspi linux-headers-raspi linux-image-raspi apt-get -y install dkms git i2c-tools libasound2-plugins # rpi-update checker check_kernel_headers diff --git a/seeed-voicecard.c b/seeed-voicecard.c index b2a5eed..385bb43 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -457,6 +457,8 @@ static int seeed_voice_card_dai_link_of(struct device_node *node, #else ret = asoc_simple_parse_clk_codec(dev, codec, dai_link, codec_dai); #endif + if (!strncmp(dai_link->codecs->dai_name, "ac10", 4)) + codec_dai->sysclk = 24000000; if (ret < 0) goto dai_link_of_err;