diff options
author | Alan Nisota <alannisota@gmail.com> | 2007-08-18 16:52:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:22 -0400 |
commit | 458b634cd86968032171a4d6db5c89a772ff0348 (patch) | |
tree | 420b1a0933457e5910f2bcee542cc77e4aef5ee3 /drivers/media/dvb | |
parent | fa40b2237ab6ed239967f76432438080232b88fe (diff) |
V4L/DVB (6037): Updated GenPix USB driver
There are now 4 different versions of the GENPIX USB adapter. The
newest 'Skywalker' models are fully self-contained, and need no
additional hardware to be used. A very reliable DVB-S card even without
using any of the alternate modulatations (which this kernel module does
not currently support)
The following patch adds support for all 4 versions of the genpix
adapter (www.genpix-electronics.com).
Signed-off-by: Alan Nisota alannisota@gmail.com
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 7 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gp8psk-fe.c | 84 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gp8psk.c | 93 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gp8psk.h | 32 |
4 files changed, 152 insertions, 64 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index a16be605c630..43bfe50a2227 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | |||
@@ -158,8 +158,11 @@ | |||
158 | #define USB_PID_WINFAST_DTV_DONGLE_COLD 0x6025 | 158 | #define USB_PID_WINFAST_DTV_DONGLE_COLD 0x6025 |
159 | #define USB_PID_WINFAST_DTV_DONGLE_WARM 0x6026 | 159 | #define USB_PID_WINFAST_DTV_DONGLE_WARM 0x6026 |
160 | #define USB_PID_WINFAST_DTV_DONGLE_STK7700P 0x6f00 | 160 | #define USB_PID_WINFAST_DTV_DONGLE_STK7700P 0x6f00 |
161 | #define USB_PID_GENPIX_8PSK_COLD 0x0200 | 161 | #define USB_PID_GENPIX_8PSK_REV_1_COLD 0x0200 |
162 | #define USB_PID_GENPIX_8PSK_WARM 0x0201 | 162 | #define USB_PID_GENPIX_8PSK_REV_1_WARM 0x0201 |
163 | #define USB_PID_GENPIX_8PSK_REV_2 0x0202 | ||
164 | #define USB_PID_GENPIX_SKYWALKER_1 0x0203 | ||
165 | #define USB_PID_GENPIX_SKYWALKER_CW3K 0x0204 | ||
163 | #define USB_PID_SIGMATEK_DVB_110 0x6610 | 166 | #define USB_PID_SIGMATEK_DVB_110 0x6610 |
164 | #define USB_PID_MSI_DIGI_VOX_MINI_II 0x1513 | 167 | #define USB_PID_MSI_DIGI_VOX_MINI_II 0x1513 |
165 | #define USB_PID_OPERA1_COLD 0x2830 | 168 | #define USB_PID_OPERA1_COLD 0x2830 |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk-fe.c b/drivers/media/dvb/dvb-usb/gp8psk-fe.c index 6ccbdc9cd772..e37142d9271a 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk-fe.c +++ b/drivers/media/dvb/dvb-usb/gp8psk-fe.c | |||
@@ -1,7 +1,8 @@ | |||
1 | /* DVB USB compliant Linux driver for the | 1 | /* DVB USB compliant Linux driver for the |
2 | * - GENPIX 8pks/qpsk USB2.0 DVB-S module | 2 | * - GENPIX 8pks/qpsk/DCII USB2.0 DVB-S module |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) | 4 | * Copyright (C) 2006,2007 Alan Nisota (alannisota@gmail.com) |
5 | * Copyright (C) 2006,2007 Genpix Electronics (genpix@genpix-electronics.com) | ||
5 | * | 6 | * |
6 | * Thanks to GENPIX for the sample code used to implement this module. | 7 | * Thanks to GENPIX for the sample code used to implement this module. |
7 | * | 8 | * |
@@ -17,27 +18,39 @@ | |||
17 | 18 | ||
18 | struct gp8psk_fe_state { | 19 | struct gp8psk_fe_state { |
19 | struct dvb_frontend fe; | 20 | struct dvb_frontend fe; |
20 | |||
21 | struct dvb_usb_device *d; | 21 | struct dvb_usb_device *d; |
22 | 22 | u8 lock; | |
23 | u16 snr; | 23 | u16 snr; |
24 | 24 | unsigned long next_status_check; | |
25 | unsigned long next_snr_check; | 25 | unsigned long status_check_interval; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | static int gp8psk_fe_update_status(struct gp8psk_fe_state *st) | ||
29 | { | ||
30 | u8 buf[6]; | ||
31 | if (time_after(jiffies,st->next_status_check)) { | ||
32 | gp8psk_usb_in_op(st->d, GET_SIGNAL_LOCK, 0,0,&st->lock,1); | ||
33 | gp8psk_usb_in_op(st->d, GET_SIGNAL_STRENGTH, 0,0,buf,6); | ||
34 | st->snr = (buf[1]) << 8 | buf[0]; | ||
35 | st->next_status_check = jiffies + (st->status_check_interval*HZ)/1000; | ||
36 | } | ||
37 | return 0; | ||
38 | } | ||
39 | |||
28 | static int gp8psk_fe_read_status(struct dvb_frontend* fe, fe_status_t *status) | 40 | static int gp8psk_fe_read_status(struct dvb_frontend* fe, fe_status_t *status) |
29 | { | 41 | { |
30 | struct gp8psk_fe_state *st = fe->demodulator_priv; | 42 | struct gp8psk_fe_state *st = fe->demodulator_priv; |
31 | u8 lock; | 43 | gp8psk_fe_update_status(st); |
32 | 44 | ||
33 | if (gp8psk_usb_in_op(st->d, GET_SIGNAL_LOCK, 0, 0, &lock,1)) | 45 | if (st->lock) |
34 | return -EINVAL; | ||
35 | |||
36 | if (lock) | ||
37 | *status = FE_HAS_LOCK | FE_HAS_SYNC | FE_HAS_VITERBI | FE_HAS_SIGNAL | FE_HAS_CARRIER; | 46 | *status = FE_HAS_LOCK | FE_HAS_SYNC | FE_HAS_VITERBI | FE_HAS_SIGNAL | FE_HAS_CARRIER; |
38 | else | 47 | else |
39 | *status = 0; | 48 | *status = 0; |
40 | 49 | ||
50 | if (*status & FE_HAS_LOCK) | ||
51 | st->status_check_interval = 1000; | ||
52 | else | ||
53 | st->status_check_interval = 100; | ||
41 | return 0; | 54 | return 0; |
42 | } | 55 | } |
43 | 56 | ||
@@ -60,33 +73,29 @@ static int gp8psk_fe_read_unc_blocks(struct dvb_frontend* fe, u32 *unc) | |||
60 | static int gp8psk_fe_read_snr(struct dvb_frontend* fe, u16 *snr) | 73 | static int gp8psk_fe_read_snr(struct dvb_frontend* fe, u16 *snr) |
61 | { | 74 | { |
62 | struct gp8psk_fe_state *st = fe->demodulator_priv; | 75 | struct gp8psk_fe_state *st = fe->demodulator_priv; |
63 | u8 buf[2]; | 76 | gp8psk_fe_update_status(st); |
64 | 77 | /* snr is reported in dBu*256 */ | |
65 | if (time_after(jiffies,st->next_snr_check)) { | 78 | *snr = st->snr; |
66 | gp8psk_usb_in_op(st->d,GET_SIGNAL_STRENGTH,0,0,buf,2); | ||
67 | *snr = (int)(buf[1]) << 8 | buf[0]; | ||
68 | /* snr is reported in dBu*256 */ | ||
69 | /* snr / 38.4 ~= 100% strength */ | ||
70 | /* snr * 17 returns 100% strength as 65535 */ | ||
71 | if (*snr <= 3855) | ||
72 | *snr = (*snr<<4) + *snr; // snr * 17 | ||
73 | else | ||
74 | *snr = 65535; | ||
75 | st->next_snr_check = jiffies + (10*HZ)/1000; | ||
76 | } else { | ||
77 | *snr = st->snr; | ||
78 | } | ||
79 | return 0; | 79 | return 0; |
80 | } | 80 | } |
81 | 81 | ||
82 | static int gp8psk_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) | 82 | static int gp8psk_fe_read_signal_strength(struct dvb_frontend* fe, u16 *strength) |
83 | { | 83 | { |
84 | return gp8psk_fe_read_snr(fe, strength); | 84 | struct gp8psk_fe_state *st = fe->demodulator_priv; |
85 | gp8psk_fe_update_status(st); | ||
86 | /* snr is reported in dBu*256 */ | ||
87 | /* snr / 38.4 ~= 100% strength */ | ||
88 | /* snr * 17 returns 100% strength as 65535 */ | ||
89 | if (st->snr > 0xf00) | ||
90 | *strength = 0xffff; | ||
91 | else | ||
92 | *strength = (st->snr << 4) + st->snr; /* snr*17 */ | ||
93 | return 0; | ||
85 | } | 94 | } |
86 | 95 | ||
87 | static int gp8psk_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) | 96 | static int gp8psk_fe_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *tune) |
88 | { | 97 | { |
89 | tune->min_delay_ms = 800; | 98 | tune->min_delay_ms = 200; |
90 | return 0; | 99 | return 0; |
91 | } | 100 | } |
92 | 101 | ||
@@ -124,7 +133,9 @@ static int gp8psk_fe_set_frontend(struct dvb_frontend* fe, | |||
124 | 133 | ||
125 | gp8psk_usb_out_op(state->d,TUNE_8PSK,0,0,cmd,10); | 134 | gp8psk_usb_out_op(state->d,TUNE_8PSK,0,0,cmd,10); |
126 | 135 | ||
127 | state->next_snr_check = jiffies; | 136 | state->lock = 0; |
137 | state->next_status_check = jiffies; | ||
138 | state->status_check_interval = 200; | ||
128 | 139 | ||
129 | return 0; | 140 | return 0; |
130 | } | 141 | } |
@@ -190,6 +201,12 @@ static int gp8psk_fe_set_voltage (struct dvb_frontend* fe, fe_sec_voltage_t volt | |||
190 | return 0; | 201 | return 0; |
191 | } | 202 | } |
192 | 203 | ||
204 | static int gp8psk_fe_enable_high_lnb_voltage(struct dvb_frontend* fe, long onoff) | ||
205 | { | ||
206 | struct gp8psk_fe_state* state = fe->demodulator_priv; | ||
207 | return gp8psk_usb_out_op(state->d, USE_EXTRA_VOLT, onoff, 0,NULL,0); | ||
208 | } | ||
209 | |||
193 | static int gp8psk_fe_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long sw_cmd) | 210 | static int gp8psk_fe_send_legacy_dish_cmd (struct dvb_frontend* fe, unsigned long sw_cmd) |
194 | { | 211 | { |
195 | struct gp8psk_fe_state* state = fe->demodulator_priv; | 212 | struct gp8psk_fe_state* state = fe->demodulator_priv; |
@@ -235,10 +252,10 @@ success: | |||
235 | 252 | ||
236 | static struct dvb_frontend_ops gp8psk_fe_ops = { | 253 | static struct dvb_frontend_ops gp8psk_fe_ops = { |
237 | .info = { | 254 | .info = { |
238 | .name = "Genpix 8psk-USB DVB-S", | 255 | .name = "Genpix 8psk-to-USB2 DVB-S", |
239 | .type = FE_QPSK, | 256 | .type = FE_QPSK, |
240 | .frequency_min = 950000, | 257 | .frequency_min = 800000, |
241 | .frequency_max = 2150000, | 258 | .frequency_max = 2250000, |
242 | .frequency_stepsize = 100, | 259 | .frequency_stepsize = 100, |
243 | .symbol_rate_min = 1000000, | 260 | .symbol_rate_min = 1000000, |
244 | .symbol_rate_max = 45000000, | 261 | .symbol_rate_max = 45000000, |
@@ -269,4 +286,5 @@ static struct dvb_frontend_ops gp8psk_fe_ops = { | |||
269 | .set_tone = gp8psk_fe_set_tone, | 286 | .set_tone = gp8psk_fe_set_tone, |
270 | .set_voltage = gp8psk_fe_set_voltage, | 287 | .set_voltage = gp8psk_fe_set_voltage, |
271 | .dishnetwork_send_legacy_command = gp8psk_fe_send_legacy_dish_cmd, | 288 | .dishnetwork_send_legacy_command = gp8psk_fe_send_legacy_dish_cmd, |
289 | .enable_high_lnb_voltage = gp8psk_fe_enable_high_lnb_voltage | ||
272 | }; | 290 | }; |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c index 518d67fca5e8..92147ee3e14f 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/drivers/media/dvb/dvb-usb/gp8psk.c | |||
@@ -1,7 +1,8 @@ | |||
1 | /* DVB USB compliant Linux driver for the | 1 | /* DVB USB compliant Linux driver for the |
2 | * - GENPIX 8pks/qpsk USB2.0 DVB-S module | 2 | * - GENPIX 8pks/qpsk/DCII USB2.0 DVB-S module |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) | 4 | * Copyright (C) 2006,2007 Alan Nisota (alannisota@gmail.com) |
5 | * Copyright (C) 2006,2007 Genpix Electronics (genpix@genpix-electronics.com) | ||
5 | * | 6 | * |
6 | * Thanks to GENPIX for the sample code used to implement this module. | 7 | * Thanks to GENPIX for the sample code used to implement this module. |
7 | * | 8 | * |
@@ -40,7 +41,7 @@ int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 | |||
40 | } | 41 | } |
41 | 42 | ||
42 | if (ret < 0 || ret != blen) { | 43 | if (ret < 0 || ret != blen) { |
43 | warn("usb in operation failed."); | 44 | warn("usb in %d operation failed.", req); |
44 | ret = -EIO; | 45 | ret = -EIO; |
45 | } else | 46 | } else |
46 | ret = 0; | 47 | ret = 0; |
@@ -97,10 +98,10 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d) | |||
97 | if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0)) | 98 | if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0)) |
98 | goto out_rel_fw; | 99 | goto out_rel_fw; |
99 | 100 | ||
100 | info("downloaidng bcm4500 firmware from file '%s'",bcm4500_firmware); | 101 | info("downloading bcm4500 firmware from file '%s'",bcm4500_firmware); |
101 | 102 | ||
102 | ptr = fw->data; | 103 | ptr = fw->data; |
103 | buf = kmalloc(512, GFP_KERNEL | GFP_DMA); | 104 | buf = kmalloc(64, GFP_KERNEL | GFP_DMA); |
104 | 105 | ||
105 | while (ptr[0] != 0xff) { | 106 | while (ptr[0] != 0xff) { |
106 | u16 buflen = ptr[0] + 4; | 107 | u16 buflen = ptr[0] + 4; |
@@ -129,25 +130,34 @@ out_rel_fw: | |||
129 | static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) | 130 | static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) |
130 | { | 131 | { |
131 | u8 status, buf; | 132 | u8 status, buf; |
133 | int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct); | ||
134 | |||
132 | if (onoff) { | 135 | if (onoff) { |
133 | gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); | 136 | gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); |
134 | if (! (status & 0x01)) /* started */ | 137 | if (! (status & bm8pskStarted)) { /* started */ |
138 | if(gp_product_id == USB_PID_GENPIX_SKYWALKER_CW3K) | ||
139 | gp8psk_usb_out_op(d, CW3K_INIT, 1, 0, NULL, 0); | ||
135 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) | 140 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) |
136 | return -EINVAL; | 141 | return -EINVAL; |
142 | } | ||
137 | 143 | ||
138 | if (! (status & 0x02)) /* BCM4500 firmware loaded */ | 144 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) |
139 | if(gp8psk_load_bcm4500fw(d)) | 145 | if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ |
140 | return EINVAL; | 146 | if(gp8psk_load_bcm4500fw(d)) |
147 | return EINVAL; | ||
141 | 148 | ||
142 | if (! (status & 0x04)) /* LNB Power */ | 149 | if (! (status & bmIntersilOn)) /* LNB Power */ |
143 | if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, | 150 | if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, |
144 | &buf, 1)) | 151 | &buf, 1)) |
145 | return EINVAL; | 152 | return EINVAL; |
146 | 153 | ||
147 | /* Set DVB mode */ | 154 | /* Set DVB mode to 1 */ |
148 | if(gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) | 155 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) |
149 | return -EINVAL; | 156 | if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) |
150 | gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); | 157 | return EINVAL; |
158 | /* Abort possible TS (if previous tune crashed) */ | ||
159 | if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) | ||
160 | return EINVAL; | ||
151 | } else { | 161 | } else { |
152 | /* Turn off LNB power */ | 162 | /* Turn off LNB power */ |
153 | if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) | 163 | if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) |
@@ -155,11 +165,28 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
155 | /* Turn off 8psk power */ | 165 | /* Turn off 8psk power */ |
156 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) | 166 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) |
157 | return -EINVAL; | 167 | return -EINVAL; |
158 | 168 | if(gp_product_id == USB_PID_GENPIX_SKYWALKER_CW3K) | |
169 | gp8psk_usb_out_op(d, CW3K_INIT, 0, 0, NULL, 0); | ||
159 | } | 170 | } |
160 | return 0; | 171 | return 0; |
161 | } | 172 | } |
162 | 173 | ||
174 | int gp8psk_bcm4500_reload(struct dvb_usb_device *d) | ||
175 | { | ||
176 | u8 buf; | ||
177 | int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct); | ||
178 | /* Turn off 8psk power */ | ||
179 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) | ||
180 | return -EINVAL; | ||
181 | /* Turn On 8psk power */ | ||
182 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) | ||
183 | return -EINVAL; | ||
184 | /* load BCM4500 firmware */ | ||
185 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) | ||
186 | if (gp8psk_load_bcm4500fw(d)) | ||
187 | return EINVAL; | ||
188 | return 0; | ||
189 | } | ||
163 | 190 | ||
164 | static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) | 191 | static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) |
165 | { | 192 | { |
@@ -177,12 +204,22 @@ static struct dvb_usb_device_properties gp8psk_properties; | |||
177 | static int gp8psk_usb_probe(struct usb_interface *intf, | 204 | static int gp8psk_usb_probe(struct usb_interface *intf, |
178 | const struct usb_device_id *id) | 205 | const struct usb_device_id *id) |
179 | { | 206 | { |
180 | return dvb_usb_device_init(intf,&gp8psk_properties,THIS_MODULE,NULL); | 207 | int ret; |
208 | struct usb_device *udev = interface_to_usbdev(intf); | ||
209 | ret = dvb_usb_device_init(intf,&gp8psk_properties,THIS_MODULE,NULL); | ||
210 | if (ret == 0) { | ||
211 | info("found Genpix USB device pID = %x (hex)", | ||
212 | le16_to_cpu(udev->descriptor.idProduct)); | ||
213 | } | ||
214 | return ret; | ||
181 | } | 215 | } |
182 | 216 | ||
183 | static struct usb_device_id gp8psk_usb_table [] = { | 217 | static struct usb_device_id gp8psk_usb_table [] = { |
184 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_COLD) }, | 218 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_REV_1_COLD) }, |
185 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_WARM) }, | 219 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_REV_1_WARM) }, |
220 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_8PSK_REV_2) }, | ||
221 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_SKYWALKER_1) }, | ||
222 | { USB_DEVICE(USB_VID_GENPIX, USB_PID_GENPIX_SKYWALKER_CW3K) }, | ||
186 | { 0 }, | 223 | { 0 }, |
187 | }; | 224 | }; |
188 | MODULE_DEVICE_TABLE(usb, gp8psk_usb_table); | 225 | MODULE_DEVICE_TABLE(usb, gp8psk_usb_table); |
@@ -213,12 +250,24 @@ static struct dvb_usb_device_properties gp8psk_properties = { | |||
213 | 250 | ||
214 | .generic_bulk_ctrl_endpoint = 0x01, | 251 | .generic_bulk_ctrl_endpoint = 0x01, |
215 | 252 | ||
216 | .num_device_descs = 1, | 253 | .num_device_descs = 4, |
217 | .devices = { | 254 | .devices = { |
218 | { .name = "Genpix 8PSK-USB DVB-S USB2.0 receiver", | 255 | { .name = "Genpix 8PSK-to-USB2 Rev.1 DVB-S receiver", |
219 | .cold_ids = { &gp8psk_usb_table[0], NULL }, | 256 | .cold_ids = { &gp8psk_usb_table[0], NULL }, |
220 | .warm_ids = { &gp8psk_usb_table[1], NULL }, | 257 | .warm_ids = { &gp8psk_usb_table[1], NULL }, |
221 | }, | 258 | }, |
259 | { .name = "Genpix 8PSK-to-USB2 Rev.2 DVB-S receiver", | ||
260 | .cold_ids = { NULL }, | ||
261 | .warm_ids = { &gp8psk_usb_table[2], NULL }, | ||
262 | }, | ||
263 | { .name = "Genpix SkyWalker-1 DVB-S receiver", | ||
264 | .cold_ids = { NULL }, | ||
265 | .warm_ids = { &gp8psk_usb_table[3], NULL }, | ||
266 | }, | ||
267 | { .name = "Genpix SkyWalker-CW3K DVB-S receiver", | ||
268 | .cold_ids = { NULL }, | ||
269 | .warm_ids = { &gp8psk_usb_table[4], NULL }, | ||
270 | }, | ||
222 | { NULL }, | 271 | { NULL }, |
223 | } | 272 | } |
224 | }; | 273 | }; |
@@ -253,6 +302,6 @@ module_init(gp8psk_usb_module_init); | |||
253 | module_exit(gp8psk_usb_module_exit); | 302 | module_exit(gp8psk_usb_module_exit); |
254 | 303 | ||
255 | MODULE_AUTHOR("Alan Nisota <alannisota@gamil.com>"); | 304 | MODULE_AUTHOR("Alan Nisota <alannisota@gamil.com>"); |
256 | MODULE_DESCRIPTION("Driver for Genpix 8psk-USB DVB-S USB2.0"); | 305 | MODULE_DESCRIPTION("Driver for Genpix 8psk-to-USB2 DVB-S"); |
257 | MODULE_VERSION("1.0"); | 306 | MODULE_VERSION("1.1"); |
258 | MODULE_LICENSE("GPL"); | 307 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.h b/drivers/media/dvb/dvb-usb/gp8psk.h index 3eba7061011c..e83a57506cfa 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.h +++ b/drivers/media/dvb/dvb-usb/gp8psk.h | |||
@@ -1,7 +1,8 @@ | |||
1 | /* DVB USB compliant Linux driver for the | 1 | /* DVB USB compliant Linux driver for the |
2 | * - GENPIX 8pks/qpsk USB2.0 DVB-S module | 2 | * - GENPIX 8pks/qpsk/DCII USB2.0 DVB-S module |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) | 4 | * Copyright (C) 2006 Alan Nisota (alannisota@gmail.com) |
5 | * Copyright (C) 2006,2007 Alan Nisota (alannisota@gmail.com) | ||
5 | * | 6 | * |
6 | * Thanks to GENPIX for the sample code used to implement this module. | 7 | * Thanks to GENPIX for the sample code used to implement this module. |
7 | * | 8 | * |
@@ -30,21 +31,37 @@ extern int dvb_usb_gp8psk_debug; | |||
30 | #define TH_COMMAND_IN 0xC0 | 31 | #define TH_COMMAND_IN 0xC0 |
31 | #define TH_COMMAND_OUT 0xC1 | 32 | #define TH_COMMAND_OUT 0xC1 |
32 | 33 | ||
33 | /* command bytes */ | 34 | /* gp8psk commands */ |
34 | #define GET_8PSK_CONFIG 0x80 | 35 | |
36 | #define GET_8PSK_CONFIG 0x80 /* in */ | ||
35 | #define SET_8PSK_CONFIG 0x81 | 37 | #define SET_8PSK_CONFIG 0x81 |
38 | #define I2C_WRITE 0x83 | ||
39 | #define I2C_READ 0x84 | ||
36 | #define ARM_TRANSFER 0x85 | 40 | #define ARM_TRANSFER 0x85 |
37 | #define TUNE_8PSK 0x86 | 41 | #define TUNE_8PSK 0x86 |
38 | #define GET_SIGNAL_STRENGTH 0x87 | 42 | #define GET_SIGNAL_STRENGTH 0x87 /* in */ |
39 | #define LOAD_BCM4500 0x88 | 43 | #define LOAD_BCM4500 0x88 |
40 | #define BOOT_8PSK 0x89 | 44 | #define BOOT_8PSK 0x89 /* in */ |
41 | #define START_INTERSIL 0x8A | 45 | #define START_INTERSIL 0x8A /* in */ |
42 | #define SET_LNB_VOLTAGE 0x8B | 46 | #define SET_LNB_VOLTAGE 0x8B |
43 | #define SET_22KHZ_TONE 0x8C | 47 | #define SET_22KHZ_TONE 0x8C |
44 | #define SEND_DISEQC_COMMAND 0x8D | 48 | #define SEND_DISEQC_COMMAND 0x8D |
45 | #define SET_DVB_MODE 0x8E | 49 | #define SET_DVB_MODE 0x8E |
46 | #define SET_DN_SWITCH 0x8F | 50 | #define SET_DN_SWITCH 0x8F |
47 | #define GET_SIGNAL_LOCK 0x90 | 51 | #define GET_SIGNAL_LOCK 0x90 /* in */ |
52 | #define GET_SERIAL_NUMBER 0x93 /* in */ | ||
53 | #define USE_EXTRA_VOLT 0x94 | ||
54 | #define CW3K_INIT 0x9d | ||
55 | |||
56 | /* PSK_configuration bits */ | ||
57 | #define bm8pskStarted 0x01 | ||
58 | #define bm8pskFW_Loaded 0x02 | ||
59 | #define bmIntersilOn 0x04 | ||
60 | #define bmDVBmode 0x08 | ||
61 | #define bm22kHz 0x10 | ||
62 | #define bmSEL18V 0x20 | ||
63 | #define bmDCtuned 0x40 | ||
64 | #define bmArmed 0x80 | ||
48 | 65 | ||
49 | /* Satellite modulation modes */ | 66 | /* Satellite modulation modes */ |
50 | #define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */ | 67 | #define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */ |
@@ -75,5 +92,6 @@ extern struct dvb_frontend * gp8psk_fe_attach(struct dvb_usb_device *d); | |||
75 | extern int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen); | 92 | extern int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen); |
76 | extern int gp8psk_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, | 93 | extern int gp8psk_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, |
77 | u16 index, u8 *b, int blen); | 94 | u16 index, u8 *b, int blen); |
95 | extern int gp8psk_bcm4500_reload(struct dvb_usb_device *d); | ||
78 | 96 | ||
79 | #endif | 97 | #endif |