Sfoglia il codice sorgente

Merge "asoc: Add support for compress perf mode"

qctecmdr 6 anni fa
parent
commit
bdc4b5f403
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      asoc/msm-compress-q6-v2.c

+ 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];
@@ -2042,6 +2046,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");