The Transmitter library provides a comprehensive set of APIs to control, configure and provide status on all aspects of the HDMI TX module.
Below is the list of all functions implemented in this library:
<fs 85%>ATV_ERR</fs> ADIAPI_TxInit <fs 85%>(BOOL FullInit)</fs>
Description
Power-up and initialize HDMI TX hardware and software module. This function will perform a complete TX module reset and brings the chip into a known state. The default behavior of the HDMI TX chip is to automatically power down if HPD is low. To change this default behavior, the
API ADIAPI_TxOverrideHpdPD can be used. The TMDS clock and data lines will be disabled following a call to this
API (or whenever the system is initialized) unless the configuration flag TX_ENABLE_TMDS_ON_INIT is set as described in the ADIAPI_TxSetConfig
API.
Parameters
FullInit - select if it is required to perform full initialization (all h/w modules will be reset) or partial initialization (
CEC module will not be affected).
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxShutdown <fs 85%>(TX_PD_MODE PdMode)</fs>
Description
Power down HDMI TX hardware. The chip power-down will be set to high and all TMDS lines will be disabled. This
API can also be used to enter stand-by mode.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetConfig <fs 85%>(TX_CONFIG UserConfig, BOOL Set)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxIsr <fs 85%>(void)</fs>
Description
Process the TX device interrupts. This function should be called by the application as soon as a TX device interrupt is detected. If the application uses polling and the interrupt line from the HDMI TX to the MCU is not connected, this function can be called periodically to poll and process any outstanding interrupts.
It should be noted that some of the TX interrupts can take relatively long time to process. For example, an EDID interrupt will consume at least the amount of time needed to read all 256 bytes of EDID via
I2C. It is thus advisable for interrupt-driven real-time applications to disable the transmitter interrupt to the MCU before calling this function and re-enable it after this function returns.
The application will be notified on any change of the operating conditions if the notification events are enabled using the ADIAPI_TxSetEnabledEvents
API.
The various interrupts, the action taken in the ISR and the associated notification event are listed in the table below. The details of the notification events can be found in the Notification events section.
Interrupt | Default Action | Notification Event |
HPD Low | None | TX_EVENT_HPD_CHG |
HPD High | Hardware reset is performed (ADIAPI_TxInit will be called) | TX_EVENT_HPD_CHG |
Rx Sense Low/High | None | TX_EVENT_MSEN_CHG |
EDID Ready | Read the next EDID segment up to TX_SUPPORTED_EDID_SEGMENTS to internal buffer | TX_EVENT_EDID_READY when a new segment is fully read |
BKSV ready | Read and concatenate downstream BKSV into internal buffer | TX_EVENT_BKSV_READY when ALL downstream BKSVs are received |
HDCP Authenticated | None | TX_EVENT_HDCP_AUTHENTICATED |
HDCP Error | None | TX_EVENT_HDCP_ERROR |
Vsync Edge | None | TX_EVENT_VSYNC_EDGE |
Audio FIFO Full | None | TX_EVENT_AUDIO_FIFO_FULL |
Embedded Sync Polarity Error | None | TX_EVENT_EMB_SYNC_ERROR |
CEC TX Ready | None | TX_EVENT_CEC_TX_READY |
CEC RX Ready | None | TX_EVENT_CEC_RX_READY |
CEC TX Retry timeout | None | TX_EVENT_CEC_ERR_TIMEOUT |
CEC TX Arbitration Lost | None | TX_EVENT_CEC_ERR_ARB_LOST |
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxIntPending <fs 85%>(void)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetEnabledEvents <fs 85%>(TX_EVENT Events, BOOL Enable)</fs>
Description
This
API enables or disables user notification on certain events as described in the Notification events section.
Parameters
Events - The events that needs to be enabled or disabled ORed together. For a list of valid events, please refer to the Notification events section. Only the events supplied in this parameter will be affected. All other events‟ state (Enabled/Disabled) will remain unchanged. The TX_EVENT enum also offers 3 additional values that are used as an event groups. This values are:
Enable
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetChipRevision <fs 85%>(UINT16 *TxRev)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxOverrideHpdPd <fs 85%>(BOOL Override)</fs>
Description
Maintain the current power state regardless of the state of the sink HPD signal. By default, HDMI TX chip will automatically power-down if the sink‟s HPD signal changes state from HIGH to LOW. This
API can be used to change this default behaviour so that the chip will remain powered-up regardless of the state of the sink HPD.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxEnableTmds <fs 85%>(BOOL Enable, BOOL SoftOn)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetInputPixelFormat <fs 85%>(UCHAR BitsPerColor, TX_IN_FORMAT Format, UCHAR Style, TX_CHAN_ALIGN Align, BOOL RisingEdge, BOOL BitSwap)</fs>
Description
Set HDMI TX input pixel data format. The HDMI TX can accept video data from 8 to 36 pins, with various configurations to accommodate 4:4:4 or 4:2:2 format, embedded or separate sync, single or double data rate, repeated pixels and different pin assignments to interface with video data sources. For most applications, the input pixel format needs to be set only once, unless the video source can change its output pixel format on the fly, in which case the HDMI TX input format must also be changed to match. For detailed information regarding HDMI TX input video pin assignments, please refer to the ADV7510 programming guide.
Parameters
BitsPerColor - Specify the number of bits per color component. This can be 8, 10 or 12.
Format - Video input format. This value indicates if the input video is SDR or
DDR, with embedded or separate sync and if the input pixel clock is twice the pixel rate. This can be one of the following:
Style - Three input styles are available: 1, 2 or 3.
Align - This value specifies the bit alignment of each channel in 4:2:2 modes. Three alignment types are available:
ALIGN_LEFT
ALIGN_RIGHT
ALIGN_EVEN
For more information about input pin assignment for each type, please refer to the ADV7510 programming guide.
RisingEdge - This value specifies the clocking edge for
DDR modes.
BitSwap
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetInputVideoClock <fs 85%>(UCHAR ClkDivide)</fs>
Description
Divide HDMI TX input video clock to generate the correct pixel clock. The input video clock to HDMI TX must be equal to the pixel clock. In cases where the input clock is NOT equal to the pixel clock, this function should be used to divide the input clock to generate the correct pixel clock. This function is designed to be used for compatibility with some older source devices.
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetOutputPixelFormat <fs 85%>(TX_OUT_ENCODING OutEnc, BOOL Interpolate)</fs>
Description
Sets HDMI TX output pixel format. This
API defines the up-conversion from 4:2:2 to 4:4:4 encoding or the down-conversion from 4:4:4 to 4:2:2 encoding along with the method to be used for up-conversion.
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetManualPixelRepeat <fs 85%>(UCHAR Vic, UCHAR Factor, UCHAR PrValue)</fs>
Description
Parameters
Vic - This value defines the Video Identification Code that should be sent in the AV info-frame. See ADIAPI_TxSendAVInfoframe for more details.
Factor - This value defines the required multiplication factor of the input pixel clock. Possible values are 1, 2, 3 and 4.
PrValue - This value defined the PR (Pixel Repeat) value that should be sent in the AV info-frame. See ADIAPI_TxSendAVInfoframe for more details.
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAutoPixelRepeat <fs 85%>(UCHAR Mode, UCHAR Vic, TX_REFR_RATE RefRate, UCHAR AspectRatio)</fs>
Description
Parameters
Mode
PR_NORMAL - Normal automatic pixel repetition. In this mode, HDMI TX will automatically calculate the required pixel repetition based on audio sampling rate and detected VIC. The resulting video identification code (VIC) and Pixel Repeat value (PR) will be automatically inserted in the AV info-frame. See ADIAPI_TxSendAVInfoframe for more details.
PR_MAX - Maximum automatic pixel repetition. This mode is similar to normal automatic mode, except the required pixel repetition will always be set to the highest possible value than HDMI TX is capable of. This makes video timing independent of audio timing.
Vic - This value defines the video identification code (VIC) of the input video format. If the VIC of the input video is not known, this value must be set to 0xff and the „RefreshRate‟ and „Aspect‟ parameters must be used.
RefRate This value defines the refresh rate for video modes with low refresh rate or with 2x or 4x the normal refresh rate, when the „Vic‟ parameter is undefined (set to 0xff) Possible values are:
REFRESH_NORMAL
REFRESH_LOW
REFRESH_2X
REFRESH_4X
AspectRatio This value defines the aspect ratio of the input video, when the „Vic‟ parameter is undefined (set to 0xff). Possible values are:
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetOutputColorDepth <fs 85%>(UCHAR Depth, TX_DC_METHOD DcMethod)</fs>
Description
Set output colour depth and the method used to handle deep colour down-conversion. When the input colour depth to the HDMI TX is less than the colour depth of the output, the remaining least-significant bits of the output will be filled with 0s. When the input colour depth is larger than the output, truncation or active dithering can be used to reduce the colour depth.
Parameters
Depth - Required colour depth of the output. This value can be 24, 30 or 36 and will correctly set the general control packet colour depth field. Any other value will be written un-modified to the General Control Packet CD (Colour Depth) field.
DcMethod - This value specifies the down-conversion method that will be used if the input colour depth is larger than the output colour depth. Possible values are:
TX_DC_TRUNCATE
TX_DC_ACTIVE_DITHER
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetCSC <fs 85%>(TX_CS_MODE InColorSpace, TX_CS_MODE OutColorSpace)</fs>
Description
Parameters
TX_CS_MODE | Meaning | Range |
HPD Low | None | TX_EVENT_HPD_CHG |
TX_CS_RGB | RGB | 0-255 |
TX_CS_YUV_601 | YCrCb 601 (SDTV) | 16-235 |
TX_CS_YUV_709 | YCrCb 709 (HDTV) | 16-235 |
TX_CS_YCC_601 | xvYCC 601 (Extended gamut SDTV) | 0-255 |
TX_CS_YCC_709 | xvYCC 709 (Extended gamut HDTV) | 0-255 |
TX_CS_AUTO | Disable CSC (out CS = In CS) | |
TX_CS_MODE | Meaning | Range |
HPD Low | None | TX_EVENT_HPD_CHG |
TX_CS_RGB | RGB | 0-255 |
TX_CS_YUV_601 | YCrCb 601 (SDTV) | 16-235 |
TX_CS_YUV_709 | YCrCb 709 (HDTV) | 16-235 |
TX_CS_YCC_601 | xvYCC 601 (Extended gamut SDTV) | 0-255 |
TX_CS_YCC_709 | xvYCC 709 (Extended gamut HDTV) | 0-255 |
TX_CS_AUTO | Disable CSC (out CS = In CS) | |
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudioInterface <fs 85%>(TX_AUD_FORMAT InputFormat, TX_AUD_PKT_TYPE OutType, UCHAR HbrStrmCount)</fs>
Description
Set the input audio interface and output audio packet type.
The TX device has 3 physical audio interfaces:
The I2S interface can accept data in the following formats:
Standard I2S
Right justified I2S
Left justified I2S
AES3 (IEC 60958-3)
Two different output packet formats can be selected when the input is I2S: Audio sample packet or HBR packet.
When the input interface is I2S, for all formats except AES3, the channel status data to be sent to the receiver (in the ASP/HBR packet) must be explicitly set in the TX registers, since I2S contains pure audio samples. For AES3 format, the TX device can extract the channel status from the data stream or can use user-defined values from registers.
The mapping between I2S input and the data sent in the audio sample packet is configurable (For example, I2S3 input left channel can be sent in the audio sample packet sub-frame 0 instead of the default sub-frame 6) See ADIAPI_TxSetAudChanMapping for details.
The SPDIF interface can accept 2 channel L-PCM audio or AES3 (IEC 60958-3) audio at sampling rates of up to 192 KHz. The sampling frequency extracted from the stream will be sent in the Audio Sample Packet channel status bits. The sampling frequency used for pixel repeat can be either the one extracted from the stream or a user-defined value.
As with I2S, the TX device can output either Audio Sample Packet or Hight Bit Rate packet when the input is SPDIF.
The DSD interface can be used to input DSD or DST audio. The output audio packets will be either one- bit audio for DSD or DST audio packet for DST.
Parameters
TX_AUD_FORMAT | Input Interface | Input Format | Valid Output Packet Type (TX_AUD_PKT_TYPE) |
TX_I2S_STD | I2S | Standard I2S | AUD_SAMP_PKT HBR_STRM_PKT |
TX_I2S_RJUST | I2S | Right justified I2S | AUD_SAMP_PKT HBR_STRM_PKT |
TX_I2S_LJUST | I2S | Left justified I2S | AUD_SAMP_PKT HBR_STRM_PKT |
TX_I2S_AES3 | I2S | AES3 direct | AUD_SAMP_PKT HBR_STRM_PKT |
TX_I2S_SPDIF | I2S | IEC61937 Bi-phase Mark | HBR_STRM_PKT |
TX_SPDIF | SPDIF | IEC61937 Bi-phase Mark | AUD_SAMP_PKT |
TX_DSD_NORM | DSD | DSD normal | ONE_BIT_ASP |
TX_DSD_SDIF3 | DSD | SDIF-3 | ONE_BIT_ASP |
TX_DSD_DST | DSD | DST normal | DST_AUD_PKT |
TX_DSD_DST_SDR | DSD | DST 2X | DST_AUD_PKT |
TX_DSD_DST_DDR | DSD | DSD 1X (DDR) | DST_AUD_PKT |
Output Packet Type (TX_AUD_PKT_TYPE) | Definition | Valid Input Formats |
AUD_SAMP_PKT | Audio Sample Packet | I2S_STD, I2S_RJUST, I2S_LJUST, I2S_AES3 |
HBR_STRM_PKT | High Bit Rate Audio Stream Packet | I2S_STD, I2S_RJUST, I2S_LJUST, I2S_AES3, I2S_SPDIF |
ONE_BIT_ASP | One Bit Audio Sample Packet | DSD_NORM, DSD_SDIF3 |
DST_AUD_PKT | DST Audio Packet | DSD_DST, DSD_DST_SDR, DSD_DST_DDR |
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudChanMapping <fs 85%>(TX_AUD_CHAN InChan, TX_AUD_CHAN OutSample)</fs>
Description
Set the mapping between I2S input channels and the output audio samples. The default setting is one- to-one according to the following table. The default setting can be changed using this
API.
Input Channel | Output Sample |
I2S0 Left Channel | Audio Sample 0 Left Channel |
I2S0 Right Channel | Audio Sample 0 Right Channel |
I2S1 Left Channel | Audio Sample 1 Left Channel |
I2S1 Right Channel | Audio Sample 1 Right Channel |
I2S2 Left Channel | Audio Sample 2 Left Channel |
I2S2 Right Channel | Audio Sample 2 Right Channel |
I2S3 Left Channel | Audio Sample 3 Left Channel |
I2S3 Right Channel | Audio Sample 3 Right Channel |
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudNValue <fs 85%>(UINT32 NValue)</fs>
Description
Parameters
NValue - Specify the 20-bit „N‟ value that HDMI TX will use to calculate the audio sampling frequency. If this value is set to 0, the N value will be calculated using the sampling frequency obtained from the current audio info-frame/audio channel status. If new audio info-frame or channel status is received, this function must be called to update the N value.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudCTS <fs 85%>(UINT32 CTS)</fs>
Description
Parameters
CTS - Specify the 20-bit „CTS‟ value that HDMI TX will use to calculate the audio sampling frequency. If this value is set to 0, the CTS value will be automatically calculated by the chip using the
SCLK.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudMCLK <fs 85%>(TX_MCLK_FREQ MClk)</fs>
Description
Set HDMI TX input audio master clock (MCLK) frequency. The MCLK can be externally supplied or internally generated using
SCLK.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudClkPolarity <fs 85%>(BOOL RisingEdge)</fs>
Description
Set the input clock polarity for MCLK,
SCLK and DSD clock.
Parameters
RisingEdge - Clock polarity for MCLK, (if externally supplied)
SCLK and DSD clock.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudChStatSampFreq <fs 85%>(TX_AUD_FS SampFreq)</fs>
Description
Set the sampling frequency to be sent in the Audio Sample Packet‟s channel status bits. The source of the sampling frequency (Extracted from input stream or defined by user) can be set independently from the rest of the channel status fields defined in the ADIAPI_Tx SetAudChanStatus
API.
The TX device can use the sampling frequency extracted from the input stream or the sampling frequency defined by user (in the channel status bits) for automatic pixel repeat calculation. See ADIAPI_TxSetAutoPixelRepeat for more details.
The source of channel status bits and/or sampling frequency sent in the sample packet can be user- defined, extracted from input stream, or both, depending on the input audio format as described in the following table:
Input Audio | Channel Status Source | Sampling Frequency Source | Sampling Frequency Source for Pixel Repeat |
I2S | User defined | User defined | User defined |
I2S – AES3 | User defined / From stream | User defined / From stream | User defined / From Stream |
SPDIF | From stream | From Stream | User defined / From Stream |
This
API only defines the source and value of the channel status sampling frequency. Incorrect settings of the sampling frequency source will be ignored by the TX device (
e.g., if input audio is I2S and the user selects the sampling frequency source to be from stream, the TX device will ignore the setting and use the latest programmed sampling frequency. The default sampling frequency is 44.1 KHz).
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAudChanStatus <fs 85%>(BOOL FromStream, TX_CHAN_STATUS *ChanStat)</fs>
Description
Set HDMI TX audio channel status parameters. This function should be called when new audio channel status is received. This function will automatically set the size of the right-justified I2S word size, either from audio info-frame (if the audio info-frame sample size is not 0) or from the CsWordLen field of the supplied channel status.
Depending on the input audio format, this
API also defines the source of the channel status bits that will be sent in the audio sample packet (either user-defined or extracted from the input stream) as defined in the table below. The sampling frequency field of the channel status can also be independently set by the ADIAPI_TxSetAudChStatSampFreq
API.
Input Audio | Channel Status Source | Sampling Frequency |
I2S | User defined | Refer to ADIAPI_TxSetAudChStatSampFreq |
I2S – AES3 | User defined / From stream | Refer to ADIAPI_TxSetAudChStatSampFreq |
SPDIF | From stream | Refer to ADIAPI_TxSetAudChStatSampFreq |
Parameters
FromStream - This parameter indicate if the channel status data (sent in the audio sample packet) is to be extracted from the incoming audio stream or taken from the user defined values (pointed to by the ChanStat parameter) This option is only valid for audio modes where channel status data is present in the incoming audio stream. For all other modes, the channel status data will be taken from the user-defined values. The sampling frequency field of the channel status can also be set independently using the ADIAPI_TxSetAudChStatSampFreq
API.
ChanStat - Pointer to CHAN_STATUS structure containing the required audio channel status to be used. This parameter will be ignored if the FormStream parameter is set to TRUE. If FromStream is set to FALSE, the sampling frequency defined in the CsSampFreq field will overwrite any sampling frequency set by the ADIAPI_TxSetAudChStatSampFreq
API and will also set the source of the sampling frequency to match the channel status source settings. If this is not wanted, the sampling frequency setting can be ignored by setting the CsSampFreq field to 0xFF.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxAudInputEnable <fs 85%>(TX_AUD_INTERFACE Interface, BOOL Enable)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetI2sInput <fs 85%>(UCHAR ChanCount, UCHAR ChanAlloc, TX_AUD_PKT_TYPE AudType)</fs>
Description
Parameters
ChanCount - Number of audio channels (0-7).
ChanAlloc - Channel allocation field from Audio InfoFrame.
AudType - Input audio packet type as defined in the table below.
Audio Packet Type Packet Type (TX_AUD_PKT_TYPE) | Definition |
AUD_SAMP_PKT | Audio Sample Packet |
HBR_STRM_PKT | High Bit Rate Audio Stream Packet |
ONE_BIT_ASP | One Bit Audio Sample Packet |
DST_AUD_PKT | DST Audio Packet |
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetOutputMode <fs 85%>(TX_OUTPUT_MODE OutMode)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxHdcpEnable <fs 85%>(BOOL EncEnable, BOOL FrameEncEnable)</fs>
Description
Parameters
EncEnable
TRUE - to enable HDCP.
FALSE - to disable HDCP.
FrameEncEnable
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetBksvList <fs 85%>(UCHAR *BksvList, UCHAR *NumOfBksvs)</fs>
Description
Parameters
BksvList - Pointer to a buffer to receive the downstream BKSV list as read by the HDMI TX. This list is available only after HDMI TX read all downstream BKSVs. This list will not be available if HDCP is disabled or if any HDCP errors are detected. The size of the buffer must be large enough to accommodate the number of BKSVs specified in the TX_SUPPORTED_DS_DEVICE_COUNT configuration parameter (
i.e., Minimum buffer size will be TX_SUPPORTED_DS_DEVICE_COUNT * 5). This parameter can be set to NULL to only return the number of available BKSVs in the NumOfBksvs parameter.
NumOfBksvs - This is a pointer to receive the number of BKSVs reported by the downstream device. This number will also include the downstream repeater BKSV if the downstream device is a repeater. This value normally specify the number of BKSVs returned in the BksvList buffer, unless the BKSV count reported by the downstream device exceeds TX_SUPPORTED_DS_DEVICE_COUNT, in which case the BksvList buffer will hold the first TX_SUPPORTED_DS_DEVICE_COUNT BKSVs.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetBstatus <fs 85%>(UINT16 *Bstatus, UCHAR *Bcaps)</fs>
Description
Read downstream device Bstatus and Bcaps registers. Bstatus and Bcaps are available only if the state of the HDCP engine is HDCP_BSTATUS_READY, HDCP_BKSV_LIST_READY or HDCP_AUTHENTICATED. The HDCP state can be obtained by calling the ADIAPI_TxGetHdcpState
API.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetHdcpState <fs 85%>(TX_HDCP_STATE *HdcpState)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetLastHdcpError <fs 85%>(TX_HDCP_ERR *Error)</fs>
Description
Return the last error status of HDCP engine. This
API returns the last encountered HDCP error(s) since the previous read using this
API. All returned error bits will be cleared following a call to this
API.
Parameters
Error - This is a pointer to receive HDCP errors that occurred since the last call to this
API. Returned errors are OR-ed together. Possible error bits are:
TX_HDCP_ERR_BAD_RECV_BKSV
TX_HDCP_ERR_RI_MISMATCH
TX_HDCP_ERR_PJ_MISMATCH
-
TX_HDCP_ERR_REP_DONE_TIMEOUT
TX_HDCP_ERR_MAX_CASCADE_EXCEEDED
TX_HDCP_ERR_V_DASH_CHECK_FAILED
TX_HDCP_ERR_MAX_DEVICE_EXCEEDED
All error bits will be cleared upon calling this function. HDMI TX automatically re-starts the authentication process on any HDCP error.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetEdidSegment <fs 85%>(UCHAR SegNum, UCHAR *SegBuf)</fs>
Description
Parameters
SegNum - EDID segment number to read (Starting from 0).
SegBuf - This is a pointer to a 256-byte buffer to receive the requested EDID segment. This buffer will contain valid data only if the return value is ATVERR_OK.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetHpdMsenState <fs 85%>(BOOL *Hpd, BOOL *Msen)</fs>
Description
Parameters
Hpd - This is a pointer to receive the sink device Hot Plug Detect state. This parameter can be set to NULL if the HPD state is not required. If not NULL, on return, it will be set to TRUE if HPD is high and FALSE if HPD is low.
Msen - This is a pointer to receive the sink device monitor sense state. This parameter can be set to NULL if the monitor sense state is not required. If not NULL, on return, it will be TRUE if monitor sense is high and FALSE if monitor sense is low.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetEdidControllerState <fs 85%>(TX_EDID_CTRL_STATE *State)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxOutputModeHdmi <fs 85%>(BOOL *IsHdmi)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxHdcpEnabled <fs 85%>(BOOL *HdcpOn)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxOutputEncrypted <fs 85%>(BOOL *Encrypted)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxPllLocked <fs 85%>(BOOL *Locked)</fs>
Description
Check if the
PLL is locked.
Parameters
Locked - This is a pointer to
PLL lock state.
TRUE - if the
PLL is locked.
FALSE - if the
PLL is not locked.
Return value
ATVERR_TRUE -
PLL is locked.
ATVERR_FALSE -
PLL is not locked.
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetStatus <fs 85%>(TX_STATUS *TxStat)</fs>
Description
This
API provides the status of HDMI TX module. It can be used by the application to get some information regarding HDMI TX current state.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxMuteAudio <fs 85%>(BOOL Mute)</fs>
Description
This
API can be used to Mute or un-mute HDMI TX audio output. The audio will be muted by disabling audio sample packets output from HDMI TX.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxMuteVideo <fs 85%>(BOOL Mute)</fs>
Description
This
API can be used to Mute or un-mute HDMI TX video output. The video will be muted by sending black level on all TMDS lines.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetAvmute <fs 85%>(TX_AVMUTE State)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetAvmute <fs 85%>(TX_AVMUTE *State)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxEnablePackets <fs 85%>(UINT16 Packets, BOOL Enable)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxGetEnabledPackets <fs 85%>(UINT16 *Packets)</fs>
Description
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendAVInfoFrame <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Packet - Pointer to the AV info frame HB0 (Header Byte 0) This AV info-frame will be sent as-is to the sink device, except the VIC and PR (pixel repeat) fields. The VIC and PR fields sent to the sink will depend on the pixel repeat mode setting using the APIs ADIAPI_TxSetManualPixelRepeat and ADIAPI_TxSetAutoPixelRepeat.
Size - Byte size of the AV info frame (Must be 16).
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendAudioInfoFrame <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Send Audio info-frame to the sink device. The Audio info-frame packet repeat must be enabled using ADIAPI_TxEnablePackets to be able to send this packet.
This function will automatically set the size of the right-justified I2S word size if the supplied audio info- frame sample size is not 0.
For HBR audio, the CA and CC fields of the audio info-frame must be set to 0x1F and 0x07 respectively, unless the ADIAPI_TxSetAudioInterface
API is called afterward to adjust those two fields.
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendACPPacket <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendSPDPacket <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendISRC1Packet <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendISRC2Packet <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendGMDPacket <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendMpegPacket <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendSpare1Packet <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxSendSpare2Packet <fs 85%>(UCHAR *Packet, UCHAR Size)</fs>
Description
Parameters
Return value
ATVERR_OK
ATVERR_INV_PARM
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecEnable <fs 85%>(BOOL Enable)</fs>
Description
This
API enables or disables the
CEC controller engine. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
Enable
TRUE - to enable the
CEC controller.
FALSE - to disable the
CEC controller.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecReset <fs 85%>(void)</fs>
Description
This
API resets the
CEC controller engine. It is called as part of the ADIAPI_TxCecEnable
API. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecSendMessage <fs 85%>(UCHAR *MsgPtr, UCHAR MsgLen)</fs>
Description
Send a
CEC message. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
MsgPtr - Pointer to the
CEC message to be sent.
MsgLen -
CEC message length.
Return value
Message is queued to be sent. The application must poll ADIAPI_TxCecGetStatus API to determine when send is completed before calling any further APIs.
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecSendMessageOut <fs 85%>(void)</fs>
Description
Send out
CEC message in buffer.
Parameters
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecResendLastMessage <fs 85%>(void)</fs>
Description
This
API sends the last
CEC massage again. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
Return value
ATVERR_OK - Message is queued to be sent. The application must poll ADIAPI_TxCecGetStatus
API to determine when send is completed before calling any further APIs.
ATVERR_FAILED - If
CEC controller is busy. The message will not be sent.
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecReadMessage <fs 85%>(UCHAR *MsgPtr, UCHAR *MsgLen)</fs>
Description
Read a
CEC message if available. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
MsgPtr - Pointer to a buffer to receive
CEC message (maximum 16 bytes).
MsgLen - Pointer to receive
CEC message length.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecSetLogicalAddr <fs 85%>(UCHAR LogAddr, UCHAR DevId, BOOL Enable)</fs>
Description
This
API sets the device logical address. Up to 3 different logical addresses can be set for the device. To inquire about logical addresses available for use (not allocated) the application can use the ADIAPI_TxCecAllocateLogAddr
API. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
LogAddr - Logical address to be set for the device.
DevID - The device to set the logical address to. Up to 3 different devices can be used. This value can be 0, 1 or 2.
Enable - Enable or disable the logical address.
Return value
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecAllocateLogAddr <fs 85%>(UCHAR *LogAddrList)</fs>
Description
This
API checks the availability of logical addresses. This
API is available only if
CEC support is included by setting the Configuration switch „TX_INCLUDE_CEC‟.
Parameters
Return value
ATVERR_OK - Operation is queued to be processed. The application must poll ADIAPI_TxCecGetStatus
API to determine the logical address that can be used.
ATVERR_FAILED - If
CEC controller is busy. The operation will not be completed.
<fs 85%>ATV_ERR</fs> ADIAPI_TxCecGetStatus <fs 85%>(UCHAR *Status)</fs>
Description
This
API returns the status of the last performed
CEC operation. Some
CEC APIs return immediately and the application is required to poll
CEC state to determine if the operation was successful.
Parameters
Status - Pointer to receive status on
CEC engine last operation. The value returned in the Status parameter depends on the return value of this
API.
If the return value is ATVERR_FAILED, the Status parameter will be set to the error code indicating the cause of failure.
If the return value is ATVERR_OK, the Status parameter will be set according to the last requested operation as follows:
API | Status value on success |
ADIAPI_TxCecEnable | 0 |
ADIAPI_TxCecReset | 0 |
ADIAPI_TxCecSendMessage | 0 |
ADIAPI_TxCecResendLastMessage | 0 |
ADIAPI_TxCecAllocateLogAddr | First available (not allocated) logical address in the logical address list supplied to the API. If no logical address is available, this value will be 0xFF. |
Return value
ATVERR_OK - Last
CEC operation was completed OK. Result is returned in the “Status” parameter.
ATVERR_NOT_AVAILABLE - Last
CEC operation is still in progress.
ATVERR_FAILED - Last
CEC operation failed. Error code is returned in the “Status” parameter as:
<fs 85%>ATV_ERR</fs> ADIAPI_TxArcSetMode <fs 85%>(TX_ARC_MODE Mode)</fs>
Description
Enable/Disable Audio Return Channel (ARC) operation. This
API is valid only on TX or transceiver-type devices that support ARC feature.
Parameters
Return value
ATVERR_OK
ATVERR_NOT_AVAILABLE
<fs 85%>ATV_ERR</fs> ADIAPI_TxSetVideoClkDelay <fs 85%>(TX_VIDEO_CLK_DELAY Delay)</fs>
Description
Parameters
Return value