Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1157020d authored by Marc Koschewski's avatar Marc Koschewski Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (3323): Add Kconfig option for wrongly programmed devices



- A new Kconfig option makes the user able to select if the dibusb-mb driver shall claim faulty programmed USB devices which are coming with default Cypress USB IDs.

Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
parent 00e34579
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -37,16 +37,16 @@ config DVB_USB_DIBUSB_MB
	  DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-B demodulator.

	  Devices supported by this driver:
	    TwinhanDTV USB-Ter (VP7041)
	    TwinhanDTV Magic Box (VP7041e)
	    KWorld/JetWay/ADSTech V-Stream XPERT DTV - DVB-T USB1.1 and USB2.0
	    Hama DVB-T USB1.1-Box
	    DiBcom USB1.1 reference devices (non-public)
	    Ultima Electronic/Artec T1 USB TVBOX
	    Artec T1 USB1.1 boxes
	    Avermedia AverTV DVBT USB1.1
	    Compro Videomate DVB-U2000 - DVB-T USB
	    DiBcom USB1.1 reference devices (non-public)
	    Grandtec DVB-T USB
	    Avermedia AverTV DVBT USB1.1
	    Artec T1 USB1.1 boxes
	    Hama DVB-T USB1.1-Box
	    KWorld/JetWay/ADSTech V-Stream XPERT DTV - DVB-T USB1.1 and USB2.0
	    TwinhanDTV Magic Box (VP7041e)
	    TwinhanDTV USB-Ter (VP7041)
	    Ultima Electronic/Artec T1 USB TVBOX

	  The VP7041 seems to be identical to "CTS Portable" (Chinese
	  Television System).
@@ -54,6 +54,12 @@ config DVB_USB_DIBUSB_MB
	  Say Y if you own such a device and want to use it. You should build it as
	  a module.

config DVB_USB_DIBUSB_MB_FAULTY
	bool "Support faulty USB IDs"
	depends on DVB_USB_DIBUSB_MB
	help
	  Support for faulty USB IDs due to an invalid EEPROM on some Artec devices.

config DVB_USB_DIBUSB_MC
	tristate "DiBcom USB DVB-T devices (based on the DiB3000M-C/P) (see help for device list)"
	depends on DVB_USB
@@ -63,8 +69,8 @@ config DVB_USB_DIBUSB_MC
	  DiBcom (<http://www.dibcom.fr>) equipped with a DiB3000M-C/P demodulator.

	  Devices supported by this driver:
	    DiBcom USB2.0 reference devices (non-public)
	    Artec T1 USB2.0 boxes
	    DiBcom USB2.0 reference devices (non-public)

	  Say Y if you own such a device and want to use it. You should build it as
	  a module.
+28 −18
Original line number Diff line number Diff line
@@ -65,11 +65,11 @@ static int dibusb_tuner_probe_and_attach(struct dvb_usb_device *d)
		d->tuner_pass_ctrl(d->fe,0,msg[0].addr);

	if (b2[0] == 0xfe) {
		info("this device has the Thomson Cable onboard. Which is default.");
		info("This device has the Thomson Cable onboard. Which is default.");
		dibusb_thomson_tuner_attach(d);
	} else {
		u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab };
		info("this device has the Panasonic ENV77H11D5 onboard.");
		info("This device has the Panasonic ENV77H11D5 onboard.");
		d->pll_addr = 0x60;
		memcpy(d->pll_init,bpll,4);
		d->pll_desc = &dvb_pll_tda665x;
@@ -133,11 +133,18 @@ static struct usb_device_id dibusb_dib3000mb_table [] = {
/* 28 */	{ USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC,	USB_PID_ULTIMA_TVBOX_USB2_COLD) },
/* 29 */	{ USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC,	USB_PID_ULTIMA_TVBOX_USB2_WARM) },

// #define DVB_USB_DIBUSB_MB_FAULTY_USB_IDs
/*
 * XXX: As Artec just 'forgot' to program the EEPROM on some Artec T1 devices
 *      we don't catch these faulty IDs (namely 'Cypress FX1 USB controller') that
 *      have been left on the device. If you don't have such a device but an Artec
 *      device that's supposed to work with this driver but is not detected by it,
 *      free to enable CONFIG_DVB_USB_DIBUSB_MB_FAULTY via your kernel config.
 */

#ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs
#ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY
/* 30 */	{ USB_DEVICE(USB_VID_ANCHOR,		USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) },
#endif

			{ }		/* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table);
@@ -257,7 +264,7 @@ static struct dvb_usb_properties dibusb1_1_an2235_properties = {
		}
	},

#ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs
#ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY
	.num_device_descs = 2,
#else
	.num_device_descs = 1,
@@ -267,11 +274,12 @@ static struct dvb_usb_properties dibusb1_1_an2235_properties = {
			{ &dibusb_dib3000mb_table[20], NULL },
			{ &dibusb_dib3000mb_table[21], NULL },
		},
#ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs
#ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY
		{	"Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)",
			{ &dibusb_dib3000mb_table[30], NULL },
			{ NULL },
		},
		{ NULL },
#endif
	}
};
@@ -323,6 +331,7 @@ static struct dvb_usb_properties dibusb2_0b_properties = {
			{ &dibusb_dib3000mb_table[27], NULL },
			{ NULL }
		},
		{ NULL },
	}
};

@@ -369,6 +378,7 @@ static struct dvb_usb_properties artec_t1_usb2_properties = {
			{ &dibusb_dib3000mb_table[28], NULL },
			{ &dibusb_dib3000mb_table[29], NULL },
		},
		{ NULL },
	}
};