forked from rdkcentral/rdkservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHdmiCecSink.json
615 lines (614 loc) · 22.8 KB
/
HdmiCecSink.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
{
"$schema": "https://raw.githubusercontent.com/rdkcentral/Thunder/master/Tools/JsonGenerator/schemas/interface.schema.json",
"jsonrpc": "2.0",
"info": {
"title": "HdmiCecSink API",
"class": "HdmiCecSink",
"description": "The `HdmiCecSink` plugin allows you to manage HDMI Consumer Electronics Control (CEC) sink for connected devices."
},
"definitions": {
"available": {
"summary": "If `true`, then there is an active source available and source details are included in the result. If `false`, then there is no active source.",
"type":"boolean",
"example": true
},
"logicalAddress":{
"summary": "Logical address of the device",
"type":"integer",
"example": 4
},
"physicalAddress": {
"summary": "Physical address of the device",
"type":"string",
"example": "1.0.0.0"
},
"deviceType": {
"summary": "Type of the device",
"type":"string",
"example": "Playback Device"
},
"osdName":{
"summary": "OSD name of the device if available",
"type":"string",
"example": "Fire TV Stick"
},
"vendorID":{
"summary": "Vendor ID of the device",
"type":"string",
"example": "0ce7"
},
"cecVersion": {
"summary": "CEC version supported",
"type": "string",
"example": "Version 1.4"
},
"powerStatus": {
"summary": "Power status of the device",
"type": "string",
"example": "Standby"
},
"enabled": {
"summary": "Indicates whether HDMI-CEC sink is enabled (`true`) or disabled (`false`)",
"type":"boolean",
"example": false
},
"vendorid": {
"summary": "Vendor ID for this device. The ID can have a maximum of 6 characters.",
"type": "string",
"example": "0019fc"
},
"status": {
"summary": "Whether the operation succeeded",
"type": "string",
"example": "success"
},
"result": {
"type":"object",
"properties": {
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"success"
]
},
"success": {
"summary": "Whether the request succeeded",
"type": "boolean",
"example": "true"
}
},
"methods": {
"getActiveRoute": {
"summary": "Gets details for the current route from the source to sink devices. This API is used for debugging the route.",
"result": {
"type": "object",
"properties": {
"available": {
"$ref": "#/definitions/available"
},
"length": {
"summary": "The number of devices in the path list",
"type":"integer",
"example": 1
},
"pathList":{
"summary": "Object [] of information about each device in the active path",
"type":"array",
"items": {
"type": "object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
},
"physicalAddress": {
"$ref": "#/definitions/physicalAddress"
},
"deviceType": {
"$ref": "#/definitions/deviceType"
},
"osdName":{
"$ref": "#/definitions/osdName"
},
"vendorID":{
"$ref": "#/definitions/vendorID"
}
},
"required": [
"logicalAddress",
"physicalAddress",
"deviceType",
"osdName",
"vendorID"
]
}
},
"ActiveRoute": {
"summary": "Gives the route from source to sink with the device type and OSD name as an identifier",
"type":"string",
"example": "Playback Device 1(Fire TV Stick)-->HDMI0"
},
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"available",
"length",
"pathList",
"ActiveRoute",
"success"
]
}
},
"getActiveSource": {
"summary": "Gets details for the current active source",
"result": {
"type": "object",
"properties": {
"available": {
"$ref": "#/definitions/available"
},
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
},
"physicalAddress": {
"$ref": "#/definitions/physicalAddress"
},
"deviceType": {
"$ref": "#/definitions/deviceType"
},
"cecVersion": {
"$ref": "#/definitions/cecVersion"
},
"osdName":{
"$ref": "#/definitions/osdName"
},
"vendorID":{
"$ref": "#/definitions/vendorID"
},
"powerStatus": {
"$ref": "#/definitions/powerStatus"
},
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"available",
"logicalAddress",
"physicalAddress",
"deviceType",
"cecVersion",
"osdName",
"vendorID",
"powerStatus",
"success"
]
}
},
"getDeviceList":{
"summary": "Gets the number of connected source devices and system information for each device. The information includes device type, physical address, CEC version, vendor ID, power status and OSD name.",
"result": {
"type": "object",
"properties": {
"numberofdevices": {
"summary": "number of devices in the `devicelist` array",
"type": "integer",
"example": 1
},
"devicelist":{
"summary": "Object [] of information about each device",
"type":"array",
"items": {
"type": "object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
},
"physicalAddress": {
"$ref": "#/definitions/physicalAddress"
},
"deviceType": {
"$ref": "#/definitions/deviceType"
},
"cecVersion": {
"$ref": "#/definitions/cecVersion"
},
"osdName":{
"$ref": "#/definitions/osdName"
},
"vendorID":{
"$ref": "#/definitions/vendorID"
},
"powerStatus": {
"$ref": "#/definitions/powerStatus"
},
"portNumber": {
"Summary": "HDMI port number of the device",
"type": "integer",
"example": 0
}
},
"required": [
"logicalAddress",
"physicalAddress",
"deviceType",
"cecVersion",
"osdName",
"vendorID",
"powerStatus",
"portNumber"
]
}
},
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"numberofdevices",
"devicelist",
"success"
]
}
},
"getEnabled":{
"summary": "Check whether HDMI-CEC sink is enabled",
"result": {
"type": "object",
"properties": {
"enabled": {
"$ref": "#/definitions/enabled"
},
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"enabled",
"success"
]
}
},
"getVendorId":{
"summary": "Gets the current vendor ID of this sink device",
"result": {
"type": "object",
"properties": {
"vendorid": {
"$ref": "#/definitions/vendorid"
},
"success": {
"$ref": "#/definitions/success"
}
},
"required": [
"vendorid",
"success"
]
}
},
"requestActiveSource": {
"summary": "Requests the active source in the network",
"result": {
"$ref": "#/definitions/result"
}
},
"requestShortAudioDescriptor": {
"summary": "Sends the CEC Request Short Audio Descriptor (SAD) message as an event. See `shortAudiodesciptorEvent`.",
"result": {
"$ref": "#/definitions/result"
}
},
"sendStandbyMessage": {
"summary": "Sends a CEC <Standby> message to the logical address of the device.",
"result": {
"$ref": "#/definitions/result"
}
},
"setActivePath": {
"summary": "Sets the source device to active (`setStreamPath`). The source wakes from standby if it's in the standby state",
"params": {
"type":"object",
"properties": {
"activePath":{
"summary": "Physical address of the source device",
"type":"string",
"example": "1.0.0.0"
}
},
"required": [
"activePath"
]
},
"result": {
"$ref": "#/definitions/result"
}
},
"setActiveSource": {
"summary": "Sets the current active source as TV (physical address 0.0.0.0). This call needs to be made when the TV switches to internal tuner or any apps.",
"result": {
"$ref": "#/definitions/result"
}
},
"setEnabled": {
"summary": "Enables or disables HDMI-CEC sink",
"params": {
"type":"object",
"properties": {
"enabled":{
"$ref": "#/definitions/enabled"
}
},
"required": [
"enabled"
]
},
"result": {
"$ref": "#/definitions/result"
}
},
"setMenuLanguage": {
"summary": "Updates the internal data structure with the new menu Language and also broadcasts the <Set Menu Language> CEC message",
"params": {
"type":"object",
"properties": {
"language":{
"summary": "3 byte ASCII defined in ISO_639-2_codes (https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes)",
"type": "string",
"example": "chi"
}
},
"required": [
"language"
]
},
"result": {
"$ref": "#/definitions/result"
}
},
"setRoutingChange":{
"summary": "Changes routing while switching between HDMI inputs and TV",
"params": {
"type":"object",
"properties": {
"oldPort":{
"summary": "Current active port, such as `TV`, `HDMI0`, `HDMI1`, `HDMI2`",
"type": "string",
"example": "HDMI0"
},
"newPort":{
"summary":"New port to switch to, such as `TV`, `HDMI0`, `HDMI1`, `HDMI2`",
"type": "string",
"example": "TV"
}
},
"required": [
"oldPort",
"newPort"
]
},
"result": {
"$ref": "#/definitions/result"
}
},
"SetupARCRouting":{
"summary": "Enable (or disable) HDMI-CEC Audio Return Channel (ARC) routing. ARC is initiated when HDMI-CEC sink is enabled.",
"params": {
"type":"object",
"properties": {
"enabled":{
"summary": "Indicates whether HDMI-CEC ARC is enabled (`true`) or disabled (`false`). If enabled, the CEC <Request ARC Initiation> and <Report ARC Initiated> messages are sent. If disabled, the CEC <Request ARC Termination> and <Report ARC Terminated> messages are sent.",
"type": "boolean",
"example": true
}
},
"required": [
"enabled"
]
},
"result": {
"$ref": "#/definitions/result"
}
},
"setVendorId":{
"summary": "Sets a vendor ID for the sink device.",
"params": {
"type":"object",
"properties": {
"vendorid": {
"$ref": "#/definitions/vendorid"
}
},
"required": [
"vendorid"
]
},
"result": {
"$ref": "#/definitions/result"
}
}
},
"events": {
"arcInitiationEvent": {
"summary": "Triggered when routing though the HDMI ARC port is successfully established",
"params": {
"type":"object",
"properties": {
"status": {
"$ref": "#/definitions/status"
}
},
"required": [
"status"
]
}
},
"arcTerminationEvent": {
"summary": "Triggered when routing though the HDMI ARC port terminates",
"params": {
"type":"object",
"properties": {
"status": {
"$ref": "#/definitions/status"
}
},
"required": [
"status"
]
}
},
"onActiveSourceChange": {
"summary": "Triggered with the active source device changes",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
},
"physicalAddress": {
"$ref": "#/definitions/physicalAddress"
}
},
"required": [
"logicalAddress",
"physicalAddress"
]
}
},
"onDeviceAdded": {
"summary": "Triggered when an HDMI cable is physically connected to the HDMI port on a TV, or the power cable is connected to the source device. After a new device is hotplugged to the port, various information is collected such as CEC version, OSD name, vendor ID, and power status. The `onDeviceAdded` event is sent as soon as any of these details are available. However, the connected device sends the information asynchronously; therefore, the information may not be collected immediately.",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onDeviceInfoUpdated": {
"summary": "Triggered when device information changes (physicalAddress, deviceType, vendorID, osdName, cecVersion, powerStatus)",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onDeviceRemoved": {
"summary": "Triggered when HDMI cable is physically removed from the HDMI port on a TV or the power cable is removed from the source device. The device is considered removed when no ACK messages are received after pinging the device.",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onImageViewOnMsg": {
"summary": "Triggered when an <Image View ON> CEC message is received from the source device",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onInActiveSource": {
"summary": "Triggered when the source is no longer active",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
},
"physicalAddress": {
"$ref": "#/definitions/physicalAddress"
}
},
"required": [
"logicalAddress",
"physicalAddress"
]
}
},
"onTextViewOnMsg": {
"summary": "Triggered when a <Text View ON> CEC message is received from the source device",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"onWakeupFromStandby": {
"summary": "Triggered when the source device changes status from STANDBY to ON and the <Image View ON> CEC message is received from the source device",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"sendStandbyMessageEvent":{
"summary": "Triggered when the source device changes status to `STANDBY`",
"params": {
"type":"object",
"properties": {
"logicalAddress": {
"$ref": "#/definitions/logicalAddress"
}
},
"required": [
"logicalAddress"
]
}
},
"shortAudiodesciptorEvent": {
"summary": "Triggered when the CEC Request Short Audio Descriptor (SAD) message is sent. See `requestShortAudioDescriptor`",
"params": {
"type":"object",
"properties": {
"audiodescriptor": {
"summary": "The SAD information (formatid, audioFormatCode, numberofdescriptor)",
"type": "integer",
"example": [0, 10, 2]
}
},
"required": [
"audiodescriptor"
]
}
}
}
}