Re: Add AverTV Studio 509UA

2010-03-21 Thread hermann pitton
Hi,

Am Samstag, den 20.03.2010, 16:08 +0200 schrieb Евгений Бацман:
 2010/3/20 hermann pitton hermann-pit...@arcor.de:
  Hi, Евгений,
 
  is there any reason, why you set the charge pump bit to low and slow
  tuning on a non FM tuner?
 
  Cheers,
  Hermann
 
 
  Am Freitag, den 19.03.2010, 20:32 +0200 schrieb Евгений Бацман:
  A add tv tuner AverTV Studio 509UA but radio now not
  work(tuner_tea5764hn not in kernel)
 
 
 
  diff -r a/linux/drivers/media/common/tuners/tuner-types.c
  --- a/linux/drivers/media/common/tuners/tuner-types.c 2010-03-17
  20:38:10.0 +0200
  +++ b/linux/drivers/media/common/tuners/tuner-types.c 2010-03-19
  14:25:24.0 +0200
  @@ -1353,6 +1353,30 @@
.count  = ARRAY_SIZE(tuner_sony_btf_pxn01z_ranges),
},
   };
  +/*  TUNER_PHILIPS_FQ1216ME_MK5 - Philips PAL  */
  +
  +static struct tuner_range tuner_fq1216me_mk5_pal_ranges[] = {
  + { 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
  + { 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
  + { 16 * 999.99, 0x8e, 0x04, },
  +};
  +
  +static struct tuner_params tuner_fq1216me_mk5_params[] = {
  + {
  + .type   = TUNER_PARAM_TYPE_PAL,
  + .ranges = tuner_fq1216me_mk5_pal_ranges,
  + .count  = ARRAY_SIZE(tuner_fq1216me_mk5_pal_ranges),
  + .cb_first_if_lower_freq = 1,
  + .has_tda9887 = 1,
  + .port1_active = 1,
  + .port2_active = 1,
  + .port2_invert_for_secam_lc = 1,
  + .default_top_mid = -2,
  + .default_top_secam_low = -2,
  + .default_top_secam_mid = -2,
  + .default_top_secam_high = -2,
  + },
  +};
 
   /* - 
  */
 
  @@ -1827,6 +1851,11 @@
.params = tuner_sony_btf_pxn01z_params,
.count  = ARRAY_SIZE(tuner_sony_btf_pxn01z_params),
},
  + [TUNER_PHILIPS_FQ1216ME_MK5] = { /* Philips PAL */
  + .name   = Philips PAL/SECAM multi (FQ1216ME MK5),
  + .params = tuner_fq1216me_mk5_params,
  + .count  = ARRAY_SIZE(tuner_fq1216me_mk5_params),
  + },
   };
   EXPORT_SYMBOL(tuners);
 
  diff -r a/linux/drivers/media/video/saa7134/saa7134-cards.c
  --- a/linux/drivers/media/video/saa7134/saa7134-cards.c   2010-03-17
  20:38:10.0 +0200
  +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c   2010-03-19
  16:34:17.0 +0200
  @@ -5411,7 +5411,44 @@
.gpio = 0x389c00,
} },
},
  -
  + [SAA7134_BOARD_AVERMEDIA_STUDIO_509UA] = {
  + /* Evgen Batsman evgenbats...@gmail.com */
  + .name   = Avermedia AVerTV Studio 509UA,
  + .audio_clock= 0x00187de7,
  + .tuner_type = TUNER_PHILIPS_FQ1216ME_MK5,
  + .radio_type = UNSET,
  + .tuner_addr = ADDR_UNSET,
  + .radio_addr = ADDR_UNSET,
  + .tda9887_conf   = TDA9887_PRESENT,
  + .gpiomask   = 0x03,
  + .inputs = { {
  + .name = name_tv,
  + .vmux = 1,
  + .amux = TV,
  + .tv   = 1,
  + .gpio = 0x00,
  + }, {
  + .name = name_comp1,
  + .vmux = 3,
  + .amux = LINE1,
  + .gpio = 0x00,
  + }, {
  + .name = name_svideo,
  + .vmux = 8,
  + .amux = LINE1,
  + .gpio = 0x00,
  + } },
  + .radio = {
  + .name = name_radio,
  + .amux = LINE2,
  + .gpio = 0x01,
  + },
  + .mute  = {
  + .name = name_mute,
  + .amux = LINE1,
  + .gpio = 0x00,
  + },
  + },
   };
 
   const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
  @@ -6567,6 +6604,12 @@
