Re: PATCH for adequate customization and attachment of dvb-pll.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Suggestion:

If the patch adds value without breaking anything, include it.

Even if it's "ugly", you can easily clean it up later and "do it the right way" (tm).
Providing you find time and cleaning it up is more important than something useful.
I counted about 35 lines of actual logic in the patch, and I think that's really about 20-25
if you ignore repetitions.

If there's a better way of coding it that someone (Markus? Michael?) can think of in 5 minutes,
please let Uwe know, since I imagine he could fix it in about 5 minutes with
his mind still fresh on the topic. Otherwise I suggest putting "clean up" somewhere
low on the to-do list and moving on.

Regards,
Bill

Uwe Bugla wrote:
Am Freitag, 1. Juni 2007 20:13 schrieben Sie:
  
Uwe Bugla wrote:
    
In current kernel 2.6.22-rc3 the frontend module dvb-pll.c is attached as
a generic standard for all bt8xx-based DVB cards. This is no good
solution.

Fact is:
The only bt8xx-based card taking advantage of that pll library is the
DViCO FusionHDTV Lite 5. All other bt8xx-based DVB cards do not take any
advantage of this pll library.

The following patch corrects this problem without breaking any card
support. For further SOBs I do appreciate the relevant persons Cced.

Signed-off-by: Uwe Bugla <uwe.bugla@xxxxxx>
      
NACK.

This hack is unacceptable.  Uwe, Please have patience 
    

In fact I had enough patience, for a couple of months now.
Even if you do not like it, it is a functionable compromise solution for now.

There is no technical reason to nack it at all. If there is one, then it's 
either a personal issue or a matter of design.
The fact that you reacted so quickly prefares option 1 (i. e. personal issue).

And the tactical background of telling some other person to wait (or to be 
patient) without offering an adequate time window for the WHEN is a gesture 
of humiliation (I know that gesture already very well from Manu, and I do not 
like it at all).

Above that you were not the only one I was asking for a SOB. I only wanted to 
try fair play (i. e. not overstepping anybody).

Regards

Uwe

P. S.: To let somebody starve at the long arm: Ever heard what that means, 
Mike? In fact I am not keen on flames, but I know people who provoke them by 
their inacceptable gestures. And that's it what must become past in here.

The other people reading this I would appreciate to test the two patches and 
complain if I have done anything wrong. My door stays open for real technical 
criticism.
Thanks for reading :)

  
-- I have a few ideas 
on how to do this without using #ifdef's , but I am spending my time on
other things right now.  Trent also had some ideas on how remove the static
dependencies on dvb-pll, but we all have bigger fish to fry.

For the time being, you should use this on your own kernel configuration,
but this is not correct, and should not be pushed into mainline.

Regards,

Mike Krufky

    
--- a/drivers/media/dvb/bt8xx/Kconfig
+++ b/drivers/media/dvb/bt8xx/Kconfig
@@ -7,7 +7,6 @@ config DVB_BT8XX
 	select DVB_CX24110 if !DVB_FE_CUSTOMISE
 	select DVB_OR51211 if !DVB_FE_CUSTOMISE
 	select DVB_LGDT330X if !DVB_FE_CUSTOMISE
-	select DVB_PLL
 	select DVB_ZL10353 if !DVB_FE_CUSTOMISE
 	select DVB_DST if !DVB_FE_CUSTOMISE
 	select FW_LOADER
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -279,6 +279,7 @@ config DVB_LGDT330X
 	tristate "LG Electronics LGDT3302/LGDT3303 based"
 	depends on DVB_CORE && I2C
 	default m if DVB_FE_CUSTOMISE
+	select DVB_PLL
 	help
 	  An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
 	  to support this frontend.
@@ -291,8 +292,9 @@
 	depends on DVB_CORE && I2C
 	default m if DVB_FE_CUSTOMISE
 	help
-	  This module driver a number of tuners based on PLL chips with a
-	  common I2C interface. Say Y when you want to support these tuners.
+	  This module driver is needed by a number of tuners based on PLL chips
+	  with a common I2C inferface.
+	  Exceptions are: All bt8xx-based DVB cards except DViCO FusionHDTV 5
Lite.

 config DVB_TDA826X
 	tristate "Philips TDA826X silicon tuner"
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -568,24 +568,6 @@ static struct lgdt330x_config
 	.demod_init = digitv_alps_tded4_demod_init,
 };

-static struct lgdt330x_config tdvs_tua6034_config = {
-	.demod_address    = 0x0e,
-	.demod_chip       = LGDT3303,
-	.serial_mpeg      = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */
-};
-
-static void lgdt330x_reset(struct dvb_bt8xx_card *bt)
-{
-	/* Set pin 27 of the lgdt3303 chip high to reset the frontend */
-
-	/* Pulse the reset line */
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low  */
-	msleep(100);
-
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
-	msleep(100);
-}

 static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
 {
@@ -606,15 +588,39 @@ case BTTV_BOARD_DVICO
 		}
 		break;

