diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/video/tegra/dc/hdmi.h | |
parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) |
Diffstat (limited to 'drivers/video/tegra/dc/hdmi.h')
-rw-r--r-- | drivers/video/tegra/dc/hdmi.h | 222 |
1 files changed, 222 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/hdmi.h b/drivers/video/tegra/dc/hdmi.h new file mode 100644 index 00000000000..702ab16e87f --- /dev/null +++ b/drivers/video/tegra/dc/hdmi.h | |||
@@ -0,0 +1,222 @@ | |||
1 | /* | ||
2 | * drivers/video/tegra/dc/hdmi.h | ||
3 | * | ||
4 | * non-tegra specific HDMI declarations | ||
5 | * | ||
6 | * Copyright (C) 2010 Google, Inc. | ||
7 | * Author: Erik Gilling <konkers@android.com> | ||
8 | * | ||
9 | * Copyright (C) 2010-2011 NVIDIA Corporation | ||
10 | * | ||
11 | * This software is licensed under the terms of the GNU General Public | ||
12 | * License version 2, as published by the Free Software Foundation, and | ||
13 | * may be copied, distributed, and modified under those terms. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #ifndef __DRIVERS_VIDEO_TEGRA_DC_HDMI_H | ||
23 | #define __DRIVERS_VIDEO_TEGRA_DC_HDMI_H | ||
24 | |||
25 | #define HDMI_INFOFRAME_TYPE_VENDOR 0x81 | ||
26 | #define HDMI_INFOFRAME_TYPE_AVI 0x82 | ||
27 | #define HDMI_INFOFRAME_TYPE_SPD 0x83 | ||
28 | #define HDMI_INFOFRAME_TYPE_AUDIO 0x84 | ||
29 | #define HDMI_INFOFRAME_TYPE_MPEG_SRC 0x85 | ||
30 | #define HDMI_INFOFRAME_TYPE_NTSC_VBI 0x86 | ||
31 | |||
32 | /* all fields little endian */ | ||
33 | struct hdmi_avi_infoframe { | ||
34 | /* PB0 */ | ||
35 | u8 csum; | ||
36 | |||
37 | /* PB1 */ | ||
38 | unsigned s:2; /* scan information */ | ||
39 | unsigned b:2; /* bar info data valid */ | ||
40 | unsigned a:1; /* active info present */ | ||
41 | unsigned y:2; /* RGB or YCbCr */ | ||
42 | unsigned res1:1; | ||
43 | |||
44 | /* PB2 */ | ||
45 | unsigned r:4; /* active format aspect ratio */ | ||
46 | unsigned m:2; /* picture aspect ratio */ | ||
47 | unsigned c:2; /* colorimetry */ | ||
48 | |||
49 | /* PB3 */ | ||
50 | unsigned sc:2; /* scan information */ | ||
51 | unsigned q:2; /* quantization range */ | ||
52 | unsigned ec:3; /* extended colorimetry */ | ||
53 | unsigned itc:1; /* it content */ | ||
54 | |||
55 | /* PB4 */ | ||
56 | unsigned vic:7; /* video format id code */ | ||
57 | unsigned res4:1; | ||
58 | |||
59 | /* PB5 */ | ||
60 | unsigned pr:4; /* pixel repetition factor */ | ||
61 | unsigned cn:2; /* it content type*/ | ||
62 | unsigned yq:2; /* ycc quantization range */ | ||
63 | |||
64 | /* PB6-7 */ | ||
65 | u16 top_bar_end_line; | ||
66 | |||
67 | /* PB8-9 */ | ||
68 | u16 bot_bar_start_line; | ||
69 | |||
70 | /* PB10-11 */ | ||
71 | u16 left_bar_end_pixel; | ||
72 | |||
73 | /* PB12-13 */ | ||
74 | u16 right_bar_start_pixel; | ||
75 | } __attribute__((packed)); | ||
76 | |||
77 | #define HDMI_AVI_VERSION 0x02 | ||
78 | |||
79 | #define HDMI_AVI_Y_RGB 0x0 | ||
80 | #define HDMI_AVI_Y_YCBCR_422 0x1 | ||
81 | #define HDMI_AVI_Y_YCBCR_444 0x2 | ||
82 | |||
83 | #define HDMI_AVI_B_VERT 0x1 | ||
84 | #define HDMI_AVI_B_HORIZ 0x2 | ||
85 | |||
86 | #define HDMI_AVI_S_NONE 0x0 | ||
87 | #define HDMI_AVI_S_OVERSCAN 0x1 | ||
88 | #define HDMI_AVI_S_UNDERSCAN 0x2 | ||
89 | |||
90 | #define HDMI_AVI_C_NONE 0x0 | ||
91 | #define HDMI_AVI_C_SMPTE 0x1 | ||
92 | #define HDMI_AVI_C_ITU_R 0x2 | ||
93 | #define HDMI_AVI_C_EXTENDED 0x4 | ||
94 | |||
95 | #define HDMI_AVI_M_4_3 0x1 | ||
96 | #define HDMI_AVI_M_16_9 0x2 | ||
97 | |||
98 | #define HDMI_AVI_R_SAME 0x8 | ||
99 | #define HDMI_AVI_R_4_3_CENTER 0x9 | ||
100 | #define HDMI_AVI_R_16_9_CENTER 0xa | ||
101 | #define HDMI_AVI_R_14_9_CENTER 0xb | ||
102 | |||
103 | /* all fields little endian */ | ||
104 | struct hdmi_audio_infoframe { | ||
105 | /* PB0 */ | ||
106 | u8 csum; | ||
107 | |||
108 | /* PB1 */ | ||
109 | unsigned cc:3; /* channel count */ | ||
110 | unsigned res1:1; | ||
111 | unsigned ct:4; /* coding type */ | ||
112 | |||
113 | /* PB2 */ | ||
114 | unsigned ss:2; /* sample size */ | ||
115 | unsigned sf:3; /* sample frequency */ | ||
116 | unsigned res2:3; | ||
117 | |||
118 | /* PB3 */ | ||
119 | unsigned cxt:5; /* coding extention type */ | ||
120 | unsigned res3:3; | ||
121 | |||
122 | /* PB4 */ | ||
123 | u8 ca; /* channel/speaker allocation */ | ||
124 | |||
125 | /* PB5 */ | ||
126 | unsigned res5:3; | ||
127 | unsigned lsv:4; /* level shift value */ | ||
128 | unsigned dm_inh:1; /* downmix inhibit */ | ||
129 | |||
130 | /* PB6-10 reserved */ | ||
131 | u8 res6; | ||
132 | u8 res7; | ||
133 | u8 res8; | ||
134 | u8 res9; | ||
135 | u8 res10; | ||
136 | } __attribute__((packed)); | ||
137 | |||
138 | #define HDMI_AUDIO_VERSION 0x01 | ||
139 | |||
140 | #define HDMI_AUDIO_CC_STREAM 0x0 /* specified by audio stream */ | ||
141 | #define HDMI_AUDIO_CC_2 0x1 | ||
142 | #define HDMI_AUDIO_CC_3 0x2 | ||
143 | #define HDMI_AUDIO_CC_4 0x3 | ||
144 | #define HDMI_AUDIO_CC_5 0x4 | ||
145 | #define HDMI_AUDIO_CC_6 0x5 | ||
146 | #define HDMI_AUDIO_CC_7 0x6 | ||
147 | #define HDMI_AUDIO_CC_8 0x7 | ||
148 | |||
149 | #define HDMI_AUDIO_CT_STREAM 0x0 /* specified by audio stream */ | ||
150 | #define HDMI_AUDIO_CT_PCM 0x1 | ||
151 | #define HDMI_AUDIO_CT_AC3 0x2 | ||
152 | #define HDMI_AUDIO_CT_MPEG1 0x3 | ||
153 | #define HDMI_AUDIO_CT_MP3 0x4 | ||
154 | #define HDMI_AUDIO_CT_MPEG2 0x5 | ||
155 | #define HDMI_AUDIO_CT_AAC_LC 0x6 | ||
156 | #define HDMI_AUDIO_CT_DTS 0x7 | ||
157 | #define HDMI_AUDIO_CT_ATRAC 0x8 | ||
158 | #define HDMI_AUDIO_CT_DSD 0x9 | ||
159 | #define HDMI_AUDIO_CT_E_AC3 0xa | ||
160 | #define HDMI_AUDIO_CT_DTS_HD 0xb | ||
161 | #define HDMI_AUDIO_CT_MLP 0xc | ||
162 | #define HDMI_AUDIO_CT_DST 0xd | ||
163 | #define HDMI_AUDIO_CT_WMA_PRO 0xe | ||
164 | #define HDMI_AUDIO_CT_CXT 0xf | ||
165 | |||
166 | #define HDMI_AUDIO_SF_STREAM 0x0 /* specified by audio stream */ | ||
167 | #define HDMI_AUIDO_SF_32K 0x1 | ||
168 | #define HDMI_AUDIO_SF_44_1K 0x2 | ||
169 | #define HDMI_AUDIO_SF_48K 0x3 | ||
170 | #define HDMI_AUDIO_SF_88_2K 0x4 | ||
171 | #define HDMI_AUDIO_SF_96K 0x5 | ||
172 | #define HDMI_AUDIO_SF_176_4K 0x6 | ||
173 | #define HDMI_AUDIO_SF_192K 0x7 | ||
174 | |||
175 | #define HDMI_AUDIO_SS_STREAM 0x0 /* specified by audio stream */ | ||
176 | #define HDMI_AUDIO_SS_16BIT 0x1 | ||
177 | #define HDMI_AUDIO_SS_20BIT 0x2 | ||
178 | #define HDMI_AUDIO_SS_24BIT 0x3 | ||
179 | |||
180 | #define HDMI_AUDIO_CXT_CT 0x0 /* refer to coding in CT */ | ||
181 | #define HDMI_AUDIO_CXT_HE_AAC 0x1 | ||
182 | #define HDMI_AUDIO_CXT_HE_AAC_V2 0x2 | ||
183 | #define HDMI_AUDIO_CXT_MPEG_SURROUND 0x3 | ||
184 | |||
185 | /* all fields little endian */ | ||
186 | struct hdmi_stereo_infoframe { | ||
187 | /* PB0 */ | ||
188 | u8 csum; | ||
189 | |||
190 | /* PB1 */ | ||
191 | u8 regid0; | ||
192 | |||
193 | /* PB2 */ | ||
194 | u8 regid1; | ||
195 | |||
196 | /* PB3 */ | ||
197 | u8 regid2; | ||
198 | |||
199 | /* PB4 */ | ||
200 | unsigned res1:5; | ||
201 | unsigned hdmi_video_format:3; | ||
202 | |||
203 | /* PB5 */ | ||
204 | unsigned res2:4; | ||
205 | unsigned _3d_structure:4; | ||
206 | |||
207 | /* PB6*/ | ||
208 | unsigned res3:4; | ||
209 | unsigned _3d_ext_data:4; | ||
210 | |||
211 | } __attribute__((packed)); | ||
212 | |||
213 | #define HDMI_VENDOR_VERSION 0x01 | ||
214 | |||
215 | struct tegra_dc_hdmi_data; | ||
216 | |||
217 | unsigned long tegra_hdmi_readl(struct tegra_dc_hdmi_data *hdmi, | ||
218 | unsigned long reg); | ||
219 | void tegra_hdmi_writel(struct tegra_dc_hdmi_data *hdmi, | ||
220 | unsigned long val, unsigned long reg); | ||
221 | |||
222 | #endif | ||