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

Commit 04fc0a40 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (34 commits)
  V4L/DVB (12303): cx23885: check pointers before dereferencing in dprintk macro
  V4L/DVB (12302): cx23885-417: fix broken IOCTL handling
  V4L/DVB (12300): bttv: fix regression: tvaudio must be loaded before tuner
  V4L/DVB (12291): b2c2: fix frontends compiled into kernel
  V4L/DVB (12286): sn9c20x: reorder includes to be like other drivers
  V4L/DVB (12284): gspca - jpeg subdrivers: Check the result of kmalloc(jpeg header).
  V4L/DVB (12283): gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.
  V4L/DVB (12282): gspca - main: Support for vidioc_g_chip_ident and vidioc_g/s_register.
  V4L/DVB (12269): af9013: auto-detect parameters in case of garbage given by app
  V4L/DVB (12267): gspca - sonixj: Bad sensor init of non ov76xx sensors.
  V4L/DVB (12265): em28xx: fix tuning problem in HVR-900 (R1)
  V4L/DVB (12263): em28xx: set demod profile for Pinnacle Hybrid Pro 320e
  V4L/DVB (12262): em28xx: Make sure the tuner is initialized if generic empia USB id was used
  V4L/DVB (12261): em28xx: set GPIO properly for Pinnacle Hybrid Pro analog support
  V4L/DVB (12260): em28xx: make support work for the Pinnacle Hybrid Pro (eb1a:2881)
  V4L/DVB (12258): em28xx: fix typo in mt352 init sequence for Terratec Cinergy T XS USB
  V4L/DVB (12257): em28xx: make tuning work for Terratec Cinergy T XS USB (mt352 variant)
  V4L/DVB (12245): em28xx: add support for mt9m001 webcams
  V4L/DVB (12244): em28xx: adjust vinmode/vinctl based on the stream input format
  V4L/DVB (12243): em28xx: allow specifying sensor xtal frequency
  ...
parents 760dcc6e ca4e771f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -20,7 +20,7 @@
 19 -> EM2860/SAA711X Reference Design          (em2860)
 19 -> EM2860/SAA711X Reference Design          (em2860)
 20 -> AMD ATI TV Wonder HD 600                 (em2880)        [0438:b002]
 20 -> AMD ATI TV Wonder HD 600                 (em2880)        [0438:b002]
 21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800)        [eb1a:2801]
 21 -> eMPIA Technology, Inc. GrabBeeX+ Video Encoder (em2800)        [eb1a:2801]
 22 -> Unknown EM2750/EM2751 webcam grabber     (em2750)        [eb1a:2750,eb1a:2751]
 22 -> EM2710/EM2750/EM2751 webcam grabber      (em2750)        [eb1a:2750,eb1a:2751]
 23 -> Huaqi DLCW-130                           (em2750)
 23 -> Huaqi DLCW-130                           (em2750)
 24 -> D-Link DUB-T210 TV Tuner                 (em2820/em2840) [2001:f112]
 24 -> D-Link DUB-T210 TV Tuner                 (em2820/em2840) [2001:f112]
 25 -> Gadmei UTV310                            (em2820/em2840)
 25 -> Gadmei UTV310                            (em2820/em2840)