.subvendor= 0x107d,
.subdevice= 0x6655,
.driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S,
  + },{
  + .vendor   = PCI_VENDOR_ID_PHILIPS,
  + .device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
  + .subvendor= 0x1461, /* Avermedia Technologies Inc */
  + .subdevice= 0xa14b,
  + .driver_data  = SAA7134_BOARD_AVERMEDIA_STUDIO_509UA,
}, {
/* --- boards without eeprom + subsystem ID --- */
.vendor   = PCI_VENDOR_ID_PHILIPS,
  diff -r a/linux/drivers/media/video/saa7134/saa7134.h
  --- a/linux/drivers/media/video/saa7134/saa7134.h 2010-03-17
  20:38:10.0 +0200
  +++ b/linux/drivers/media/video/saa7134/saa7134.h 2010-03-19
  

Re: Add AverTV Studio 509UA

2010-03-21 Thread hermann pitton

 
 I think best would be to create two patches.
 
 1/2 adds the new tuner. (tuner-types.c/tuner.h/tveeprom.c)
 2/2 adds the new Avermedia card.
 
 Else it looks fine.

To add some for the record here for those eventually later on it.

We have seen over so many years now, that hundreds of new can tuners
did appear and, IIRC, we got them all with any combination of previous
chips.

The filters, mainly the SAW filters did make a difference to the
original products they follow all in what ever combination concerning
quality.

However, a main annoyance was, that lots of such clones did appear and
some did start to use extra radio tuners on cheap silicon on separate
addresses, hard to track, since hidden under some welded shielding.

This was with all such clones all over Asia and the extra silicon radio
tuner was always Philips/NXP in the beginning.

What is new now, I think, and first seen, is that the last can tuner
flagship MK5 series has a FQ non radio variant on a AverMedia using some
extra silicon from Philips/NXP/Trident _themselves_ to make some extra
profit against a FM MK5 they have.

I would call this a management disaster, but my education might be
outdated.

Cheers,
Hermann






--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Add AverTV Studio 509UA

2010-03-19 Thread Евгений Бацман
A add tv tuner AverTV Studio 509UA but radio now not
work(tuner_tea5764hn not in kernel)



diff -r a/linux/drivers/media/common/tuners/tuner-types.c
--- a/linux/drivers/media/common/tuners/tuner-types.c   2010-03-17
20:38:10.0 +0200
+++ b/linux/drivers/media/common/tuners/tuner-types.c   2010-03-19
14:25:24.0 +0200
@@ -1353,6 +1353,30 @@
.count  = ARRAY_SIZE(tuner_sony_btf_pxn01z_ranges),
},
 };
+/*  TUNER_PHILIPS_FQ1216ME_MK5 - Philips PAL  */
+
+static struct tuner_range tuner_fq1216me_mk5_pal_ranges[] = {
+   { 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
+   { 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
+   { 16 * 999.99, 0x8e, 0x04, },
+};
+
+static struct tuner_params tuner_fq1216me_mk5_params[] = {
+   {
+   .type   = TUNER_PARAM_TYPE_PAL,
+   .ranges = tuner_fq1216me_mk5_pal_ranges,
+   .count  = ARRAY_SIZE(tuner_fq1216me_mk5_pal_ranges),
+   .cb_first_if_lower_freq = 1,
+   .has_tda9887 = 1,
+   .port1_active = 1,
+   .port2_active = 1,
+   .port2_invert_for_secam_lc = 1,
+   .default_top_mid = -2,
+   .default_top_secam_low = -2,
+   .default_top_secam_mid = -2,
+   .default_top_secam_high = -2,
+   },
+};

 /* - */

@@ -1827,6 +1851,11 @@
.params = tuner_sony_btf_pxn01z_params,
.count  = ARRAY_SIZE(tuner_sony_btf_pxn01z_params),
},
+   [TUNER_PHILIPS_FQ1216ME_MK5] = { /* Philips PAL */
+   .name   = Philips PAL/SECAM multi (FQ1216ME MK5),
+   .params = tuner_fq1216me_mk5_params,
+   .count  = ARRAY_SIZE(tuner_fq1216me_mk5_params),
+   },
 };
 EXPORT_SYMBOL(tuners);

