Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/mchehab/v4l-dvb

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (4750): AGC command1/2 is board specific
  V4L/DVB (4748): Fixed oops for Nova-T USB2
  V4L/DVB (4746): HM12 is YUV 4:2:0, not YUV 4:1:1
  V4L/DVB (4744): The Samsung TCPN2121P30A does not have a tda9887
  V4L/DVB (4743): Fix oops in VIDIOC_G_PARM
  V4L/DVB (4742): Drivers/media/video: handle sysfs errors
  V4L/DVB (4741): {ov511,stv680}: handle sysfs errors
  V4L/DVB (4740): Fixed an if-block to avoid floating with debug-messages
  V4L/DVB (4739): SECAM support for saa7113 into saa7115
  V4L/DVB (4738): Bt8xx/dvb-bt8xx.c: check kmalloc() return value.
  V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
  V4L/DVB (4733): Tda10086: fix frontend selection for dvb_attach
  V4L/DVB (4732): Fix spelling error in Kconfig help text for DVB_CORE_ATTACH
  V4L/DVB (4731a): Kconfig: restore pvrusb2 menu items
  V4L/DVB (4729): Fix VIDIOC_G_FMT for NTSC in cx25840.
  V4L/DVB (4727): Support status readout for saa713x based FM radio
  V4L/DVB (4725): Fix vivi compile on parisc
  V4L/DVB (4692): Add WinTV-HVR3000 DVB-T support
  • Loading branch information
Linus Torvalds committed Oct 15, 2006
2 parents e5a301e + 5570dd0 commit ed75ded
Show file tree
Hide file tree
Showing 26 changed files with 342 additions and 81 deletions.
2 changes: 1 addition & 1 deletion Documentation/video4linux/CARDLIST.cx88
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
50 -> NPG Tech Real TV FM Top 10 [14f1:0842]
51 -> WinFast DTV2000 H [107d:665e]
52 -> Geniatech DVB-S [14f1:0084]
53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404]
53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404,0070:1400,0070:1401,0070:1402]
54 -> Norwood Micro TV Tuner
55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM [c180:c980]
56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder [0070:9600,0070:9601,0070:9602]
4 changes: 4 additions & 0 deletions drivers/media/dvb/bt8xx/dvb-bt8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
case BTTV_BOARD_TWINHAN_DST:
/* DST is not a frontend driver !!! */
state = (struct dst_state *) kmalloc(sizeof (struct dst_state), GFP_KERNEL);
if (!state) {
printk("dvb_bt8xx: No memory\n");
break;
}
/* Setup the Card */
state->config = &dst_config;
state->i2c = card->i2c_adapter;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/dvb-core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ config DVB_CORE_ATTACH
allow the card drivers to only load the frontend modules
they require. This saves several KBytes of memory.

Note: You will need moudule-init-tools v3.2 or later for this feature.
Note: You will need module-init-tools v3.2 or later for this feature.

If unsure say Y.
11 changes: 9 additions & 2 deletions drivers/media/dvb/dvb-usb/dibusb-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ EXPORT_SYMBOL(dibusb_read_eeprom_byte);
// Config Adjacent channels Perf -cal22
static struct dibx000_agc_config dib3000p_mt2060_agc_config = {
.band_caps = BAND_VHF | BAND_UHF,
.setup = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0),
.setup = (1 << 8) | (5 << 5) | (1 << 4) | (1 << 3) | (0 << 2) | (2 << 0),

.agc1_max = 48497,
.agc1_min = 23593,
Expand All @@ -196,10 +196,14 @@ static struct dib3000mc_config stk3000p_dib3000p_config = {
.ln_adc_level = 0x1cc7,

.output_mpeg2_in_188_bytes = 1,

.agc_command1 = 1,
.agc_command2 = 1,
};

static struct dibx000_agc_config dib3000p_panasonic_agc_config = {
.setup = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0),
.band_caps = BAND_VHF | BAND_UHF,
.setup = (1 << 8) | (5 << 5) | (1 << 4) | (1 << 3) | (0 << 2) | (2 << 0),

