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

Commit 9d125879 authored by Deeraj Soman's avatar Deeraj Soman Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarDeeraj Soman <sdeeraj@codeaurora.org>
parent e039f16f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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");