diff -r a/linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c 2010-03-17
20:38:10.0 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c 2010-03-19
16:34:17.0 +0200
@@ -5411,7 +5411,44 @@
.gpio = 0x389c00,
} },
},
-
+   [SAA7134_BOARD_AVERMEDIA_STUDIO_509UA] = {
+   /* Evgen Batsman evgenbats...@gmail.com */
+   .name   = Avermedia AVerTV Studio 509UA,
+   .audio_clock= 0x00187de7,
+   .tuner_type = TUNER_PHILIPS_FQ1216ME_MK5,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .tda9887_conf   = TDA9887_PRESENT,
+   .gpiomask   = 0x03,
+   .inputs = { {
+   .name = name_tv,
+   .vmux = 1,
+   .amux = TV,
+   .tv   = 1,
+   .gpio = 0x00,
+   }, {
+   .name = name_comp1,
+   .vmux = 3,
+   .amux = LINE1,
+   .gpio = 0x00,
+   }, {
+   .name = name_svideo,
+   .vmux = 8,
+   .amux = LINE1,
+   .gpio = 0x00,
+   } },
+   .radio = {
+   .name = name_radio,
+   .amux = LINE2,
+   .gpio = 0x01,
+   },
+   .mute  = {
+   .name = name_mute,
+   .amux = LINE1,
+   .gpio = 0x00,
+   },
+   },
 };

 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -6567,6 +6604,12 @@
