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:
@@ -186,12 +186,6 @@ static int hap_enable_swr_dac_port(struct snd_soc_dapm_widget *w,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SND_SOC_DAPM_PRE_PMD:
|
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 */
|
/* stop SWR play */
|
||||||
val = 0;
|
val = 0;
|
||||||
rc = regmap_write(swr_hap->regmap, SWR_PLAY_REG, val);
|
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);
|
__func__, rc);
|
||||||
return 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);
|
swr_device_wakeup_unvote(swr_hap->swr_slave);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user