Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f3ec433 authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarManish Dewangan <manish@codeaurora.org>
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent 0ebb8f59
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -136,6 +136,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

/**
 * enum sndrv_compress_encoder
 * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the
@@ -144,6 +148,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,
@@ -152,12 +157,14 @@ enum sndrv_compress_encoder {
	SNDRV_COMPRESS_MAX_BLK_SIZE = 4,
	SNDRV_COMPRESS_PATH_DELAY = 5,
	SNDRV_COMPRESS_RENDER_MODE = 6,
	SNDRV_COMPRESS_CLK_REC_MODE = 7,
};

#define SNDRV_COMPRESS_MIN_BLK_SIZE SNDRV_COMPRESS_MIN_BLK_SIZE
#define SNDRV_COMPRESS_MAX_BLK_SIZE SNDRV_COMPRESS_MAX_BLK_SIZE
#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

/**
 * struct snd_compr_metadata - compressed stream metadata