Browse Source

Enable wait for PD only when PDR mechanism is up

When the PDR mechanism is down, the value of ispdup is always 0.
This makes the sensors or audio daemon wait indefinitely in the
kernel.
Disabling wait in kernel when PDR mechanism is not working.

Change-Id: I556dc0aa3908bc97b433cbd6060b88a710923b58
Signed-off-by: Anirudh Raghavendra <[email protected]>
Anirudh Raghavendra 2 năm trước cách đây
mục cha
commit
8ac83763ce
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      dsp/adsprpc.c

+ 4 - 0
dsp/adsprpc.c

@@ -5998,6 +5998,7 @@ 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 IS_ENABLED(CONFIG_QCOM_PDR_HELPERS)
 		if (!strcmp(fl->servloc_name,
 			AUDIO_PDR_SERVICE_LOCATION_CLIENT_NAME) || !strcmp(fl->servloc_name,
 			SENSORS_PDR_ADSP_SERVICE_LOCATION_CLIENT_NAME) ||
@@ -6008,6 +6009,9 @@ static int fastrpc_check_pd_status(struct fastrpc_file *fl, char *sloc_name)
 			atomic_read(&me->channel[cid].spd[session].ispdup));
 			goto bail;
 		}
+#else
+		(void)me;
+#endif
 	}
 bail:
 	return err;