Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: qcom: q6apm: do not close GPR port before closing graph

Closing GPR port before graph close can result in un handled notifications
from DSP, this results in spam of errors from GPR driver as there is no
one to handle these notification at that point in time.

Fix this by closing GPR port after graph close is finished.

Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230705131842.41584-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Srinivas Kandagatla and committed by
Mark Brown
c1be6292 c03226ba

+6 -1
+6 -1
sound/soc/qcom/qdsp6/q6apm.c
··· 511 511 512 512 switch (hdr->opcode) { 513 513 case DATA_CMD_RSP_WR_SH_MEM_EP_DATA_BUFFER_DONE_V2: 514 + if (!graph->ar_graph) 515 + break; 514 516 client_event = APM_CLIENT_EVENT_DATA_WRITE_DONE; 515 517 mutex_lock(&graph->lock); 516 518 token = hdr->token & APM_WRITE_TOKEN_MASK; ··· 546 544 wake_up(&graph->cmd_wait); 547 545 break; 548 546 case DATA_CMD_RSP_RD_SH_MEM_EP_DATA_BUFFER_V2: 547 + if (!graph->ar_graph) 548 + break; 549 549 client_event = APM_CLIENT_EVENT_DATA_READ_DONE; 550 550 mutex_lock(&graph->lock); 551 551 rd_done = data->payload; ··· 653 649 { 654 650 struct audioreach_graph *ar_graph = graph->ar_graph; 655 651 656 - gpr_free_port(graph->port); 652 + graph->ar_graph = NULL; 657 653 kref_put(&ar_graph->refcount, q6apm_put_audioreach_graph); 654 + gpr_free_port(graph->port); 658 655 kfree(graph); 659 656 660 657 return 0;