.agc1_max = 56361,
.agc1_min = 22282,
Expand All @@ -226,6 +230,9 @@ static struct dib3000mc_config mod3000p_dib3000p_config = {
.ln_adc_level = 0x1cc7,

.output_mpeg2_in_188_bytes = 1,

.agc_command1 = 1,
.agc_command2 = 1,
};

int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap)
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/dvb/dvb-usb/dibusb.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@
struct dibusb_state {
struct dib_fe_xfer_ops ops;
int mt2060_present;
};

struct dibusb_device_state {
/* for RC5 remote control */
int old_toggle;
int last_repeat_count;
Expand Down
3 changes: 2 additions & 1 deletion drivers/media/dvb/dvb-usb/nova-t-usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
u8 key[5],cmd[2] = { DIBUSB_REQ_POLL_REMOTE, 0x35 }, data,toggle,custom;
u16 raw;
int i;
struct dibusb_state *st = d->priv;
struct dibusb_device_state *st = d->priv;

dvb_usb_generic_rw(d,cmd,2,key,5,0);

Expand Down Expand Up @@ -184,6 +184,7 @@ static struct dvb_usb_device_properties nova_t_properties = {
.size_of_priv = sizeof(struct dibusb_state),
}
},
.size_of_priv = sizeof(struct dibusb_device_state),

.power_ctrl = dibusb2_0_power_ctrl,
.read_mac_address = nova_t_read_mac_address,
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/dib3000mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static int dib3000mc_init(struct dvb_frontend *demod)

/* agc */
dib3000mc_write_word(state, 36, state->cfg->max_time);
dib3000mc_write_word(state, 37, agc->setup);
dib3000mc_write_word(state, 37, (state->cfg->agc_command1 << 13) | (state->cfg->agc_command2 << 12) | (0x1d << 0));
dib3000mc_write_word(state, 38, state->cfg->pwm3_value);
dib3000mc_write_word(state, 39, state->cfg->ln_adc_level);

Expand Down
3 changes: 3 additions & 0 deletions drivers/media/dvb/frontends/dib3000mc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ struct dib3000mc_config {
u16 max_time;
u16 ln_adc_level;

u8 agc_command1 :1;
u8 agc_command2 :1;

u8 mobile_mode;

u8 output_mpeg2_in_188_bytes;
Expand Down
9 changes: 9 additions & 0 deletions drivers/media/dvb/frontends/tda10086.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ struct tda10086_config
u8 invert;
};

#if defined(CONFIG_DVB_TDA10086) || defined(CONFIG_DVB_TDA10086_MODULE)
extern struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
struct i2c_adapter* i2c);
#else
static inline struct dvb_frontend* tda10086_attach(const struct tda10086_config* config,
struct i2c_adapter* i2c)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
return NULL;
}
#endif // CONFIG_DVB_TDA10086

#endif // TDA10086_H
19 changes: 16 additions & 3 deletions drivers/media/dvb/frontends/tda826x.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@
* @param has_loopthrough Set to 1 if the card has a loopthrough RF connector.
* @return FE pointer on success, NULL on failure.
*/
extern struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c, int has_loopthrough);

#endif
#if defined(CONFIG_DVB_TDA826X) || defined(CONFIG_DVB_TDA826X_MODULE)
extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr,
struct i2c_adapter *i2c,
int has_loopthrough);
#else
static inline struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe,
int addr,
struct i2c_adapter *i2c,
int has_loopthrough)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
return NULL;
}
#endif // CONFIG_DVB_TDA826X

#endif // __DVB_TDA826X_H__
2 changes: 2 additions & 0 deletions drivers/media/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ config VIDEO_M32R_AR_M64278
menu "V4L USB devices"
depends on USB && VIDEO_DEV

source "drivers/media/video/pvrusb2/Kconfig"

