aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0866-drm-amd-dal-Don-t-include-audio-type-in-dc.h.patch
blob: 3c2ef09d7c34c3f689bf14824ae604cf9ccf7c14 (plain)
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
From 4be119ad847e317ad53d1162155b63dccd2ec607 Mon Sep 17 00:00:00 2001
From: Eric Yang <eric.yang2@amd.com>
Date: Sat, 27 Feb 2016 17:04:24 -0500
Subject: [PATCH 0866/1110] drm/amd/dal: Don't include audio type in dc.h

Signed-off-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/dc.h               |   2 +-
 drivers/gpu/drm/amd/dal/dc/dc_types.h         | 101 ++++++++++++++++++++
 drivers/gpu/drm/amd/dal/dc/dm_services.h      |   2 -
 drivers/gpu/drm/amd/dal/include/audio_types.h | 129 --------------------------
 4 files changed, 102 insertions(+), 132 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h
index 5660790..348bb0d 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc.h
@@ -28,7 +28,7 @@
 
 #include "dc_types.h"
 #include "dal_types.h"
-#include "audio_types.h"
+#include "grph_object_defs.h"
 #include "logger_types.h"
 #include "gpio_types.h"
 #include "link_service_types.h"
diff --git a/drivers/gpu/drm/amd/dal/dc/dc_types.h b/drivers/gpu/drm/amd/dal/dc/dc_types.h
index e849972..a0a8542 100644
--- a/drivers/gpu/drm/amd/dal/dc/dc_types.h
+++ b/drivers/gpu/drm/amd/dal/dc/dc_types.h
@@ -571,4 +571,105 @@ struct render_mode {
 	enum pixel_format pixel_format;
 };
 
+/* audio*/
+
+union audio_sample_rates {
+	struct sample_rates {
+		uint8_t RATE_32:1;
+		uint8_t RATE_44_1:1;
+		uint8_t RATE_48:1;
+		uint8_t RATE_88_2:1;
+		uint8_t RATE_96:1;
+		uint8_t RATE_176_4:1;
+		uint8_t RATE_192:1;
+	} rate;
+
+	uint8_t all;
+};
+
+struct audio_speaker_flags {
+    uint32_t FL_FR:1;
+    uint32_t LFE:1;
+    uint32_t FC:1;
+    uint32_t RL_RR:1;
+    uint32_t RC:1;
+    uint32_t FLC_FRC:1;
+    uint32_t RLC_RRC:1;
+    uint32_t SUPPORT_AI:1;
+};
+
+struct audio_speaker_info {
+	uint32_t ALLSPEAKERS:7;
+	uint32_t SUPPORT_AI:1;
+};
+
+
+struct audio_info_flags {
+
+	union {
+
+		struct audio_speaker_flags speaker_flags;
+		struct audio_speaker_info   info;
+
+		uint8_t all;
+	};
+};
+
+enum audio_format_code {
+	AUDIO_FORMAT_CODE_FIRST = 1,
+	AUDIO_FORMAT_CODE_LINEARPCM = AUDIO_FORMAT_CODE_FIRST,
+
+	AUDIO_FORMAT_CODE_AC3,
+	/*Layers 1 & 2 */
+	AUDIO_FORMAT_CODE_MPEG1,
+	/*MPEG1 Layer 3 */
+	AUDIO_FORMAT_CODE_MP3,
+	/*multichannel */
+	AUDIO_FORMAT_CODE_MPEG2,
+	AUDIO_FORMAT_CODE_AAC,
+	AUDIO_FORMAT_CODE_DTS,
+	AUDIO_FORMAT_CODE_ATRAC,
+	AUDIO_FORMAT_CODE_1BITAUDIO,
+	AUDIO_FORMAT_CODE_DOLBYDIGITALPLUS,
+	AUDIO_FORMAT_CODE_DTS_HD,
+	AUDIO_FORMAT_CODE_MAT_MLP,
+	AUDIO_FORMAT_CODE_DST,
+	AUDIO_FORMAT_CODE_WMAPRO,
+	AUDIO_FORMAT_CODE_LAST,
+	AUDIO_FORMAT_CODE_COUNT =
+		AUDIO_FORMAT_CODE_LAST - AUDIO_FORMAT_CODE_FIRST
+};
+
+struct audio_mode {
+	 /* ucData[0] [6:3] */
+	enum audio_format_code format_code;
+	/* ucData[0] [2:0] */
+	uint8_t channel_count;
+	/* ucData[1] */
+	union audio_sample_rates sample_rates;
+	union {
+		/* for LPCM */
+		uint8_t sample_size;
+		/* for Audio Formats 2-8 (Max bit rate divided by 8 kHz) */
+		uint8_t max_bit_rate;
+		/* for Audio Formats 9-15 */
+		uint8_t vendor_specific;
+	};
+};
+
+struct audio_info {
+	struct audio_info_flags flags;
+	uint32_t video_latency;
+	uint32_t audio_latency;
+	uint32_t display_index;
+	uint8_t display_name[AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS];
+	uint32_t manufacture_id;
+	uint32_t product_id;
+	/* PortID used for ContainerID when defined */
+	uint32_t port_id[2];
+	uint32_t mode_count;
+	/* this field must be last in this struct */
+	struct audio_mode modes[DC_MAX_AUDIO_DESC_COUNT];
+};
+
 #endif /* DC_TYPES_H_ */
