diff options
| author | Manish Dewangan <manish@codeaurora.org> | 2017-01-31 17:51:00 +0530 |
|---|---|---|
| committer | Manish Dewangan <manish@codeaurora.org> | 2017-02-27 19:06:44 +0530 |
| commit | be6a8d4885b23069e646b0c2274910e1d0dbb80f (patch) | |
| tree | 8b1c061a0f56777887b19cbb7fa5a469e36202d6 /include | |
| parent | df38388af0e15a7e47192518f74c7a434d46b231 (diff) | |
ASoC: msm: qdsp6v2: Support to configure clock recovery mode
ASM driver changes to configure clock recovery mode.
Based on the configure mode, DSP decides whether to enable
clock recovery or not.
CRs-Fixed: 1112258
Change-Id: Ia6a6c33ce7b478af8d2397c20fcc6281d96ec3ce
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/apr_audio-v2.h | 45 | ||||
| -rw-r--r-- | include/sound/q6asm-v2.h | 4 |
2 files changed, 49 insertions, 0 deletions
diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h index 9642cf6a6beb..4bfd187095b6 100644 --- a/include/sound/apr_audio-v2.h +++ b/include/sound/apr_audio-v2.h @@ -10271,9 +10271,54 @@ struct asm_session_mtmx_strtr_param_render_mode_t { u32 flags; } __packed; +/* Parameter used by #ASM_SESSION_MTMX_STRTR_MODULE_ID_AVSYNC which allows the + * audio client to specify the clock recovery mechanism that the audio DSP + * should use. + */ + +#define ASM_SESSION_MTMX_STRTR_PARAM_CLK_REC_CMD 0x00012F0E + +/* Indicates that default clock recovery will be used (no clock recovery). + * If the client wishes that no clock recovery be done, the client can + * choose this. This means that no attempt will made by the DSP to try and + * match the rates of the input and output audio. + */ +#define ASM_SESSION_MTMX_STRTR_PARAM_CLK_REC_NONE 0 + +/* Indicates that independent clock recovery needs to be used. + * 1. In the DSP loopback/client loopback use cases (frame based inputs), + * the client should choose the independent clock recovery option. + * 2. This basically de-couples the audio and video from knowing each others + * clock sources and lets the audio DSP independently rate match the input + * and output rates. + * 3. After drift detection, the drift correction is achieved by either pulling + * the PLLs (if applicable) or by stream to device rate matching + * (for PCM use cases) by comparing drift with respect to STC. + * 4. For passthrough use cases, since the PLL pulling is the only option, + * a best effort will be made. + * If PLL pulling is not possible / available, the rendering will be + * done without rate matching. + */ +#define ASM_SESSION_MTMX_STRTR_PARAM_CLK_REC_AUTO 1 + +/* Payload of the #ASM_SESSION_MTMX_STRTR_PARAM_CLK_REC parameter. + */ +struct asm_session_mtmx_strtr_param_clk_rec_t { + /* Specifies the type of clock recovery that the audio DSP should + * use for rate matching. + */ + + /* @values + * #ASM_SESSION_MTMX_STRTR_PARAM_CLK_REC_DEFAULT + * #ASM_SESSION_MTMX_STRTR_PARAM_CLK_REC_INDEPENDENT + */ + u32 flags; +} __packed; + union asm_session_mtmx_strtr_param_config { struct asm_session_mtmx_strtr_param_window_v2_t window_param; struct asm_session_mtmx_strtr_param_render_mode_t render_param; + struct asm_session_mtmx_strtr_param_clk_rec_t clk_rec_param; } __packed; struct asm_mtmx_strtr_params { diff --git a/include/sound/q6asm-v2.h b/include/sound/q6asm-v2.h index 9d60a8b0d1fa..4947c30287a3 100644 --- a/include/sound/q6asm-v2.h +++ b/include/sound/q6asm-v2.h @@ -646,6 +646,10 @@ int q6asm_send_mtmx_strtr_window(struct audio_client *ac, int q6asm_send_mtmx_strtr_render_mode(struct audio_client *ac, uint32_t render_mode); +/* Configure DSP clock recovery mode */ +int q6asm_send_mtmx_strtr_clk_rec_mode(struct audio_client *ac, + uint32_t clk_rec_mode); + /* Retrieve the current DSP path delay */ int q6asm_get_path_delay(struct audio_client *ac); |
