浏览代码

dsp-kernel: Allow audio PD kill call after audio PDR

Currently, after audio PDR, all invoke calls are discarded in pd status
check, due to this kill does not reach to DSP to clean up the ftq
group in guestOS. Fix is to discard only audio pd attachment and allow
kill message to clean DSP GuestOS resources.

Change-Id: Ica8bff6ed6e81eab4119c59c46fb6be9c0b79704
Signed-off-by: rnallago <[email protected]>
Ramesh Nallagopu 1 年之前
父节点
当前提交
8f36f9526b
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      dsp/adsprpc.c

+ 6 - 1
dsp/adsprpc.c

@@ -6876,10 +6876,15 @@ static int fastrpc_check_pd_status(struct fastrpc_file *fl, char *sloc_name)
 		err = fastrpc_get_spd_session(sloc_name, &session, &cid);
 		if (err || cid != fl->cid)
 			goto bail;
+		/*
+		 * Audio PD attachment is not allowed after PDR.
+		 * Allow kill message after PDR to clean DSP guestOS resources.
+		 */
 		if ((!strcmp(fl->servloc_name,
 			AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME)) &&
 			(me->channel[cid].spd[session].pdrcount !=
-			me->channel[cid].spd[session].prevpdrcount)) {
+			me->channel[cid].spd[session].prevpdrcount) &&
+			!fl->dsp_proc_init) {
 			err = -ECONNRESET;
 			goto bail;
 		}