RDK Documentation (Open Sourced RDK Components)
dsMgr.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 
22 /**
23 * @defgroup devicesettings
24 * @{
25 * @defgroup rpc
26 * @{
27 **/
28 
29 
30 #ifndef RPDSMGR_H_
31 #define RPDSMGR_H_
32 #include "libIARM.h"
33 #include "dsTypes.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #define IARM_BUS_DSMGR_NAME "DSMgr"
40 
41 IARM_Result_t dsMgr_init();
42 IARM_Result_t dsMgr_term();
43 
44 
45 /*! Events published from DS Mananger */
46 typedef enum _DSMgr_EventId_t {
47  IARM_BUS_DSMGR_EVENT_RES_PRECHANGE=0, /*!< Resolution Pre Change Event */
48  IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE, /*!< Resolution Post Change Event */
49  IARM_BUS_DSMGR_EVENT_ZOOM_SETTINGS, /*!< Zoom Settings Events */
50  IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG, /*!< HDMI HPD DETECT Change Event */
51  IARM_BUS_DSMGR_EVENT_AUDIO_MODE, /*!< HDMI HPD DETECT Change Event */
52  IARM_BUS_DSMGR_EVENT_HDCP_STATUS, /*!< HDMI HDCP status */
53  IARM_BUS_DSMGR_EVENT_RX_SENSE, /*!< HDMI Rx Sense status */
54  IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG, /*!< HDMI IN HPD change event */
55  IARM_BUS_DSMGR_EVENT_HDMI_IN_SIGNAL_STATUS, /*!< HDMI IN signal status change event */
56  IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS, /*!< HDMI IN status change event */
57  IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE, /*!< HDMI IN video mode update event */
58  IARM_BUS_DSMGR_EVENT_HDMI_IN_ALLM_STATUS, /*!< HDMI IN ALLM mode update event */
59  IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_HOTPLUG, /*!< COMPOSITE IN HPD change event */
60  IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_SIGNAL_STATUS, /*!< COMPOSITE IN signal status change event */
61  IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS, /*!< COMPOSITE IN status change event */
62  IARM_BUS_DSMGR_EVENT_TIME_FORMAT_CHANGE, /*!< Clock Time Format Change Event*/
63  IARM_BUS_DSMGR_EVENT_AUDIO_LEVEL_CHANGED, /*!< Audio Level Change Event*/
64  IARM_BUS_DSMGR_EVENT_AUDIO_OUT_HOTPLUG, /*!< AUDIO OUT HPD change event */
65  IARM_BUS_DSMGR_EVENT_AUDIO_FORMAT_UPDATE, /*!< Audio Format change event */
66  IARM_BUS_DSMGR_EVENT_AUDIO_PRIMARY_LANGUAGE_CHANGED, /*!< Audio Primary Language change event */
67  IARM_BUS_DSMGR_EVENT_AUDIO_SECONDARY_LANGUAGE_CHANGED, /*!< Audio Secondary Language change event */
68  IARM_BUS_DSMGR_EVENT_AUDIO_FADER_CONTROL_CHANGED, /*!< Audio Fader Control change event */
69  IARM_BUS_DSMGR_EVENT_AUDIO_ASSOCIATED_AUDIO_MIXING_CHANGED, /*!< Audio Associated Audio Mixing change event */
70  IARM_BUS_DSMGR_EVENT_VIDEO_FORMAT_UPDATE, /*!< Video Format change event */
71  IARM_BUS_DSMGR_EVENT_DISPLAY_FRAMRATE_PRECHANGE, /*!< Frame rate pre change */
72  IARM_BUS_DSMGR_EVENT_DISPLAY_FRAMRATE_POSTCHANGE, /*!< Frame rate post change */
73  IARM_BUS_DSMGR_EVENT_AUDIO_PORT_STATE, /*!< Audio Port Init State */
74  IARM_BUS_DSMGR_EVENT_SLEEP_MODE_CHANGED, /*!< Sleep Mode Change Event*/
75  IARM_BUS_DSMGR_EVENT_MAX, /*!< Max Event */
77 
78 
79 
80 /*! DS Manager Event Data */
81 typedef struct _DSMgr_EventData_t {
82  union {
83  struct _RESOLUTION_DATA{
84  /* Declare Event Data structure for Video resolution Event */
85  int width; /*!< Resolution Width */
86  int height; /*!< Key code */
87  } resn; /*Reolution data*/
88  struct _DFC_DATA{
89  /* Declare Event Data structure for Zoom settings Event */
90  int zoomsettings;
91  }dfc; /*zoom data*/
92 
93  struct _AUDIOMODE_DATA {
94  /* Declare Event Data structure for Video resolution Event */
95  int type; /*!< device type */
96  int mode; /*!< device mode */
97  }Audioport; /*Audio mode data*/
98 
99  struct _HDMI_HPD_DATA{
100  /* Declare HDMI HPD Data */
101  int event;
102  }hdmi_hpd; /*HDMI Hot Plug detect*/
103 
104  struct _HDMI_HDCP_DATA{
105  /* Declare HDMI DCP Data */
106  int hdcpStatus;
107  }hdmi_hdcp; /*HDMI HDCP Hot Plug detect*/
108 
109  struct _HDMI_RXSENSE_DATA{
110  /* Declare HDMI Rx Sense status */
111  int status;
112  }hdmi_rxsense; /*HDMI Rx Sense Data*/
113 
114  struct _HDMI_IN_CONNECT_DATA
115  {
116  dsHdmiInPort_t port;
117  bool isPortConnected;
118  }hdmi_in_connect;
119 
120  struct _HDMI_IN_STATUS_DATA{
121  /* Declare HDMI Input status*/
122  dsHdmiInPort_t port;
123  bool isPresented;
124  }hdmi_in_status; /*HDMI in status change detect*/
125 
126  struct _HDMI_IN_SIG_STATUS_DATA{
127  /* Declare HDMI In signal status*/
128  dsHdmiInPort_t port;
129  dsHdmiInSignalStatus_t status;
130  }hdmi_in_sig_status; /*HDMI in signal change detect*/
131 
132  struct _HDMI_IN_VIDEO_MODE_DATA{
133  /* Declare HDMI In signal status*/
134  dsHdmiInPort_t port;
135  dsVideoPortResolution_t resolution;
136  }hdmi_in_video_mode; /*HDMI in video mode update*/
137 
138  struct _COMPOSITE_IN_CONNECT_DATA
139  {
140  dsCompositeInPort_t port;
141  bool isPortConnected;
142  }composite_in_connect;
143 
144  struct _COMPOSITE_IN_STATUS_DATA{
145  /* Declare Composite Input status*/
146  dsCompositeInPort_t port;
147  bool isPresented;
148  }composite_in_status; /*Composite in status change detect*/
149 
150  struct _COMPOSITE_IN_SIG_STATUS_DATA{
151  /* Declare Composite In signal status*/
152  dsCompositeInPort_t port;
153  dsCompInSignalStatus_t status;
154  }composite_in_sig_status; /*Composite in signal change detect*/
155 
156  struct _FPD_TIME_FORMAT
157  {
158  dsFPDTimeFormat_t eTimeFormat;
159  }FPDTimeFormat;
160 
161  struct _HDCP_PROTOCOL_DATA
162  {
163  dsHdcpProtocolVersion_t protocolVersion;
164  }HDCPProtocolVersion;
165  struct _SLEEP_MODE_DATA
166  {
167  dsSleepMode_t sleepMode;
168  }sleepModeInfo;
169 
170  struct _AUDIO_LEVEL_DATA
171  {
172  int level;
173  }AudioLevelInfo;
174 
175  struct _AUDIO_OUT_CONNECT_DATA
176  {
177  dsAudioPortType_t portType;
178  unsigned int uiPortNo;
179  bool isPortConnected;
180  }audio_out_connect;
181 
182  struct _AUDIO_FORMAT_DATA
183  {
184  dsAudioFormat_t audioFormat;
185  }AudioFormatInfo;
186 
187  struct _LANGUAGE_DATA
188  {
189  char audioLanguage[MAX_LANGUAGE_LEN];
190  }AudioLanguageInfo;
191 
192  struct _FADER_CONTROL_DATA
193  {
194  int mixerbalance;
195  }FaderControlInfo;
196 
197  struct _ASSOCIATED_AUDIO_MIXING_DATA
198  {
199  bool mixing;
200  }AssociatedAudioMixingInfo;
201 
202  struct _VIDEO_FORMAT_DATA
203  {
204  dsHDRStandard_t videoFormat;
205  }VideoFormatInfo;
206 
207  struct _AUDIO_PORTSTATE_DATA
208  {
209  dsAudioPortState_t audioPortState;
210  }AudioPortStateInfo;
211 
212  struct _HDMI_IN_ALLM_MODE_DATA{
213  /* Declare HDMI In ALLM Mode*/
214  dsHdmiInPort_t port;
215  bool allm_mode;
216  }hdmi_in_allm_mode; /*HDMI in ALLM Mode change*/
217 
218  } data;
220 
221 #ifdef __cplusplus
222 }
223 #endif
224 
225 #endif /* RPDSMGR_H_ */
226 
227 
228 /** @} */
229 /** @} */
IARM_BUS_DSMGR_EVENT_DISPLAY_FRAMRATE_PRECHANGE
@ IARM_BUS_DSMGR_EVENT_DISPLAY_FRAMRATE_PRECHANGE
Definition: dsMgr.h:71
IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_HOTPLUG
@ IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_HOTPLUG
Definition: dsMgr.h:59
IARM_BUS_DSMGR_EVENT_AUDIO_FADER_CONTROL_CHANGED
@ IARM_BUS_DSMGR_EVENT_AUDIO_FADER_CONTROL_CHANGED
Definition: dsMgr.h:68
IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_HOTPLUG
Definition: dsMgr.h:54
IARM_BUS_DSMGR_EVENT_TIME_FORMAT_CHANGE
@ IARM_BUS_DSMGR_EVENT_TIME_FORMAT_CHANGE
Definition: dsMgr.h:62
dsSleepMode_t
enum _dsSleepMode_t dsSleepMode_t
dsAudioPortType_t
enum _dsAudioPortType_t dsAudioPortType_t
dsTypes.h
Device Settings HAL types.
dsFPDTimeFormat_t
enum __dsFPDTimeFormat_t dsFPDTimeFormat_t
IARM_Bus_DSMgr_EventData_t
struct _DSMgr_EventData_t IARM_Bus_DSMgr_EventData_t
IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE
Definition: dsMgr.h:57
IARM_BUS_DSMGR_EVENT_AUDIO_MODE
@ IARM_BUS_DSMGR_EVENT_AUDIO_MODE
Definition: dsMgr.h:51
IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS
@ IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS
Definition: dsMgr.h:61
IARM_BUS_DSMGR_EVENT_AUDIO_FORMAT_UPDATE
@ IARM_BUS_DSMGR_EVENT_AUDIO_FORMAT_UPDATE
Definition: dsMgr.h:65
IARM_BUS_DSMGR_EVENT_HDCP_STATUS
@ IARM_BUS_DSMGR_EVENT_HDCP_STATUS
Definition: dsMgr.h:52
_DSMgr_EventId_t
_DSMgr_EventId_t
Definition: dsMgr.h:46
IARM_BUS_DSMGR_EVENT_SLEEP_MODE_CHANGED
@ IARM_BUS_DSMGR_EVENT_SLEEP_MODE_CHANGED
Definition: dsMgr.h:74
IARM_BUS_DSMGR_EVENT_AUDIO_SECONDARY_LANGUAGE_CHANGED
@ IARM_BUS_DSMGR_EVENT_AUDIO_SECONDARY_LANGUAGE_CHANGED
Definition: dsMgr.h:67
IARM_BUS_DSMGR_EVENT_AUDIO_PORT_STATE
@ IARM_BUS_DSMGR_EVENT_AUDIO_PORT_STATE
Definition: dsMgr.h:73
IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE
@ IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE
Definition: dsMgr.h:48
IARM_BUS_DSMGR_EVENT_VIDEO_FORMAT_UPDATE
@ IARM_BUS_DSMGR_EVENT_VIDEO_FORMAT_UPDATE
Definition: dsMgr.h:70
IARM_BUS_DSMGR_EVENT_AUDIO_PRIMARY_LANGUAGE_CHANGED
@ IARM_BUS_DSMGR_EVENT_AUDIO_PRIMARY_LANGUAGE_CHANGED
Definition: dsMgr.h:66
dsHDRStandard_t
enum _dsHDRStandard_t dsHDRStandard_t
_dsVideoPortResolution_t
Structure that defines video port resolution settings of output video device.
Definition: dsTypes.h:642
IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS
Definition: dsMgr.h:56
IARM_BUS_DSMGR_EVENT_ZOOM_SETTINGS
@ IARM_BUS_DSMGR_EVENT_ZOOM_SETTINGS
Definition: dsMgr.h:49
IARM_BUS_DSMGR_EVENT_RES_PRECHANGE
@ IARM_BUS_DSMGR_EVENT_RES_PRECHANGE
Definition: dsMgr.h:47
IARM_BUS_DSMGR_EVENT_HDMI_IN_ALLM_STATUS
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_ALLM_STATUS
Definition: dsMgr.h:58
IARM_BUS_DSMGR_EVENT_DISPLAY_FRAMRATE_POSTCHANGE
@ IARM_BUS_DSMGR_EVENT_DISPLAY_FRAMRATE_POSTCHANGE
Definition: dsMgr.h:72
IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG
@ IARM_BUS_DSMGR_EVENT_HDMI_HOTPLUG
Definition: dsMgr.h:50
IARM_BUS_DSMGR_EVENT_MAX
@ IARM_BUS_DSMGR_EVENT_MAX
Definition: dsMgr.h:75
IARM_Bus_DSMgr_EventId_t
enum _DSMgr_EventId_t IARM_Bus_DSMgr_EventId_t
IARM_BUS_DSMGR_EVENT_HDMI_IN_SIGNAL_STATUS
@ IARM_BUS_DSMGR_EVENT_HDMI_IN_SIGNAL_STATUS
Definition: dsMgr.h:55
dsAudioFormat_t
enum _dsAudioFormat_t dsAudioFormat_t
IARM_BUS_DSMGR_EVENT_AUDIO_ASSOCIATED_AUDIO_MIXING_CHANGED
@ IARM_BUS_DSMGR_EVENT_AUDIO_ASSOCIATED_AUDIO_MIXING_CHANGED
Definition: dsMgr.h:69
IARM_BUS_DSMGR_EVENT_AUDIO_OUT_HOTPLUG
@ IARM_BUS_DSMGR_EVENT_AUDIO_OUT_HOTPLUG
Definition: dsMgr.h:64
IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_SIGNAL_STATUS
@ IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_SIGNAL_STATUS
Definition: dsMgr.h:60
IARM_BUS_DSMGR_EVENT_AUDIO_LEVEL_CHANGED
@ IARM_BUS_DSMGR_EVENT_AUDIO_LEVEL_CHANGED
Definition: dsMgr.h:63
IARM_BUS_DSMGR_EVENT_RX_SENSE
@ IARM_BUS_DSMGR_EVENT_RX_SENSE
Definition: dsMgr.h:53
_DSMgr_EventData_t
Definition: dsMgr.h:81