Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) TDM slot:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) This specifies audio DAI's TDM slot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) TDM slot properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) dai-tdm-slot-num : Number of slots in use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) dai-tdm-slot-width : Width in bits for each slot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) dai-tdm-slot-tx-mask : Transmit direction slot mask, optional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) dai-tdm-slot-rx-mask : Receive direction slot mask, optional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) For instance:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 	dai-tdm-slot-num = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	dai-tdm-slot-width = <8>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	dai-tdm-slot-tx-mask = <0 1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	dai-tdm-slot-rx-mask = <1 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) And for each specified driver, there could be one .of_xlate_tdm_slot_mask()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) to specify an explicit mapping of the channels and the slots. If it's absent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) tx and rx masks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) for an active slot as default, and the default active bits are at the LSB of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) the masks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) The explicit masks are given as array of integers, where the first
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) number presents bit-0 (LSB), second presents bit-1, etc. Any non zero
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) number is considered 1 and 0 is 0. snd_soc_of_xlate_tdm_slot_mask()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) does not do anything, if either mask is set non zero value.