summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2019-06-20 12:20:01 +0300
committerMark Brown <broonie@kernel.org>2019-06-20 12:59:17 +0100
commit5dd17a3c3ed545f73b8bf7754efd5f6125bf7531 (patch)
tree8b121ecb65bdf035d76461965ffc7fd7f28aa35d /sound/soc
parent9e0784d00e35e058353e2e7e59dd956be7519788 (diff)
ASoC: ti: davinci-mcasp: Set unused serializers as INACTIVE
Unused serializers needs to be configured as INACTIVE, otherwise they will underflow/overflow when multiple serializers are connected, but some are not needed for the given stream. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/ti/davinci-mcasp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c
index a8378d223a9e..8bec0dc4f754 100644
--- a/sound/soc/ti/davinci-mcasp.c
+++ b/sound/soc/ti/davinci-mcasp.c
@@ -848,14 +848,15 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
rx_ser < max_active_serializers) {
clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
rx_ser++;
- } else if (mcasp->serial_dir[i] == INACTIVE_MODE) {
+ } else {
+ /* Inactive or unused pin, set it to inactive */
mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
SRMOD_INACTIVE, SRMOD_MASK);
- clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
- } else if (mcasp->serial_dir[i] == TX_MODE) {
- /* Unused TX pins, clear PDIR */
- mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i),
- mcasp->dismod, DISMOD_MASK);
+ /* If unused, set DISMOD for the pin */
+ if (mcasp->serial_dir[i] != INACTIVE_MODE)
+ mcasp_mod_bits(mcasp,
+ DAVINCI_MCASP_XRSRCTL_REG(i),
+ mcasp->dismod, DISMOD_MASK);
clear_bit(PIN_BIT_AXR(i), &mcasp->pdir);
}
}
@@ -965,6 +966,7 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream,
for (i = 0; i < active_slots; i++)
mask |= (1 << i);
}
+
mcasp_clr_bits(mcasp, DAVINCI_MCASP_ACLKXCTL_REG, TX_ASYNC);
if (!mcasp->dat_port)