[PATCH 0/7] ASoC: basic support for configuring bus keepers
James Calligeros
jcalligeros99 at gmail.com
Tue Dec 9 01:31:13 PST 2025
Hi all,
This series introduces some infrastructure to allow platform drivers
to specify what a DAI should be doing when it is not active on the
bus. The primary use case for this is configuring bus keepers which
may be integrated into various codecs.
Consider a device with two codecs that report voice coil voltage and
current data back to the host via I2S. Codec A is configured to transmit
its V/ISENSE data on TDM slots 1 and 3, while Codec B is configured to
do so on slots 2 and 4. The receiving end sums the two together.
If Codec A transmits anything on slots 2 or 4 (and vice versa), the
result is a bus conflict.
Some codecs include configurable bus keepers to ameliorate this issue.
Notable examples are the TI TAS2764 and TAS2770. By default, these
codecs keep their SDOUT pin floating during unconfigured TDM slots,
however this can result in garbage data on the bus. TAS2764 can be
set up to fill specific TDM slots with zeroes, TAS2770 can hold its
SDOUT pin to ground.
This feature is necessary to properly drive the speaker systems found
on most Apple Silicon laptops. All but three models include six codecs
in two groups of three driving two woofers and a tweeter on both the left
and right channels. Each codec group has a single line for SDOUT, to
which all codecs are connected. The two groups are then summed on to
one I2S port. Each group must ensure that it is silent on the bus while
the other is supposed to be active.
In the downstream Asahi Linux kernel[1], we set up one codec in each
group to zero-fill or pull down its group's side of the bus for the
opposite group's transmit slots. This is done entirely in the codec
driver, however this approach is perhaps over-fit for our use case.
Following previous mailing list discussions[2], I have tried to
expose the functionality in a more configurable and generic way.
I have integrated this approach into our downstream platform driver
and select Devicetrees as an example of how this mechanism is intended
to be used[3].
Regards,
James
[1] https://github.com/AsahiLinux/linux/tree/bits/070-audio
[2] https://lore.kernel.org/asahi/20250227-apple-codec-changes-v3-17-cbb130030acf@gmail.com/
[3] https://github.com/chadmed/tree/tdm-revised2
---
James Calligeros (7):
ASoC: dt-bindings: convert tdm-slot to YAML
ASoC: dt-bindings: update tdm-slot.txt references to tdm-slot.yaml
ASoC: dt-bindings: add TDM slot idle mode properties
ASoC: soc-dai: define TDM idle behaviour modes
ASoC: soc-dai: add common operation to set TDM idle mode
ASoC: tas2764: expose SDOUT bus keeper via set_tdm_idle operation
ASoC: tas2770: expose SDOUT bus keeper via set_tdm_idle
.../bindings/sound/imx-audio-card.yaml | 4 +-
.../bindings/sound/simple-card.yaml | 4 +-
.../bindings/sound/tdm-slot.txt | 29 --------
.../bindings/sound/tdm-slot.yaml | 66 +++++++++++++++++
include/sound/soc-dai.h | 20 ++++++
sound/soc/codecs/tas2764.c | 95 +++++++++++++++++++++++++
sound/soc/codecs/tas2764.h | 11 +++
sound/soc/codecs/tas2770.c | 75 +++++++++++++++++++
sound/soc/codecs/tas2770.h | 12 ++++
sound/soc/soc-dai.c | 40 +++++++++++
10 files changed, 323 insertions(+), 33 deletions(-)
---
base-commit: e4deadb3e562aadf2825f28be3dcbbf01cf2ef17
change-id: 20251201-tdm-idle-slots-10ba92516da4
Best regards,
--
James Calligeros <jcalligeros99 at gmail.com>
More information about the linux-arm-kernel
mailing list