forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wis-go7007-0.9.8-kernel-2.6.17.diff
200 lines (186 loc) · 6.87 KB
/
wis-go7007-0.9.8-kernel-2.6.17.diff
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
diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c wis-go7007-linux-0.9.8/kernel/go7007-driver.c
--- wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/go7007-driver.c 2007-04-26 18:35:06.000000000 +0200
@@ -18,7 +18,9 @@
#include <linux/module.h>
#include <linux/version.h>
#include <linux/init.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
#include <linux/config.h>
+#endif
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c wis-go7007-linux-0.9.8/kernel/go7007-fw.c
--- wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/go7007-fw.c 2007-04-26 18:35:06.000000000 +0200
@@ -26,7 +26,10 @@
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
#include <linux/config.h>
+#endif
#include <linux/time.h>
#include <linux/mm.h>
#include <linux/device.h>
diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c wis-go7007-linux-0.9.8/kernel/go7007-i2c.c
--- wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/go7007-i2c.c 2007-04-26 18:35:06.000000000 +0200
@@ -15,9 +15,11 @@
* Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
*/
+#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
#include <linux/config.h>
+#endif
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/sched.h>
diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c wis-go7007-linux-0.9.8/kernel/go7007-usb.c
--- wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/go7007-usb.c 2007-04-26 18:35:06.000000000 +0200
@@ -27,7 +27,7 @@
#include <linux/usb.h>
#include <linux/i2c.h>
#include <asm/byteorder.h>
-#include <media/audiochip.h>
+#include <media/tvaudio.h>
#include "go7007-priv.h"
#include "wis-i2c.h"
@@ -225,17 +225,17 @@
.inputs = {
{
.video_input = 1,
- .audio_input = AUDIO_EXTERN,
+ .audio_input = TVAUDIO_INPUT_EXTERN,
.name = "Composite",
},
{
.video_input = 8,
- .audio_input = AUDIO_EXTERN,
+ .audio_input = TVAUDIO_INPUT_EXTERN,
.name = "S-Video",
},
{
.video_input = 3,
- .audio_input = AUDIO_TUNER,
+ .audio_input = TVAUDIO_INPUT_TUNER,
.name = "Tuner",
},
},
diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c
--- wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c 2007-04-26 18:35:06.000000000 +0200
@@ -17,8 +17,10 @@
#include <linux/module.h>
#include <linux/init.h>
-#include <linux/config.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
+#include <linux/config.h>
+#endif
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/spinlock.h>
@@ -939,7 +941,7 @@
if (go->i2c_adapter_online) {
i2c_clients_command(&go->i2c_adapter, DECODER_SET_INPUT,
&go->board_info->inputs[*input].video_input);
- i2c_clients_command(&go->i2c_adapter, AUDC_SET_INPUT,
+ i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO,
&go->board_info->inputs[*input].audio_input);
}
return 0;
diff -ru wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c wis-go7007-linux-0.9.8/kernel/snd-go7007.c
--- wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-04-26 18:38:24.000000000 +0200
@@ -20,7 +20,9 @@
#include <linux/version.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17)
#include <linux/config.h>
+#endif
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>
@@ -305,7 +307,11 @@
struct go7007_snd *gosnd = go->snd_context;
snd_card_disconnect(gosnd->card);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
snd_card_free_in_thread(gosnd->card);
+#else
+ snd_card_free_when_closed(gosnd->card);
+#endif
return 0;
}
EXPORT_SYMBOL(go7007_snd_remove);
diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c wis-go7007-linux-0.9.8/kernel/wis-saa7113.c
--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/wis-saa7113.c 2007-04-26 18:35:06.000000000 +0200
@@ -21,6 +21,7 @@
#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/video_decoder.h>
+#include <linux/ioctl.h>
#include "wis-i2c.h"
diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c wis-go7007-linux-0.9.8/kernel/wis-saa7115.c
--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/wis-saa7115.c 2007-04-26 18:35:06.000000000 +0200
@@ -21,6 +21,7 @@
#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/video_decoder.h>
+#include <linux/ioctl.h>
#include "wis-i2c.h"
diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c wis-go7007-linux-0.9.8/kernel/wis-tw2804.c
--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/wis-tw2804.c 2007-04-26 18:35:06.000000000 +0200
@@ -21,6 +21,7 @@
#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/video_decoder.h>
+#include <linux/ioctl.h>
#include "wis-i2c.h"
diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c wis-go7007-linux-0.9.8/kernel/wis-tw9903.c
--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/wis-tw9903.c 2007-04-26 18:35:06.000000000 +0200
@@ -21,6 +21,7 @@
#include <linux/i2c.h>
#include <linux/videodev.h>
#include <linux/video_decoder.h>
+#include <linux/ioctl.h>
#include "wis-i2c.h"
diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c wis-go7007-linux-0.9.8/kernel/wis-uda1342.c
--- wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c 2007-04-26 18:34:44.000000000 +0200
+++ wis-go7007-linux-0.9.8/kernel/wis-uda1342.c 2007-04-26 18:35:06.000000000 +0200
@@ -20,7 +20,7 @@
#include <linux/version.h>
#include <linux/i2c.h>
#include <linux/videodev.h>
-#include <media/audiochip.h>
+#include <media/tvaudio.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <media/v4l2-common.h>
#endif
@@ -38,15 +38,15 @@
unsigned int cmd, void *arg)
{
switch (cmd) {
- case AUDC_SET_INPUT:
+ case VIDIOC_S_AUDIO:
{
int *inp = arg;
switch (*inp) {
- case AUDIO_TUNER:
+ case TVAUDIO_INPUT_TUNER:
write_reg(client, 0x00, 0x1441); /* select input 2 */
break;
- case AUDIO_EXTERN:
+ case TVAUDIO_INPUT_EXTERN:
write_reg(client, 0x00, 0x1241); /* select input 1 */
break;
default: