Merge branch 'v5.5' into v5.7
This commit is contained in:
commit
6aff6e0b33
8 changed files with 16 additions and 13 deletions
10
ac101.c
10
ac101.c
|
@ -376,7 +376,7 @@ static int ac101_switch_probe(struct ac10x_priv *ac10x) {
|
||||||
|
|
||||||
ac10x->irq = gpiod_to_irq(ac10x->gpiod_irq);
|
ac10x->irq = gpiod_to_irq(ac10x->gpiod_irq);
|
||||||
if (IS_ERR_VALUE(ac10x->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;
|
ac10x->irq = 0;
|
||||||
goto _err_irq;
|
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 */
|
/* 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);
|
ret = devm_request_irq(ac10x->codec->dev, ac10x->irq, audio_hmic_irq, IRQF_TRIGGER_FALLING, "SWTICH_EINT", ac10x);
|
||||||
if (IS_ERR_VALUE(ret)) {
|
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;
|
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) {
|
switch(fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||||
case SND_SOC_DAIFMT_CBM_CFM: /* codec clk & frm master, ap is slave*/
|
case SND_SOC_DAIFMT_CBM_CFM: /* codec clk & frm master, ap is slave*/
|
||||||
#if _MASTER_MULTI_CODEC == _MASTER_AC101
|
#if _MASTER_MULTI_CODEC == _MASTER_AC101
|
||||||
pr_warn("AC101 as Master\n");
|
pr_info("AC101 as Master\n");
|
||||||
reg_val |= (0x0<<AIF1_MSTR_MOD);
|
reg_val |= (0x0<<AIF1_MSTR_MOD);
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
pr_warn("AC108 as Master\n");
|
pr_info("AC108 as Master\n");
|
||||||
#endif
|
#endif
|
||||||
case SND_SOC_DAIFMT_CBS_CFS: /* codec clk & frm slave, ap is master*/
|
case SND_SOC_DAIFMT_CBS_CFS: /* codec clk & frm slave, ap is master*/
|
||||||
pr_warn("AC101 as Slave\n");
|
pr_info("AC101 as Slave\n");
|
||||||
reg_val |= (0x1<<AIF1_MSTR_MOD);
|
reg_val |= (0x1<<AIF1_MSTR_MOD);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
3
ac108.c
3
ac108.c
|
@ -810,6 +810,9 @@ static int ac108_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int fr
|
||||||
|
|
||||||
struct ac10x_priv *ac10x = snd_soc_dai_get_drvdata(dai);
|
struct ac10x_priv *ac10x = snd_soc_dai_get_drvdata(dai);
|
||||||
|
|
||||||
|
if (freq != 24000000 || clk_id != SYSCLK_SRC_PLL)
|
||||||
|
dev_warn(dai->dev, "ac108_set_sysclk freq = %d clk = %d\n", freq, clk_id);
|
||||||
|
|
||||||
freq = 24000000;
|
freq = 24000000;
|
||||||
clk_id = SYSCLK_SRC_PLL;
|
clk_id = SYSCLK_SRC_PLL;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment@1 {
|
fragment@1 {
|
||||||
target-path = "/clocks";
|
target-path = "/";
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
ac108_mclk: codec-mclk {
|
ac108_mclk: codec-mclk {
|
||||||
compatible = "fixed-clock";
|
compatible = "fixed-clock";
|
||||||
|
|
Binary file not shown.
|
@ -13,7 +13,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment@1 {
|
fragment@1 {
|
||||||
target-path = "/clocks";
|
target-path = "/";
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
ac10x_mclk: codec-mclk {
|
ac10x_mclk: codec-mclk {
|
||||||
compatible = "fixed-clock";
|
compatible = "fixed-clock";
|
||||||
|
|
Binary file not shown.
|
@ -322,10 +322,8 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (simple_dai->slots) {
|
if (simple_dai->slots) {
|
||||||
ret = snd_soc_dai_set_tdm_slot(dai,
|
ret = snd_soc_dai_set_bclk_ratio(dai,
|
||||||
simple_dai->tx_slot_mask,
|
simple_dai->slots *
|
||||||
simple_dai->rx_slot_mask,
|
|
||||||
simple_dai->slots,
|
|
||||||
simple_dai->slot_width);
|
simple_dai->slot_width);
|
||||||
if (ret && ret != -ENOTSUPP) {
|
if (ret && ret != -ENOTSUPP) {
|
||||||
dev_err(dai->dev, "simple-card: set_tdm_slot error\n");
|
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
|
#else
|
||||||
ret = asoc_simple_parse_clk_codec(dev, codec, dai_link, codec_dai);
|
ret = asoc_simple_parse_clk_codec(dev, codec, dai_link, codec_dai);
|
||||||
#endif
|
#endif
|
||||||
if (!strncmp(dai_link->codecs->dai_name, "ac10", 4))
|
|
||||||
codec_dai->sysclk = 24000000;
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto dai_link_of_err;
|
goto dai_link_of_err;
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ do_overlay() {
|
||||||
|
|
||||||
RPI_HATS="seeed-2mic-voicecard seeed-4mic-voicecard seeed-8mic-voicecard"
|
RPI_HATS="seeed-2mic-voicecard seeed-4mic-voicecard seeed-8mic-voicecard"
|
||||||
|
|
||||||
|
PATH=$PATH:/opt/vc/bin
|
||||||
echo "remove dtbos"
|
echo "remove dtbos"
|
||||||
for i in $RPI_HATS; do
|
for i in $RPI_HATS; do
|
||||||
dtoverlay -r $i
|
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-wm8960.ko || true
|
||||||
rm /lib/modules/*/kernel/sound/soc/codecs/snd-soc-ac108.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/*/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"
|
echo "remove $CONFIG configuration"
|
||||||
for i in $RPI_HATS; do
|
for i in $RPI_HATS; do
|
||||||
|
|
Loading…
Reference in a new issue