RDK Documentation (Open Sourced RDK Components)
dsHdmiIn.h
Go to the documentation of this file.
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  * If not stated otherwise in this file or this component's Licenses.txt file the
21  * following copyright and licenses apply:
22  *
23  * Copyright ARRIS Enterprises, Inc. 2015.
24  *
25  * Licensed under the Apache License, Version 2.0 (the "License");
26  * you may not use this file except in compliance with the License.
27  * You may obtain a copy of the License at
28  *
29  * http://www.apache.org/licenses/LICENSE-2.0
30  *
31  * Unless required by applicable law or agreed to in writing, software
32  * distributed under the License is distributed on an "AS IS" BASIS,
33  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34  * See the License for the specific language governing permissions and
35  * limitations under
36 */
37 
38 
39 /**
40  * @file dsHdmiIn.h
41  *
42  * @brief Device Settings HAL HDMI Input Public API.
43  * This API defines the HAL for the Device Settings HDMI Input interface.
44  *
45  * @par Document
46  * Document reference.
47  *
48  * @par Open Issues (in no particular order)
49  * -# None
50  *
51  * @par Assumptions
52  * -# None
53  *
54  * @par Abbreviations
55  * - BE: Big-Endian.
56  * - cb: Callback function (suffix).
57  * - DS: Device Settings.
58  * - FPD: Front-Panel Display.
59  * - HAL: Hardware Abstraction Layer.
60  * - LE: Little-Endian.
61  * - LS: Least Significant.
62  * - MBZ: Must be zero.
63  * - MS: Most Significant.
64  * - RDK: Reference Design Kit.
65  * - _t: Type (suffix).
66  *
67  * @par Implementation Notes
68  * -# None
69  *
70  */
71 
72 
73 
74 /**
75 * @defgroup devicesettings
76 * @{
77 * @defgroup hal
78 * @{
79 **/
80 
81 
82 #ifndef _DS_dsHdmiInH_
83 #define _DS_dsHdmiInH_
84 
85 #include <sys/types.h>
86 #include "dsError.h"
87 #include "dsTypes.h"
88 
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92 
93 /** @addtogroup DSHAL_HdmiIn_API Device Settings HAL HDMI Input Public APIs
94  * @ingroup devicesettingshalapi
95  * @{
96  */
97 
98 /**
99  * @brief Initialize the underlying HDMI Input sub-system.
100  *
101  * This function must initialize the HDMI Input module and any associated data
102  * structures.
103  *
104  * @param None
105  * @return Device Settings error code
106  * @retval ::dsError_t
107  */
108 dsError_t dsHdmiInInit (void);
109 
110 /**
111  * @brief Terminate the underlying HDMI Input sub-system.
112  *
113  * This function must terminate the HDMI Input module and any associated data
114  * structures.
115  *
116  * @param None
117  * @return Device Settings error code
118  * @retval ::dsError_t
119  */
120 dsError_t dsHdmiInTerm (void);
121 
122 /**
123  * @brief Get the number of HDMI Input ports on the set-top.
124  *
125  * This function is used to get the number of HDMI Input ports on the set-top.
126  *
127  * @param [in]pNumberOfInputs number of HDMI Input ports.
128  * @return Device Settings error code
129  * @retval ::dsError_t
130  */
131 dsError_t dsHdmiInGetNumberOfInputs (uint8_t *pNumberOfInputs);
132 
133 /**
134  * @brief Get the HDMI Inpuut Status.
135  *
136  * This function is used to get the current HDMI Input Status.
137  *
138  * @param [in]pStatus HDMI Input enabled, HDMI Input port connected,
139  * Active HDMI Input port, and HW Pass-Through enabled.
140  * @return Device Settings error code
141  * @retval ::dsError_t
142  */
144 
145 /**
146  * @brief Select the HDMI Input port to be presented.
147  *
148  * This function is used to select the HDMI Input port for presentation.
149  *
150  * @param [in]ePort HDMI Input port to be presented,
151  * @return Device Settings error code
152  * @retval ::dsError_t
153  */
154 dsError_t dsHdmiInSelectPort (dsHdmiInPort_t Port);
155 
156 /**
157  * @brief Scale the HDMI In video
158  * This function is used to scale the HDMI In video.
159  *
160  * @param[in] x : x coordinate for the video
161  * @param[in] y : y coordinate for the video
162  * @param[in] width : width of the video
163  * @param[in] height : height of the video
164  *
165  * @return Device Settings error code
166  * @retval ::dsError_t
167  */
168 dsError_t dsHdmiInScaleVideo (int32_t x, int32_t y, int32_t width, int32_t height);
169 
170 /**
171  * @brief Select the HDMI Input zoom mode
172  *
173  * This function is used to select the HDMI Input zoom mode.
174  *
175  * @param [in]requestedZoomMode HDMI Input zoom mode,
176  * @return Device Settings error code
177  * @retval ::dsError_t
178  */
180 
181 /**
182  * @brief Stop the output of HDMI Input audio.
183  *
184  * This function stops the HDMI Input audio from being output via HDMI Out.
185  *
186  * @param None
187  * @return Device Settings error code
188  * @retval ::dsError_t
189  */
191 
192 /**
193  * @brief Start the output of HDMI Input audio.
194  *
195  * This function presents the HDMI Input audio via HDMI Out.
196  *
197  * @param None
198  * @return Device Settings error code
199  * @retval ::dsError_t
200  */
202 
203 /**
204  * @brief Get the current HDMI Input video mode.
205  *
206  * This function gets the current HDMI Input video mode.
207  *
208  * @param None
209  * @return Current HDMI Input video mode (resolution)
210  * @retval ::dsError_t
211  */
213 
214 /**
215  * @brief Callback function used to notify applications of HDMI In hot plug status
216  *
217  * HAL Implementation should call this method to deliver HDMI In hot plug status
218  * to the application (e.g. Connect/Disconnect for Port 0/1).
219  *
220  * @param Port HDMI Input port.
221  * @param isPortConnected Connection state of HDMI In Port.
222  *
223  *
224  * @return None.
225  */
226 typedef void (*dsHdmiInConnectCB_t)(dsHdmiInPort_t Port, bool isPortConnected);
227 
228 /**
229  * @brief Callback function used to notify applications of HDMI In signal change status
230  *
231  * HAL Implementation should call this method to deliver HDMI In signal change status
232  * to the application (e.g. NoSignal/UnstableSignal/NotSupportedSignal/StableSignal for HDMI In ports).
233  *
234  * @param port HDMI Input port.
235  * @param sigStatus signal Status of HDMI In Port.
236  *
237  *
238  * @return None.
239  */
240 typedef void (*dsHdmiInSignalChangeCB_t)(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus);
241 
242 /**
243  * @brief Callback function used to notify applications of HDMI Input status
244  *
245  * HAL Implementation should call this method to deliver HDMI Input status
246  * to the application (e.g. port, isPresented(true/false) etc. for HDMI In ports).
247  *
248  * @param inputStatus HDMI Input status of a specific Port.
249  *
250  *
251  * @return None.
252  */
253 typedef void (*dsHdmiInStatusChangeCB_t)(dsHdmiInStatus_t inputStatus);
254 
255 /**
256  * @brief Callback function used to notify applications of HDMI In video mode changes
257  *
258  * HAL Implementation should call this method to deliver updated HDMI In video mode info
259  * to the application
260  *
261  * @param port HDMI Input port.
262  * @param videoResolution dsVideoPortResolution_t of HDMI In Source
263  *
264  *
265  * @return None.
266  */
267 typedef void (*dsHdmiInVideoModeUpdateCB_t)(dsHdmiInPort_t port, dsVideoPortResolution_t videoResolution);
268 
269 /**
270  * @brief Callback function used to notify applications of HDMI Input ALLM Mode
271  *
272  * HAL Implementation should call this method to deliver HDMI Input ALLM Mode
273  * to the application (e.g. port, allm_mode(true/false) etc. for HDMI In ports).
274  *
275  * @param port HDMI Input port.
276  * @param allm_mode ALLM Mode of HDMI In Port.
277  *
278  *
279  * @return None.
280  */
281 typedef void (*dsHdmiInAllmChangeCB_t)(dsHdmiInPort_t port, bool allm_mode);
282 
283 /**
284  * @brief Register for the HDMI Input hot plug event.
285  *
286  * This function is used to register for the HDMI Input hot plug event.
287  *
288  * @param[in] CBFunc HDMI Input hot plug callback function.
289  * @return Device Settings error code
290  * @retval ::dsError_t
291  */
293 
294 /**
295  * @brief Register for the HDMI Input Signal Change event.
296  *
297  * This function is used to register for the HDMI Input Signal Change event.
298  *
299  * @param[in] CBFunc HDMI Input Signal change callback function.
300  * @return Device Settings error code
301  * @retval ::dsError_t
302  */
304 
305 /**
306  * @brief Register for the HDMI Input Status Change event.
307  *
308  * This function is used to register for the HDMI Input Status Change event.
309  *
310  * @param[in] CBFunc HDMI Input Status change callback function.
311  * @return Device Settings error code
312  * @retval ::dsError_t
313  */
315 
316 /**
317  * @brief Register for the HDMI Input Video Mode change event
318  *
319  * This function is used to register for the HDMI Input video mode Change event.
320  *
321  * @param[in] CBFunc HDMI Input video mode change callback function.
322  * @return Device Settings error code
323  * @retval ::dsError_t
324  */
326 
327 /**
328  * @brief Register for the HDMI Input ALLM Mode Change event.
329  *
330  * This function is used to register for the HDMI Input ALLM Mode Change event.
331  *
332  * @param[in] CBFunc HDMI Input ALLM Mode change callback function.
333  * @return Device Settings error code
334  * @retval ::dsError_t
335  */
337 
338 bool dsIsHdmiARCPort (int iPort);
339 
340 dsError_t dsGetEDIDBytesInfo (int iHdmiPort, unsigned char **edid, int *length);
341 dsError_t dsGetHDMISPDInfo (int iHdmiPort, unsigned char **data);
342 dsError_t dsSetEdidVersion (int iHdmiPort, int iEdidVersion);
343 dsError_t dsGetEdidVersion (int iHdmiPort, int *iEdidVersion);
344 dsError_t dsGetAllmStatus (int iHdmiPort, bool *allmStatus);
345 dsError_t dsGetSupportedGameFeaturesList (dsSupportedGameFeatureList_t* features);
346 /* End of DSHAL_HdmiIn_API doxygen group */
347 /**
348  * @}
349  */
350 
351 #ifdef __cplusplus
352 }
353 #endif
354 #endif /* _DS_dsHdmiInH_ */
355 
356 /** @} */
357 /** @} */
dsHdmiInGetNumberOfInputs
dsError_t dsHdmiInGetNumberOfInputs(uint8_t *pNumberOfInputs)
Get the number of HDMI Input ports on the set-top.
Definition: dsHdmiIn.c:99
dsHdmiInConnectCB_t
void(* dsHdmiInConnectCB_t)(dsHdmiInPort_t Port, bool isPortConnected)
Callback function used to notify applications of HDMI In hot plug status.
Definition: dsHdmiIn.h:226
dsHdmiInAllmChangeCB_t
void(* dsHdmiInAllmChangeCB_t)(dsHdmiInPort_t port, bool allm_mode)
Callback function used to notify applications of HDMI Input ALLM Mode.
Definition: dsHdmiIn.h:281
dsHdmiInSelectZoomMode
dsError_t dsHdmiInSelectZoomMode(dsVideoZoom_t requestedZoomMode)
Select the HDMI Input zoom mode.
Definition: dsHdmiIn.c:202
_dsSupportedGameFeatureList_t
Definition: dsTypes.h:1141
dsTypes.h
Device Settings HAL types.
dsHdmiInTerm
dsError_t dsHdmiInTerm(void)
Terminate the underlying HDMI Input sub-system.
Definition: dsHdmiIn.c:78
dsHdmiInVideoModeUpdateCB_t
void(* dsHdmiInVideoModeUpdateCB_t)(dsHdmiInPort_t port, dsVideoPortResolution_t videoResolution)
Callback function used to notify applications of HDMI In video mode changes.
Definition: dsHdmiIn.h:267
dsError.h
Device Settings HAL error codes.
dsHdmiInStatusChangeCB_t
void(* dsHdmiInStatusChangeCB_t)(dsHdmiInStatus_t inputStatus)
Callback function used to notify applications of HDMI Input status.
Definition: dsHdmiIn.h:253
dsHdmiInGetCurrentVideoMode
dsError_t dsHdmiInGetCurrentVideoMode(dsVideoPortResolution_t *resolution)
Get the current HDMI Input video mode.
Definition: dsHdmiIn.c:269
dsHdmiInRegisterSignalChangeCB
dsError_t dsHdmiInRegisterSignalChangeCB(dsHdmiInSignalChangeCB_t CBFunc)
Register for the HDMI Input Signal Change event.
dsHdmiInPauseAudio
dsError_t dsHdmiInPauseAudio(void)
Stop the output of HDMI Input audio.
Definition: dsHdmiIn.c:225
dsHdmiInRegisterConnectCB
dsError_t dsHdmiInRegisterConnectCB(dsHdmiInConnectCB_t CBFunc)
Register for the HDMI Input hot plug event.
dsVideoZoom_t
enum _dsVideoZoom_t dsVideoZoom_t
dsHdmiInInit
dsError_t dsHdmiInInit(void)
Initialize the underlying HDMI Input sub-system.
Definition: dsHdmiIn.c:58
_dsHdmiInStatus_t
Definition: dsTypes.h:1029
dsHdmiInSignalChangeCB_t
void(* dsHdmiInSignalChangeCB_t)(dsHdmiInPort_t port, dsHdmiInSignalStatus_t sigStatus)
Callback function used to notify applications of HDMI In signal change status.
Definition: dsHdmiIn.h:240
dsHdmiInScaleVideo
dsError_t dsHdmiInScaleVideo(int32_t x, int32_t y, int32_t width, int32_t height)
Scale the HDMI In video This function is used to scale the HDMI In video.
Definition: dsHdmiIn.c:176
dsHdmiInRegisterAllmChangeCB
dsError_t dsHdmiInRegisterAllmChangeCB(dsHdmiInAllmChangeCB_t CBFunc)
Register for the HDMI Input ALLM Mode Change event.
dsHdmiInSelectPort
dsError_t dsHdmiInSelectPort(dsHdmiInPort_t Port)
Select the HDMI Input port to be presented.
Definition: dsHdmiIn.c:152
dsHdmiInGetStatus
dsError_t dsHdmiInGetStatus(dsHdmiInStatus_t *pStatus)
Get the HDMI Inpuut Status.
Definition: dsHdmiIn.c:125
_dsVideoPortResolution_t
Structure that defines video port resolution settings of output video device.
Definition: dsTypes.h:642
dsHdmiInRegisterVideoModeUpdateCB
dsError_t dsHdmiInRegisterVideoModeUpdateCB(dsHdmiInVideoModeUpdateCB_t CBFunc)
Register for the HDMI Input Video Mode change event.
dsHdmiInRegisterStatusChangeCB
dsError_t dsHdmiInRegisterStatusChangeCB(dsHdmiInStatusChangeCB_t CBFunc)
Register for the HDMI Input Status Change event.
dsHdmiInResumeAudio
dsError_t dsHdmiInResumeAudio(void)
Start the output of HDMI Input audio.
Definition: dsHdmiIn.c:247
dsError_t
dsError_t
Device Settings API Error return codes.
Definition: dsError.h:84