asoc: swr-haptics: keep in SWR PLAY_SRC when disabling SWR play

Currently, 0 is written into SWR_PLAY register when disabling SWR play,
it coincidently updates the PLAY_SRC to FIFO mode and disables it. If
there is a FIFO play triggered from SPMI address space, the FIFO play
will be disabled and the FIFO samples will be flushed. To avoid this,
keep in SWR PLAY_SRC when disabling SWR play.

Change-Id: Ib594df57835979a8832f2f7a1954ff36f643f724
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
This commit is contained in:
Fenglin Wu
2022-11-03 17:37:43 +08:00
committed by Gerrit - the friendly Code Review server
父節點 a116a9c2f0
當前提交 8d450b9235

查看文件

@@ -332,7 +332,7 @@ static int hap_enable_swr_dac_port(struct snd_soc_dapm_widget *w,
break;
case SND_SOC_DAPM_PRE_PMD:
/* stop SWR play */
val = 0;
val = SWR_PLAY_SRC_VAL_SWR;
rc = regmap_write(swr_hap->regmap, SWR_PLAY_REG, val);
if (rc) {
dev_err_ratelimited(swr_hap->dev, "%s: Enable SWR_PLAY failed, rc=%d\n",