xref: /freebsd/sys/contrib/device-tree/Bindings/sound/tdm-slot.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotTDM slot:
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThis specifies audio DAI's TDM slot.
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel VadotTDM slot properties:
6*c66ec88fSEmmanuel Vadotdai-tdm-slot-num : Number of slots in use.
7*c66ec88fSEmmanuel Vadotdai-tdm-slot-width : Width in bits for each slot.
8*c66ec88fSEmmanuel Vadotdai-tdm-slot-tx-mask : Transmit direction slot mask, optional
9*c66ec88fSEmmanuel Vadotdai-tdm-slot-rx-mask : Receive direction slot mask, optional
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel VadotFor instance:
12*c66ec88fSEmmanuel Vadot	dai-tdm-slot-num = <2>;
13*c66ec88fSEmmanuel Vadot	dai-tdm-slot-width = <8>;
14*c66ec88fSEmmanuel Vadot	dai-tdm-slot-tx-mask = <0 1>;
15*c66ec88fSEmmanuel Vadot	dai-tdm-slot-rx-mask = <1 0>;
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel VadotAnd for each specified driver, there could be one .of_xlate_tdm_slot_mask()
18*c66ec88fSEmmanuel Vadotto specify an explicit mapping of the channels and the slots. If it's absent
19*c66ec88fSEmmanuel Vadotthe default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
20*c66ec88fSEmmanuel Vadottx and rx masks.
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel VadotFor snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
23*c66ec88fSEmmanuel Vadotfor an active slot as default, and the default active bits are at the LSB of
24*c66ec88fSEmmanuel Vadotthe masks.
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotThe explicit masks are given as array of integers, where the first
27*c66ec88fSEmmanuel Vadotnumber presents bit-0 (LSB), second presents bit-1, etc. Any non zero
28*c66ec88fSEmmanuel Vadotnumber is considered 1 and 0 is 0. snd_soc_of_xlate_tdm_slot_mask()
29*c66ec88fSEmmanuel Vadotdoes not do anything, if either mask is set non zero value.
30