This source file includes following definitions.
- pack_hdmi_infoframe
1
2 #include "hdmi.h"
3
4 void pack_hdmi_infoframe(struct packed_hdmi_infoframe *packed_frame,
5 u8 *raw_frame, ssize_t len)
6 {
7 u32 header = 0;
8 u32 subpack0_low = 0;
9 u32 subpack0_high = 0;
10 u32 subpack1_low = 0;
11 u32 subpack1_high = 0;
12
13 switch (len) {
14
15
16
17
18 default:
19
20
21
22
23
24 case 17:
25 subpack1_high = (raw_frame[16] << 16);
26
27 case 16:
28 subpack1_high |= (raw_frame[15] << 8);
29
30 case 15:
31 subpack1_high |= raw_frame[14];
32
33 case 14:
34 subpack1_low = (raw_frame[13] << 24);
35
36 case 13:
37 subpack1_low |= (raw_frame[12] << 16);
38
39 case 12:
40 subpack1_low |= (raw_frame[11] << 8);
41
42 case 11:
43 subpack1_low |= raw_frame[10];
44
45 case 10:
46 subpack0_high = (raw_frame[9] << 16);
47
48 case 9:
49 subpack0_high |= (raw_frame[8] << 8);
50
51 case 8:
52 subpack0_high |= raw_frame[7];
53
54 case 7:
55 subpack0_low = (raw_frame[6] << 24);
56
57 case 6:
58 subpack0_low |= (raw_frame[5] << 16);
59
60 case 5:
61 subpack0_low |= (raw_frame[4] << 8);
62
63 case 4:
64 subpack0_low |= raw_frame[3];
65
66 case 3:
67 header = (raw_frame[2] << 16);
68
69 case 2:
70 header |= (raw_frame[1] << 8);
71
72 case 1:
73 header |= raw_frame[0];
74
75 case 0:
76 break;
77 }
78
79 packed_frame->header = header;
80 packed_frame->subpack0_low = subpack0_low;
81 packed_frame->subpack0_high = subpack0_high;
82 packed_frame->subpack1_low = subpack1_low;
83 packed_frame->subpack1_high = subpack1_high;
84 }