Skip to content

Commit 783efdf

Browse files
committed
audioreach-driver: q6apm_audio_pkt: remap APM_EVENT_MODULE_TO_CLIENT dest_port
When a GPR response's token isn't found in the audio-packet port map, module-to-client events (APM_EVENT_MODULE_TO_CLIENT) destined for the APM module IID were being dropped instead of delivered. Detect this case and remap the destination port to the SVA client port (8208), preserving the original source port, so these events reach the intended client instead of being silently discarded. Signed-off-by: Kiruthika Vijayasekar <kvijayas@qti.qualcomm.com>
1 parent 9fd751c commit 783efdf

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

audioreach-driver/q6apm_audio_pkt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define APM_CMD_SHARED_MEM_MAP_REGIONS 0x0100100C
3939
#define APM_CMD_SHARED_SATELLITE_MEM_MAP_REGIONS 0x01001026
4040
#define APM_MEMORY_MAP_BIT_MASK_PHYS_ADDRESS 0x000001C1UL
41+
#define APM_EVENT_MODULE_TO_CLIENT 0x03001000
4142

4243
/* Define Logging Macros */
4344
static int audio_pkt_debug_mask;
@@ -738,6 +739,12 @@ static int q6apm_audio_pkt_callback_core(const struct gpr_resp_pkt *data, void *
738739
kfree(audpkt_port_map);
739740
} else {
740741
dev_dbg(dev, "Token=%u not found\n", hdr->token);
742+
if (hdr->opcode == APM_EVENT_MODULE_TO_CLIENT &&
743+
hdr->dest_port == GPR_APM_MODULE_IID) {
744+
new_dest_port = 8208;
745+
new_src_port = hdr->src_port;
746+
remap_ports = true;
747+
}
741748
}
742749
mutex_unlock(&apm->audpkt_port_lock);
743750

0 commit comments

Comments
 (0)