asoc: swr-haptics: close SWR data channel after stoping playing

Per HW recommendation, when stopping SWR playing, SWR_PLAY register need
to get deasserted before disconnecting SWR data channel. Hence adjust the
sequence.

Change-Id: I15f33fefc8b847c9a7f6abd627217f21f8ddee89
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
Fenglin Wu
2020-05-15 10:54:32 +08:00
parent e7efdae360
commit 84d85e958f

View File

@@ -186,12 +186,6 @@ static int hap_enable_swr_dac_port(struct snd_soc_dapm_widget *w,
}
break;
case SND_SOC_DAPM_PRE_PMD:
swr_disconnect_port(swr_hap->swr_slave, &port_id, num_port,
&ch_mask, &port_type);
break;
case SND_SOC_DAPM_POST_PMD:
swr_slvdev_datapath_control(swr_hap->swr_slave,
swr_hap->swr_slave->dev_num, false);
/* stop SWR play */
val = 0;
rc = regmap_write(swr_hap->regmap, SWR_PLAY_REG, val);
@@ -200,6 +194,12 @@ static int hap_enable_swr_dac_port(struct snd_soc_dapm_widget *w,
__func__, rc);
return rc;
}
break;
case SND_SOC_DAPM_POST_PMD:
swr_disconnect_port(swr_hap->swr_slave, &port_id, num_port,
&ch_mask, &port_type);
swr_slvdev_datapath_control(swr_hap->swr_slave,
swr_hap->swr_slave->dev_num, false);
swr_device_wakeup_unvote(swr_hap->swr_slave);
break;
default: