8.4.1 TDM Port
The TAS2564 provides a flexible TDM serial audio port. The port can be configured to support a variety of formats including stereo I2S, Left Justified and TDM. Mono audio playback is available via the SDIN pin. The SDOUT pin is used to transmit sample streams including speaker voltage and current sense, VBAT voltage, die temperature and channel gain.
The TDM serial audio port supports up to 16 32-bit time slots at 44.1/48 kHz, 8 32-bit time slots at a 88.2/96 kHz sample rate and 4 32-bit time slots at a 176.4/192 kHz sample rate. The device supports 2 time slots at 32 bits in width and 4 or 8 time slots at 16, 24 or 32 bits in width. Valid SBCLK to FSYNC ratios are 64, 96, 128, 192, 256, 384 and 512. The device will automatically detect the number of time slots and this does not need to be programmed.
By default, the TAS2564 will automatically detect the PCM playback sample rate. This can be disabled by setting the AUTO_RATE register bit high and manually configuring the device.
The SAMP_RATE register bits set the PCM audio sample rate when AUTO_RATE is enabled. The TAS2564 employs a robust clock fault detection engine that will automatically volume ramp down the playback path if FSYNC does not match the configured sample rate (AUTO_RATE enabled) or the ratio of SBCLK to FSYNC is not supported (minimizing any audible artifacts). Once the clocks are detected to be valid in both frequency and ratio, the device will automatically volume ramp the playback path back to the configured volume and resume playback.
When using the auto rate detection the sampling rate and SBCLK to FSYNC ration detected on the TDM bus is reported back on the read-only register FS_RATE and FS_RATIO respectively.
While the sampling rate of 192 kHz is supported, it is internally down-sampled to 96 kHz. Therefore audio content greater than 40 kHz should not be applied to prevent aliasing. This additionally effects all processing blocks like BOP and limiter which should use 96 kHz fs when accepting 192 kHz audio. It is recommend to use PurePath™ Console 3 Software to configure the device.
Table 15. PCM Auto Sample Rate Detection
AUTO_RATE |
SETTING |
0
|
Enabled (default) |
1
|
Disabled |
Table 16. PCM Audio Sample Rates
SAMP_RATE[2:0] |
FS_RATE(read only) |
SAMPLE RATE |
000
|
000
|
|
001
|
001
|
14.7kHz / 16kHz |
010
|
010
|
22.05 kHz / 24 kHz |
011
|
011
|
29.4 kHz / 32 kHz |
100
|
100
|
44.1 kHz / 48 kHz (default) |
101
|
101
|
88.2 kHz / 96 kHz |
110
|
110
|
176.4 kHz / 192 kHz |
111
|
111
|
Reserved |
Table 17. PCM SBCLK to FSYNC Ratio Rates
FS_RATIO[3:0] |
SAMPLE RATE |
0x0-0x3
|
Reserved |
0x4
|
64 |
0x5
|
96 |
0x6
|
128 |
0x7
|
192 |
0x8
|
256 |
0x9
|
384 |
0xA
|
512 |
0xB-0xE
|
Reserved |
0xF
|
Error Condition |
Figure 34 and Figure 35 below illustrates the receiver frame parameters required to configure the port for playback. A frame begins with the transition of FSYNC from either high to low or low to high (set by the FRAME_START register bit). FSYNC and SDIN are sampled by SBCLK using either the rising or falling edge (set by the RX_EDGE register bit). The RX_OFFSET register bits define the number of SBCLK cycles from the transition of FSYNC until the beginning of time slot 0. This is typically set to a value of 0 for Left Justified format and 1 for an I2S format.
Table 18. TDM Start of Frame Polarity
FRAME_START |
POLARITY |
0
|
Low to High on FSYNC(1) |
1
|
High to Low on FSYNC (default)(2) |
(1) When Low to High is used RX_EDGE and TX_EDGE cannot both simultaneously be set to rising edge.
(2) When High to Low is used RX_EDGE and TX_EDGE cannot both simultaneously be set to falling edge.
Table 19. TDM RX Capture Polarity
RX_EDGE |
FSYNC AND SDIN CAPTURE EDGE |
0
|
Rising edge of SBCLK (default) |
1
|
Falling edge of SBCLK |
Table 20. TDM RX Start of Frame to Time Slot 0 Offset
RX_OFFSET[4:0] |
SBCLK CYCLES |
0x00
|
0 |
0x01
|
1 (default) |
0x02
|
2 |
...
|
... |
0x1E
|
30 |
0x1F
|
31 |
The RX_SLEN[1:0] register bits set the length of the RX time slot. The length of the audio sample word within the time slot is configured by the RX_WLEN[1:0] register bits. The RX port will left justify the audio sample within the time slot by default, but this can be changed to right justification via the RX_JUSTIFY register bit. The TAS2564 supports mono and stereo down mix playback ([L+R]/2) via the left time slot, right time slot and time slot configuration register bits (RX_SLOT_L[3:0], RX_SLOT_R[3:0] and RX_SCFG[1:0] respectively). By default the device will playback mono from the time slot equal to the I2C base address offset for playback. The RX_SCFG[1:0] register bits can be used to override the playback source to the left time slot, right time slot or stereo down mix set by the RX_SLOT_L[3:0] and RX_SLOT_R[3:0] register bits.
If time slot selections places reception either partially or fully beyond the frame boundary, the receiver will return a null sample equivalent to a digitally muted sample.
Table 21. TDM RX Time Slot Length
RX_SLEN[1:0] |
TIME SLOT LENGTH |
00
|
16-bits |
01
|
24-bits |
10
|
32-bits (default) |
11
|
reserved |
Table 22. TDM RX Sample Word Length
RX_WLEN[1:0] |
LENGTH |
00
|
16-bits |
01
|
20-bits |
10
|
24-bits (default) |
11
|
32-bits |
Table 23. TDM RX Sample Justification
RX_JUSTIFY |
JUSTIFICATION |
0
|
Left (default) |
1
|
Right |
Table 24. TDM RX Time Slot Select Configuration
RX_SCFG[1:0] |
CONFIG ORIGIN |
00
|
Mono with Time Slot equal to I2C Address Offset (default) |
01
|
Mono Left Channel |
10
|
Mono Right Channel |
10
|
Stereo Down Mix [L+R]/2 |
Table 25. TDM RX Left Channel Time Slot
RX_SLOT_L[3:0] |
TIME SLOT |
0x0
|
0 (default) |
0x1
|
1 |
...
|
... |
0xE
|
14 |
0xF
|
15 |
Table 26. TDM RX Right Channel Time Slot
RX_SLOT_R[3:0] |
TIME SLOT |
0x0
|
0 |
0x1
|
1 (default) |
...
|
... |
0xE
|
14 |
0xF
|
15 |
The TDM port can transmit a number sample streams on the SDOUT pin includingboth speaker voltage sense, speaker current sense, VBAT voltage, die temperature and channel gain. Figure 36 below illustrates the alignment of time slots to the beginning of a frame and how a given sample stream is mapped to time slots. Either the rising or falling edge of SBCLK can be used to transmit data on the SDOUT pin, which can be configured by setting the TX_EDGE register bit. The TX_OFFSET register defines the number SBCLK cycles between the start of a frame and the beginning of time slot 0. This would typically be programmed to 0 for Left Justified format and 1 for I2S format. The TDM TX can either transmit logic 0 or Hi-Z depending on the setting of the TX_FILL register bit setting. An optional bus keeper will weakly hold the state of SDOUT when all devices driving are Hi-Z. Since only one bus keeper is required on SDOUT, this feature can be disabled via the TX_KEEPEN register bit. The bus-keeper can additionally be configured to be enabled for only 1LSB cycle or always using TX_KEEPLN and to drive the full or half cycle of the LSB using TX_KEEPCY.
Each sample stream is composed of either one or two 8-bit time slots.Speaker voltage sense and speaker current sense sample streams are 16-bit precision, so they will always utilize two TX time slots. The VBAT voltage stream is 10-bit precision, and can either be transmitted left justified in a 16-bit word (using two time slots) or can be truncated to 8-bits (the top 8 MSBs) and be transmitted in a single time slot. This is configured by setting VBAT_SLEN register bit. The Die temperature and gain are both 8-bit precision and are transmitted in a single time slot.
Table 27. TDM TX Transmit Polarity
TX_EDGE |
SDOUT TRANSMIT EDGE |
0
|
Rising edge of SBCLK |
1
|
Falling edge of SBCLK (default) |
Table 28. TDM TX Start of Frame to Time Slot 0 Offset
TX_OFFSET[2:0] |
SBCLK CYCLES |
0x0
|
0 |
0x1
|
1 (default) |
0x2
|
2 |
...
|
... |
0x6
|
6 |
0x7
|
7 |
Table 29. TDM TX Unused Bit Field Fill
TX_FILL |
SDOUT UNUSED BIT FIELDS |
0
|
Transmit 0 |
1
|
Transmit Hi-Z (default) |
Table 30. TDM TX SDOUT Bus Keeper Enable
TX_KEEPEN |
SDOUT BUS KEEPER |
0
|
Disable bus keeper |
1
|
Enable bus keeper (default) |
Table 31. TDM TX SDOUT Bus Keeper Length
TX_KEEPLN |
SDOUT BUS KEEPER ENABLED FOR |
0
|
1 LSB cycle (default) |
1
|
Always |
Table 32. TDM TX SDOUT Bus Keeper LSB Cycle
TX_KEEPCY |
SDOUT BUS KEEPER DRIVEN |
0
|
full-cycle (default) |
1
|
half-cycle |
The time slot register for each sample stream defines where the MSB transmission begins. For instance, if VSNS_SLOT is set to 2, the upper 8 MSBs will be transmitted in time slot 2 and the lower 8 LSBs will be transmitted in time slot 3. Each sample stream can be individually enabled or disabled. This is useful to manage limited TDM bandwidth since it may not be necessary to transmit all streams for all devices on the bus.
It is important to ensure that time slot assignments for actively transmitted sample streams do not conflict. For instance, if VSNS_SLOT is set to 2 and ISNS_SLOT is set to 3, the lower 8 LSBs of voltage sense will conflict with the upper 8 MSBs of current sense. This will produce unpredictable transmission results in the conflicting bit slots (for example the priority is not defined).
The current and voltage values are transmitted at the full 16-bit measured values by default. The IVMON_LEN register can be used to transmit only the 8 MSB bits in one slot or 12 MSB bits values across multiple slots. The special 12-bit mode is used when only 24-bit I2S/TDM data can be processed by the host processor. The device should be configured with the voltage-sense slot and current-sense slot off by 1 slot and will consume 3 consecutive 8-bit slots. In this mode the device will transmit the first 12 MSB bits followed by the second 12 MSB bits specified by the preceding slot.
If time slot selections place transmission beyond the frame boundary, the transmitter will truncate transmission at the frame boundary.
It is recommended to keep the following slot ordering:
ISNS_SLOT<VSNS_SLOT<VBAT_SLOT<TEMP_SLOT<GAIN_SLOT<BIL_ILIM_SLOT.
Table 33. TDM Voltage/Current Length
IVMON_LEN[1:0] |
LENGTH BITS |
00
|
16 bits (default) |
01
|
12 bits |
10
|
8 bits |
11
|
Reserved |
Table 34. TDM Voltage Sense Time Slot
VSNS_SLOT[5:0] |
SLOT |
0x00
|
0 |
0x01
|
1 |
0x02
|
2 (default) |
...
|
... |
0x3E
|
62 |
0x3F
|
63 |
Table 35. TDM Voltage Sense Transmit Enable
VSNS_TX |
STATE |
0
|
Disabled (default) |
1
|
Enabled |
Table 36. TDM Current Sense Time Slot
ISNS_SLOT[5:0] |
SLOT |
0x00
|
0 (default) |
0x01
|
1 |
0x02
|
2 |
...
|
... |
0x3E
|
62 |
0x3F
|
63 |
Table 37. TDM Current Sense Transmit Enable
ISNS_TX |
STATE |
0
|
Disabled (default) |
1
|
Enabled |
Table 38. TDM VBAT Time Slot
VBAT_SLOT[5:0] |
SLOT |
0x00
|
0 |
0x01
|
1 |
...
|
... |
0x04
|
4 (default) |
...
|
... |
0x3E
|
62 |
0x3F
|
63 |
Table 39. TDM VBAT Time Slot Length
VBAT_SLEN |
SLOT LENGTH |
0
|
Truncate to 8-bits (default) |
1
|
Left justify to 16-bits |
Table 40. TDM VBAT Transmit Enable
VBAT_TX |
STATE |
0
|
Disabled (default) |
1
|
Enabled |
Table 41. TDM Temp Sensor Time Slot
TEMP_SLOT[5:0] |
SLOT |
0x00
|
0 |
0x01
|
1 |
...
|
... |
0x05
|
5 (default) |
...
|
... |
0x3E
|
62 |
0x3F
|
63 |
Table 42. TDM Temp Sensor Transmit Enable
TEMP_TX |
STATE |
0
|
Disabled (default) |
1
|
Enabled |
The following sample streams are part of the Inter Chip Limiter Alignment system. These data streams can be routed over the audio TDM bus.
Table 43. TDM Limiter Gain Reduction Time Slot
GAIN_SLOT[5:0] |
SLOT |
0x00
|
0 |
0x01
|
1 |
...
|
... |
0x06
|
6 (default) |
...
|
... |
0x3E
|
62 |
0x3F
|
63 |
Table 44. TDM Limiter Gain Reduction Transmit Enable
GAIN_TX |
STATE |
0
|
Disabled (default) |
1
|
Enabled |
Table 45. TDM Boost Sync Time Slot
BST_SLOT[5:0] |
SLOT |
0x00
|
0 |
0x01
|
1 |
...
|
... |
0x07
|
7 (default) |
...
|
... |
0x3E
|
62 |
0x3F
|
63 |
Table 46. TDM Boost Sync Enable
BST_TX |
STATE |
0
|
Disabled (default) |
1
|
Enabled |