Prechádzať zdrojové kódy

soc: soundwire: Fix soundwire audio core voting sequence

Fix soundwire audio core voting sequence during sub system restart.

Change-Id: I1653cc8b62083b5b736e661d608b0249e03f6093
Signed-off-by: Sudheer Papothi <[email protected]>
Sudheer Papothi 4 rokov pred
rodič
commit
e649c72517
1 zmenil súbory, kde vykonal 7 pridanie a 4 odobranie
  1. 7 4
      soc/swr-mstr-ctrl.c

+ 7 - 4
soc/swr-mstr-ctrl.c

@@ -3229,16 +3229,19 @@ static int swrm_runtime_suspend(struct device *dev)
 				swrm->ipc_wakeup_triggered = false;
 			}
 		}
-
 	}
-	if (swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, false))
-		dev_dbg(dev, "%s:lpass audio hw enable failed\n",
-			__func__);
 
 	/* Retain  SSR state until resume */
 	if (current_state != SWR_MSTR_SSR)
 		swrm->state = SWR_MSTR_DOWN;
+
 exit:
+	if (current_state != SWR_MSTR_UP) {
+		if (swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, false))
+			dev_dbg(dev, "%s:lpass audio hw enable failed\n",
+			__func__);
+	}
+
 	if (!hw_core_err)
 		swrm_request_hw_vote(swrm, LPASS_HW_CORE, false);
 	mutex_unlock(&swrm->reslock);