RDK Documentation (Open Sourced RDK Components)

Description

A set of events sourced from display device (e.g. TV) Described herein are DeviceSettings HAL types and functions that are part of the Display subsystem. The Display subsystem manages operations relating to connected Vendors please add appropriate events needed for your implementation. display devices, e.g. TVs.

Typedefs

typedef void(* dsDisplayEventCallback_t) (intptr_t handle, dsDisplayEvent_t event, void *eventData)
 Callback function used to notify applications of display events. More...
 

Functions

dsError_t dsDisplayInit ()
 Initialize the Display sub-system. More...
 
dsError_t dsGetDisplay (dsVideoPortType_t vType, int index, intptr_t *handle)
 Get the handle of a display device. More...
 
dsError_t dsGetEDID (intptr_t handle, dsDisplayEDID_t *edid)
 Get the EDID information from the specified display device. More...
 
dsError_t dsGetEDIDBytes (intptr_t handle, unsigned char **edid, int *length)
 This function is used to get the EDID buffer and length of the connected display. More...
 
dsError_t dsGetDisplayAspectRatio (intptr_t handle, dsVideoAspectRatio_t *aspectRatio)
 This function gets the aspect ratio for the dsiaply device. This function returns the aspect ratio of the display corresponding to the specified display device handle. More...
 
dsError_t dsDisplayTerm ()
 This function deinitialize the display sub-system. This function deallocates the data structures used within the display module and releases any display specific handles. More...
 
dsError_t dsRegisterDisplayEventCallback (intptr_t handle, dsDisplayEventCallback_t cb)
 Register a callback function to listen for display events. More...
 

Typedef Documentation

◆ dsDisplayEventCallback_t

typedef void(* dsDisplayEventCallback_t) (intptr_t handle, dsDisplayEvent_t event, void *eventData)

Callback function used to notify applications of display events.

HAL Implementation should call this method to delivery display events to the application (e.g. connected, disconnected).

Parameters
handleHandle of the display device.
eventDisplay event.
eventDataData associated with the event. This is currently a place holder.
Note
HAL implementation is responsible for allocation of memory needed for event data. The memory can be free'd after callback returns.
Returns
None.

Definition at line 88 of file dsDisplay.h.

Function Documentation

◆ dsDisplayInit()

dsError_t dsDisplayInit ( )

Initialize the Display sub-system.

This function must initialize all underlying Display sub-system modules and associated data structures.

Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsDisplayInit api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 47 of file dsDisplay.c.

◆ dsGetDisplay()

dsError_t dsGetDisplay ( dsVideoPortType_t  vType,
int  index,
intptr_t *  handle 
)

Get the handle of a display device.

This function will get the handle for the display device connected to the specified video port.

Parameters
[in]vTypeType of video port (e.g. HDMI, COMPONENT, etc.).
[in]indexThe index of the video port (0, 1, ...).
[out]*handleThe address of a location to hold the handle for the specified display device on return.
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetDisplay api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 65 of file dsDisplay.c.

◆ dsGetEDID()

dsError_t dsGetEDID ( intptr_t  handle,
dsDisplayEDID_t edid 
)

Get the EDID information from the specified display device.

This function gets the EDID information from the HDMI/DVI display corresponding to the specified display device handle.

Parameters
[in]handleHandle of the display device.
[out]*edidThe address of a location to hold the EDID for the specified display device on return.
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetEDID api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 119 of file dsDisplay.c.

◆ dsGetEDIDBytes()

dsError_t dsGetEDIDBytes ( intptr_t  handle,
unsigned char **  edid,
int *  length 
)

This function is used to get the EDID buffer and length of the connected display.

Parameters
[in]handleHandle for the video display. This must be HDMI output handle.
[out]edidThe EDID raw buffer of the display. The HAL implementation should malloc() the buffer and return it to the application. The application is required to free() the buffer after using it; If HDMI is not connected no data should be returned, and the API returns dsERR_INVALID_STATE.
[out]lengthThe length of EDID buffer data
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetEDIDBytes api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 149 of file dsDisplay.c.

◆ dsGetDisplayAspectRatio()

dsError_t dsGetDisplayAspectRatio ( intptr_t  handle,
dsVideoAspectRatio_t aspectRatio 
)

This function gets the aspect ratio for the dsiaply device. This function returns the aspect ratio of the display corresponding to the specified display device handle.

Parameters
[in]handleHandle of the display device.
[out]aspectRatioThe address of a location to hold the current aspect ratio for the specified display device on return.
Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsGetDisplayAspectRatio api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 93 of file dsDisplay.c.

◆ dsDisplayTerm()

dsError_t dsDisplayTerm ( )

This function deinitialize the display sub-system. This function deallocates the data structures used within the display module and releases any display specific handles.

Returns
Device Settings error code
Return values
dsERR_NONEIf sucessfully dsDisplayTerm api has been called using IARM support.
dsERR_GENERALGeneral failure.

Definition at line 194 of file dsDisplay.c.

◆ dsRegisterDisplayEventCallback()

dsError_t dsRegisterDisplayEventCallback ( intptr_t  handle,
dsDisplayEventCallback_t  cb 
)

Register a callback function to listen for display events.

This function registers a callback function for display events corresponding to the specified display device handle.

Note
Application should install at most one callback function per handle. Multiple listeners are supported at application layer and thus not required in HAL implementation.
Parameters
handleHandle of the display device.
cbThe callback function.
Returns
Error code.
Return values
dsError_t