]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: fsl_xcvr: add bitcount and timestamp controls
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 10 Mar 2026 10:42:35 +0000 (18:42 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 10 Mar 2026 13:55:59 +0000 (13:55 +0000)
commit7b3f8db159f710d432c4edc024fcefa9e62e8b4b
tree172a1ba81c9653df9d686d2b60b401abbd605342
parent8e27987a208029c39da7a787bd9f1217d42011a5
ASoC: fsl_xcvr: add bitcount and timestamp controls

The transmitter and receiver implement separate timestamp counters and
bit counters. The bit counter increments at the end of each bit in a
frame whenever the transmitter or receiver is enabled. The bit counter
can be reset by software. The timestamp counter increments on the bus
interface clock whenever it is enabled. The current value of the
timestamp counter is latched whenever the bit counter increments.
Reading the bit counter register will cause the latched timestamp
value to be saved in the bit counter timestamp register. The timestamp
counter can be reset by software, this also resets the latched timestamp
value and the bit counter timestamp register.

The timestamp counter and bit counter can be used by software to track
the progress of the transmitter and receiver. It can also be used to
calculate the relative frequency of the bit clock against the bus
interface clock.

As there are three regmap handlers defined in this driver, explicitly
call the snd_soc_component_init_regmap() to init regmap handler for the
component.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20260310104235.1234569-4-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_xcvr.c
sound/soc/fsl/fsl_xcvr.h