V4L/DVB fixes
Subsystems (2)
PATCH 1/18 V4L/DVB (4692): Add WinTV-HVR3000 DVB-T support
In reply to [email protected]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)
---
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(-)
Documentation/video4linux/CARDLIST.cx88 +1 -1
@@ -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]
drivers/media/video/cx88/cx88-cards.c +21 -0
@@ -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) */
drivers/media/video/cx88/cx88-dvb.c +17 -0
@@ -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,
drivers/media/video/cx88/cx88-input.c +2 -0
@@ -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 )
PATCH 17/18 V4L/DVB (4748): Fixed oops for Nova-T USB2
In reply to [email protected]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.
---
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(-)
drivers/media/dvb/dvb-usb/dibusb.h +2 -0
@@ -99,7 +99,9 @@ #define DIBUSB_IOCTL_CMD_DISABLE_STREAMstruct 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;
drivers/media/dvb/dvb-usb/nova-t-usb2.c +2 -1
@@ -75,7 +75,7 @@ static int nova_t_rc_query(struct dvb_usu8 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,
PATCH 18/18 V4L/DVB (4750): AGC command1/2 is board specific
In reply to [email protected]From: Patrick Boettcher <[email protected]>
Added config-struct-parameter to take board-specific AGC command 1 and 2 into account.
---
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(-)
drivers/media/dvb/dvb-usb/dibusb-common.c +9 -2
@@ -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)
drivers/media/dvb/frontends/dib3000mc.c +1 -1
@@ -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);
drivers/media/dvb/frontends/dib3000mc.h +3 -0
@@ -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;
PATCH 4/18 V4L/DVB (4729): Fix VIDIOC_G_FMT for NTSC in cx25840.
In reply to [email protected]From: Hans Verkuil <[email protected]>
VIDIOC_G_FMT returned the sliced VBI types in the wrong lines for NTSC (three lines too low).
---
drivers/media/video/cx25840/cx25840-vbi.c | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-)
drivers/media/video/cx25840/cx25840-vbi.c +19 -6
@@ -235,6 +235,7 @@ int cx25840_vbi(struct i2c_client *clien0 ,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 *clienif ((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 ; }
PATCH 12/18 V4L/DVB (4741): {ov511,stv680}: handle sysfs errors
In reply to [email protected]From: Jeff Garzik <[email protected]>
---
drivers/media/video/ov511.c | 58 ++++++++++++++++++++++++++++++++++-------- drivers/media/video/stv680.c | 53 +++++++++++++++++++++++++++++++------- 2 files changed, 90 insertions(+), 21 deletions(-)
drivers/media/video/ov511.c +47 -11
@@ -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:
drivers/media/video/stv680.c +43 -10
68 lines not on this page · raw message
PATCH 7/18 V4L/DVB (4733): Tda10086: fix frontend selection for dvb_attach
In reply to [email protected]From: Michael Krufky <[email protected]>
---
drivers/media/dvb/frontends/tda10086.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/media/dvb/frontends/tda10086.h +9 -0
@@ -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
PATCH 8/18 V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
In reply to [email protected]From: Michael Krufky <[email protected]>
---
drivers/media/dvb/frontends/tda826x.h | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-)
drivers/media/dvb/frontends/tda826x.h +16 -3
@@ -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__
PATCH 10/18 V4L/DVB (4739): SECAM support for saa7113 into saa7115
In reply to [email protected]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).
---
drivers/media/video/saa7115.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/video/saa7115.c +2 -0
@@ -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 {
PATCH 3/18 V4L/DVB (4727): Support status readout for saa713x based FM radio
In reply to [email protected]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.
---
drivers/media/video/saa7134/saa7134-video.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/media/video/saa7134/saa7134-video.c +5 -1
@@ -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 :
PATCH 2/18 V4L/DVB (4725): Fix vivi compile on parisc
In reply to [email protected]From: Matthew Wilcox <[email protected]>
parisc (and several other architectures) don't have a dma_address in their sg list. Use the macro instead.
---
drivers/media/video/vivi.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/media/video/vivi.c +6 -6
@@ -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 tfor (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 tfor (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_destruct 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, structfor (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;
PATCH 6/18 V4L/DVB (4732): Fix spelling error in Kconfig help text for DVB_CORE_ATTACH
In reply to [email protected]From: Uwe Bugla <[email protected]>
---
drivers/media/dvb/dvb-core/Kconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/dvb-core/Kconfig +1 -1
@@ -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.
PATCH 13/18 V4L/DVB (4742): Drivers/media/video: handle sysfs errors
In reply to [email protected]From: Jeff Garzik <[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(-)
drivers/media/video/et61x251/et61x251_core.c +31 -6
@@ -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 @@ #endifreturn 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);
drivers/media/video/pwc/pwc-if.c +32 -9
73 lines not on this page · raw message
drivers/media/video/sn9c102/sn9c102_core.c +54 -17
100 lines not on this page · raw message
PATCH 14/18 V4L/DVB (4743): Fix oops in VIDIOC_G_PARM
In reply to [email protected]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.
---
drivers/media/video/videodev.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/media/video/videodev.c +9 -2
@@ -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 @@ #endifif (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));
PATCH 15/18 V4L/DVB (4744): The Samsung TCPN2121P30A does not have a tda9887
In reply to [email protected]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.
---
drivers/media/video/tuner-types.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/media/video/tuner-types.c +0 -1
@@ -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, }, };
PATCH 11/18 V4L/DVB (4740): Fixed an if-block to avoid floating with debug-messages
In reply to [email protected]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.
---
drivers/media/video/videodev.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/media/video/videodev.c +3 -2
@@ -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) \
cover V4L/DVB fixes
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(-)
PATCH 9/18 V4L/DVB (4738): Bt8xx/dvb-bt8xx.c: check kmalloc() return value.
From: Amit Choudhary <[email protected]>
Check the return value of kmalloc() in function frontend_init(), in file drivers/media/dvb/bt8xx/dvb-bt8xx.c.
---
drivers/media/dvb/bt8xx/dvb-bt8xx.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/dvb/bt8xx/dvb-bt8xx.c +4 -0
@@ -665,6 +665,10 @@ static void frontend_init(struct dvb_bt8case 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;
PATCH 16/18 V4L/DVB (4746): HM12 is YUV 4:2:0, not YUV 4:1:1
In reply to [email protected]From: Hans Verkuil <[email protected]>
Fix comment in videodev2.h
---
include/linux/videodev2.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/videodev2.h +1 -1
@@ -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.. */
PATCH 5/18 V4L/DVB (4731a): Kconfig: restore pvrusb2 menu items
In reply to [email protected]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.
---
drivers/media/video/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/video/Kconfig +2 -0
@@ -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"
Re: [PATCH 07/18] V4L/DVB (4733): Tda10086: fix frontend selection for dvb_attach
In reply to [email protected]Quoted 19 lines · 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(-)drivers/media/dvb/frontends/tda10086.h +1
-0@@ -35,7 +35,16 @@ struct tda10086_configu8 invert; }; +#if defined(CONFIG_DVB_TDA10086 ) || defined(CONFIG_DVB_TDA10086_MODULE )
drivers/media/dvb/frontends/tda10086.h struct tda10086_config · line 48
Quoted 10 lines
drivers/media/dvb/frontends/tda10086.h +8
-0extern 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
Signature · 4 lines
"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 SeedRe: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
In reply to [email protected]Quoted 27 lines · 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(-)drivers/media/dvb/frontends/tda826x.h +6
-3@@ -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,
drivers/media/dvb/frontends/tda826x.h #include "dvb_frontend.h" · line 53
Quoted 10 lines
drivers/media/dvb/frontends/tda826x.h +10
-0+ 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
Signature · 4 lines
"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 SeedRe: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
Quoted 31 lines · Adrian Bunk
Quoted 30 lines · 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(-)drivers/media/dvb/frontends/tda826x.h +10
-3@@ -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) +{
Quoted 8 lines
drivers/media/dvb/frontends/tda826x.h #include "dvb_frontend.h" · line 53
Quoted 6 lines
drivers/media/dvb/frontends/tda826x.h +6
-0+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
Re: [PATCH 07/18] V4L/DVB (4733): Tda10086: fix frontend selection for dvb_attach
In reply to Adrian BunkQuoted 18 lines · Adrian Bunk
Quoted 17 lines · 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(-)drivers/media/dvb/frontends/tda10086.h +0
-0@@ -35,7 +35,16 @@ struct tda10086_configu8 invert; };
Quoted 14 lines
drivers/media/dvb/frontends/tda10086.h struct tda10086_config · line 48
Quoted 11 lines
drivers/media/dvb/frontends/tda10086.h +9
-0+#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 withCONFIG_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
Re: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
In reply to Michael KrufkyQuoted 41 lines · Michael Krufky
Quoted 31 lines · Adrian Bunk
Quoted 30 lines · 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(-)drivers/media/dvb/frontends/tda826x.h +10
-3@@ -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) +{Quoted 8 lines
drivers/media/dvb/frontends/tda826x.h #include "dvb_frontend.h" · line 53
Quoted 6 lines
drivers/media/dvb/frontends/tda826x.h +6
-0+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.
Quoted 5 lines
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.
Quoted 1 line
-Mike Krufky
cu
Adrian
Signature · 4 lines
"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 SeedRe: [PATCH 07/18] V4L/DVB (4733): Tda10086: fix frontend selection for dvb_attach
In reply to Michael KrufkyQuoted 34 lines · Michael Krufky
Quoted 18 lines · Adrian Bunk
Quoted 17 lines · 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(-)drivers/media/dvb/frontends/tda10086.h +0
-0@@ -35,7 +35,16 @@ struct tda10086_configu8 invert; };Quoted 14 lines
drivers/media/dvb/frontends/tda10086.h struct tda10086_config · line 48
Quoted 11 lines
drivers/media/dvb/frontends/tda10086.h +9
-0+#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 withCONFIG_VIDEO_SAA7134_DVB=y,CONFIG_DVB_TDA10086=m.
Quoted 3 lines
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.
Quoted 1 line
-Mike Krufky
cu
Adrian
Signature · 4 lines
"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 SeedRe: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
In reply to Adrian BunkQuoted 10 lines · Adrian Bunk
Quoted 7 lines · Michael Krufky
Quoted 3 lines
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 ...
Quoted 10 lines
Quoted 3 lines
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
#ifdefined(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
Re: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
Quoted 30 lines · Michael Krufky
Quoted 19 lines · Adrian Bunk
Quoted 6 lines · Michael Krufky
Quoted 3 lines
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 ...
Quoted 10 lines
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.Quoted 9 lines
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
#ifdefined(CONFIG_DVB_TDA826X)|| (defined(CONFIG_DVB_TDA826X_MODULE)&& defined(MODULE))
which is what I stated in exactly the thread you quote.
Quoted 5 lines
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...
Quoted 3 lines
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].
Quoted 4 lines
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.
Quoted 1 line
-Mike Krufky
cu
Adrian
[1] http://lkml.org/lkml/2006/10/9/35
[2] http://lkml.org/lkml/2006/10/9/43
Signature · 4 lines
"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 SeedRe: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
Em Sáb, 2006-10-14 às 21:14 +0200, Adrian Bunk escreveu:
Quoted 8 lines · Michael Krufky
Quoted 5 lines
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
Quoted 3 lines
To be honest and after looking deeper at it, I don't like this
CONFIG_DVB_FE_CUSTOMIZEapproach 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.
Quoted 2 lines
I'd simply select all frontends unconditionally
Most users do this, including me :)
Cheers,
Mauro.
Re: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
Quoted 8 lines · Mauro Carvalho Chehab
Em Sáb, 2006-10-14 às 21:14 +0200, Adrian Bunk escreveu:
Quoted 7 lines · Michael Krufky
Quoted 5 lines
Adrian Bunk wrote:
Two separate problems, please do not confuse them.
My tda10086 and tda826x patches are correct -- there is no question of it.
Quoted 7 lines
Quoted 1 line
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.
Quoted 8 lines
Quoted 3 lines
To be honest and after looking deeper at it, I don't like this
CONFIG_DVB_FE_CUSTOMIZEapproach 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).
Quoted 5 lines
Quoted 1 line
I'd simply select all frontends unconditionally
Most users do this, including me :)
Cheers,
Mauro.
cu
Adrian
Signature · 4 lines
"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 SeedRe: [v4l-dvb-maintainer] Re: [PATCH 08/18] V4L/DVB (4734): Tda826x: fix frontend selection for dvb_attach
Quoted 9 lines · Adrian Bunk
Quoted 8 lines
Quoted 3 lines
To be honest and after looking deeper at it, I don't like this
CONFIG_DVB_FE_CUSTOMIZEapproach 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.
Quoted 3 lines
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.
Quoted 5 lines
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 useCONFIG_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.