20 static char bcm4500_firmware[] =
"dvb-usb-gp8psk-02.fw";
39 u8 fpga_vers, fw_vers[6];
41 if (!gp8psk_get_fw_version(d, fw_vers))
42 info(
"FW Version = %i.%02i.%i (0x%x) Build %4i/%02i/%02i",
44 2000 + fw_vers[5], fw_vers[4], fw_vers[3]);
46 info(
"failed to get FW version");
48 if (!gp8psk_get_fpga_version(d, &fpga_vers))
49 info(
"FPGA Version = %i", fpga_vers);
51 info(
"failed to get FPGA version");
61 while (ret >= 0 && ret != blen &&
try < 3) {
63 usb_rcvctrlpipe(d->
udev,0),
68 deb_info(
"reading number %d (ret: %d)\n",
try,ret);
72 if (ret < 0 || ret != blen) {
73 warn(
"usb in %d operation failed.", req);
78 deb_xfer(
"in: req. %x, val: %x, ind: %x, buffer: ",req,value,index);
91 deb_xfer(
"out: req. %x, val: %x, ind: %x, buffer: ",req,value,index);
98 usb_sndctrlpipe(d->
udev,0),
103 warn(
"usb out operation failed.");
119 &d->
udev->dev)) != 0) {
120 err(
"did not find the bcm4500 firmware file. (%s) "
121 "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)",
122 bcm4500_firmware,ret);
131 info(
"downloading bcm4500 firmware from file '%s'",bcm4500_firmware);
140 while (ptr[0] != 0xff) {
142 if (ptr + buflen >= fw->
data + fw->
size) {
143 err(
"failed to load bcm4500 firmware.");
148 err(
"failed to load bcm4500 firmware.");
181 if(gp8psk_load_bcm4500fw(d))
221 if (gp8psk_load_bcm4500fw(d))
226 static int gp8psk_streaming_ctrl(
struct dvb_usb_adapter *adap,
int onoff)
243 struct usb_device *
udev = interface_to_usbdev(intf);
247 info(
"found Genpix USB device pID = %x (hex)",
266 .firmware =
"dvb-usb-gp8psk-01.fw",
273 .streaming_ctrl = gp8psk_streaming_ctrl,
274 .frontend_attach = gp8psk_frontend_attach,
289 .power_ctrl = gp8psk_power_ctrl,
291 .generic_bulk_ctrl_endpoint = 0x01,
293 .num_device_descs = 4,
295 { .name =
"Genpix 8PSK-to-USB2 Rev.1 DVB-S receiver",
296 .cold_ids = { &gp8psk_usb_table[0],
NULL },
297 .warm_ids = { &gp8psk_usb_table[1],
NULL },
299 { .name =
"Genpix 8PSK-to-USB2 Rev.2 DVB-S receiver",
300 .cold_ids = {
NULL },
301 .warm_ids = { &gp8psk_usb_table[2],
NULL },
303 { .name =
"Genpix SkyWalker-1 DVB-S receiver",
304 .cold_ids = {
NULL },
305 .warm_ids = { &gp8psk_usb_table[3],
NULL },
307 { .name =
"Genpix SkyWalker-2 DVB-S receiver",
308 .cold_ids = {
NULL },
309 .warm_ids = { &gp8psk_usb_table[4],
NULL },
316 static struct usb_driver gp8psk_usb_driver = {
317 .name =
"dvb_usb_gp8psk",
318 .probe = gp8psk_usb_probe,
320 .id_table = gp8psk_usb_table,