From 39ab7828be3219db878aa083be7819bbc954db43 Mon Sep 17 00:00:00 2001 From: Harshal Ahire Date: Mon, 13 Jul 2020 14:53:02 +0530 Subject: [PATCH] dsp: fix mute for AptX Adaptive A2DP streaming Only load depacketizer module for aptx_adaptive and ldac playback use-case during dynamic load of BT modules, decoder module loading not required. Change-Id: If7ec559f5cc7ff428b8e0e4fac1f34e7f2469c8e Signed-off-by: Harshal Ahire --- dsp/q6afe.c | 8 ++++++-- dsp/q6core.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dsp/q6afe.c b/dsp/q6afe.c index 98f1aefd7c3a..d38594167596 100644 --- a/dsp/q6afe.c +++ b/dsp/q6afe.c @@ -5680,8 +5680,12 @@ static int __afe_port_start(u16 port_id, union afe_port_config *afe_config, if ((q6core_get_avcs_api_version_per_service( APRV2_IDS_SERVICE_ID_ADSP_CORE_V) >= AVCS_API_VERSION_V5)) { - /* LDAC doesn't require decoder */ - if (codec_format == ENC_CODEC_TYPE_LDAC) + /* + * LDAC and APTX_ADAPTIVE don't require loading decoder module + * Only loading de-packetizer module. + */ + if (codec_format == ENC_CODEC_TYPE_LDAC || + codec_format == ASM_MEDIA_FMT_APTX_ADAPTIVE) ret = q6afe_load_avcs_modules(1, port_id, DECODER_CASE, codec_format); else diff --git a/dsp/q6core.c b/dsp/q6core.c index 8e8bedff42dd..392b09dec8e7 100644 --- a/dsp/q6core.c +++ b/dsp/q6core.c @@ -990,6 +990,7 @@ int32_t q6core_avcs_load_unload_modules(struct avcs_load_unload_modules_payload else mod->hdr.opcode = AVCS_CMD_UNLOAD_MODULES; + q6core_lcl.adsp_status = 0; q6core_lcl.avcs_module_resp_received = 0; ret = apr_send_pkt(q6core_lcl.core_handle_q, (uint32_t *)mod);