source "drivers/media/video/em28xx/Kconfig"

source "drivers/media/video/usbvideo/Kconfig"
Expand Down
25 changes: 19 additions & 6 deletions drivers/media/video/cx25840/cx25840-vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)
0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */
0, 0, 0, 0
};
int is_pal = !(cx25840_get_v4lstd(client) & V4L2_STD_525_60);
int i;

fmt = arg;
Expand All @@ -246,13 +247,25 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)
if ((cx25840_read(client, 0x404) & 0x10) == 0)
break;

for (i = 7; i <= 23; i++) {
u8 v = cx25840_read(client, 0x424 + i - 7);
if (is_pal) {
for (i = 7; i <= 23; i++) {
u8 v = cx25840_read(client, 0x424 + i - 7);

svbi->service_lines[0][i] = lcr2vbi[v >> 4];
svbi->service_lines[1][i] = lcr2vbi[v & 0xf];
svbi->service_set |=
svbi->service_lines[0][i] | svbi->service_lines[1][i];
}
}
else {
for (i = 10; i <= 21; i++) {
u8 v = cx25840_read(client, 0x424 + i - 10);

svbi->service_lines[0][i] = lcr2vbi[v >> 4];
svbi->service_lines[1][i] = lcr2vbi[v & 0xf];
svbi->service_set |=
svbi->service_lines[0][i] | svbi->service_lines[1][i];
svbi->service_lines[0][i] = lcr2vbi[v >> 4];
svbi->service_lines[1][i] = lcr2vbi[v & 0xf];
svbi->service_set |=
svbi->service_lines[0][i] | svbi->service_lines[1][i];
}
}
break;
}
Expand Down
21 changes: 21 additions & 0 deletions drivers/media/video/cx88/cx88-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,7 @@ struct cx88_board cx88_boards[] = {
.vmux = 2,
.gpio0 = 0x84bf,
}},
.mpeg = CX88_MPEG_DVB,
},
[CX88_BOARD_NORWOOD_MICRO] = {
.name = "Norwood Micro TV Tuner",
Expand Down Expand Up @@ -1590,6 +1591,18 @@ struct cx88_subid cx88_subids[] = {
.subvendor = 0x0070,
.subdevice = 0x9000,
.card = CX88_BOARD_HAUPPAUGE_DVB_T1,
},{
.subvendor = 0x0070,
.subdevice = 0x1400,
.card = CX88_BOARD_HAUPPAUGE_HVR3000,
},{
.subvendor = 0x0070,
.subdevice = 0x1401,
.card = CX88_BOARD_HAUPPAUGE_HVR3000,
},{
.subvendor = 0x0070,
.subdevice = 0x1402,
.card = CX88_BOARD_HAUPPAUGE_HVR3000,
},
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
Expand Down Expand Up @@ -1633,7 +1646,15 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
/* Make sure we support the board model */
switch (tv.model)
{
case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
case 34519: /* WinTV-PCI-FM */
case 90002: /* Nova-T-PCI (9002) */
Expand Down
17 changes: 17 additions & 0 deletions drivers/media/video/cx88/cx88-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,22 @@ static struct cx22702_config hauppauge_novat_config = {
.demod_address = 0x43,
.output_mode = CX22702_SERIAL_OUTPUT,
};

static struct cx22702_config hauppauge_hvr1100_config = {
.demod_address = 0x63,
.output_mode = CX22702_SERIAL_OUTPUT,
};

static struct cx22702_config hauppauge_hvr1300_config = {
.demod_address = 0x63,
.output_mode = CX22702_SERIAL_OUTPUT,
};

static struct cx22702_config hauppauge_hvr3000_config = {
.demod_address = 0x63,
.output_mode = CX22702_SERIAL_OUTPUT,
};

static int or51132_set_ts_param(struct dvb_frontend* fe,
int is_punctured)
{
Expand Down Expand Up @@ -558,6 +565,16 @@ static int dvb_register(struct cx8802_dev *dev)
&dvb_pll_fmd1216me);
}
break;
case CX88_BOARD_HAUPPAUGE_HVR3000:
dev->dvb.frontend = dvb_attach(cx22702_attach,
&hauppauge_hvr3000_config,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
&dev->core->i2c_adap,
&dvb_pll_fmd1216me);
}
break;
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
dev->dvb.frontend = dvb_attach(mt352_attach,
&dvico_fusionhdtv,
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/video/cx88/cx88-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
case CX88_BOARD_HAUPPAUGE_HVR1100:
case CX88_BOARD_HAUPPAUGE_HVR1300:
case CX88_BOARD_HAUPPAUGE_HVR3000:
ir_codes = ir_codes_hauppauge_new;
ir_type = IR_TYPE_RC5;
ir->sampling = 1;
Expand Down Expand Up @@ -419,6 +420,7 @@ void cx88_ir_irq(struct cx88_core *core)
case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
case CX88_BOARD_HAUPPAUGE_HVR1100:
case CX88_BOARD_HAUPPAUGE_HVR1300:
case CX88_BOARD_HAUPPAUGE_HVR3000:
ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
ir_dprintk("biphase decoded: %x\n", ircode);
if ((ircode & 0xfffff000) != 0x3000)
Expand Down
37 changes: 31 additions & 6 deletions drivers/media/video/et61x251/et61x251_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,16 +973,32 @@ static CLASS_DEVICE_ATTR(i2c_val, S_IRUGO | S_IWUSR,
et61x251_show_i2c_val, et61x251_store_i2c_val);


static void et61x251_create_sysfs(struct et61x251_device* cam)
static int et61x251_create_sysfs(struct et61x251_device* cam)
{
struct video_device *v4ldev = cam->v4ldev;
int rc;

video_device_create_file(v4ldev, &class_device_attr_reg);
video_device_create_file(v4ldev, &class_device_attr_val);
rc = video_device_create_file(v4ldev, &class_device_attr_reg);
if (rc) goto err;
rc = video_device_create_file(v4ldev, &class_device_attr_val);
if (rc) goto err_reg;
if (cam->sensor.sysfs_ops) {
video_device_create_file(v4ldev, &class_device_attr_i2c_reg);
video_device_create_file(v4ldev, &class_device_attr_i2c_val);
rc = video_device_create_file(v4ldev, &class_device_attr_i2c_reg);
if (rc) goto err_val;
rc = video_device_create_file(v4ldev, &class_device_attr_i2c_val);
if (rc) goto err_i2c_reg;
}

return 0;

err_i2c_reg:
video_device_remove_file(v4ldev, &class_device_attr_i2c_reg);
err_val:
video_device_remove_file(v4ldev, &class_device_attr_val);
err_reg:
video_device_remove_file(v4ldev, &class_device_attr_reg);
err:
return rc;
}
#endif /* CONFIG_VIDEO_ADV_DEBUG */

Expand Down Expand Up @@ -2534,7 +2550,9 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
dev_nr = (dev_nr < ET61X251_MAX_DEVICES-1) ? dev_nr+1 : 0;

#ifdef CONFIG_VIDEO_ADV_DEBUG
et61x251_create_sysfs(cam);
err = et61x251_create_sysfs(cam);
if (err)
goto fail2;
DBG(2, "Optional device control through 'sysfs' interface ready");
#endif

Expand All @@ -2544,6 +2562,13 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)

return 0;

#ifdef CONFIG_VIDEO_ADV_DEBUG
fail2:
video_nr[dev_nr] = -1;
dev_nr = (dev_nr < ET61X251_MAX_DEVICES-1) ? dev_nr+1 : 0;
mutex_unlock(&cam->dev_mutex);
video_unregister_device(cam->v4ldev);
#endif
fail:
if (cam) {
kfree(cam->control_buffer);
Expand Down
Loading

0 comments on commit ed75ded

Please sign in to comment.