From d6fb9fd28394294fb037b8a9567a4d19be108215 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Mon, 26 Nov 2018 12:51:07 +0200 Subject: [PATCH] IPC: DMIC: Add wake_up_time and min_clock_on_time parameters This patch adds the two parameters into DMIC configuration IPC. The parameters will control DMIC HW muting in capture start and ensure in capture stop that the clock has been kept active sufficient long time. The implementation of these features is done later. The reserved[] vector is reduced by the amount of added words. Also the ABI minor version is incremented. Signed-off-by: Seppo Ingalsuo --- src/include/uapi/ipc/dai-intel.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/include/uapi/ipc/dai-intel.h b/src/include/uapi/ipc/dai-intel.h index bdbde0d5d..c0ffaffcb 100644 --- a/src/include/uapi/ipc/dai-intel.h +++ b/src/include/uapi/ipc/dai-intel.h @@ -164,6 +164,14 @@ struct sof_ipc_dai_dmic_pdm_ctrl { * The microphone clock needs to be usually about 50-80 times the used audio * sample rate. With highest sample rates above 48 kHz this can relaxed * somewhat. + * + * The parameter wake_up_time describes how long time the microphone needs + * for the data line to produce valid output from mic clock start. The driver + * will mute the captured audio for the given time. The min_clock_on_time + * parameter is used to prevent too short clock bursts to happen. The driver + * will keep the clock active after capture stop if this time is not yet + * met. The unit for both is microseconds (us). Exceed of 100 ms will be + * treated as an error. */ struct sof_ipc_dai_dmic_params { uint32_t driver_ipc_version; /**< Version (1..N) */ @@ -181,8 +189,11 @@ struct sof_ipc_dai_dmic_params { uint32_t num_pdm_active; /**< Number of active pdm controllers */ + uint32_t wake_up_time; /**< Time from clock start to data (us) */ + uint32_t min_clock_on_time; /**< Min. time that clk is kept on (us) */ + /* reserved for future use */ - uint32_t reserved[8]; + uint32_t reserved[6]; /**< variable number of pdm controller config */ struct sof_ipc_dai_dmic_pdm_ctrl pdm[0];