Linus,
Please pull 'master' from:
git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git master
It contains the following:
- Add WinTV-HVR3000 DVB-T support
- Fix vivi compile on parisc
- Support status readout for saa713x based FM radio
- Fix VIDIOC_G_FMT for NTSC in cx25840.
- Kconfig: restore pvrusb2 menu items
- Fix spelling error in Kconfig help text for DVB_CORE_ATTACH
- Tda10086: fix frontend selection for dvb_attach
- Tda826x: fix frontend selection for dvb_attach
- Bt8xx/dvb-bt8xx.c: check kmalloc() return value.
- SECAM support for saa7113 into saa7115
- Fixed an if-block to avoid floating with debug-messages
- {ov511,stv680}: handle sysfs errors
- Drivers/media/video: handle sysfs errors
- Fix oops in VIDIOC_G_PARM
- The Samsung TCPN2121P30A does not have a tda9887
- HM12 is YUV 4:2:0, not YUV 4:1:1
- Fixed oops for Nova-T USB2
- AGC command1/2 is board specific
Cheers,
Mauro.
V4L/DVB development is hosted at http://linuxtv.org
---
Documentation/video4linux/CARDLIST.cx88 | 2 -
drivers/media/dvb/bt8xx/dvb-bt8xx.c | 4 +
drivers/media/dvb/dvb-core/Kconfig | 2 -
drivers/media/dvb/dvb-usb/dibusb-common.c | 11 +++-
drivers/media/dvb/dvb-usb/dibusb.h | 2 +
drivers/media/dvb/dvb-usb/nova-t-usb2.c | 3 +
drivers/media/dvb/frontends/dib3000mc.c | 2 -
drivers/media/dvb/frontends/dib3000mc.h | 3 +
drivers/media/dvb/frontends/tda10086.h | 9 +++
drivers/media/dvb/frontends/tda826x.h | 19 ++++++-
drivers/media/video/Kconfig | 2 +
drivers/media/video/cx25840/cx25840-vbi.c | 25 +++++++--
drivers/media/video/cx88/cx88-cards.c | 21 ++++++++
drivers/media/video/cx88/cx88-dvb.c | 17 ++++++
drivers/media/video/cx88/cx88-input.c | 2 +
drivers/media/video/et61x251/et61x251_core.c | 37 +++++++++++---
drivers/media/video/ov511.c | 58 +++++++++++++++++----
drivers/media/video/pwc/pwc-if.c | 41 ++++++++++++---
drivers/media/video/saa7115.c | 2 +
drivers/media/video/saa7134/saa7134-video.c | 6 ++
drivers/media/video/sn9c102/sn9c102_core.c | 71 ++++++++++++++++++++------
drivers/media/video/stv680.c | 53 ++++++++++++++++---
drivers/media/video/tuner-types.c | 1
drivers/media/video/videodev.c | 16 ++++--
drivers/media/video/vivi.c | 12 ++--
include/linux/videodev2.h | 2 -
26 files changed, 342 insertions(+), 81 deletions(-)
From: Steven Toth <[email protected]>
The WinTV-HVR3000 is currently defined for analog support only. This
patch adds full DVB-T support. (DVB-S support will be added soon)
Signed-off-by: Steven Toth <[email protected]>
Signed-off-by: Michael Krufky <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
Documentation/video4linux/CARDLIST.cx88 | 2 +-
drivers/media/video/cx88/cx88-cards.c | 21 +++++++++++++++++++++
drivers/media/video/cx88/cx88-dvb.c | 17 +++++++++++++++++
drivers/media/video/cx88/cx88-input.c | 2 ++
4 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 126e59d..8755b3e 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -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]
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index af71d42..f764a57 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -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",
@@ -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);
@@ -1633,7 +1646,15 @@ static void hauppauge_eeprom(struct cx88
/* 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) */
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index bd0c879..0ef13e7 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -315,15 +315,22 @@ static struct cx22702_config hauppauge_n
.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)
{
@@ -558,6 +565,16 @@ static int dvb_register(struct cx8802_de
&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,
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index 83ebf7a..ee48995 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -196,6 +196,7 @@ int cx88_ir_init(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:
ir_codes = ir_codes_hauppauge_new;
ir_type = IR_TYPE_RC5;
ir->sampling = 1;
@@ -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)
From: Patrick Boettcher <[email protected]>
When using the remote control with the Nova-T USB there was an Oops because of
the recent DVB-USB-Adapter change.
Signed-off-by: Patrick Boettcher <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/dvb/dvb-usb/dibusb.h | 2 ++
drivers/media/dvb/dvb-usb/nova-t-usb2.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/media/dvb/dvb-usb/dibusb.h b/drivers/media/dvb/dvb-usb/dibusb.h
index 5153fb9..b607810 100644
--- a/drivers/media/dvb/dvb-usb/dibusb.h
+++ b/drivers/media/dvb/dvb-usb/dibusb.h
@@ -99,7 +99,9 @@ #define DIBUSB_IOCTL_CMD_DISABLE_STREAM
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;
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index a9219bf..a58874c 100644
--- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -75,7 +75,7 @@ static int nova_t_rc_query(struct dvb_us
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);
@@ -184,6 +184,7 @@ static struct dvb_usb_device_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,
From: Patrick Boettcher <[email protected]>
Added config-struct-parameter to take board-specific AGC command 1 and 2 into account.
Signed-off-by: Patrick Boettcher <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/dvb/dvb-usb/dibusb-common.c | 11 +++++++++--
drivers/media/dvb/frontends/dib3000mc.c | 2 +-
drivers/media/dvb/frontends/dib3000mc.h | 3 +++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c
index fd3a990..5143e42 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -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,
@@ -196,10 +196,14 @@ static struct dib3000mc_config stk3000p_
.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,
@@ -226,6 +230,9 @@ static struct dib3000mc_config mod3000p_
.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)
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index ccc813b..3561a77 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -345,7 +345,7 @@ static int dib3000mc_init(struct dvb_fro
/* 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);
diff --git a/drivers/media/dvb/frontends/dib3000mc.h b/drivers/media/dvb/frontends/dib3000mc.h
index b198cd5..0d6fdef 100644
--- a/drivers/media/dvb/frontends/dib3000mc.h
+++ b/drivers/media/dvb/frontends/dib3000mc.h
@@ -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;
From: Hans Verkuil <[email protected]>
VIDIOC_G_FMT returned the sliced VBI types in the wrong lines for NTSC
(three lines too low).
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/cx25840/cx25840-vbi.c | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c
index 48014a2..f85f208 100644
--- a/drivers/media/video/cx25840/cx25840-vbi.c
+++ b/drivers/media/video/cx25840/cx25840-vbi.c
@@ -235,6 +235,7 @@ int cx25840_vbi(struct i2c_client *clien
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;
@@ -246,13 +247,25 @@ int cx25840_vbi(struct i2c_client *clien
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;
}
From: Jeff Garzik <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/ov511.c | 58 ++++++++++++++++++++++++++++++++++--------
drivers/media/video/stv680.c | 53 +++++++++++++++++++++++++++++++-------
2 files changed, 90 insertions(+), 21 deletions(-)
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index ce4886f..b4db2cb 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -5648,17 +5648,49 @@ static ssize_t show_exposure(struct clas
}
static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL);
-static void ov_create_sysfs(struct video_device *vdev)
+static int ov_create_sysfs(struct video_device *vdev)
{
- video_device_create_file(vdev, &class_device_attr_custom_id);
- video_device_create_file(vdev, &class_device_attr_model);
- video_device_create_file(vdev, &class_device_attr_bridge);
- video_device_create_file(vdev, &class_device_attr_sensor);
- video_device_create_file(vdev, &class_device_attr_brightness);
- video_device_create_file(vdev, &class_device_attr_saturation);
- video_device_create_file(vdev, &class_device_attr_contrast);
- video_device_create_file(vdev, &class_device_attr_hue);
- video_device_create_file(vdev, &class_device_attr_exposure);
+ int rc;
+
+ rc = video_device_create_file(vdev, &class_device_attr_custom_id);
+ if (rc) goto err;
+ rc = video_device_create_file(vdev, &class_device_attr_model);
+ if (rc) goto err_id;
+ rc = video_device_create_file(vdev, &class_device_attr_bridge);
+ if (rc) goto err_model;
+ rc = video_device_create_file(vdev, &class_device_attr_sensor);
+ if (rc) goto err_bridge;
+ rc = video_device_create_file(vdev, &class_device_attr_brightness);
+ if (rc) goto err_sensor;
+ rc = video_device_create_file(vdev, &class_device_attr_saturation);
+ if (rc) goto err_bright;
+ rc = video_device_create_file(vdev, &class_device_attr_contrast);
+ if (rc) goto err_sat;
+ rc = video_device_create_file(vdev, &class_device_attr_hue);
+ if (rc) goto err_contrast;
+ rc = video_device_create_file(vdev, &class_device_attr_exposure);
+ if (rc) goto err_hue;
+
+ return 0;
+
+err_hue:
+ video_device_remove_file(vdev, &class_device_attr_hue);
+err_contrast:
+ video_device_remove_file(vdev, &class_device_attr_contrast);
+err_sat:
+ video_device_remove_file(vdev, &class_device_attr_saturation);
+err_bright:
+ video_device_remove_file(vdev, &class_device_attr_brightness);
+err_sensor:
+ video_device_remove_file(vdev, &class_device_attr_sensor);
+err_bridge:
+ video_device_remove_file(vdev, &class_device_attr_bridge);
+err_model:
+ video_device_remove_file(vdev, &class_device_attr_model);
+err_id:
+ video_device_remove_file(vdev, &class_device_attr_custom_id);
+err:
+ return rc;
}
/****************************************************************************
@@ -5817,7 +5849,11 @@ #endif
ov->vdev->minor);
usb_set_intfdata(intf, ov);
- ov_create_sysfs(ov->vdev);
+ if (ov_create_sysfs(ov->vdev)) {
+ err("ov_create_sysfs failed");
+ goto error;
+ }
+
return 0;
error:
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c
index 87e1130..6d1ef1e 100644
--- a/drivers/media/video/stv680.c
+++ b/drivers/media/video/stv680.c
@@ -516,16 +516,45 @@ stv680_file(frames_read, framecount, "%d
stv680_file(packets_dropped, dropped, "%d\n");
stv680_file(decoding_errors, error, "%d\n");
-static void stv680_create_sysfs_files(struct video_device *vdev)
+static int stv680_create_sysfs_files(struct video_device *vdev)
{
- video_device_create_file(vdev, &class_device_attr_model);
- video_device_create_file(vdev, &class_device_attr_in_use);
- video_device_create_file(vdev, &class_device_attr_streaming);
- video_device_create_file(vdev, &class_device_attr_palette);
- video_device_create_file(vdev, &class_device_attr_frames_total);
- video_device_create_file(vdev, &class_device_attr_frames_read);
- video_device_create_file(vdev, &class_device_attr_packets_dropped);
- video_device_create_file(vdev, &class_device_attr_decoding_errors);
+ int rc;
+
+ rc = video_device_create_file(vdev, &class_device_attr_model);
+ if (rc) goto err;
+ rc = video_device_create_file(vdev, &class_device_attr_in_use);
+ if (rc) goto err_model;
+ rc = video_device_create_file(vdev, &class_device_attr_streaming);
+ if (rc) goto err_inuse;
+ rc = video_device_create_file(vdev, &class_device_attr_palette);
+ if (rc) goto err_stream;
+ rc = video_device_create_file(vdev, &class_device_attr_frames_total);
+ if (rc) goto err_pal;
+ rc = video_device_create_file(vdev, &class_device_attr_frames_read);
+ if (rc) goto err_framtot;
+ rc = video_device_create_file(vdev, &class_device_attr_packets_dropped);
+ if (rc) goto err_framread;
+ rc = video_device_create_file(vdev, &class_device_attr_decoding_errors);
+ if (rc) goto err_dropped;
+
+ return 0;
+
+err_dropped:
+ video_device_remove_file(vdev, &class_device_attr_packets_dropped);
+err_framread:
+ video_device_remove_file(vdev, &class_device_attr_frames_read);
+err_framtot:
+ video_device_remove_file(vdev, &class_device_attr_frames_total);
+err_pal:
+ video_device_remove_file(vdev, &class_device_attr_palette);
+err_stream:
+ video_device_remove_file(vdev, &class_device_attr_streaming);
+err_inuse:
+ video_device_remove_file(vdev, &class_device_attr_in_use);
+err_model:
+ video_device_remove_file(vdev, &class_device_attr_model);
+err:
+ return rc;
}
static void stv680_remove_sysfs_files(struct video_device *vdev)
@@ -1418,9 +1447,13 @@ static int stv680_probe (struct usb_inte
usb_set_intfdata (intf, stv680);
- stv680_create_sysfs_files(stv680->vdev);
+ retval = stv680_create_sysfs_files(stv680->vdev);
+ if (retval)
+ goto error_unreg;
return 0;
+error_unreg:
+ video_unregister_device(stv680->vdev);
error_vdev:
video_device_release(stv680->vdev);
error:
From: P?draig Brady <[email protected]>
Without the attached trivial patch, the saa7113 is set up for PAL when SECAM
is selected and hence will see only show black and white for SECAM signals.
Tested the patch against the saa7115 module in linux-2.6.17 with a
Pinnacle 50e USB tuner (em28xx).
Signed-off-by: P?draig Brady <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/saa7115.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 974179d..c5719f7 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -960,6 +960,8 @@ static void saa711x_set_v4lstd(struct i2
reg |= 0x10;
} else if (std == V4L2_STD_NTSC_M_JP) {
reg |= 0x40;
+ } else if (std == V4L2_STD_SECAM) {
+ reg |= 0x50;
}
saa711x_write(client, R_0E_CHROMA_CNTL_1, reg);
} else {
From: Michael Krufky <[email protected]>
Signed-off-by: Michael Krufky <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/dvb/frontends/tda826x.h | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/media/dvb/frontends/tda826x.h b/drivers/media/dvb/frontends/tda826x.h
index 3307607..83998c0 100644
--- a/drivers/media/dvb/frontends/tda826x.h
+++ b/drivers/media/dvb/frontends/tda826x.h
@@ -35,6 +35,19 @@ #include "dvb_frontend.h"
* @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__
From: Hartmut Hackmann <[email protected]>
This patch adds readout for stereo and signal level for
saa713x cards which use the saa713x as FM demodulator.
These are many cards based on saa7133, tda8290 and tda8275a.
FM channel search should work now.
Signed-off-by: Hartmut Hackmann <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/saa7134/saa7134-video.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 203302f..830617e 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -2248,7 +2248,11 @@ static int radio_do_ioctl(struct inode *
t->type = V4L2_TUNER_RADIO;
saa7134_i2c_call_clients(dev, VIDIOC_G_TUNER, t);
-
+ if (dev->input->amux == TV) {
+ t->signal = 0xf800 - ((saa_readb(0x581) & 0x1f) << 11);
+ t->rxsubchans = (saa_readb(0x529) & 0x08) ?
+ V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
+ }
return 0;
}
case VIDIOC_S_TUNER:
From: Michael Krufky <[email protected]>
Signed-off-by: Michael Krufky <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/dvb/frontends/tda10086.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h
index e8061db..18457ad 100644
--- a/drivers/media/dvb/frontends/tda10086.h
+++ b/drivers/media/dvb/frontends/tda10086.h
@@ -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
From: Matthew Wilcox <[email protected]>
parisc (and several other architectures) don't have a dma_address in their
sg list. Use the macro instead.
Signed-off-by: Matthew Wilcox <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/vivi.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index e7c01d5..3c8dc72 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -272,7 +272,7 @@ static void gen_line(struct sg_to_addr t
/* Get first addr pointed to pixel position */
oldpg=get_addr_pos(pos,pages,to_addr);
- pg=pfn_to_page(to_addr[oldpg].sg->dma_address >> PAGE_SHIFT);
+ pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;
/* We will just duplicate the second pixel at the packet */
@@ -287,7 +287,7 @@ static void gen_line(struct sg_to_addr t
for (color=0;color<4;color++) {
pgpos=get_addr_pos(pos,pages,to_addr);
if (pgpos!=oldpg) {
- pg=pfn_to_page(to_addr[pgpos].sg->dma_address >> PAGE_SHIFT);
+ pg=pfn_to_page(sg_dma_address(to_addr[pgpos].sg) >> PAGE_SHIFT);
kunmap_atomic(basep, KM_BOUNCE_READ);
basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset;
oldpg=pgpos;
@@ -339,8 +339,8 @@ static void gen_line(struct sg_to_addr t
for (color=0;color<4;color++) {
pgpos=get_addr_pos(pos,pages,to_addr);
if (pgpos!=oldpg) {
- pg=pfn_to_page(to_addr[pgpos].
- sg->dma_address
+ pg=pfn_to_page(sg_dma_address(
+ to_addr[pgpos].sg)
>> PAGE_SHIFT);
kunmap_atomic(basep,
KM_BOUNCE_READ);
@@ -386,7 +386,7 @@ static void vivi_fillbuff(struct vivi_de
struct timeval ts;
/* Test if DMA mapping is ready */
- if (!vb->dma.sglist[0].dma_address)
+ if (!sg_dma_address(&vb->dma.sglist[0]))
return;
prep_to_addr(to_addr,vb);
@@ -783,7 +783,7 @@ static int vivi_map_sg(void *dev, struct
for (i = 0; i < nents; i++ ) {
BUG_ON(!sg[i].page);
- sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
+ sg_dma_address(&sg[i]) = page_to_phys(sg[i].page) + sg[i].offset;
}
return nents;
From: Jeff Garzik <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/et61x251/et61x251_core.c | 37 +++++++++++---
drivers/media/video/pwc/pwc-if.c | 41 ++++++++++++---
drivers/media/video/sn9c102/sn9c102_core.c | 71 ++++++++++++++++++++------
3 files changed, 117 insertions(+), 32 deletions(-)
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c
index bc544cc..f786ab1 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -973,16 +973,32 @@ static CLASS_DEVICE_ATTR(i2c_val, S_IRUG
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 */
@@ -2534,7 +2550,9 @@ et61x251_usb_probe(struct usb_interface*
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
@@ -2544,6 +2562,13 @@ #endif
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);
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index c77b85c..46c1148 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1024,12 +1024,25 @@ static ssize_t show_snapshot_button_stat
static CLASS_DEVICE_ATTR(button, S_IRUGO | S_IWUSR, show_snapshot_button_status,
NULL);
-static void pwc_create_sysfs_files(struct video_device *vdev)
+static int pwc_create_sysfs_files(struct video_device *vdev)
{
struct pwc_device *pdev = video_get_drvdata(vdev);
- if (pdev->features & FEATURE_MOTOR_PANTILT)
- video_device_create_file(vdev, &class_device_attr_pan_tilt);
- video_device_create_file(vdev, &class_device_attr_button);
+ int rc;
+
+ rc = video_device_create_file(vdev, &class_device_attr_button);
+ if (rc)
+ goto err;
+ if (pdev->features & FEATURE_MOTOR_PANTILT) {
+ rc = video_device_create_file(vdev,&class_device_attr_pan_tilt);
+ if (rc) goto err_button;
+ }
+
+ return 0;
+
+err_button:
+ video_device_remove_file(vdev, &class_device_attr_button);
+err:
+ return rc;
}
static void pwc_remove_sysfs_files(struct video_device *vdev)
@@ -1408,7 +1421,7 @@ static int usb_pwc_probe(struct usb_inte
struct usb_device *udev = interface_to_usbdev(intf);
struct pwc_device *pdev = NULL;
int vendor_id, product_id, type_id;
- int i, hint;
+ int i, hint, rc;
int features = 0;
int video_nr = -1; /* default: use next available device */
char serial_number[30], *name;
@@ -1709,9 +1722,8 @@ static int usb_pwc_probe(struct usb_inte
i = video_register_device(pdev->vdev, VFL_TYPE_GRABBER, video_nr);
if (i < 0) {
PWC_ERROR("Failed to register as video device (%d).\n", i);
- video_device_release(pdev->vdev); /* Drip... drip... drip... */
- kfree(pdev); /* Oops, no memory leaks please */
- return -EIO;
+ rc = i;
+ goto err;
}
else {
PWC_INFO("Registered as /dev/video%d.\n", pdev->vdev->minor & 0x3F);
@@ -1723,13 +1735,24 @@ static int usb_pwc_probe(struct usb_inte
PWC_DEBUG_PROBE("probe() function returning struct at 0x%p.\n", pdev);
usb_set_intfdata (intf, pdev);
- pwc_create_sysfs_files(pdev->vdev);
+ rc = pwc_create_sysfs_files(pdev->vdev);
+ if (rc)
+ goto err_unreg;
/* Set the leds off */
pwc_set_leds(pdev, 0, 0);
pwc_camera_power(pdev, 0);
return 0;
+
+err_unreg:
+ if (hint < MAX_DEV_HINTS)
+ device_hint[hint].pdev = NULL;
+ video_unregister_device(pdev->vdev);
+err:
+ video_device_release(pdev->vdev); /* Drip... drip... drip... */
+ kfree(pdev); /* Oops, no memory leaks please */
+ return rc;
}
/* The user janked out the cable... */
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 3e0ff8a..a4702d3 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -1240,23 +1240,53 @@ static CLASS_DEVICE_ATTR(frame_header, S
sn9c102_show_frame_header, NULL);
-static void sn9c102_create_sysfs(struct sn9c102_device* cam)
+static int sn9c102_create_sysfs(struct sn9c102_device* cam)
{
struct video_device *v4ldev = cam->v4ldev;
+ int rc;
+
+ 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;
+ rc = video_device_create_file(v4ldev, &class_device_attr_frame_header);
+ if (rc) goto err_val;
- video_device_create_file(v4ldev, &class_device_attr_reg);
- video_device_create_file(v4ldev, &class_device_attr_val);
- video_device_create_file(v4ldev, &class_device_attr_frame_header);
- if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102)
- video_device_create_file(v4ldev, &class_device_attr_green);
- else if (cam->bridge == BRIDGE_SN9C103) {
- video_device_create_file(v4ldev, &class_device_attr_blue);
- video_device_create_file(v4ldev, &class_device_attr_red);
- }
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_frhead;
+ rc = video_device_create_file(v4ldev, &class_device_attr_i2c_val);
+ if (rc) goto err_i2c_reg;
+ }
+
+ if (cam->bridge == BRIDGE_SN9C101 || cam->bridge == BRIDGE_SN9C102) {
+ rc = video_device_create_file(v4ldev, &class_device_attr_green);
+ if (rc) goto err_i2c_val;
+ } else if (cam->bridge == BRIDGE_SN9C103) {
+ rc = video_device_create_file(v4ldev, &class_device_attr_blue);
+ if (rc) goto err_i2c_val;
+ rc = video_device_create_file(v4ldev, &class_device_attr_red);
+ if (rc) goto err_blue;
}
+
+ return 0;
+
+err_blue:
+ video_device_remove_file(v4ldev, &class_device_attr_blue);
+err_i2c_val:
+ if (cam->sensor.sysfs_ops)
+ video_device_remove_file(v4ldev, &class_device_attr_i2c_val);
+err_i2c_reg:
+ if (cam->sensor.sysfs_ops)
+ video_device_remove_file(v4ldev, &class_device_attr_i2c_reg);
+err_frhead:
+ video_device_remove_file(v4ldev, &class_device_attr_frame_header);
+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 */
@@ -2809,10 +2839,7 @@ sn9c102_usb_probe(struct usb_interface*
DBG(1, "V4L2 device registration failed");
if (err == -ENFILE && video_nr[dev_nr] == -1)
DBG(1, "Free /dev/videoX node not found");
- video_nr[dev_nr] = -1;
- dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0;
- mutex_unlock(&cam->dev_mutex);
- goto fail;
+ goto fail2;
}
DBG(2, "V4L2 device registered as /dev/video%d", cam->v4ldev->minor);
@@ -2823,7 +2850,9 @@ sn9c102_usb_probe(struct usb_interface*
dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0;
#ifdef CONFIG_VIDEO_ADV_DEBUG
- sn9c102_create_sysfs(cam);
+ err = sn9c102_create_sysfs(cam);
+ if (err)
+ goto fail3;
DBG(2, "Optional device control through 'sysfs' interface ready");
#endif
@@ -2833,6 +2862,14 @@ #endif
return 0;
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+fail3:
+ video_unregister_device(cam->v4ldev);
+#endif
+fail2:
+ video_nr[dev_nr] = -1;
+ dev_nr = (dev_nr < SN9C102_MAX_DEVICES-1) ? dev_nr+1 : 0;
+ mutex_unlock(&cam->dev_mutex);
fail:
if (cam) {
kfree(cam->control_buffer);
From: Uwe Bugla <[email protected]>
Signed-off-by: Uwe Bugla <[email protected]>
Signed-off-by: Michael Krufky <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/dvb/dvb-core/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/dvb/dvb-core/Kconfig b/drivers/media/dvb/dvb-core/Kconfig
index e46eae3..1990eda 100644
--- a/drivers/media/dvb/dvb-core/Kconfig
+++ b/drivers/media/dvb/dvb-core/Kconfig
@@ -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.
From: Jonathan Corbet <[email protected]>
The call to v4l2_std_construct() in the VIDIOC_G_PARM handler treats
vfd->current_norm as if it were an index - but it's not. The result is
an oops if the driver has no vidioc_g_parm() method defined. Here's the
fix.
Signed-off-by: Jonathan Corbet <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/videodev.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 98de872..d424a41 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1288,6 +1288,7 @@ #endif
ret=vfd->vidioc_g_parm(file, fh, p);
} else {
struct v4l2_standard s;
+ int i;
if (!vfd->tvnormsize) {
printk (KERN_WARNING "%s: no TV norms defined!\n",
@@ -1298,8 +1299,14 @@ #endif
if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
- v4l2_video_std_construct(&s, vfd->tvnorms[vfd->current_norm].id,
- vfd->tvnorms[vfd->current_norm].name);
+ for (i = 0; i < vfd->tvnormsize; i++)
+ if (vfd->tvnorms[i].id == vfd->current_norm)
+ break;
+ if (i >= vfd->tvnormsize)
+ return -EINVAL;
+
+ v4l2_video_std_construct(&s, vfd->current_norm,
+ vfd->tvnorms[i].name);
memset(p,0,sizeof(*p));
From: Hans Verkuil <[email protected]>
Fix comment in videodev2.h
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
include/linux/videodev2.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index c5fdf62..df5c465 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -243,7 +243,7 @@ #define V4L2_PIX_FMT_YUV410 v4l2_fourcc
#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */
#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */
#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */
-#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:1:1 16x16 macroblocks */
+#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */
/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */
From: Enrico Scholz <[email protected]>
The dbgarg() macro in videodev.c contains some printk() statements
where only the first one is influenced by an if-statement. This causes
floating with debug-messages which is fixed by this patch by adding a
'{ ... }' pair.
Signed-off-by: Enrico Scholz <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/videodev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 479a067..98de872 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -17,10 +17,11 @@
*/
#define dbgarg(cmd, fmt, arg...) \
- if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \
+ if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { \
printk (KERN_DEBUG "%s: ", vfd->name); \
v4l_printk_ioctl(cmd); \
- printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg);
+ printk (KERN_DEBUG "%s: " fmt, vfd->name, ## arg); \
+ }
#define dbgarg2(fmt, arg...) \
if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) \
From: Hans Verkuil <[email protected]>
Contrary to all expections the Samsung TCPN2121P30A tuner does
NOT have a tda9887. Remove the tda9887 flag from the tuner
definition.
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/tuner-types.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c
index 8fff642..7816823 100644
--- a/drivers/media/video/tuner-types.c
+++ b/drivers/media/video/tuner-types.c
@@ -1046,7 +1046,6 @@ static struct tuner_params tuner_samsung
.type = TUNER_PARAM_TYPE_NTSC,
.ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges,
.count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges),
- .has_tda9887 = 1,
},
};
From: Michael Krufky <[email protected]>
Looks like the pvrusb2 menu items were accidentally removed in
git commit 1450e6bedc58c731617d99b4670070ed3ccc91b4
This patch restores the menu items so that the pvrusb2 driver can be built.
Signed-off-by: Michael Krufky <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/video/Kconfig | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index afb734d..fbe5b61 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -677,6 +677,8 @@ #
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"
From: Amit Choudhary <[email protected]>
Check the return value of kmalloc() in function frontend_init(),
in file drivers/media/dvb/bt8xx/dvb-bt8xx.c.
Signed-off-by: Amit Choudhary <[email protected]>
Signed-off-by: Manu Abraham <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
drivers/media/dvb/bt8xx/dvb-bt8xx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index fb6c4cc..14e69a7 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -665,6 +665,10 @@ static void frontend_init(struct dvb_bt8
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;
On Sat, Oct 14, 2006 at 09:00:50AM -0300, [email protected] wrote:
>
> From: Michael Krufky <[email protected]>
>
> Signed-off-by: Michael Krufky <[email protected]>
> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
> ---
>
> drivers/media/dvb/frontends/tda10086.h | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h
> index e8061db..18457ad 100644
> --- a/drivers/media/dvb/frontends/tda10086.h
> +++ b/drivers/media/dvb/frontends/tda10086.h
> @@ -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
As already said:
This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA10086=m.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Sat, Oct 14, 2006 at 09:00:50AM -0300, [email protected] wrote:
>
> From: Michael Krufky <[email protected]>
>
> Signed-off-by: Michael Krufky <[email protected]>
> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
> ---
>
> drivers/media/dvb/frontends/tda826x.h | 19 ++++++++++++++++---
> 1 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/tda826x.h b/drivers/media/dvb/frontends/tda826x.h
> index 3307607..83998c0 100644
> --- a/drivers/media/dvb/frontends/tda826x.h
> +++ b/drivers/media/dvb/frontends/tda826x.h
> @@ -35,6 +35,19 @@ #include "dvb_frontend.h"
> * @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__
This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Adrian Bunk wrote:
> On Sat, Oct 14, 2006 at 09:00:50AM -0300, [email protected] wrote:
>> From: Michael Krufky <[email protected]>
>>
>> Signed-off-by: Michael Krufky <[email protected]>
>> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
>> ---
>>
>> drivers/media/dvb/frontends/tda826x.h | 19 ++++++++++++++++---
>> 1 files changed, 16 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/dvb/frontends/tda826x.h b/drivers/media/dvb/frontends/tda826x.h
>> index 3307607..83998c0 100644
>> --- a/drivers/media/dvb/frontends/tda826x.h
>> +++ b/drivers/media/dvb/frontends/tda826x.h
>> @@ -35,6 +35,19 @@ #include "dvb_frontend.h"
>> * @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__
>
> This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m.
Regardless, the patch must be applied. The above should only break with DVB_FE_CUSTOMIZE=Y ...
Turn off DVB_FE_CUSTOMIZE, and you will find that the above does NOT break. You can probably reproduce this 'broken' situation by setting any card driver = y, with the frontend = m ...
As stated in the prior thread, "CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m" is not the problem -- rather, "CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m, DVB_FE_CUSTOMIZE=Y" causes the breakage.
-Mike Krufky
Adrian Bunk wrote:
> On Sat, Oct 14, 2006 at 09:00:50AM -0300, [email protected] wrote:
>> From: Michael Krufky <[email protected]>
>>
>> Signed-off-by: Michael Krufky <[email protected]>
>> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
>> ---
>>
>> drivers/media/dvb/frontends/tda10086.h | 9 +++++++++
>> 1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h
>> index e8061db..18457ad 100644
>> --- a/drivers/media/dvb/frontends/tda10086.h
>> +++ b/drivers/media/dvb/frontends/tda10086.h
>> @@ -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
>
> As already said:
> This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA10086=m.
Again, the breakage is from DVB_FE_CUSTOMIZE=Y, not the above ^^.
This patch must be applied.
-Mike Krufky
On Sat, Oct 14, 2006 at 02:10:33PM -0400, Michael Krufky wrote:
> Adrian Bunk wrote:
> > On Sat, Oct 14, 2006 at 09:00:50AM -0300, [email protected] wrote:
> >> From: Michael Krufky <[email protected]>
> >>
> >> Signed-off-by: Michael Krufky <[email protected]>
> >> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
> >> ---
> >>
> >> drivers/media/dvb/frontends/tda826x.h | 19 ++++++++++++++++---
> >> 1 files changed, 16 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/media/dvb/frontends/tda826x.h b/drivers/media/dvb/frontends/tda826x.h
> >> index 3307607..83998c0 100644
> >> --- a/drivers/media/dvb/frontends/tda826x.h
> >> +++ b/drivers/media/dvb/frontends/tda826x.h
> >> @@ -35,6 +35,19 @@ #include "dvb_frontend.h"
> >> * @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__
> >
> > This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m.
>
> Regardless, the patch must be applied. The above should only break with DVB_FE_CUSTOMIZE=Y ...
>
> Turn off DVB_FE_CUSTOMIZE, and you will find that the above does NOT break. You can probably reproduce this 'broken' situation by setting any card driver = y, with the frontend = m ...
>
> As stated in the prior thread, "CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m" is not the problem -- rather, "CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m, DVB_FE_CUSTOMIZE=Y" causes the breakage.
This patch fixes only a part of the problem.
If this is the way how you want to handle CONFIG_DVB_FE_CUSTOMIZE=y,
I don't understand why you don't use
#if defined(CONFIG_DVB_TDA826X) || (defined(CONFIG_DVB_TDA826X_MODULE) && defined(MODULE))
which is what I stated in exactly the thread you quote.
> -Mike Krufky
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Sat, Oct 14, 2006 at 02:12:11PM -0400, Michael Krufky wrote:
> Adrian Bunk wrote:
> > On Sat, Oct 14, 2006 at 09:00:50AM -0300, [email protected] wrote:
> >> From: Michael Krufky <[email protected]>
> >>
> >> Signed-off-by: Michael Krufky <[email protected]>
> >> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
> >> ---
> >>
> >> drivers/media/dvb/frontends/tda10086.h | 9 +++++++++
> >> 1 files changed, 9 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/media/dvb/frontends/tda10086.h b/drivers/media/dvb/frontends/tda10086.h
> >> index e8061db..18457ad 100644
> >> --- a/drivers/media/dvb/frontends/tda10086.h
> >> +++ b/drivers/media/dvb/frontends/tda10086.h
> >> @@ -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
> >
> > As already said:
> > This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA10086=m.
>
> Again, the breakage is from DVB_FE_CUSTOMIZE=Y, not the above ^^.
>
> This patch must be applied.
Again, this patch fixes only part of the problem, and I did already
suggest how to do it properly if it should be done this way.
> -Mike Krufky
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Adrian Bunk wrote:
>On Sat, Oct 14, 2006 at 02:10:33PM -0400, Michael Krufky wrote:
>
>
>>>This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m.
>>>
>>>
>>Regardless, the patch must be applied. The above should only break with DVB_FE_CUSTOMIZE=Y ...
>>
>>Turn off DVB_FE_CUSTOMIZE, and you will find that the above does NOT break. You can probably reproduce this 'broken' situation by setting any card driver = y, with the frontend = m ...
>>
>>As stated in the prior thread, "CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m" is not the problem -- rather, "CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m, DVB_FE_CUSTOMIZE=Y" causes the breakage.
>>
>>
>This patch fixes only a part of the problem.
>
>If this is the way how you want to handle CONFIG_DVB_FE_CUSTOMIZE=y,
>I don't understand why you don't use
> #if defined(CONFIG_DVB_TDA826X) || (defined(CONFIG_DVB_TDA826X_MODULE) && defined(MODULE))
>which is what I stated in exactly the thread you quote.
>
>
Adrian --
Two separate problems, please do not confuse them.
My tda10086 and tda826x patches are correct -- there is no question of it.
I did not get an email from you with a suggestion for a fix for
DVB_FE_CUSTOMIZE, but my cable / internet has been down for a day and a
half, maybe it will come in soon.
I am not the author of DVB_FE_CUSTOMIZE, adq (cc added) seems to be busy
at the moment. Please send in your patch suggestion to the
v4l-dvb-maintainer list, if you haven't already, and we can discuss that
issue separately.
-Mike Krufky
On Sat, Oct 14, 2006 at 02:57:10PM -0400, Michael Krufky wrote:
> Adrian Bunk wrote:
>
> >On Sat, Oct 14, 2006 at 02:10:33PM -0400, Michael Krufky wrote:
> >
> >
> >>>This breaks with CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m.
> >>>
> >>>
> >>Regardless, the patch must be applied. The above should only break with
> >>DVB_FE_CUSTOMIZE=Y ...
> >>
> >>Turn off DVB_FE_CUSTOMIZE, and you will find that the above does NOT
> >>break. You can probably reproduce this 'broken' situation by setting any
> >>card driver = y, with the frontend = m ...
> >>
> >>As stated in the prior thread, "CONFIG_VIDEO_SAA7134_DVB=y,
> >>CONFIG_DVB_TDA826X=m" is not the problem -- rather,
> >>"CONFIG_VIDEO_SAA7134_DVB=y, CONFIG_DVB_TDA826X=m, DVB_FE_CUSTOMIZE=Y"
> >>causes the breakage.
> >>
> >>
> >This patch fixes only a part of the problem.
> >
> >If this is the way how you want to handle CONFIG_DVB_FE_CUSTOMIZE=y,
> >I don't understand why you don't use
> > #if defined(CONFIG_DVB_TDA826X) || (defined(CONFIG_DVB_TDA826X_MODULE) &&
> > defined(MODULE))
> >which is what I stated in exactly the thread you quote.
> >
> >
> Adrian --
>
> Two separate problems, please do not confuse them.
>
> My tda10086 and tda826x patches are correct -- there is no question of it.
The problem is that they don't fix the whole problem.
And the fact that all frontends do "default m if DVB_FE_CUSTOMISE" makes
my scenario of a built-in driver and modular frontends quite likely...
> I did not get an email from you with a suggestion for a fix for
> DVB_FE_CUSTOMIZE, but my cable / internet has been down for a day and a
> half, maybe it will come in soon.
I did suggest this in [1], and you answered to my email in [2].
> I am not the author of DVB_FE_CUSTOMIZE, adq (cc added) seems to be busy
> at the moment. Please send in your patch suggestion to the
> v4l-dvb-maintainer list, if you haven't already, and we can discuss that
> issue separately.
To be honest and after looking deeper at it, I don't like this
CONFIG_DVB_FE_CUSTOMIZE approach at all since it adds that much
complexity for not much gain.
I'd simply select all frontends unconditionally, and I'd even make the
frontend options no longer user visible.
> -Mike Krufky
cu
Adrian
[1] http://lkml.org/lkml/2006/10/9/35
[2] http://lkml.org/lkml/2006/10/9/43
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Em S?b, 2006-10-14 ?s 21:14 +0200, Adrian Bunk escreveu:
> On Sat, Oct 14, 2006 at 02:57:10PM -0400, Michael Krufky wrote:
> > Adrian Bunk wrote:
> >
> > Two separate problems, please do not confuse them.
> >
> > My tda10086 and tda826x patches are correct -- there is no question of it.
>
> The problem is that they don't fix the whole problem.
Yes. Trent made two patches using your suggestion of checking for
MODULE. I'll submit it to Linus probably tomorrow after some tests.
If you want to review, they are at:
http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=b8c06286cb3a;style=gitweb
http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=18a778dbf540;style=gitweb
> To be honest and after looking deeper at it, I don't like this
> CONFIG_DVB_FE_CUSTOMIZE approach at all since it adds that much
> complexity for not much gain.
Yes, it adds some complexity. The gain, however, is to allow having
smaller kernel size on embedded systems and DVR using MythTV or Freevo.
There's a similar feature for V4L (Autoselect pertinent
encoders/decoders and other helper chips), that allows selecting just
the needed stuff.
>
> I'd simply select all frontends unconditionally
Most users do this, including me :)
Cheers,
Mauro.
On Sat, Oct 14, 2006 at 10:55:06PM -0300, Mauro Carvalho Chehab wrote:
> Em S?b, 2006-10-14 ?s 21:14 +0200, Adrian Bunk escreveu:
> > On Sat, Oct 14, 2006 at 02:57:10PM -0400, Michael Krufky wrote:
> > > Adrian Bunk wrote:
> > >
> > > Two separate problems, please do not confuse them.
> > >
> > > My tda10086 and tda826x patches are correct -- there is no question of it.
> >
> > The problem is that they don't fix the whole problem.
> Yes. Trent made two patches using your suggestion of checking for
> MODULE. I'll submit it to Linus probably tomorrow after some tests.
>
> If you want to review, they are at:
> http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=b8c06286cb3a;style=gitweb
> http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=18a778dbf540;style=gitweb
At a first glance they look good.
> > To be honest and after looking deeper at it, I don't like this
> > CONFIG_DVB_FE_CUSTOMIZE approach at all since it adds that much
> > complexity for not much gain.
> Yes, it adds some complexity. The gain, however, is to allow having
> smaller kernel size on embedded systems and DVR using MythTV or Freevo.
> There's a similar feature for V4L (Autoselect pertinent
> encoders/decoders and other helper chips), that allows selecting just
> the needed stuff.
I understand this, but I still don't like the solution.
But unless I can send a patch with a better solution, this is nothing I
can complain about...
There are two things that might be changed even now:
The "default m if DVB_FE_CUSTOMISE" is something I do not like that
much, especially considering that embedded users caring about kernel
size are likely to use CONFIG_MODULES=n.
Another thing is that we might want to let DVB_FE_CUSTOMISE depend on
EMBEDDED - for the average non-embedded user kernel size doesn't matter
that much, and CONFIG_DVB_FE_CUSTOMIZE=y might often cause user
confusion (similar to e.g. KEYBOARD_ATKBD depending on EMBEDDED,
although many users might use USB keyboards).
> > I'd simply select all frontends unconditionally
> Most users do this, including me :)
>
> Cheers,
> Mauro.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Sun, 15 Oct 2006, Adrian Bunk wrote:
> > > To be honest and after looking deeper at it, I don't like this
> > > CONFIG_DVB_FE_CUSTOMIZE approach at all since it adds that much
> > > complexity for not much gain.
> > Yes, it adds some complexity. The gain, however, is to allow having
> > smaller kernel size on embedded systems and DVR using MythTV or Freevo.
> > There's a similar feature for V4L (Autoselect pertinent
> > encoders/decoders and other helper chips), that allows selecting just
> > the needed stuff.
>
> I understand this, but I still don't like the solution.
> But unless I can send a patch with a better solution, this is nothing I
> can complain about...
There used to be a different way of selecting which front-ends get
built/loaded, that was recently replaced with DVB_FE_CUSTOMISE. It was
even more complex and only worked for a few card drivers that specially
supported it.
What is nice about the new DVB_FE_CUSTOMISE way is that there is very
little code needed. There is a boilerplate #if in the font-end header file
for the _attach function, and that's it.
> There are two things that might be changed even now:
>
> The "default m if DVB_FE_CUSTOMISE" is something I do not like that
> much, especially considering that embedded users caring about kernel
> size are likely to use CONFIG_MODULES=n.
A front-end could default to the highest level of the card drivers which
utilizes it. I'm not sure how to express that in a Kconfig file, and it
would be more work to maintain. One has to go into the FE customisation
menu to turn on DVB_FE_CUSTOMISE anyway, at which point it seems like there
is little difference between disabling the drivers one doesn't want vs
enabling the drivers one does.