[12/15] - tm6000 bugfix tuner reset time and tuner param

Message ID 4B69DD3F.2000103@arcor.de (mailing list archive)
State Rejected, archived
Headers

Commit Message

Stefan Ringel Feb. 3, 2010, 8:31 p.m. UTC
  signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>

-static int tm6000_tuner_callback(void *ptr, int component, int command,
int arg)
+int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
 {
     int rc=0;
     struct tm6000_core *dev = ptr;
@@ -252,11 +271,14 @@ static int tm6000_tuner_callback(void *ptr, int
component, int command, int arg)
         switch (arg) {
         case 0:
             tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
+                    dev->tuner_reset_gpio, 0x01);
+            msleep(60);
+            tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
                     dev->tuner_reset_gpio, 0x00);
-            msleep(130);
+            msleep(75);
             tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
                     dev->tuner_reset_gpio, 0x01);
-            msleep(130);
+            msleep(60);
             break;
         case 1:
             tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT,
@@ -290,7 +332,7 @@ static void tm6000_config_tuner (struct tm6000_core
*dev)
     memset(&tun_setup, 0, sizeof(tun_setup));
     tun_setup.type   = dev->tuner_type;
     tun_setup.addr   = dev->tuner_addr;
-    tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
+    tun_setup.mode_mask = T_ANALOG_TV | T_RADIO | T_DIGITAL_TV;
     tun_setup.tuner_callback = tm6000_tuner_callback;
 
     v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr,
&tun_setup);
@@ -302,15 +344,19 @@ static void tm6000_config_tuner (struct
tm6000_core *dev)
         memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
         memset (&ctl,0,sizeof(ctl));
 
-        ctl.mts   = 1;
-        ctl.read_not_reliable = 1;
+        ctl.input1 = 1;
+        ctl.read_not_reliable = 0;
         ctl.msleep = 10;
-
+        ctl.demod = XC3028_FE_ZARLINK456;
+        ctl.vhfbw7 = 1;
+        ctl.uhfbw8 = 1;
+        ctl.switch_mode = 1;
         xc2028_cfg.tuner = TUNER_XC2028;
         xc2028_cfg.priv  = &ctl;
 
         switch(dev->model) {
         case TM6010_BOARD_HAUPPAUGE_900H:
+        case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE:
             ctl.fname = "xc3028L-v36.fw";
             break;
         default:
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Comments

Devin Heitmueller Feb. 3, 2010, 8:52 p.m. UTC | #1
On Wed, Feb 3, 2010 at 3:31 PM, Stefan Ringel <stefan.ringel@arcor.de> wrote:
> signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
>
> --- a/drivers/staging/tm6000/tm6000-cards.c
> +++ b/drivers/staging/tm6000/tm6000-cards.c
> @@ -221,12 +239,13 @@ struct usb_device_id tm6000_id_table [] = {
>     { USB_DEVICE(0x2040, 0x6600), .driver_info =
> TM6010_BOARD_HAUPPAUGE_900H },
>     { USB_DEVICE(0x6000, 0xdec0), .driver_info =
> TM6010_BOARD_BEHOLD_WANDER },
>     { USB_DEVICE(0x6000, 0xdec1), .driver_info =
> TM6010_BOARD_BEHOLD_VOYAGER },
>     { USB_DEVICE(0x0ccd, 0x0086), .driver_info =
> TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE },
>     { },
>  };
>
>  /* Tuner callback to provide the proper gpio changes needed for xc2028 */
>
> -static int tm6000_tuner_callback(void *ptr, int component, int command,
> int arg)
> +int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
>  {

Why was the static removed from this declaration?  What could possibly
be calling this from outside the module?  And if there were something
that needed it, the declaration would have to be moved to a header
file so it could be included elsewhere (which should be in this same
patch).

Just to be clear, the fact that I am going through these patches
should not be taken personally - I'm just trying to give you some
advice on what you need to do to ensure the patches can be accepted
upstream and be reviewed with minimal cost to the other developers.

Devin
  
Stefan Ringel Feb. 3, 2010, 9:15 p.m. UTC | #2
Am 03.02.2010 21:52, schrieb Devin Heitmueller:
> On Wed, Feb 3, 2010 at 3:31 PM, Stefan Ringel <stefan.ringel@arcor.de> wrote:
>   
>> signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
>>
>> --- a/drivers/staging/tm6000/tm6000-cards.c
>> +++ b/drivers/staging/tm6000/tm6000-cards.c
>> @@ -221,12 +239,13 @@ struct usb_device_id tm6000_id_table [] = {
>>     { USB_DEVICE(0x2040, 0x6600), .driver_info =
>> TM6010_BOARD_HAUPPAUGE_900H },
>>     { USB_DEVICE(0x6000, 0xdec0), .driver_info =
>> TM6010_BOARD_BEHOLD_WANDER },
>>     { USB_DEVICE(0x6000, 0xdec1), .driver_info =
>> TM6010_BOARD_BEHOLD_VOYAGER },
>>     { USB_DEVICE(0x0ccd, 0x0086), .driver_info =
>> TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE },
>>     { },
>>  };
>>
>>  /* Tuner callback to provide the proper gpio changes needed for xc2028 */
>>
>> -static int tm6000_tuner_callback(void *ptr, int component, int command,
>> int arg)
>> +int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
>>  {
>>     
> Why was the static removed from this declaration?  What could possibly
> be calling this from outside the module?  And if there were something
> that needed it, the declaration would have to be moved to a header
> file so it could be included elsewhere (which should be in this same
> patch).
>
> Just to be clear, the fact that I am going through these patches
> should not be taken personally - I'm just trying to give you some
> advice on what you need to do to ensure the patches can be accepted
> upstream and be reviewed with minimal cost to the other developers.
>
> Devin
>
>   
1. It broke by building.
2. callback for dvb frontend (tm6000-dvb.c) so can the tuner a reset
send if it goes in DVB mode (it must reload the firmware)
  

Patch

--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
@@ -221,12 +239,13 @@  struct usb_device_id tm6000_id_table [] = {
     { USB_DEVICE(0x2040, 0x6600), .driver_info =
TM6010_BOARD_HAUPPAUGE_900H },
     { USB_DEVICE(0x6000, 0xdec0), .driver_info =
TM6010_BOARD_BEHOLD_WANDER },
     { USB_DEVICE(0x6000, 0xdec1), .driver_info =
TM6010_BOARD_BEHOLD_VOYAGER },
     { USB_DEVICE(0x0ccd, 0x0086), .driver_info =
TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE },
     { },
 };
 
 /* Tuner callback to provide the proper gpio changes needed for xc2028 */