Эх сурвалжийг харах

asoc: Add support for compress perf mode

Add support for compress perf mode so that clients
can set the COMPRESSED_PERF_MODE_FLAG to invoke
the perf mode in compress driver.

Change-Id: Ia84b95e8566aeeaf654ed90c2ab19de46e708d4d
Signed-off-by: Deeraj Soman <[email protected]>
Deeraj Soman 6 жил өмнө
parent
commit
9d125879de

+ 9 - 0
asoc/msm-compress-q6-v2.c

@@ -76,6 +76,10 @@ const DECLARE_TLV_DB_LINEAR(msm_compr_vol_gain, 0,
 
 #define SND_DEC_DDP_MAX_PARAMS 18
 
+#ifndef COMPRESSED_PERF_MODE_FLAG
+#define COMPRESSED_PERF_MODE_FLAG 0
+#endif
+
 struct msm_compr_gapless_state {
 	bool set_next_stream_id;
 	int32_t stream_opened[MAX_NUMBER_OF_STREAMS];
@@ -2037,6 +2041,11 @@ static int msm_compr_set_params(struct snd_compr_stream *cstream,
 		}
 	}
 
+	if (params->codec.flags & COMPRESSED_PERF_MODE_FLAG) {
+		pr_debug("%s: setting perf mode = %d", __func__, LOW_LATENCY_PCM_MODE);
+		prtd->audio_client->perf_mode = LOW_LATENCY_PCM_MODE;
+	}
+
 	switch (params->codec.id) {
 	case SND_AUDIOCODEC_PCM: {
 		pr_debug("SND_AUDIOCODEC_PCM\n");