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

Commit 136cafbf authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (4646): Misc. changes, DiB3000MC, MT2060



Changed the attach-function of the dib3000mc-driver to return only one
frontend. In case of multiple dib3000-chips on one board, one has to call the
i2c-enumeration manually before.
Added a field to Microtune 2060 config to output the clock to other
tuners/device on a board.

Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 6870ab57
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,5 +37,6 @@ dvb-usb-cxusb-objs = cxusb.o
obj-$(CONFIG_DVB_USB_CXUSB) += dvb-usb-cxusb.o

dvb-usb-dib0700-objs = dib0700_core.o dib0700_devices.o
obj-$(CONFIG_DVB_USB_DIB0700) += dvb-usb-dib0700.o

EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+5 −6
Original line number Diff line number Diff line
@@ -230,8 +230,8 @@ static struct dib3000mc_config mod3000p_dib3000p_config = {

int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap)
{
	if (dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0 ||
		dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0) {
	if ((adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS,  &mod3000p_dib3000p_config)) == NULL ||
		(adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL) {
		if (adap->priv != NULL) {
			struct dibusb_state *st = adap->priv;
			st->ops.pid_parse = dib3000mc_pid_parse;
@@ -250,7 +250,6 @@ static struct mt2060_config stk3000p_mt2060_config = {
int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap)
{
	struct dibusb_state *st = adap->priv;
	int ret;
	u8 a,b;
	u16 if1 = 1220;
	struct i2c_adapter *tun_i2c;
@@ -287,9 +286,9 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap)
	}

	tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1);
	if ((ret = mt2060_attach(adap->fe, tun_i2c, &stk3000p_mt2060_config, if1)) != 0) {
	if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) != NULL) {
		/* not found - use panasonic pll parameters */
		if (dvb_pll_attach(adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL)
		if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL)
			return -ENOMEM;
	} else {
		st->mt2060_present = 1;
+0 −1
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ static struct dvb_usb_device_properties dibusb_mc_properties = {
	.usb_ctrl = CYPRESS_FX2,
	.firmware = "dvb-usb-dibusb-6.0.0.8.fw",


	.num_adapters = 1,
	.adapter = {
		{
+2 −4
Original line number Diff line number Diff line
@@ -24,9 +24,6 @@ static struct usb_cypress_controller cypress[] = {
	{ .id = CYPRESS_FX2,     .name = "Cypress FX2",     .cpu_cs_register = 0xe600 },
};

static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
			       int *pos);

/*
 * load a firmware packet to the device
 */
@@ -115,7 +112,7 @@ int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_device_pro
	return ret;
}

static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
			       int *pos)
{
	u8 *b = (u8 *) &fw->data[*pos];
@@ -146,3 +143,4 @@ static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,

	return *pos;
}
EXPORT_SYMBOL(dvb_usb_get_hexline);
+4 −2
Original line number Diff line number Diff line
@@ -52,8 +52,7 @@
#define USB_PID_DIBCOM_MOD3000_WARM			0x0bb9
#define USB_PID_DIBCOM_MOD3001_COLD			0x0bc6
#define USB_PID_DIBCOM_MOD3001_WARM			0x0bc7
#define USB_PID_DIBCOM_STK7700				0x1e14
#define USB_PID_DIBCOM_STK7700_REENUM			0x1e15
#define USB_PID_DIBCOM_STK7700P				0x1e14
#define USB_PID_DIBCOM_ANCHOR_2135_COLD			0x2131
#define USB_PID_GRANDTEC_DVBT_USB_COLD			0x0fa0
#define USB_PID_GRANDTEC_DVBT_USB_WARM			0x0fa1
@@ -95,6 +94,9 @@
#define USB_PID_WT220U_ZL0353_WARM			0x022b
#define USB_PID_WINTV_NOVA_T_USB2_COLD			0x9300
#define USB_PID_WINTV_NOVA_T_USB2_WARM			0x9301
#define USB_PID_HAUPPAUGE_NOVA_T_500			0x1234
#define USB_PID_HAUPPAUGE_NOVA_T_STICK			0x1234
#define USB_PID_AVERMEDIA_VOLAR				0x1234
#define USB_PID_NEBULA_DIGITV				0x0201
#define USB_PID_DVICO_BLUEBIRD_LGDT			0xd820
#define USB_PID_DVICO_BLUEBIRD_LG064F_COLD		0xd500
Loading