+#if defined(CONFIG_DVB_LGDT330x)
+static struct lgdt330x_config tdvs_tua6034_config = {
+	.demod_address    = 0x0e,
+	.demod_chip       = LGDT3303,
+	.serial_mpeg      = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */
+};
+
+static void lgdt330x_reset(struct dvb_bt8xx_card *bt)
+{
+	/* Set pin 27 of the lgdt3303 chip high to reset the frontend */
+
+	/* Pulse the reset line */
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low  */
+	msleep(100);
+
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
+	msleep(100);
+}
+
 	case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE:
 		lgdt330x_reset(card);
 		card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config,
card->i2c_adapter); if (card->fe != NULL) {
 			dvb_attach(dvb_pll_attach, card->fe, 0x61,
 				   card->i2c_adapter, &dvb_pll_lg_tdvs_h06xf);
 			dprintk ("dvb_bt8xx: lgdt330x detected\n");
 		}
 		break;
+#else
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+ return NULL;
+#endif // CONFIG_DVB_LGDT330x //

 	case BTTV_BOARD_NEBULA_DIGITV:
 		/*



------------------------------------------------------------------------

--- a/drivers/media/dvb/bt8xx/Kconfig
+++ b/drivers/media/dvb/bt8xx/Kconfig
@@ -7,7 +7,6 @@ config DVB_BT8XX
 	select DVB_CX24110 if !DVB_FE_CUSTOMISE
 	select DVB_OR51211 if !DVB_FE_CUSTOMISE
 	select DVB_LGDT330X if !DVB_FE_CUSTOMISE
-	select DVB_PLL
 	select DVB_ZL10353 if !DVB_FE_CUSTOMISE
 	select DVB_DST if !DVB_FE_CUSTOMISE
 	select FW_LOADER
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -279,6 +279,7 @@ config DVB_LGDT330X
 	tristate "LG Electronics LGDT3302/LGDT3303 based"
 	depends on DVB_CORE && I2C
 	default m if DVB_FE_CUSTOMISE
+	select DVB_PLL
 	help
 	  An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want
 	  to support this frontend.
@@ -291,8 +292,9 @@
 	depends on DVB_CORE && I2C
 	default m if DVB_FE_CUSTOMISE
 	help
-	  This module driver a number of tuners based on PLL chips with a
-	  common I2C interface. Say Y when you want to support these tuners.
+	  This module driver is needed by a number of tuners based on PLL chips
+	  with a common I2C inferface.
+	  Exceptions are: All bt8xx-based DVB cards except DViCO FusionHDTV 5
Lite.

 config DVB_TDA826X
 	tristate "Philips TDA826X silicon tuner"
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -568,24 +568,6 @@ static struct lgdt330x_config
 	.demod_init = digitv_alps_tded4_demod_init,
 };

-static struct lgdt330x_config tdvs_tua6034_config = {
-	.demod_address    = 0x0e,
-	.demod_chip       = LGDT3303,
-	.serial_mpeg      = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */
-};
-
-static void lgdt330x_reset(struct dvb_bt8xx_card *bt)
-{
-	/* Set pin 27 of the lgdt3303 chip high to reset the frontend */
-
-	/* Pulse the reset line */
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low  */
-	msleep(100);
-
-	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
-	msleep(100);
-}

 static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
 {
@@ -606,15 +588,39 @@ case BTTV_BOARD_DVICO
 		}
 		break;

+#if defined(CONFIG_DVB_LGDT330x)
+static struct lgdt330x_config tdvs_tua6034_config = {
+	.demod_address    = 0x0e,
+	.demod_chip       = LGDT3303,
+	.serial_mpeg      = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */
+};
+
+static void lgdt330x_reset(struct dvb_bt8xx_card *bt)
+{
+	/* Set pin 27 of the lgdt3303 chip high to reset the frontend */
+
+	/* Pulse the reset line */
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low  */
+	msleep(100);
+
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
+	msleep(100);
+}
+
 	case BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE:
 		lgdt330x_reset(card);
 		card->fe = dvb_attach(lgdt330x_attach, &tdvs_tua6034_config,
card->i2c_adapter); if (card->fe != NULL) {
 			dvb_attach(dvb_pll_attach, card->fe, 0x61,
 				   card->i2c_adapter, &dvb_pll_lg_tdvs_h06xf);
 			dprintk ("dvb_bt8xx: lgdt330x detected\n");
 		}
 		break;
+#else
+ printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__);
+ return NULL;
+#endif // CONFIG_DVB_LGDT330x //

 	case BTTV_BOARD_NEBULA_DIGITV:
 		/*


------------------------------------------------------------------------

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
      

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb



  

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux