Prechádzať zdrojové kódy

soc : swr-mstr-ctl : Disable PCM port wth proper condition check

disabling pcm port only when master port needs to be disabled.

Change-Id: I666d4acdad5d7c01e366fac972cb72f85f99d75e
Signed-off-by: Ganapathiraju Sarath Varma <[email protected]>
Ganapathiraju Sarath Varma 2 rokov pred
rodič
commit
e517fca722
1 zmenil súbory, kde vykonal 4 pridanie a 3 odobranie
  1. 4 3
      soc/swr-mstr-ctrl.c

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

@@ -797,7 +797,8 @@ static int swrm_pcm_port_config(struct swr_mstr_ctrl *swrm, u8 port_num,
 			SWRM_DOUT_DP_PCM_PORT_CTRL(port_num));
 	reg_val = enable ? 0x3 : 0x0;
 	swr_master_write(swrm, reg_addr, reg_val);
-
+	dev_dbg(swrm->dev, "%s : pcm port %s, reg_val = %d, for addr %x\n",
+			__func__, enable ? "Enabled" : "disabled", reg_val, reg_addr);
 	return 0;
 }
 
@@ -1306,8 +1307,8 @@ static void swrm_disable_ports(struct swr_master *master,
 		dev_dbg(swrm->dev, "%s: mport :%d, reg: 0x%x, val: 0x%x\n",
 			__func__, i,
 			(SWRM_DP_PORT_CTRL_BANK((i + 1), bank)), value);
-
-		swrm_pcm_port_config(swrm, (i + 1),
+		if (!mport->req_ch)
+			swrm_pcm_port_config(swrm, (i + 1),
 				mport->stream_type, mport->dir, false);
 	}
 }