Эх сурвалжийг харах

Merge "dsp-kernel: Check pdrcount count along with pd status"

qctecmdr 1 жил өмнө
parent
commit
f4142dce5c
1 өөрчлөгдсөн 7 нэмэгдсэн , 0 устгасан
  1. 7 0
      dsp/adsprpc.c

+ 7 - 0
dsp/adsprpc.c

@@ -6829,6 +6829,13 @@ 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;
+		if ((!strcmp(fl->servloc_name,
+			AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME)) &&
+			(me->channel[cid].spd[session].pdrcount !=
+			me->channel[cid].spd[session].prevpdrcount)) {
+			err = -ECONNRESET;
+			goto bail;
+		}
 #if IS_ENABLED(CONFIG_QCOM_PDR_HELPERS)
 		if (!strcmp(fl->servloc_name,
 			AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME) || !strcmp(fl->servloc_name,