History

ASoC: SOF: Add DMIC token for unmute gain ramp time

The settling time of DMIC DC level is both platform and used microphone model specific. The unmute gain ramp is used to conceal most of the large DC level seen in beginning of capture. This patch adds into the DMIC DAI IPC struct a new field called unmute_ramp_time and a new token SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME. The value is the ramp length in milliseconds (ms). The ABI minor version is incremented for this backwards compatible change.

Seppo Ingalsuo committed 7 years ago

Commit 7df43911 parent 65a18a44 files · +8 −2Browse files

Unified · Split

4 files
  1. include/sound/sof/dai-intel.h +2 −1
  2. include/uapi/sound/sof/abi.h +1 −1
  3. include/uapi/sound/sof/tokens.h +1 −0
  4. sound/soc/sof/topology.c +4 −0
include/sound/sof/dai-intel.h+2−1
@@ -167,9 +167,10 @@ struct sof_ipc_dai_dmic_params { · 166 unmodified lines
167 167
168 uint32_t wake_up_time; /**< Time from clock start to data (us) */168 uint32_t wake_up_time; /**< Time from clock start to data (us) */
169 uint32_t min_clock_on_time; /**< Min. time that clk is kept on (us) */169 uint32_t min_clock_on_time; /**< Min. time that clk is kept on (us) */
170 uint32_t unmute_ramp_time; /**< Length of logarithmic gain ramp (ms) */
170 171
171 /* reserved for future use */172 /* reserved for future use */
172 uint32_t reserved[6];173 uint32_t reserved[5];
173 174
174 /**< variable number of pdm controller config */175 /**< variable number of pdm controller config */
175 struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];176 struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];
include/uapi/sound/sof/abi.h+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
26 26
27/* SOF ABI version major, minor and patch numbers */27/* SOF ABI version major, minor and patch numbers */
28#define SOF_ABI_MAJOR 328#define SOF_ABI_MAJOR 3
29#define SOF_ABI_MINOR 729#define SOF_ABI_MINOR 8
30#define SOF_ABI_PATCH 030#define SOF_ABI_PATCH 0
31 31
32/* SOF ABI version number. Format within 32bit word is MMmmmppp */32/* SOF ABI version number. Format within 32bit word is MMmmmppp */
include/uapi/sound/sof/tokens.h+1−0
@@ -85,6 +85,7 @@ · 84 unmodified lines
85#define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE 60585#define SOF_TKN_INTEL_DMIC_NUM_PDM_ACTIVE 605
86#define SOF_TKN_INTEL_DMIC_SAMPLE_RATE 60886#define SOF_TKN_INTEL_DMIC_SAMPLE_RATE 608
87#define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH 60987#define SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH 609
88#define SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS 610
88 89
89/* DMIC PDM */90/* DMIC PDM */
90#define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID 70091#define SOF_TKN_INTEL_DMIC_PDM_CTRL_ID 700
sound/soc/sof/topology.c+4−0
@@ -779,6 +779,10 @@ static const struct sof_topology_token dmic_tokens[] = { · 778 unmodified lines
779 {SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH,779 {SOF_TKN_INTEL_DMIC_FIFO_WORD_LENGTH,
780 SND_SOC_TPLG_TUPLE_TYPE_SHORT, get_token_u16,780 SND_SOC_TPLG_TUPLE_TYPE_SHORT, get_token_u16,
781 offsetof(struct sof_ipc_dai_dmic_params, fifo_bits), 0},781 offsetof(struct sof_ipc_dai_dmic_params, fifo_bits), 0},
782 {SOF_TKN_INTEL_DMIC_UNMUTE_RAMP_TIME_MS,
783 SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
784 offsetof(struct sof_ipc_dai_dmic_params, unmute_ramp_time), 0},
785
782};786};
783 787
784/*788/*