Prechádzať zdrojové kódy

asoc: bolero: Avoid reg access if audio hw vote fails

Check audio hw vote before register access.

Change-Id: I2753f6abd912910285f586bf95c71e3c99dfe60a
Signed-off-by: Laxminath Kasam <[email protected]>
Laxminath Kasam 5 rokov pred
rodič
commit
6ac07f666d
1 zmenil súbory, kde vykonal 8 pridanie a 2 odobranie
  1. 8 2
      asoc/codecs/bolero/bolero-cdc.c

+ 8 - 2
asoc/codecs/bolero/bolero-cdc.c

@@ -101,8 +101,11 @@ static int __bolero_reg_read(struct bolero_priv *priv,
 		goto ssr_err;
 	}
 
-	if (priv->macro_params[VA_MACRO].dev)
+	if (priv->macro_params[VA_MACRO].dev) {
 		pm_runtime_get_sync(priv->macro_params[VA_MACRO].dev);
+		if (!bolero_check_core_votes(priv->macro_params[VA_MACRO].dev))
+			goto ssr_err;
+	}
 
 	if (priv->version < BOLERO_VERSION_2_0) {
 		/* Request Clk before register access */
@@ -149,8 +152,11 @@ static int __bolero_reg_write(struct bolero_priv *priv,
 		ret = -EINVAL;
 		goto ssr_err;
 	}
-	if (priv->macro_params[VA_MACRO].dev)
+	if (priv->macro_params[VA_MACRO].dev) {
 		pm_runtime_get_sync(priv->macro_params[VA_MACRO].dev);
+		if (!bolero_check_core_votes(priv->macro_params[VA_MACRO].dev))
+			goto ssr_err;
+	}
 
 	if (priv->version < BOLERO_VERSION_2_0) {
 		/* Request Clk before register access */