+32 −0
Original line number Original line Diff line number Diff line
@@ -44,7 +44,9 @@ zc3xx 0458:7007 Genius VideoCam V2
zc3xx		0458:700c	Genius VideoCam V3
zc3xx		0458:700c	Genius VideoCam V3
zc3xx		0458:700f	Genius VideoCam Web V2
zc3xx		0458:700f	Genius VideoCam Web V2
sonixj		0458:7025	Genius Eye 311Q
sonixj		0458:7025	Genius Eye 311Q
sn9c20x		0458:7029	Genius Look 320s
sonixj		0458:702e	Genius Slim 310 NB
sonixj		0458:702e	Genius Slim 310 NB
sn9c20x		045e:00f4	LifeCam VX-6000 (SN9C20x + OV9650)
sonixj		045e:00f5	MicroSoft VX3000
sonixj		045e:00f5	MicroSoft VX3000
sonixj		045e:00f7	MicroSoft VX1000
sonixj		045e:00f7	MicroSoft VX1000
ov519		045e:028c	Micro$oft xbox cam
ov519		045e:028c	Micro$oft xbox cam
@@ -282,6 +284,28 @@ sonixj 0c45:613a Microdia Sonix PC Camera
sonixj		0c45:613b	Surfer SN-206
sonixj		0c45:613b	Surfer SN-206
sonixj		0c45:613c	Sonix Pccam168
sonixj		0c45:613c	Sonix Pccam168
sonixj		0c45:6143	Sonix Pccam168
sonixj		0c45:6143	Sonix Pccam168
sn9c20x		0c45:6240	PC Camera (SN9C201 + MT9M001)
sn9c20x		0c45:6242	PC Camera (SN9C201 + MT9M111)
sn9c20x		0c45:6248	PC Camera (SN9C201 + OV9655)
sn9c20x		0c45:624e	PC Camera (SN9C201 + SOI968)
sn9c20x		0c45:624f	PC Camera (SN9C201 + OV9650)
sn9c20x		0c45:6251	PC Camera (SN9C201 + OV9650)
sn9c20x		0c45:6253	PC Camera (SN9C201 + OV9650)
sn9c20x		0c45:6260	PC Camera (SN9C201 + OV7670)
sn9c20x		0c45:6270	PC Camera (SN9C201 + MT9V011/MT9V111/MT9V112)
sn9c20x		0c45:627b	PC Camera (SN9C201 + OV7660)
sn9c20x		0c45:627c	PC Camera (SN9C201 + HV7131R)
sn9c20x		0c45:627f	PC Camera (SN9C201 + OV9650)
sn9c20x		0c45:6280	PC Camera (SN9C202 + MT9M001)
sn9c20x		0c45:6282	PC Camera (SN9C202 + MT9M111)
sn9c20x		0c45:6288	PC Camera (SN9C202 + OV9655)
sn9c20x		0c45:628e	PC Camera (SN9C202 + SOI968)
sn9c20x		0c45:628f	PC Camera (SN9C202 + OV9650)
sn9c20x		0c45:62a0	PC Camera (SN9C202 + OV7670)
sn9c20x		0c45:62b0	PC Camera (SN9C202 + MT9V011/MT9V111/MT9V112)
sn9c20x		0c45:62b3	PC Camera (SN9C202 + OV9655)
sn9c20x		0c45:62bb	PC Camera (SN9C202 + OV7660)
sn9c20x		0c45:62bc	PC Camera (SN9C202 + HV7131R)
sunplus		0d64:0303	Sunplus FashionCam DXG
sunplus		0d64:0303	Sunplus FashionCam DXG
etoms		102c:6151	Qcam Sangha CIF
etoms		102c:6151	Qcam Sangha CIF
etoms		102c:6251	Qcam xxxxxx VGA
etoms		102c:6251	Qcam xxxxxx VGA
@@ -290,6 +314,7 @@ spca561 10fd:7e50 FlyCam Usb 100
zc3xx		10fd:8050	Typhoon Webshot II USB 300k
zc3xx		10fd:8050	Typhoon Webshot II USB 300k
ov534		1415:2000	Sony HD Eye for PS3 (SLEH 00201)
ov534		1415:2000	Sony HD Eye for PS3 (SLEH 00201)
pac207		145f:013a	Trust WB-1300N
pac207		145f:013a	Trust WB-1300N
sn9c20x		145f:013d	Trust WB-3600R
vc032x		15b8:6001	HP 2.0 Megapixel
vc032x		15b8:6001	HP 2.0 Megapixel
vc032x		15b8:6002	HP 2.0 Megapixel rz406aa
vc032x		15b8:6002	HP 2.0 Megapixel rz406aa
spca501		1776:501c	Arowana 300K CMOS Camera
spca501		1776:501c	Arowana 300K CMOS Camera
@@ -300,4 +325,11 @@ spca500 2899:012c Toptro Industrial
spca508		8086:0110	Intel Easy PC Camera
spca508		8086:0110	Intel Easy PC Camera
spca500		8086:0630	Intel Pocket PC Camera
spca500		8086:0630	Intel Pocket PC Camera
spca506		99fa:8988	Grandtec V.cap
spca506		99fa:8988	Grandtec V.cap
sn9c20x		a168:0610	Dino-Lite Digital Microscope (SN9C201 + HV7131R)
sn9c20x		a168:0611	Dino-Lite Digital Microscope (SN9C201 + HV7131R)
sn9c20x		a168:0613	Dino-Lite Digital Microscope (SN9C201 + HV7131R)
sn9c20x		a168:0618	Dino-Lite Digital Microscope (SN9C201 + HV7131R)
sn9c20x		a168:0614	Dino-Lite Digital Microscope (SN9C201 + MT9M111)
sn9c20x		a168:0615	Dino-Lite Digital Microscope (SN9C201 + MT9M111)
sn9c20x		a168:0617	Dino-Lite Digital Microscope (SN9C201 + MT9M111)
spca561		abcd:cdee	Petcam
spca561		abcd:cdee	Petcam
+37 −30
Original line number Original line Diff line number Diff line
@@ -20,8 +20,14 @@
#include "tuner-simple.h"
#include "tuner-simple.h"
#include "stv0297.h"
#include "stv0297.h"