.subvendor= 0x107d,
.subdevice= 0x6655,
.driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S,
+   },{
+   .vendor   = PCI_VENDOR_ID_PHILIPS,
+   .device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+   .subvendor= 0x1461, /* Avermedia Technologies Inc */
+   .subdevice= 0xa14b,
+   .driver_data  = SAA7134_BOARD_AVERMEDIA_STUDIO_509UA,
}, {
/* --- boards without eeprom + subsystem ID --- */
.vendor   = PCI_VENDOR_ID_PHILIPS,
diff -r a/linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h   2010-03-17
20:38:10.0 +0200
+++ b/linux/drivers/media/video/saa7134/saa7134.h   2010-03-19
13:13:00.0 +0200
@@ -302,6 +302,7 @@
 #define SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S 175
 #define SAA7134_BOARD_BEHOLD_505RDS_MK3 176
 #define SAA7134_BOARD_HAWELL_HW_404M7  177
+#define SAA7134_BOARD_AVERMEDIA_STUDIO_509UA 178

 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8
diff -r a/linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c 

Re: Add AverTV Studio 509UA

2010-03-19 Thread hermann pitton
Hi, Евгений,

is there any reason, why you set the charge pump bit to low and slow
tuning on a non FM tuner?

Cheers,
Hermann


Am Freitag, den 19.03.2010, 20:32 +0200 schrieb Евгений Бацман:
 A add tv tuner AverTV Studio 509UA but radio now not
 work(tuner_tea5764hn not in kernel)
 
 
 
 diff -r a/linux/drivers/media/common/tuners/tuner-types.c
 --- a/linux/drivers/media/common/tuners/tuner-types.c 2010-03-17
 20:38:10.0 +0200
 +++ b/linux/drivers/media/common/tuners/tuner-types.c 2010-03-19
 14:25:24.0 +0200
 @@ -1353,6 +1353,30 @@
   .count  = ARRAY_SIZE(tuner_sony_btf_pxn01z_ranges),
   },
  };
 +/*  TUNER_PHILIPS_FQ1216ME_MK5 - Philips PAL  */
 +
 +static struct tuner_range tuner_fq1216me_mk5_pal_ranges[] = {
 + { 16 * 158.00 /*MHz*/, 0x8e, 0x01, },
 + { 16 * 442.00 /*MHz*/, 0x8e, 0x02, },
 + { 16 * 999.99, 0x8e, 0x04, },
 +};
 +
 +static struct tuner_params tuner_fq1216me_mk5_params[] = {
 + {
 + .type   = TUNER_PARAM_TYPE_PAL,
 + .ranges = tuner_fq1216me_mk5_pal_ranges,
 + .count  = ARRAY_SIZE(tuner_fq1216me_mk5_pal_ranges),
 + .cb_first_if_lower_freq = 1,
 + .has_tda9887 = 1,
 + .port1_active = 1,
 + .port2_active = 1,
 + .port2_invert_for_secam_lc = 1,
 + .default_top_mid = -2,
 + .default_top_secam_low = -2,
 + .default_top_secam_mid = -2,
 + .default_top_secam_high = -2,
 + },
 +};
 
  /* - */
 
 @@ -1827,6 +1851,11 @@
   .params = tuner_sony_btf_pxn01z_params,
   .count  = ARRAY_SIZE(tuner_sony_btf_pxn01z_params),
   },
 + [TUNER_PHILIPS_FQ1216ME_MK5] = { /* Philips PAL */
 + .name   = Philips PAL/SECAM multi (FQ1216ME MK5),
 + .params = tuner_fq1216me_mk5_params,
 + .count  = ARRAY_SIZE(tuner_fq1216me_mk5_params),
 + },
  };
  EXPORT_SYMBOL(tuners);
 
 diff -r a/linux/drivers/media/video/saa7134/saa7134-cards.c
 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c   2010-03-17
 20:38:10.0 +0200
 +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c   2010-03-19
 16:34:17.0 +0200
 @@ -5411,7 +5411,44 @@
   .gpio = 0x389c00,
   } },
   },
 -
 + [SAA7134_BOARD_AVERMEDIA_STUDIO_509UA] = {
 + /* Evgen Batsman evgenbats...@gmail.com */
 + .name   = Avermedia AVerTV Studio 509UA,
 + .audio_clock= 0x00187de7,
 + .tuner_type = TUNER_PHILIPS_FQ1216ME_MK5,
 + .radio_type = UNSET,
 + .tuner_addr = ADDR_UNSET,
 + .radio_addr = ADDR_UNSET,
 + .tda9887_conf   = TDA9887_PRESENT,
 + .gpiomask   = 0x03,
 + .inputs = { {
 + .name = name_tv,
 + .vmux = 1,
 + .amux = TV,
 + .tv   = 1,
 + .gpio = 0x00,
 + }, {
 + .name = name_comp1,
 + .vmux = 3,
 + .amux = LINE1,
 + .gpio = 0x00,
 + }, {
 + .name = name_svideo,
 + .vmux = 8,
 + .amux = LINE1,
 + .gpio = 0x00,
 + } },
 + .radio = {
 + .name = name_radio,
 + .amux = LINE2,
 + .gpio = 0x01,
 + },
 + .mute  = {
 + .name = name_mute,
 + .amux = LINE1,
 + .gpio = 0x00,
 + },
 + },
  };
 
  const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
 @@ -6567,6 +6604,12 @@
   .subvendor= 0x107d,
   .subdevice= 0x6655,
   .driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S,
 + },{
 + .vendor   = PCI_VENDOR_ID_PHILIPS,
 + .device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
 + .subvendor= 0x1461, /* Avermedia Technologies Inc */
 + .subdevice= 0xa14b,
 + .driver_data  = SAA7134_BOARD_AVERMEDIA_STUDIO_509UA,
   }, {
   /* --- boards without eeprom + subsystem ID --- */
   .vendor   = PCI_VENDOR_ID_PHILIPS,
 diff -r a/linux/drivers/media/video/saa7134/saa7134.h
 --- a/linux/drivers/media/video/saa7134/saa7134.h 2010-03-17
 20:38:10.0 +0200
 +++ b/linux/drivers/media/video/saa7134/saa7134.h 2010-03-19
 13:13:00.0 +0200
 @@ -302,6 +302,7 @@
  #define SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S 175
  #define SAA7134_BOARD_BEHOLD_505RDS_MK3 176
  #define SAA7134_BOARD_HAWELL_HW_404M7177
 +#define SAA7134_BOARD_AVERMEDIA_STUDIO_509UA 178