Files
linux/Documentation/devicetree/bindings/sound/tdm-slot.yaml
James Calligeros 938c1ed56a ASoC: dt-bindings: add TDM slot idle mode properties
Add properties to describe TDM slot idle behaviour. These properties can
be used to describe how a DAI is supposed to behave when not active.

For example, Apple Silicon laptops split a single I2S bus between two
physical lines which are combined at an OR gate in front of the
receiving port. One codec on each line is expected to transmit zeroes
during the active TDM slots of the opposite line, or we will have corrupted
data at the receiver.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260301-tdm-idle-slots-v3-3-c6ac5351489a@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-16 01:13:02 +00:00

53 lines
1.7 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tdm-slot.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Time Division Multiplexing (TDM) Slot Parameters
maintainers:
- Liam Girdwood <lgirdwood@gmail.com>
select: false
properties:
dai-tdm-slot-num:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of slots in use
dai-tdm-slot-width:
$ref: /schemas/types.yaml#/definitions/uint32
description: Width, in bits, of each slot
dai-tdm-idle-mode:
$ref: /schemas/types.yaml#/definitions/string
enum:
- none
- off
- zero
- pulldown
- hiz
- pullup
- drivehigh
description: Drive mode for inactive/idle TDM slots. For hardware that
implements .set_tdm_idle(). Optional. "None" represents undefined
behaviour and is the same as not setting this property.
patternProperties:
'^dai-tdm-slot-[rt]x-mask$':
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Slot mask for active TDM slots. Optional. Drivers may
specify .xlate_tdm_slot_mask() to generate a slot mask dynamically. If
neither this property nor a driver-specific function are specified, the
default snd_soc_xlate_tdm_slot_mask() function will be used to generate
a mask. The first element of the array is slot 0 (LSB). Any nonzero
value will be treated as 1.
'^dai-tdm-slot-[rt]x-idle-mask$':
$ref: /schemas/types.yaml#/definitions/uint32
description: Idle slot mask. Optional. A bit being set to 1 indicates
that the corresponding TDM slot is inactive/idle.
additionalProperties: true