Overview
RDK Device Settings library is a cross-platform library for controlling the following hardware configurations:
- Audio Output Ports (Volume, Mute, etc.)
- Video Ouptut Ports (Resolutions, Aspect Ratio, etc.)
- Front Panel Indicators
- Zoom Settings
- Display (Aspect Ratio, EDID data etc.)
- General Host configuration (Power managements, event management etc.)
The library is split into three major components
- Application Level APIs. (Comcast component)
- SoC level APIs. (SoC component)
- IARM support. (Comcast Component)
Application Level API
This is the API that application should use to control hardware configurations in a platform independent way. It also hides single-app and multi-app difference of the implementation from the applications. This allows the application to switch among different SoC versions or between single or multi app mode freely.
Example: API to get the current video resolution :
const VideoResolution & VideoOutputPort::getResolution() const
SoC Level API
SoC Level APIs that that need to implement by SoC vendors. It provides primitive and hardware specific implementation for each controllable aspect of their device. This level API is considered single-app mode only, even though its SoC implementation may potentially support multiple-app mode.
Example: API to get the current video resolution :
dsError_t dsGetResolution ( int handle, dsVideoPortResolution_t *resolution )
IARM Support
If multiple applications need to control the device settings simultaneously, this component turns the single-app mode SoC level API into multi-app mode. Even though some SoC vendors implement the SoC level API to be multi-app capable, we still use Comcast’s IARM support to achieve multiple-app mode. This allows the Application level API to remain truly platform neutral.
Architectural Overview
The Device Settings (DS) registers its services with the service manager. The Application uses/calls the DS Public API through service manager and DS Public API’s intern calls the under lying SoC level API’s to perform the required functionality.
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6IlVua25vd24gVXNlciAoeW1haGFyYW5hKSIsIm91dHB1dFR5cGUiOiJibG9jayIsImxhc3RNb2RpZmllck5hbWUiOiJVbmtub3duIFVzZXIgKHltYWhhcmFuYSkiLCJsYW5ndWFnZSI6ImVuIiwidWlDb25maWciOiJ7fSIsImRpYWdyYW1EaXNwbGF5TmFtZSI6IiIsInNGaWxlSWQiOiIiLCJhdHRJZCI6IjE0NDkwMTQ5NiIsImRpYWdyYW1OYW1lIjoiQmxvY2sgZGlhZ3JhbS5kcmF3aW8iLCJhc3BlY3QiOiIiLCJsaW5rcyI6ImF1dG8iLCJjZW9OYW1lIjoiRGV2aWNlIFNldHRpbmdzIiwidGJzdHlsZSI6InRvcCIsImNhbkNvbW1lbnQiOmZhbHNlLCJkaWFncmFtVXJsIjoiIiwiY3N2RmlsZVVybCI6IiIsImJvcmRlciI6dHJ1ZSwibWF4U2NhbGUiOiIxIiwib3duaW5nUGFnZUlkIjoyODA4MjQ1MSwiZWRpdGFibGUiOmZhbHNlLCJjZW9JZCI6MjgwODI0NTEsInBhZ2VJZCI6IiIsImxib3giOnRydWUsInNlcnZlckNvbmZpZyI6eyJlbWFpbHByZXZpZXciOiIxIn0sIm9kcml2ZUlkIjoiIiwicmV2aXNpb24iOjEsIm1hY3JvSWQiOiJhODVmZWE0NC1hODljLTQ3ZmEtYWM4NS04OWIxNWZiMTFhYjIiLCJwcmV2aWV3TmFtZSI6IkJsb2NrIGRpYWdyYW0uZHJhd2lvLnBuZyIsImxpY2Vuc2VTdGF0dXMiOiJPSyIsInNlcnZpY2UiOiIiLCJpc1RlbXBsYXRlIjoiIiwid2lkdGgiOiJudWxsIiwic2ltcGxlVmlld2VyIjpmYWxzZSwibGFzdE1vZGlmaWVkIjoxNjE0Njk0NTUxMDAwLCJleGNlZWRQYWdlV2lkdGgiOmZhbHNlLCJvQ2xpZW50SWQiOiIifQ==
Multi-App mode Support using IARM
Multi-app mode is used when multiple applications need to control the device settings simultaneously. Some SoC vendors implement the SoC level API to be multi-app capable, we still use Comcast’s IARM support to achieve multiple-app mode. This allows the Application level API to remain truly platform neutral.
eyJleHRTcnZJbnRlZ1R5cGUiOiIiLCJnQ2xpZW50SWQiOiIiLCJjcmVhdG9yTmFtZSI6IlVua25vd24gVXNlciAoeW1haGFyYW5hKSIsIm91dHB1dFR5cGUiOiJibG9jayIsImxhc3RNb2RpZmllck5hbWUiOiJVbmtub3duIFVzZXIgKHltYWhhcmFuYSkiLCJsYW5ndWFnZSI6ImVuIiwidWlDb25maWciOiJ7fSIsImRpYWdyYW1E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ibG9jayIsImxhc3RNb2RpZmllck5hbWUiOiJVbmtub3duIFVzZXIgKHltYWhhcmFuYSkiLCJsYW5ndWFnZSI6ImVuIiwidWlDb25maWciOiJ7fSIsImRpYWdyYW1EaXNwbGF5TmFtZSI6IiIsInNGaWxlSWQiOiIiLCJhdHRJZCI6IjE0NDkwMTQ5NCIsImRpYWdyYW1OYW1lIjoiUkRLLURldmljZVNldHRpbmdzLU92ZXJ2aWV3LmRyYXdpbyIsImFzcGVjdCI6IiIsImxpbmtzIjoiYXV0byIsImNlb05hbWUiOiJEZXZpY2UgU2V0dGluZ3MiLCJ0YnN0eWxlIjoidG9wIiwiY2FuQ29tbWVudCI6ZmFsc2UsImRpYWdyYW1VcmwiOiIiLCJjc3ZGaWxlVXJsIjoiIiwiYm9yZGVyIjp0cnVlLCJtYXhTY2FsZSI6IjEiLCJvd25pbmdQYWdlSWQiOjI4MDgyNDUxLCJlZGl0YWJsZSI6ZmFsc2UsImNlb0lkIjoyODA4MjQ1MSwicGFnZUlkIjoiIiwibGJveCI6dHJ1ZSwic2VydmVyQ29uZmlnIjp7ImVtYWlscHJldmlldyI6IjEifSwib2RyaXZlSWQiOiIiLCJyZXZpc2lvbiI6MSwibWFjcm9JZCI6ImEyNjQwNDI1LWIwZWEtNGRlNy05NGM4LTI0MjdiZTM1NDQxMiIsInByZXZpZXdOYW1lIjoiUkRLLURldmljZVNldHRpbmdzLU92ZXJ2aWV3LmRyYXdpby5wbmciLCJsaWNlbnNlU3RhdHVzIjoiT0siLCJzZXJ2aWNlIjoiIiwiaXNUZW1wbGF0ZSI6IiIsIndpZHRoIjoibnVsbCIsInNpbXBsZVZpZXdlciI6ZmFsc2UsImxhc3RNb2RpZmllZCI6MTYxNDY5NDU1MTAwMCwiZXhjZWVkUGFnZVdpZHRoIjpmYWxzZSwib0NsaWVudElkIjoiIn0=
Device Settings Programming Guide
First we need to initialize the IARMbus and device manager, perform the required task making use of the API’s and and finally need to de-initialize the device manager and disconnect the IARMbus.
Simple use case to set the resolution
API Documentation
To know more about SoC/Application level APIs details use in RDK, refer the link Device Settings API Documentation