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 <hongtaop@codeaurora.org>
This commit is contained in:
Hongtao Peng 2021-04-23 13:36:06 +08:00 • committed by Gerrit - the friendly Code Review server
commit 549e4babae
2 changed files with 3 additions and 5 deletions

View file

@ -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);

2
dsp/q6asm.c Normal file → Executable file
View file

@ -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__,