From 549e4babae476f4aac5bf6d10fc39f05193e76df Mon Sep 17 00:00:00 2001 From: Hongtao Peng Date: Fri, 23 Apr 2021 13:36:06 +0800 Subject: [PATCH] dsp : Support different mode POPPs connect to same COPP Allow Low-Latency POPP and Legacy POPP connect to the same COPP Allow Low-Latency POPP use spcical topology Change-Id: I67365d8dd98eaebccd78a7e237891e85a518003b Signed-off-by: Hongtao Peng --- dsp/q6adm.c | 6 ++---- dsp/q6asm.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) mode change 100644 => 100755 dsp/q6asm.c diff --git a/dsp/q6adm.c b/dsp/q6adm.c index 5fd053abfc06..274aea9e82cf 100755 --- a/dsp/q6adm.c +++ b/dsp/q6adm.c @@ -288,7 +288,7 @@ static int adm_get_copp_id(int port_idx, int copp_idx) } static int adm_get_idx_if_single_copp_exists(int port_idx, - int topology, int mode, + int topology, int rate, int bit_width, uint32_t copp_token) { @@ -299,8 +299,6 @@ static int adm_get_idx_if_single_copp_exists(int port_idx, for (idx = 0; idx < MAX_COPPS_PER_PORT; idx++) if ((topology == atomic_read(&this_adm.copp.topology[port_idx][idx])) && - (mode == - atomic_read(&this_adm.copp.mode[port_idx][idx])) && (rate == atomic_read(&this_adm.copp.rate[port_idx][idx])) && (bit_width == @@ -322,7 +320,7 @@ static int adm_get_idx_if_copp_exists(int port_idx, int topology, int mode, if (copp_token) return adm_get_idx_if_single_copp_exists(port_idx, - topology, mode, + topology, rate, bit_width, copp_token); diff --git a/dsp/q6asm.c b/dsp/q6asm.c old mode 100644 new mode 100755 index 9cefadaea1b6..abb1c5e28437 --- a/dsp/q6asm.c +++ b/dsp/q6asm.c @@ -3747,7 +3747,7 @@ static int __q6asm_open_write(struct audio_client *ac, uint32_t format, rc = q6asm_get_asm_topology_apptype(&cal_info, ac); open.postprocopo_id = cal_info.topology_id; - if (ac->perf_mode != LEGACY_PCM_MODE) + if ((ac->perf_mode != LEGACY_PCM_MODE) && (ac->perf_mode != LOW_LATENCY_PCM_MODE)) open.postprocopo_id = ASM_STREAM_POSTPROCOPO_ID_NONE; pr_debug("%s: perf_mode %d asm_topology 0x%x bps %d\n", __func__,