From 7ba40c9e3f8fee490da65f57203d1f613174051e Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Mon, 11 Sep 2017 13:23:21 +0800 Subject: [PATCH 1/2] ASoC: msm: qdsp6v2: Support to configure render mode Update compress driver to support configuration of render mode. CRs-Fixed: 1112258 Change-Id: Iac8c3a3d2df6180c9982c352b1c00ce7a624c167 Signed-off-by: Manish Dewangan Signed-off-by: Meng Wang --- include/uapi/sound/compress_offload.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h index 67e28320020f..5900111964cd 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/sound/compress_offload.h @@ -138,6 +138,9 @@ struct snd_compr_audio_info { } __attribute__((packed, aligned(4))); #define SND_COMPR_AUDIO_INFO + +#define SNDRV_COMPRESS_RENDER_MODE_AUDIO_MASTER 0 +#define SNDRV_COMPRESS_RENDER_MODE_STC_MASTER 1 #endif /** * enum sndrv_compress_encoder @@ -146,17 +149,20 @@ struct snd_compr_audio_info { * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the * beginning of the track * @SNDRV_COMPRESS_PATH_DELAY: dsp path delay in microseconds + * @SNDRV_COMPRESS_RENDER_MODE: dsp render mode (audio master or stc) */ enum sndrv_compress_encoder { SNDRV_COMPRESS_ENCODER_PADDING = 1, SNDRV_COMPRESS_ENCODER_DELAY = 2, #ifdef CONFIG_AUDIO_QGKI SNDRV_COMPRESS_PATH_DELAY = 3, + SNDRV_COMPRESS_RENDER_MODE = 4, #endif }; #ifdef CONFIG_AUDIO_QGKI #define SNDRV_COMPRESS_PATH_DELAY SNDRV_COMPRESS_PATH_DELAY +#define SNDRV_COMPRESS_RENDER_MODE SNDRV_COMPRESS_RENDER_MODE #endif /** From b83ade287a9b51333c0d3ffae5bd6214c0bec902 Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Mon, 11 Sep 2017 13:27:01 +0800 Subject: [PATCH 2/2] ASoC: msm: qdsp6v2: Support to configure clk recovery mode Update compress driver to support configuration of DSP clock recovery mode. Supported modes are auto and none. In auto mode DSP does clock recovery based on avtimer and device drift otherwise it ignores drift. CRs-Fixed: 1112258 Change-Id: I4b6b37c08be422e38b7f0bf625712d5e2b0dc0f3 Signed-off-by: Manish Dewangan Signed-off-by: Meng Wang --- include/uapi/sound/compress_offload.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h index 5900111964cd..d614127c3996 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/sound/compress_offload.h @@ -141,6 +141,10 @@ struct snd_compr_audio_info { #define SNDRV_COMPRESS_RENDER_MODE_AUDIO_MASTER 0 #define SNDRV_COMPRESS_RENDER_MODE_STC_MASTER 1 + +#define SNDRV_COMPRESS_CLK_REC_MODE_NONE 0 +#define SNDRV_COMPRESS_CLK_REC_MODE_AUTO 1 + #endif /** * enum sndrv_compress_encoder @@ -150,6 +154,7 @@ struct snd_compr_audio_info { * beginning of the track * @SNDRV_COMPRESS_PATH_DELAY: dsp path delay in microseconds * @SNDRV_COMPRESS_RENDER_MODE: dsp render mode (audio master or stc) + * @SNDRV_COMPRESS_CLK_REC_MODE: clock recovery mode ( none or auto) */ enum sndrv_compress_encoder { SNDRV_COMPRESS_ENCODER_PADDING = 1, @@ -157,12 +162,14 @@ enum sndrv_compress_encoder { #ifdef CONFIG_AUDIO_QGKI SNDRV_COMPRESS_PATH_DELAY = 3, SNDRV_COMPRESS_RENDER_MODE = 4, + SNDRV_COMPRESS_CLK_REC_MODE = 5, #endif }; #ifdef CONFIG_AUDIO_QGKI #define SNDRV_COMPRESS_PATH_DELAY SNDRV_COMPRESS_PATH_DELAY #define SNDRV_COMPRESS_RENDER_MODE SNDRV_COMPRESS_RENDER_MODE +#define SNDRV_COMPRESS_CLK_REC_MODE SNDRV_COMPRESS_CLK_REC_MODE #endif /**