Prechádzať zdrojové kódy

ipc: apr: set q6 state down when ECONNRESET from TAL

When SSR happens, APR state can update to DOWN
immediately which ensures avoid continuous retry
for PCM open from userspace as audio clients check
APR state at pcm_open and return ENETRESET if
APR is down.

Change-Id: I60a6d217786b3d610b70adbd12d0e5f2a7c12205
Signed-off-by: Laxminath Kasam <[email protected]>
Laxminath Kasam 4 rokov pred
rodič
commit
35d2276eac
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      ipc/apr.c

+ 2 - 0
ipc/apr.c

@@ -432,6 +432,8 @@ int apr_send_pkt(void *handle, uint32_t *buf)
 		if (rc == -ECONNRESET) {
 			pr_err_ratelimited("%s: Received reset error from tal\n",
 					__func__);
+			if (svc->dest_id == APR_DEST_QDSP6)
+				apr_set_q6_state(APR_SUBSYS_DOWN);
 			rc = -ENETRESET;
 		}
 		if (rc == -EAGAIN || rc == -ETIMEDOUT) {