diff --git a/ac101.c b/ac101.c index 26aa9e3..3a95203 100644 --- a/ac101.c +++ b/ac101.c @@ -376,7 +376,7 @@ static int ac101_switch_probe(struct ac10x_priv *ac10x) { ac10x->irq = gpiod_to_irq(ac10x->gpiod_irq); if (IS_ERR_VALUE(ac10x->irq)) { - pr_info("[ac101] map gpio to irq failed, errno = %ld\n", ac10x->irq); + pr_warn("[ac101] map gpio to irq failed, errno = %ld\n", ac10x->irq); ac10x->irq = 0; goto _err_irq; } @@ -384,7 +384,7 @@ static int ac101_switch_probe(struct ac10x_priv *ac10x) { /* request irq, set irq type to falling edge trigger */ ret = devm_request_irq(ac10x->codec->dev, ac10x->irq, audio_hmic_irq, IRQF_TRIGGER_FALLING, "SWTICH_EINT", ac10x); if (IS_ERR_VALUE(ret)) { - pr_info("[ac101] request virq %ld failed, errno = %ld\n", ac10x->irq, ret); + pr_warn("[ac101] request virq %ld failed, errno = %ld\n", ac10x->irq, ret); goto _err_irq; } @@ -1152,14 +1152,14 @@ int ac101_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) switch(fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: /* codec clk & frm master, ap is slave*/ #if _MASTER_MULTI_CODEC == _MASTER_AC101 - pr_warn("AC101 as Master\n"); + pr_info("AC101 as Master\n"); reg_val |= (0x0<dev, "ac108_set_sysclk freq = %d clk = %d\n", freq, clk_id); + freq = 24000000; clk_id = SYSCLK_SRC_PLL; diff --git a/seeed-4mic-voicecard-overlay.dts b/seeed-4mic-voicecard-overlay.dts index de7213b..db0b988 100644 --- a/seeed-4mic-voicecard-overlay.dts +++ b/seeed-4mic-voicecard-overlay.dts @@ -13,7 +13,7 @@ }; fragment@1 { - target-path = "/clocks"; + target-path = "/"; __overlay__ { ac108_mclk: codec-mclk { compatible = "fixed-clock"; diff --git a/seeed-4mic-voicecard.dtbo b/seeed-4mic-voicecard.dtbo index 764dc80..09ee566 100644 Binary files a/seeed-4mic-voicecard.dtbo and b/seeed-4mic-voicecard.dtbo differ diff --git a/seeed-8mic-voicecard-overlay.dts b/seeed-8mic-voicecard-overlay.dts index 6d60469..56a1433 100644 --- a/seeed-8mic-voicecard-overlay.dts +++ b/seeed-8mic-voicecard-overlay.dts @@ -13,7 +13,7 @@ }; fragment@1 { - target-path = "/clocks"; + target-path = "/"; __overlay__ { ac10x_mclk: codec-mclk { compatible = "fixed-clock"; diff --git a/seeed-8mic-voicecard.dtbo b/seeed-8mic-voicecard.dtbo index 4ef515b..2dcaa93 100644 Binary files a/seeed-8mic-voicecard.dtbo and b/seeed-8mic-voicecard.dtbo differ diff --git a/seeed-voicecard.c b/seeed-voicecard.c index 385bb43..aeae8f4 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -322,10 +322,8 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai, } if (simple_dai->slots) { - ret = snd_soc_dai_set_tdm_slot(dai, - simple_dai->tx_slot_mask, - simple_dai->rx_slot_mask, - simple_dai->slots, + ret = snd_soc_dai_set_bclk_ratio(dai, + simple_dai->slots * simple_dai->slot_width); if (ret && ret != -ENOTSUPP) { dev_err(dai->dev, "simple-card: set_tdm_slot error\n"); @@ -457,8 +455,6 @@ 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; diff --git a/uninstall.sh b/uninstall.sh index 6b9f8d1..a00f7a1 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -53,6 +53,7 @@ do_overlay() { RPI_HATS="seeed-2mic-voicecard seeed-4mic-voicecard seeed-8mic-voicecard" +PATH=$PATH:/opt/vc/bin echo "remove dtbos" for i in $RPI_HATS; do dtoverlay -r $i @@ -81,6 +82,9 @@ echo "remove kernel modules" rm /lib/modules/*/kernel/sound/soc/codecs/snd-soc-wm8960.ko || true rm /lib/modules/*/kernel/sound/soc/codecs/snd-soc-ac108.ko || true rm /lib/modules/*/kernel/sound/soc/bcm/snd-soc-seeed-voicecard.ko || true +rm /lib/modules/*/updates/dkms/snd-soc-wm8960.ko || true +rm /lib/modules/*/updates/dkms/snd-soc-ac108.ko || true +rm /lib/modules/*/updates/dkms/snd-soc-seeed-voicecard.ko || true echo "remove $CONFIG configuration" for i in $RPI_HATS; do