/* Can we use the specified front-end?  Remember that if we are compiled
 * into the kernel we can't call code that's in modules.  */
#define FE_SUPPORTED(fe) (defined(CONFIG_DVB_##fe) || \
	(defined(CONFIG_DVB_##fe##_MODULE) && defined(MODULE)))

/* lnb control */
/* lnb control */
#if defined(CONFIG_DVB_MT312_MODULE) || defined(CONFIG_DVB_STV0299_MODULE)
#if FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)
static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
{
{
	struct flexcop_device *fc = fe->dvb->priv;
	struct flexcop_device *fc = fe->dvb->priv;
@@ -49,8 +55,7 @@ static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage
}
}
#endif
#endif


#if defined(CONFIG_DVB_S5H1420_MODULE) || defined(CONFIG_DVB_STV0299_MODULE) \
#if FE_SUPPORTED(S5H1420) || FE_SUPPORTED(STV0299) || FE_SUPPORTED(MT312)
	|| defined(CONFIG_DVB_MT312_MODULE)
static int flexcop_sleep(struct dvb_frontend* fe)
static int flexcop_sleep(struct dvb_frontend* fe)
{
{
	struct flexcop_device *fc = fe->dvb->priv;
	struct flexcop_device *fc = fe->dvb->priv;
@@ -61,7 +66,7 @@ static int flexcop_sleep(struct dvb_frontend* fe)
#endif
#endif


/* SkyStar2 DVB-S rev 2.3 */
/* SkyStar2 DVB-S rev 2.3 */
#if defined(CONFIG_DVB_MT312_MODULE)
#if FE_SUPPORTED(MT312)
static int flexcop_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
static int flexcop_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
{
{
/* u16 wz_half_period_for_45_mhz[] = { 0x01ff, 0x0154, 0x00ff, 0x00cc }; */
/* u16 wz_half_period_for_45_mhz[] = { 0x01ff, 0x0154, 0x00ff, 0x00cc }; */
@@ -193,10 +198,12 @@ static int skystar2_rev23_attach(struct flexcop_device *fc,
	}
	}
	return 0;
	return 0;
}
}
#else
#define skystar2_rev23_attach NULL
#endif
#endif


/* SkyStar2 DVB-S rev 2.6 */
/* SkyStar2 DVB-S rev 2.6 */
#if defined(CONFIG_DVB_STV0299_MODULE)
#if FE_SUPPORTED(STV0299)
static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend *fe,
static int samsung_tbmu24112_set_symbol_rate(struct dvb_frontend *fe,
	u32 srate, u32 ratio)
	u32 srate, u32 ratio)
{
{
@@ -321,10 +328,12 @@ static int skystar2_rev26_attach(struct flexcop_device *fc,
	}
	}
	return 0;
	return 0;
}
}
#else
#define skystar2_rev26_attach NULL
#endif
#endif


/* SkyStar2 DVB-S rev 2.7 */
/* SkyStar2 DVB-S rev 2.7 */
#if defined(CONFIG_DVB_S5H1420_MODULE)
#if FE_SUPPORTED(S5H1420) && FE_SUPPORTED(ISL6421) && FE_SUPPORTED(TUNER_ITD1000)
static struct s5h1420_config skystar2_rev2_7_s5h1420_config = {
static struct s5h1420_config skystar2_rev2_7_s5h1420_config = {
	.demod_address = 0x53,
	.demod_address = 0x53,
	.invert = 1,
	.invert = 1,
@@ -385,10 +394,12 @@ fail:
	fc->fc_i2c_adap[0].no_base_addr = 0;
	fc->fc_i2c_adap[0].no_base_addr = 0;
	return 0;
	return 0;
}
}
#else
#define skystar2_rev27_attach NULL
#endif
#endif


/* SkyStar2 rev 2.8 */
/* SkyStar2 rev 2.8 */
#if defined(CONFIG_DVB_CX24123_MODULE)
#if FE_SUPPORTED(CX24123) && FE_SUPPORTED(ISL6421) && FE_SUPPORTED(TUNER_CX24113)
static struct cx24123_config skystar2_rev2_8_cx24123_config = {
static struct cx24123_config skystar2_rev2_8_cx24123_config = {
	.demod_address = 0x55,
	.demod_address = 0x55,
	.dont_use_pll = 1,
	.dont_use_pll = 1,
@@ -433,10 +444,12 @@ static int skystar2_rev28_attach(struct flexcop_device *fc,
	 * IR-receiver (PIC16F818) - but the card has no input for that ??? */
	 * IR-receiver (PIC16F818) - but the card has no input for that ??? */
	return 1;
	return 1;
}
}
#else
#define skystar2_rev28_attach NULL
#endif
#endif


/* AirStar DVB-T */
/* AirStar DVB-T */
#if defined(CONFIG_DVB_MT352_MODULE)
#if FE_SUPPORTED(MT352)
static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend *fe)
static int samsung_tdtc9251dh0_demod_init(struct dvb_frontend *fe)
{
{
	static u8 mt352_clock_config[] = { 0x89, 0x18, 0x2d };
	static u8 mt352_clock_config[] = { 0x89, 0x18, 0x2d };
@@ -495,10 +508,12 @@ static int airstar_dvbt_attach(struct flexcop_device *fc,
	}
	}
	return 0;
	return 0;
}
}
#else
#define airstar_dvbt_attach NULL
#endif
#endif


