[PATCH v4 0/3] ASoC: fsl: add bitcount and timestamp controls

Shengjiu Wang
2026-03-06T09:38:53Z

The SAI and XCVR have the timestamp counters and bit counters, which can
be used by software to track the progress of the transmitter and receiver.
They can also be used to calculate the relative frequency of the bit clock
against the bus interface clock.

changes in v4:
- use the pm_runtime_resume_and_get to get pm reference before calling
fuctions and use pm_runtime_put_autosuspend to release the reference
in patch 1/3

changes in v3:
- define own functions which check the pm status before accessing the
registers to avoid -EBUSY error reported by mixer-test.

Changes in v2:
- remove arrays of enums, define transmit_tstmp_enum and receive_tstmp_enum
separately.
- remove __bf_shf(), define the XXX_SHIFT macros.

Shengjiu Wang (3):
ASoC: fsl_utils: Add snd_kcontrol functions for specific cases
ASoC: fsl_sai: add bitcount and timestamp controls
ASoC: fsl_xcvr: add bitcount and timestamp controls

sound/soc/fsl/fsl_sai.c | 62 +++++++++++++++++++++
sound/soc/fsl/fsl_sai.h | 4 ++
sound/soc/fsl/fsl_utils.c | 113 ++++++++++++++++++++++++++++++++++++++
sound/soc/fsl/fsl_utils.h | 30 ++++++++++
sound/soc/fsl/fsl_xcvr.c | 64 +++++++++++++++++++++
sound/soc/fsl/fsl_xcvr.h | 18 ++++++
6 files changed, 291 insertions(+)

--
2.34.1