From b032c0664d49aaf8398f802633b142015ed1b0f9 Mon Sep 17 00:00:00 2001 From: "peter.yang" Date: Wed, 24 Jan 2018 20:18:58 +0800 Subject: [PATCH] Add: ac101 dsp_a mode, tdm enabled, 8 slot, 32bit OK --- ac101.c | 14 +++++++------- seeed-8mic-voicecard-overlay.dts | 2 +- seeed-8mic-voicecard.dtbo | Bin 2359 -> 2359 bytes 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ac101.c b/ac101.c index 84b3679..74b800a 100644 --- a/ac101.c +++ b/ac101.c @@ -64,12 +64,12 @@ static bool agc_used = false; static bool drc_used = false; #define ac10x_RATES (SNDRV_PCM_RATE_8000_96000|SNDRV_PCM_RATE_KNOT) -#define ac10x_FORMATS ( /*SNDRV_PCM_FMTBIT_S8 |*/ \ +#define ac10x_FORMATS ( /*SNDRV_PCM_FMTBIT_S8 | \ SNDRV_PCM_FMTBIT_S16_LE | \ - /* SNDRV_PCM_FMTBIT_S18_3LE | \ + SNDRV_PCM_FMTBIT_S18_3LE | \ SNDRV_PCM_FMTBIT_S20_3LE | \ - SNDRV_PCM_FMTBIT_S24_LE | \ - SNDRV_PCM_FMTBIT_S32_LE*/ \ + SNDRV_PCM_FMTBIT_S24_LE |*/ \ + SNDRV_PCM_FMTBIT_S32_LE | \ 0) /*supply voltage*/ @@ -1283,7 +1283,7 @@ static int ac10x_hw_params(struct snd_pcm_substream *substream, ac10x->trgr_cnt = 0; channels = params_channels(params); - aif1_lrck_div = 16 * channels; + aif1_lrck_div = 32 * channels; for (i = 0; i < ARRAY_SIZE(codec_aif1_lrck); i++) { if (codec_aif1_lrck[i].val == aif1_lrck_div) { @@ -1397,8 +1397,8 @@ static int ac10x_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) /* * Disable TDM mode */ - // reg_val |= (0x1 << AIF1_TDMM_ENA); - reg_val &= ~(0x1 << AIF1_TDMM_ENA); + reg_val |= (0x1 << AIF1_TDMM_ENA); + // reg_val &= ~(0x1 << AIF1_TDMM_ENA); snd_soc_write(codec, AIF_CLK_CTRL, reg_val); /* i2s mode selection */ diff --git a/seeed-8mic-voicecard-overlay.dts b/seeed-8mic-voicecard-overlay.dts index 48be269..e87148e 100644 --- a/seeed-8mic-voicecard-overlay.dts +++ b/seeed-8mic-voicecard-overlay.dts @@ -70,7 +70,7 @@ cpu_dai: simple-audio-card,cpu { sound-dai = <&i2s>; dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; + dai-tdm-slot-width = <32>; dai-tdm-slot-tx-mask = <1 1 0 0>; dai-tdm-slot-rx-mask = <1 1 0 0>; }; diff --git a/seeed-8mic-voicecard.dtbo b/seeed-8mic-voicecard.dtbo index 317bc63fc799caf8cf6f3ef472173c2cb15c70cc..a9de216dbf7730b65050753c22d3c14a64110926 100644 GIT binary patch delta 14 Vcmdlkv|VUJGc%*Y<`(A7tN