/* AirStar ATSC 1st generation */
/* AirStar ATSC 1st generation */
#if defined(CONFIG_DVB_BCM3510_MODULE)
#if FE_SUPPORTED(BCM3510)
static int flexcop_fe_request_firmware(struct dvb_frontend *fe,
static int flexcop_fe_request_firmware(struct dvb_frontend *fe,
	const struct firmware **fw, char* name)
	const struct firmware **fw, char* name)
{
{
@@ -517,10 +532,12 @@ static int airstar_atsc1_attach(struct flexcop_device *fc,
	fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c);
	fc->fe = dvb_attach(bcm3510_attach, &air2pc_atsc_first_gen_config, i2c);
	return fc->fe != NULL;
	return fc->fe != NULL;
}
}
#else
#define airstar_atsc1_attach NULL
#endif
#endif


/* AirStar ATSC 2nd generation */
/* AirStar ATSC 2nd generation */
#if defined(CONFIG_DVB_NXT200X_MODULE)
#if FE_SUPPORTED(NXT200X) && FE_SUPPORTED(PLL)
static struct nxt200x_config samsung_tbmv_config = {
static struct nxt200x_config samsung_tbmv_config = {
	.demod_address = 0x0a,
	.demod_address = 0x0a,
};
};
@@ -535,10 +552,12 @@ static int airstar_atsc2_attach(struct flexcop_device *fc,
	return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL,
	return !!dvb_attach(dvb_pll_attach, fc->fe, 0x61, NULL,
			    DVB_PLL_SAMSUNG_TBMV);
			    DVB_PLL_SAMSUNG_TBMV);
}
}
#else
#define airstar_atsc2_attach NULL
#endif
#endif


