Skip to contentSkip to conversation

ASoC: qcom: q6apm: Fix the wait for SHARED_MEM_UNMAP_REGIONS

PATCH In review redducc 3 participants 3 messages Oct 19 – Oct 20

Subsystems (4)
lore
Share & tools
lore

redducc

author
#0 lore raw

PATCH 1/1 ASoC: qcom: q6apm: Fix the wait for SHARED_MEM_UNMAP_REGIONS

The DSP acknowledges APM_CMD_SHARED_MEM_UNMAP_REGIONS with a GPR_BASIC_RSP_RESULT packet. apm_callback() stores the packet opcode, GPR_BASIC_RSP_RESULT, as the result opcode, but audioreach_send_cmd_sync() waits for the result opcode to match the command, APM_CMD_SHARED_MEM_UNMAP_REGIONS. The wait never completes, so every unmap blocks for the full 5 s timeout and logs "CMD timeout".

Store the opcode of the command being acknowledged, as the other GPR_BASIC_RSP_RESULT cases already do.

Fixes 8ea6e25c8536 ("ASoC: qcom: q6apm: Add support for early buffer mapping on DSP")
Assisted-by LLM
---
 sound/soc/qcom/qdsp6/q6apm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6apm.c +1 -1
index b6b1ef6833b3..379b15b7e503 100644
@@ -960,7 +960,7 @@ static int apm_callback(const struct gpr_resp_pkt *data, void *priv, int op)
 			wake_up(&apm->wait);
 			break;
 		case APM_CMD_SHARED_MEM_UNMAP_REGIONS:
-			apm->result.opcode = hdr->opcode;
+			apm->result.opcode = result->opcode;
 			apm->result.status = 0;
 			rsp = data->payload;
 

base-commit: 6a56f4f29711dd2da49f03a5b99ce53779e638d7
prerequisite-patch-id: 154550924ab1d2c1bc95517c058aaee0bb242f92
prerequisite-patch-id: 22bca48e48813fb55976db043f9c35c926c61e3d
prerequisite-patch-id: cd21b1ff6a4fef14c706cea97fc906d7a0331b5c
prerequisite-patch-id: ce4057205dd2c2a6650c3a36c60664bd2737e202

Signature · 1 line
2.43.0
#1 lore raw
Quoted 8 lines · redducc

The DSP acknowledges APM_CMD_SHARED_MEM_UNMAP_REGIONS with a GPR_BASIC_RSP_RESULT packet. apm_callback() stores the packet opcode, GPR_BASIC_RSP_RESULT, as the result opcode, but audioreach_send_cmd_sync() waits for the result opcode to match the command, APM_CMD_SHARED_MEM_UNMAP_REGIONS. The wait never completes, so every unmap blocks for the full 5 s timeout and logs "CMD timeout".

Quoted 6 lines

Store the opcode of the command being acknowledged, as the other GPR_BASIC_RSP_RESULT cases already do.

Fixes 8ea6e25c8536 ("ASoC: qcom: q6apm: Add support for early buffer mapping on DSP")
Assisted-by LLM

Please use real and known identity. See submitting patches document.

Quoted 18 lines
---
 sound/soc/qcom/qdsp6/q6apm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6apm.c +1 -1
index b6b1ef6833b3..379b15b7e503 100644
@@ -960,7 +960,7 @@ static int apm_callback(const struct gpr_resp_pkt *data, void *priv, int op)
 			wake_up(&apm->wait);
 			break;
 		case APM_CMD_SHARED_MEM_UNMAP_REGIONS:
-			apm->result.opcode = hdr->opcode;
+			apm->result.opcode = result->opcode;
 			apm->result.status = 0;
 			rsp = data->payload;
 
Quoted 5 lines

base-commit: 6a56f4f29711dd2da49f03a5b99ce53779e638d7
prerequisite-patch-id: 154550924ab1d2c1bc95517c058aaee0bb242f92
prerequisite-patch-id: 22bca48e48813fb55976db043f9c35c926c61e3d
prerequisite-patch-id: cd21b1ff6a4fef14c706cea97fc906d7a0331b5c
prerequisite-patch-id: ce4057205dd2c2a6650c3a36c60664bd2737e202

Why are you fixing patches in flight? Why can't you just give review there?

Best regards,
Krzysztof

#2 lore raw
In reply to redducc
Quoted 8 lines · redducc

The DSP acknowledges APM_CMD_SHARED_MEM_UNMAP_REGIONS with a GPR_BASIC_RSP_RESULT packet. apm_callback() stores the packet opcode, GPR_BASIC_RSP_RESULT, as the result opcode, but audioreach_send_cmd_sync() waits for the result opcode to match the command, APM_CMD_SHARED_MEM_UNMAP_REGIONS. The wait never completes, so every unmap blocks for the full 5 s timeout and logs "CMD timeout".

Quoted 6 lines

Store the opcode of the command being acknowledged, as the other GPR_BASIC_RSP_RESULT cases already do.

Fixes 8ea6e25c8536 ("ASoC: qcom: q6apm: Add support for early buffer mapping on DSP")
Assisted-by LLM

This issue is already addressed in <[email protected]>

--srini

Quoted 23 lines
---
 sound/soc/qcom/qdsp6/q6apm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6apm.c +1 -1
index b6b1ef6833b3..379b15b7e503 100644
@@ -960,7 +960,7 @@ static int apm_callback(const struct gpr_resp_pkt *data, void *priv, int op)
 			wake_up(&apm->wait);
 			break;
 		case APM_CMD_SHARED_MEM_UNMAP_REGIONS:
-			apm->result.opcode = hdr->opcode;
+			apm->result.opcode = result->opcode;
 			apm->result.status = 0;
 			rsp = data->payload;
 

base-commit: 6a56f4f29711dd2da49f03a5b99ce53779e638d7
prerequisite-patch-id: 154550924ab1d2c1bc95517c058aaee0bb242f92
prerequisite-patch-id: 22bca48e48813fb55976db043f9c35c926c61e3d
prerequisite-patch-id: cd21b1ff6a4fef14c706cea97fc906d7a0331b5c
prerequisite-patch-id: ce4057205dd2c2a6650c3a36c60664bd2737e202