diff --git a/drivers/gpu/drm/amd/dal/dc/dm_services.h b/drivers/gpu/drm/amd/dal/dc/dm_services.h
index 2d44e92..8acdcd4 100644
--- a/drivers/gpu/drm/amd/dal/dc/dm_services.h
+++ b/drivers/gpu/drm/amd/dal/dc/dm_services.h
@@ -34,8 +34,6 @@
 /* TODO: remove when DC is complete. */
 #include "dm_services_types.h"
 #include "logger_interface.h"
-#include "include/dal_types.h"
-#include "irq_types.h"
 #include "link_service_types.h"
 
 #undef DEPRECATED
diff --git a/drivers/gpu/drm/amd/dal/include/audio_types.h b/drivers/gpu/drm/amd/dal/include/audio_types.h
index 8f1eda1..f08b609 100644
--- a/drivers/gpu/drm/amd/dal/include/audio_types.h
+++ b/drivers/gpu/drm/amd/dal/include/audio_types.h
@@ -33,13 +33,6 @@
 #define MAX_HW_AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS 18
 #define MULTI_CHANNEL_SPLIT_NO_ASSO_INFO 0xFFFFFFFF
 
-struct audio_pll_hw_settings {
-	uint32_t feed_back_divider;
-	uint32_t step_size_integer;
-	uint32_t step_size_fraction;
-	uint32_t step_range;
-};
-
 struct audio_clock_info {
 	/* pixel clock frequency*/
 	uint32_t pixel_clock_in_10khz;
@@ -70,113 +63,6 @@ enum audio_dto_source {
 	DTO_SOURCE_ID5
 };
 
-union audio_sample_rates {
-	struct sample_rates {
-		uint8_t RATE_32:1;
-		uint8_t RATE_44_1:1;
-		uint8_t RATE_48:1;
-		uint8_t RATE_88_2:1;
-		uint8_t RATE_96:1;
-		uint8_t RATE_176_4:1;
-		uint8_t RATE_192:1;
-	} rate;
-
-	uint8_t all;
-};
-
-enum audio_format_code {
-	AUDIO_FORMAT_CODE_FIRST = 1,
-	AUDIO_FORMAT_CODE_LINEARPCM = AUDIO_FORMAT_CODE_FIRST,
-
-	AUDIO_FORMAT_CODE_AC3,
-	/*Layers 1 & 2 */
-	AUDIO_FORMAT_CODE_MPEG1,
-	/*MPEG1 Layer 3 */
-	AUDIO_FORMAT_CODE_MP3,
-	/*multichannel */
-	AUDIO_FORMAT_CODE_MPEG2,
-	AUDIO_FORMAT_CODE_AAC,
-	AUDIO_FORMAT_CODE_DTS,
-	AUDIO_FORMAT_CODE_ATRAC,
-	AUDIO_FORMAT_CODE_1BITAUDIO,
-	AUDIO_FORMAT_CODE_DOLBYDIGITALPLUS,
-	AUDIO_FORMAT_CODE_DTS_HD,
-	AUDIO_FORMAT_CODE_MAT_MLP,
-	AUDIO_FORMAT_CODE_DST,
-	AUDIO_FORMAT_CODE_WMAPRO,
-	AUDIO_FORMAT_CODE_LAST,
-	AUDIO_FORMAT_CODE_COUNT =
-		AUDIO_FORMAT_CODE_LAST - AUDIO_FORMAT_CODE_FIRST
-};
-
-struct audio_mode {
-	 /* ucData[0] [6:3] */
-	enum audio_format_code format_code;
-	/* ucData[0] [2:0] */
-	uint8_t channel_count;
-	/* ucData[1] */
-	union audio_sample_rates sample_rates;
-	union {
-		/* for LPCM */
-		uint8_t sample_size;
-		/* for Audio Formats 2-8 (Max bit rate divided by 8 kHz) */
-		uint8_t max_bit_rate;
-		/* for Audio Formats 9-15 */
-		uint8_t vendor_specific;
-	};
-};
-
-struct audio_speaker_flags {
-    uint32_t FL_FR:1;
-    uint32_t LFE:1;
-    uint32_t FC:1;
-    uint32_t RL_RR:1;
-    uint32_t RC:1;
-    uint32_t FLC_FRC:1;
-    uint32_t RLC_RRC:1;
-    uint32_t SUPPORT_AI:1;
-};
-
-struct audio_speaker_info {
-    uint32_t ALLSPEAKERS:7;
-    uint32_t SUPPORT_AI:1;
-};
-
-struct audio_info_flags {
-
-	union {
-
-		struct audio_speaker_flags speaker_flags;
-		struct audio_speaker_info   info;
-
-		uint8_t all;
-	};
-};
-
-/*struct audio_info_flags {
-	struct audio_speaker_flags {
-		uint32_t FL_FR:1;
-		uint32_t LFE:1;
-		uint32_t FC:1;
-		uint32_t RL_RR:1;
-		uint32_t RC:1;
-		uint32_t FLC_FRC:1;
-		uint32_t RLC_RRC:1;
-		uint32_t SUPPORT_AI:1;
-	};
-
-	struct audio_speaker_info {
-		uint32_t ALLSPEAKERS:7;
-		uint32_t SUPPORT_AI:1;
-	};
-
-	union {
-		struct audio_speaker_flags speaker_flags;
-		struct audio_speaker_info info;
-	};
-};
-*/
-
 union audio_cea_channels {
 	uint8_t all;
 	struct audio_cea_channels_bits {
@@ -191,21 +77,6 @@ union audio_cea_channels {
 	} channels;
 };
 
-struct audio_info {
-	struct audio_info_flags flags;
-	uint32_t video_latency;
-	uint32_t audio_latency;
-	uint32_t display_index;
-	uint8_t display_name[AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS];
-	uint32_t manufacture_id;
-	uint32_t product_id;
-	/* PortID used for ContainerID when defined */
-	uint32_t port_id[2];
-	uint32_t mode_count;
-	/* this field must be last in this struct */
-	struct audio_mode modes[DC_MAX_AUDIO_DESC_COUNT];
-};
-
 struct audio_crtc_info {
 	uint32_t h_total;
 	uint32_t h_active;
-- 
2.7.4