/* AirStar ATSC 3rd generation */
/* AirStar ATSC 3rd generation */
#if defined(CONFIG_DVB_LGDT330X_MODULE)
#if FE_SUPPORTED(LGDT330X)
static struct lgdt330x_config air2pc_atsc_hd5000_config = {
static struct lgdt330x_config air2pc_atsc_hd5000_config = {
	.demod_address       = 0x59,
	.demod_address       = 0x59,
	.demod_chip          = LGDT3303,
	.demod_chip          = LGDT3303,
@@ -556,10 +575,12 @@ static int airstar_atsc3_attach(struct flexcop_device *fc,
	return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61,
	return !!dvb_attach(simple_tuner_attach, fc->fe, i2c, 0x61,
			    TUNER_LG_TDVS_H06XF);
			    TUNER_LG_TDVS_H06XF);
}
}
#else
#define airstar_atsc3_attach NULL
#endif
#endif


/* CableStar2 DVB-C */
/* CableStar2 DVB-C */
#if defined(CONFIG_DVB_STV0297_MODULE)
#if FE_SUPPORTED(STV0297)
static int alps_tdee4_stv0297_tuner_set_params(struct dvb_frontend* fe,
static int alps_tdee4_stv0297_tuner_set_params(struct dvb_frontend* fe,
		struct dvb_frontend_parameters *fep)
		struct dvb_frontend_parameters *fep)
{
{
@@ -698,39 +719,23 @@ static int cablestar2_attach(struct flexcop_device *fc,
	fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
	fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
	return 1;
	return 1;
}
}
#else
#define cablestar2_attach NULL
#endif
#endif


static struct {
static struct {
	flexcop_device_type_t type;
	flexcop_device_type_t type;
	int (*attach)(struct flexcop_device *, struct i2c_adapter *);
	int (*attach)(struct flexcop_device *, struct i2c_adapter *);
} flexcop_frontends[] = {
} flexcop_frontends[] = {
#if defined(CONFIG_DVB_S5H1420_MODULE)
	{ FC_SKY_REV27, skystar2_rev27_attach },
	{ FC_SKY_REV27, skystar2_rev27_attach },
#endif
#if defined(CONFIG_DVB_CX24123_MODULE)
	{ FC_SKY_REV28, skystar2_rev28_attach },
	{ FC_SKY_REV28, skystar2_rev28_attach },
#endif
#if defined(CONFIG_DVB_STV0299_MODULE)
	{ FC_SKY_REV26, skystar2_rev26_attach },
	{ FC_SKY_REV26, skystar2_rev26_attach },
#endif
#if defined(CONFIG_DVB_MT352_MODULE)
	{ FC_AIR_DVBT, airstar_dvbt_attach },
	{ FC_AIR_DVBT, airstar_dvbt_attach },
#endif
#if defined(CONFIG_DVB_NXT200X_MODULE)
	{ FC_AIR_ATSC2, airstar_atsc2_attach },
	{ FC_AIR_ATSC2, airstar_atsc2_attach },
#endif
#if defined(CONFIG_DVB_LGDT330X_MODULE)
	{ FC_AIR_ATSC3, airstar_atsc3_attach },
	{ FC_AIR_ATSC3, airstar_atsc3_attach },
#endif
#if defined(CONFIG_DVB_BCM3510_MODULE)
	{ FC_AIR_ATSC1, airstar_atsc1_attach },
	{ FC_AIR_ATSC1, airstar_atsc1_attach },
#endif
#if defined(CONFIG_DVB_STV0297_MODULE)
	{ FC_CABLE, cablestar2_attach },
	{ FC_CABLE, cablestar2_attach },
#endif
#if defined(CONFIG_DVB_MT312_MODULE)
	{ FC_SKY_REV23, skystar2_rev23_attach },
	{ FC_SKY_REV23, skystar2_rev23_attach },
#endif
};
};


/* try to figure out the frontend */
/* try to figure out the frontend */
@@ -738,6 +743,8 @@ int flexcop_frontend_init(struct flexcop_device *fc)
{
{
	int i;
	int i;
	for (i = 0; i < ARRAY_SIZE(flexcop_frontends); i++) {
	for (i = 0; i < ARRAY_SIZE(flexcop_frontends); i++) {
		if (!flexcop_frontends[i].attach)
			continue;
		/* type needs to be set before, because of some workarounds
		/* type needs to be set before, because of some workarounds
		 * done based on the probed card type */
		 * done based on the probed card type */
		fc->dev_type = flexcop_frontends[i].type;
		fc->dev_type = flexcop_frontends[i].type;
+18 −7
Original line number Original line Diff line number Diff line
@@ -527,6 +527,10 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
	u8 i, buf[3] = {0, 0, 0};
	u8 i, buf[3] = {0, 0, 0};
	*auto_mode = 0; /* set if parameters are requested to auto set */
	*auto_mode = 0; /* set if parameters are requested to auto set */


	/* Try auto-detect transmission parameters in case of AUTO requested or
	   garbage parameters given by application for compatibility.
	   MPlayer seems to provide garbage parameters currently. */

	switch (params->transmission_mode) {
	switch (params->transmission_mode) {
	case TRANSMISSION_MODE_AUTO:
	case TRANSMISSION_MODE_AUTO:
		*auto_mode = 1;
		*auto_mode = 1;
@@ -536,7 +540,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		buf[0] |= (1 << 0);
		buf[0] |= (1 << 0);
		break;
		break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid transmission_mode\n", __func__);
		*auto_mode = 1;
	}
	}


	switch (params->guard_interval) {
	switch (params->guard_interval) {
@@ -554,7 +559,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		buf[0] |= (3 << 2);
		buf[0] |= (3 << 2);
		break;
		break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid guard_interval\n", __func__);
		*auto_mode = 1;
	}
	}


	switch (params->hierarchy_information) {
	switch (params->hierarchy_information) {
@@ -572,7 +578,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		buf[0] |= (3 << 4);
		buf[0] |= (3 << 4);
		break;
		break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid hierarchy_information\n", __func__);
		*auto_mode = 1;
	};
	};


	switch (params->constellation) {
	switch (params->constellation) {
@@ -587,7 +594,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		buf[1] |= (2 << 6);
		buf[1] |= (2 << 6);
		break;
		break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid constellation\n", __func__);
		*auto_mode = 1;
	}
	}


	/* Use HP. How and which case we can switch to LP? */
	/* Use HP. How and which case we can switch to LP? */
@@ -611,7 +619,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		buf[2] |= (4 << 0);
		buf[2] |= (4 << 0);
		break;
		break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid code_rate_HP\n", __func__);
		*auto_mode = 1;
	}
	}


	switch (params->code_rate_LP) {
	switch (params->code_rate_LP) {
@@ -638,7 +647,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		if (params->hierarchy_information == HIERARCHY_AUTO)
		if (params->hierarchy_information == HIERARCHY_AUTO)
			break;
			break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid code_rate_LP\n", __func__);
		*auto_mode = 1;
	}
	}


	switch (params->bandwidth) {
	switch (params->bandwidth) {
@@ -651,7 +661,8 @@ static int af9013_set_ofdm_params(struct af9013_state *state,
		buf[1] |= (2 << 2);
		buf[1] |= (2 << 2);
		break;
		break;
	default:
	default:
		return -EINVAL;
		deb_info("%s: invalid bandwidth\n", __func__);
		buf[1] |= (2 << 2); /* cannot auto-detect BW, try 8 MHz */
	}
	}


	/* program */
	/* program */
+48 −44
Original line number Original line Diff line number Diff line
@@ -3324,8 +3324,6 @@ void __devinit bttv_init_card1(struct bttv *btv)
/* initialization part two -- after registering i2c bus */
/* initialization part two -- after registering i2c bus */
void __devinit bttv_init_card2(struct bttv *btv)
void __devinit bttv_init_card2(struct bttv *btv)
{
{
	int addr=ADDR_UNSET;

	btv->tuner_type = UNSET;
	btv->tuner_type = UNSET;


	if (BTTV_BOARD_UNKNOWN == btv->c.type) {
	if (BTTV_BOARD_UNKNOWN == btv->c.type) {
@@ -3470,9 +3468,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
	btv->pll.pll_current = -1;
	btv->pll.pll_current = -1;


	/* tuner configuration (from card list / autodetect / insmod option) */
	/* tuner configuration (from card list / autodetect / insmod option) */
	if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
		addr = bttv_tvcards[btv->c.type].tuner_addr;

	if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
	if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
		if (UNSET == btv->tuner_type)
		if (UNSET == btv->tuner_type)
			btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
			btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
@@ -3496,40 +3491,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
	if (UNSET == btv->tuner_type)
	if (UNSET == btv->tuner_type)
		btv->tuner_type = TUNER_ABSENT;
		btv->tuner_type = TUNER_ABSENT;


	if (btv->tuner_type != TUNER_ABSENT) {
		struct tuner_setup tun_setup;

		/* Load tuner module before issuing tuner config call! */
		if (bttv_tvcards[btv->c.type].has_radio)
			v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				v4l2_i2c_tuner_addrs(ADDRS_RADIO));
		v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
		v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));

		tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
		tun_setup.type = btv->tuner_type;
		tun_setup.addr = addr;

		if (bttv_tvcards[btv->c.type].has_radio)
			tun_setup.mode_mask |= T_RADIO;

		bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
	}

	if (btv->tda9887_conf) {
		struct v4l2_priv_tun_config tda9887_cfg;

		tda9887_cfg.tuner = TUNER_TDA9887;
		tda9887_cfg.priv = &btv->tda9887_conf;

		bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
	}

	btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
	btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
		   bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
		   bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
	btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
	btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
@@ -3666,6 +3627,49 @@ no_audio:
}
}




/* initialize the tuner */
void __devinit bttv_init_tuner(struct bttv *btv)
{
	int addr = ADDR_UNSET;

	if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
		addr = bttv_tvcards[btv->c.type].tuner_addr;

	if (btv->tuner_type != TUNER_ABSENT) {
		struct tuner_setup tun_setup;

		/* Load tuner module before issuing tuner config call! */
		if (bttv_tvcards[btv->c.type].has_radio)
			v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				v4l2_i2c_tuner_addrs(ADDRS_RADIO));
		v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
		v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
				&btv->c.i2c_adap, "tuner", "tuner",
				v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));

		tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
		tun_setup.type = btv->tuner_type;
		tun_setup.addr = addr;

		if (bttv_tvcards[btv->c.type].has_radio)
			tun_setup.mode_mask |= T_RADIO;

		bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
	}

	if (btv->tda9887_conf) {
		struct v4l2_priv_tun_config tda9887_cfg;

		tda9887_cfg.tuner = TUNER_TDA9887;
		tda9887_cfg.priv = &btv->tda9887_conf;

		bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
	}
}

/* ----------------------------------------------------------------------- */
/* ----------------------------------------------------------------------- */


static void modtec_eeprom(struct bttv *btv)
static void modtec_eeprom(struct bttv *btv)
Loading