Re: [PATCH 4/4] Zolid Hybrid PCI card add AGC control

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

 



On Tue, Sep 22, 2009 at 5:09 PM,  <spam@xxxxxxxxxxxxxxxxx> wrote:
>
> Switches IF AGC control via GPIO 21 of the saa7134. Improves DTV reception and
> FM radio reception.
>
> Signed-off-by: Henk.Vergonet@xxxxxxxxx

Reviewed-by: Michael Krufky <mkrufky@xxxxxxxxxxxxxx>

Henk,

This is *very* interesting...  Have you taken a scope to the board to
measure AGC interference?   This seems to be *very* similar to
Hauppauge's design for the HVR1120 and HVR1150 boards, which are
actually *not* based on any reference design.

I have no problems with this patch, but I would be interested to hear
that you can prove it is actually needed by using a scope.  If you
don't have a scope, I understand....  but this certainly peaks my
interest.

Do you have schematics of that board?

Regards,

Mike Krufky

>
> diff -r 29e4ba1a09bc linux/drivers/media/video/saa7134/saa7134-cards.c
> --- a/linux/drivers/media/video/saa7134/saa7134-cards.c Sat Sep 19 09:45:22 2009 -0300
> +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Tue Sep 22 22:06:31 2009 +0200
> @@ -6651,6 +6651,22 @@
>        return 0;
>  }
>
> +static inline int saa7134_tda18271_zolid_toggle_agc(struct saa7134_dev *dev,
> +                                                     enum tda18271_mode mode)
> +{
> +       switch (mode) {
> +       case TDA18271_ANALOG:
> +               saa7134_set_gpio(dev, 21, 0);
> +               break;
> +       case TDA18271_DIGITAL:
> +               saa7134_set_gpio(dev, 21, 1);
> +               break;
> +       default:
> +               return -EINVAL;
> +       }
> +       return 0;
> +}
> +
>  static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev,
>                                          int command, int arg)
>  {
> @@ -6663,7 +6679,8 @@
>                case SAA7134_BOARD_HAUPPAUGE_HVR1120:
>                        ret = saa7134_tda18271_hvr11x0_toggle_agc(dev, arg);
>                        break;
> -               default:
> +               case SAA7134_BOARD_ZOLID_HYBRID_PCI:
> +                       ret = saa7134_tda18271_zolid_toggle_agc(dev, arg);
>                        break;
>                }
>                break;
> @@ -6682,6 +6699,7 @@
>        switch (dev->board) {
>        case SAA7134_BOARD_HAUPPAUGE_HVR1150:
>        case SAA7134_BOARD_HAUPPAUGE_HVR1120:
> +       case SAA7134_BOARD_ZOLID_HYBRID_PCI:
>                /* tda8290 + tda18271 */
>                ret = saa7134_tda8290_18271_callback(dev, command, arg);
>                break;
> @@ -6985,6 +7003,11 @@
>                saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x00008000, 0x00008000);
>                saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
>                break;
> +       case SAA7134_BOARD_ZOLID_HYBRID_PCI:
> +               saa7134_set_gpio(dev, 21, 0);   /* s0 HC4052 */
> +               saa7134_set_gpio(dev, 22, 0);   /* vsync tda18271 - TODO implement saa713x driven sync in analog TV modes */
> +               saa7134_set_gpio(dev, 23, 0);   /* s1 HC4052 */
> +               break;
>        }
>        return 0;
>  }
> diff -r 29e4ba1a09bc linux/drivers/media/video/saa7134/saa7134-dvb.c
> --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c   Sat Sep 19 09:45:22 2009 -0300
> +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c   Tue Sep 22 22:06:31 2009 +0200
> @@ -1026,8 +1026,17 @@
>        .disable_gate_access = 1,
>  };
>
> +static struct tda18271_std_map zolid_tda18271_std_map = {
> +       /* FM reception via RF_IN */
> +       .fm_radio = { .if_freq = 1250, .fm_rfn = 0, .agc_mode = 3, .std = 0,
> +                     .if_lvl = 0, .rfagc_top = 0x2c, },
> +};
> +
>  static struct tda18271_config zolid_tda18271_config = {
> +       .std_map = &zolid_tda18271_std_map,
>        .gate    = TDA18271_GATE_ANALOG,
> +       .config  = 3,
> +       .output_opt = TDA18271_OUTPUT_LT_OFF,
>  };
>
>  /* ==================================================================
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux