Skip to content

Commit ca592e2

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_xcvr: get channel status data when PHY is not exists
There is no PHY for the XCVR module on i.MX93, the channel status needs to be obtained from FSL_XCVR_RX_CS_DATA_* registers. And channel status acknowledge (CSA) bit should be set once channel status is processed. Fixes: e240b93 ("ASoC: fsl_xcvr: Add support for i.MX93 platform") Signed-off-by: Shengjiu Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c58c35e commit ca592e2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

sound/soc/fsl/fsl_xcvr.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,26 @@ static irqreturn_t irq0_isr(int irq, void *devid)
14231423
/* clear CS control register */
14241424
memset_io(reg_ctrl, 0, sizeof(val));
14251425
}
1426+
} else {
1427+
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_0,
1428+
(u32 *)&xcvr->rx_iec958.status[0]);
1429+
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_1,
1430+
(u32 *)&xcvr->rx_iec958.status[4]);
1431+
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_2,
1432+
(u32 *)&xcvr->rx_iec958.status[8]);
1433+
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_3,
1434+
(u32 *)&xcvr->rx_iec958.status[12]);
1435+
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_4,
1436+
(u32 *)&xcvr->rx_iec958.status[16]);
1437+
regmap_read(xcvr->regmap, FSL_XCVR_RX_CS_DATA_5,
1438+
(u32 *)&xcvr->rx_iec958.status[20]);
1439+
for (i = 0; i < 6; i++) {
1440+
val = *(u32 *)(xcvr->rx_iec958.status + i * 4);
1441+
*(u32 *)(xcvr->rx_iec958.status + i * 4) =
1442+
bitrev32(val);
1443+
}
1444+
regmap_set_bits(xcvr->regmap, FSL_XCVR_RX_DPTH_CTRL,
1445+
FSL_XCVR_RX_DPTH_CTRL_CSA);
14261446
}
14271447
}
14281448
if (isr & FSL_XCVR_IRQ_NEW_UD) {

0 commit comments

Comments
 (0)