conflict DD-cine C/T V7 with older dvb-cards

2016-03-31 Thread I don't like Spam
Hello,

I recently bought a cine C/T V7 DVB-card from digital devices and I realized 
some strange behaviour.
The older dvb-cards are KNC or Mystique dvb-C cards that work fine for years.

When I compile the driver from digital devices, the cine C/T works fine, but 
the older cards stop with errors.

I did a quick search and diff and found out, that digital devices provides a 
dvb_core aparently incompatible with the dvb_core from kernel.
I don't have any idea of kernel or driver hacking. 
Is anybody out there, who can help with that drama?


best regards

Reinhard 

--
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


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

2009-10-02 Thread spam
On Thu, Sep 24, 2009 at 02:55:42PM -0400, Michael Krufky wrote:
 On Tue, Sep 22, 2009 at 5:09 PM,  s...@systol-ng.god.lan wrote:
 
  Switches IF AGC control via GPIO 21 of the saa7134. Improves DTV reception 
  and
  FM radio reception.
 
  Signed-off-by: henk.vergo...@gmail.com
 
 Reviewed-by: Michael Krufky mkru...@kernellabs.com
 
 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
 

One note: I have tested the tda18271 signedness fixes in the debug
repository. This is a big improvement in reception.

Based on the latest testing with all the fixes I would say that
switching the AGC line via gpio is not needed and leaving it at 0 gives
the best results.
(This is purely based on SNR and BER readings from tzap)

So I would recomend: leaving config at zero.

 static struct tda18271_config zolid_tda18271_config = {
.std_map = zolid_tda18271_std_map,
.gate= TDA18271_GATE_ANALOG,
-   .config  = 3,
+// .config  = 3,
.output_opt = TDA18271_OUTPUT_LT_OFF,
 };

Regards,
Henk
--
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


Re: [PATCH 1/4] tda18271_set_analog_params major bugfix

2009-09-27 Thread spam
On Sun, Sep 27, 2009 at 12:35:00PM -0400, Michael Krufky wrote:
 On Sun, Sep 27, 2009 at 12:25 PM, Michael Krufky mkru...@kernellabs.com 
 wrote:
 
 On a second thought, I see that my above patch loses some precision
 ...  this is even better:
 
 diff -r f52640ced9e8 linux/drivers/media/common/tuners/tda18271-fe.c
 --- a/linux/drivers/media/common/tuners/tda18271-fe.c Tue Sep 15
 01:25:35 2009 -0400
 +++ b/linux/drivers/media/common/tuners/tda18271-fe.c Sun Sep 27
 12:33:20 2009 -0400
 @@ -1001,12 +1001,12 @@
   struct tda18271_std_map_item *map;
   char *mode;
   int ret;
 - u32 freq = params-frequency * 62500;
 + u32 freq = params-frequency * 125 *
 + ((params-mode == V4L2_TUNER_RADIO) ? 1 : 1000) / 2;
 
   priv-mode = TDA18271_ANALOG;
 
   if (params-mode == V4L2_TUNER_RADIO) {
 - freq = freq / 1000;
   map = std_map-fm_radio;
   mode = fm;
   } else if (params-std  V4L2_STD_MN) {
 
 Cheers,
 
 Mike

Much better!

Btw. It seems that the tuner is capable of tuning in 1000 Hz steps, is
there a reason why we are using 62500 Hz steps?

Regards,
Henk
--
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


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

2009-09-24 Thread spam
On Thu, Sep 24, 2009 at 02:55:42PM -0400, Michael Krufky wrote:
 
 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.

Yes a scope would be nice!

No I traced some pins with a ohm meter. After some gpio togling and measuring
the voltage on the hc4052 I found out the s0 and s1 pins.

For the dvb reception I looked at the BER (bit-error-rate) using tzap it
seemed to drop from 8000 or so to 4000 when using gpio21 = 1.
Analog reception is a no-go in this mode it only works when gpio21 = 0.

FM radio seemed a (little) bit better when using fm_rfn = 0 and the
1.5Mhz antialiasing filter enabled. But its all somewhat subjective I
must admit.

 
 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?

Nope, I will update the wiki with a few drawings that I have been able
to figure out.

Thanks for the support!

regards,
henk

BTW Currently the card is for sale in the Aldi for 28.99 euros if
someone is interested and in the proximity of Holland ;).

 
--
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


Re: [PATCH 1/4] tda18271_set_analog_params major bugfix

2009-09-24 Thread spam
On Thu, Sep 24, 2009 at 02:46:06PM -0400, Michael Krufky wrote:
 On Tue, Sep 22, 2009 at 5:05 PM,  s...@systol-ng.god.lan wrote:
 
  Multiplication by 62500 causes an overflow in the 32 bits freq register 
  when
  using radio. FM radio reception on a Zolid Hybrid PCI is now working. Other
  tda18271 configurations may also benefit from this change ;)
 
  Signed-off-by: henk.vergo...@gmail.com
 
  diff -r 29e4ba1a09bc linux/drivers/media/common/tuners/tda18271-fe.c
...
  -   freq = freq / 1000;
  +   freq = params-frequency * 625;
  +   freq = freq / 10;

Hmm now that I review my own patch:

-   freq = freq / 1000;
+   freq = params-frequency * 125;
+   freq = freq / 2;

might even be better...

regards
henk
--
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


[PATCH 1/4] tda18271_set_analog_params major bugfix

2009-09-22 Thread spam

Multiplication by 62500 causes an overflow in the 32 bits freq register when
using radio. FM radio reception on a Zolid Hybrid PCI is now working. Other
tda18271 configurations may also benefit from this change ;)

Signed-off-by: henk.vergo...@gmail.com

diff -r 29e4ba1a09bc linux/drivers/media/common/tuners/tda18271-fe.c
--- a/linux/drivers/media/common/tuners/tda18271-fe.c   Sat Sep 19 09:45:22 
2009 -0300
+++ b/linux/drivers/media/common/tuners/tda18271-fe.c   Tue Sep 22 22:06:31 
2009 +0200
@@ -1001,38 +1020,43 @@
struct tda18271_std_map_item *map;
char *mode;
int ret;
-   u32 freq = params-frequency * 62500;
+   u32 freq;
 
priv-mode = TDA18271_ANALOG;
 
if (params-mode == V4L2_TUNER_RADIO) {
-   freq = freq / 1000;
+   freq = params-frequency * 625;
+   freq = freq / 10;
map = std_map-fm_radio;
mode = fm;
-   } else if (params-std  V4L2_STD_MN) {
-   map = std_map-atv_mn;
-   mode = MN;
-   } else if (params-std  V4L2_STD_B) {
-   map = std_map-atv_b;
-   mode = B;
-   } else if (params-std  V4L2_STD_GH) {
-   map = std_map-atv_gh;
-   mode = GH;
-   } else if (params-std  V4L2_STD_PAL_I) {
-   map = std_map-atv_i;
-   mode = I;
-   } else if (params-std  V4L2_STD_DK) {
-   map = std_map-atv_dk;
-   mode = DK;
-   } else if (params-std  V4L2_STD_SECAM_L) {
-   map = std_map-atv_l;
-   mode = L;
-   } else if (params-std  V4L2_STD_SECAM_LC) {
-   map = std_map-atv_lc;
-   mode = L';
} else {
-   map = std_map-atv_i;
-   mode = xx;
+   freq = params-frequency * 62500;
+   
+   if (params-std  V4L2_STD_MN) {
+   map = std_map-atv_mn;
+   mode = MN;
+   } else if (params-std  V4L2_STD_B) {
+   map = std_map-atv_b;
+   mode = B;
+   } else if (params-std  V4L2_STD_GH) {
+   map = std_map-atv_gh;
+   mode = GH;
+   } else if (params-std  V4L2_STD_PAL_I) {
+   map = std_map-atv_i;
+   mode = I;
+   } else if (params-std  V4L2_STD_DK) {
+   map = std_map-atv_dk;
+   mode = DK;
+   } else if (params-std  V4L2_STD_SECAM_L) {
+   map = std_map-atv_l;
+   mode = L;
+   } else if (params-std  V4L2_STD_SECAM_LC) {
+   map = std_map-atv_lc;
+   mode = L';
+   } else {
+   map = std_map-atv_i;
+   mode = xx;
+   }
}
 
tda_dbg(setting tda18271 to system %s\n, mode);
--
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


[PATCH 2/4] 18271_calc_main_pll small bugfix

2009-09-22 Thread spam

Removed code fragment that is not part of the (C2) specs. Possibly an early
remnant of an attempted if_notch filter configuration. It is already
handled correctly in the tda18271_set_if_notch function.

Signed-off-by: henk.vergo...@gmail.com

diff -r 29e4ba1a09bc linux/drivers/media/common/tuners/tda18271-common.c
--- a/linux/drivers/media/common/tuners/tda18271-common.c   Sat Sep 19 
09:45:22 2009 -0300
+++ b/linux/drivers/media/common/tuners/tda18271-common.c   Tue Sep 22 
22:06:31 2009 +0200
@@ -582,15 +582,6 @@
 
regs[R_MPD]   = (0x77  pd);
 
-   switch (priv-mode) {
-   case TDA18271_ANALOG:
-   regs[R_MPD]  = ~0x08;
-   break;
-   case TDA18271_DIGITAL:
-   regs[R_MPD]  |=  0x08;
-   break;
-   }
-
div =  ((d * (freq / 1000))  7) / 125;
 
regs[R_MD1]   = 0x7f  (div  16);
--
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


[PATCH 3/4] tda8290 enable deemphasis_50 module parameter.

2009-09-22 Thread spam

This adds a forgotten module_param macro needed to set a deemphasis of 50us.
It is the standard setting for commercial FM radio broadcasts outside the US.

Signed-off-by: henk.vergo...@gmail.com

diff -r 29e4ba1a09bc linux/drivers/media/common/tuners/tda8290.c
--- a/linux/drivers/media/common/tuners/tda8290.c   Sat Sep 19 09:45:22 
2009 -0300
+++ b/linux/drivers/media/common/tuners/tda8290.c   Tue Sep 22 22:06:31 
2009 +0200
@@ -34,6 +34,7 @@
 MODULE_PARM_DESC(debug, enable verbose debug messages);
 
 static int deemphasis_50;
+module_param(deemphasis_50, int, 0644);
 MODULE_PARM_DESC(deemphasis_50, 0 - 75us deemphasis; 1 - 50us deemphasis);
 
 /* -- */
--
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


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

2009-09-22 Thread spam

Switches IF AGC control via GPIO 21 of the saa7134. Improves DTV reception and
FM radio reception.

Signed-off-by: henk.vergo...@gmail.com

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,   0x8000, 0x8000);
saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x8000, 0x8000);
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] tda18271 add FM filter selction + minor fixes

2009-09-14 Thread spam
On Mon, Sep 14, 2009 at 11:21:17AM -0400, Michael Krufky wrote:
 Don't wait for them to be merged to v4l-dvb -- Just work against the
 tda18271 development repository:
 
 http://kernellabs.com/hg/~mkrufky/tda18271
 
 I maintain this driver, and I actually have some other fixes with
 respect to rf tracking filter calibration / compensation that I have
 yet to push.  I'm asking you to resend your patches so that I'll queue
 them for the next tda18271 merge.

Done
--
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


Re: [PATCH] tda18271 add FM filter selction + minor fixes

2009-09-14 Thread spam
On Mon, Sep 14, 2009 at 08:33:46AM -0400, Michael Krufky wrote:
 On Sun, Sep 13, 2009 at 8:14 PM,  s...@systol-ng.god.lan wrote:
 
  This patch adds support for FM filter selection. The tda18271 has two rf
  inputs RF_IN (45-864 MHz) and FM_IN (65-108 MHz). The code automatically
  enables the antialiasing filter for radio reception and depending on the
  FM input selected configures EB23 register.
 
  Additional fixes:
  - Fixed the temerature comensation, see revision history of TDA18271HD_4
  ?spec.
  - Minor cosmetic change in the tda18271_rf_band[]
  - Fixed one value and removed a duplicate in tda18271_cid_target[]
 
  Signed-off-by: henk.vergo...@gmail.com
 
 
 
 Henk,
 
 Thank you for your patch.
 
 I have some other tda18271 patches pending merge currently, so it will
 be a few days before I'll be able to test and merge your patch.
 
 In the meanwhile, I'd request that this single patch be broken down
 into three separate patches, each with a description of the change and
 sign-off.  I know that the patch you sent in is small, I just prefer
 to apply changes separately.
 
Thats fine, I will wait for the pull in v4l-dvb and then redo the patches:
- FM filter selection
- Errata temerature compensation
- Table fixes

if thast ok.

 Do you have FM radio working on the Zolid board after applying this?

Unfortunately not yet, I get static noise with small 'ticks' at regular
intervals. It maybe the way I am testing. Currently I am using:

mplayer radio://91.3/capture -nocache -rawaudio rate=32000 -radio \
adevice=hw=1.0:arate=32000

to test.

I will try to see if a can solder some pin headers on the card so I can
use audio bypass to the sound card.

Thanks,

Henk
--
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


[PATCH] tda18271 add FM filter selction + minor fixes

2009-09-13 Thread spam

This patch adds support for FM filter selection. The tda18271 has two rf
inputs RF_IN (45-864 MHz) and FM_IN (65-108 MHz). The code automatically
enables the antialiasing filter for radio reception and depending on the
FM input selected configures EB23 register.

Additional fixes:
- Fixed the temerature comensation, see revision history of TDA18271HD_4
  spec.
- Minor cosmetic change in the tda18271_rf_band[]
- Fixed one value and removed a duplicate in tda18271_cid_target[]

Signed-off-by: henk.vergo...@gmail.com

diff -r 2b49813f8482 linux/drivers/media/common/tuners/tda18271-fe.c
--- a/linux/drivers/media/common/tuners/tda18271-fe.c   Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/common/tuners/tda18271-fe.c   Mon Sep 14 01:45:49 
2009 +0200
@@ -99,6 +99,22 @@
if (tda_fail(ret))
goto fail;
 
+   /* update FM filter selection */
+   if (map-std == 0) {
+   /* std == FM radio */
+   regs[R_EB23] |=  0x06; /* 1.5 Mhz cut-off freq */
+   } else if (map-fm_rfn) {
+   /* antenna FM_IN, std != FM radio */
+   regs[R_EB23] |=  0x04; /* set FORCELP */
+   regs[R_EB23] = ~0x02; /* clear LP_FC */
+   } else {
+   /* antenna RF_IN, std != FM radio */
+   regs[R_EB23] = ~0x06; /* clear FORCELP, LP_FC */
+   }
+   ret = tda18271_write_regs(fe, R_EB23, 1);
+   if (tda_fail(ret))
+   goto fail;
+
/* --- */
 
/* disable Power Level Indicator */
@@ -272,7 +288,7 @@
tda18271_lookup_map(fe, RF_CAL_DC_OVER_DT, freq, dc_over_dt);
 
/* calculate temperature compensation */
-   rfcal_comp = dc_over_dt * (tm_current - priv-tm_rfcal);
+   rfcal_comp = dc_over_dt * (tm_current - priv-tm_rfcal) / 1000;
 
regs[R_EB14] = approx + rfcal_comp;
ret = tda18271_write_regs(fe, R_EB14, 1);
diff -r 2b49813f8482 linux/drivers/media/common/tuners/tda18271-maps.c
--- a/linux/drivers/media/common/tuners/tda18271-maps.c Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/common/tuners/tda18271-maps.c Mon Sep 14 01:45:49 
2009 +0200
@@ -229,8 +229,8 @@
 static struct tda18271_map tda18271_rf_band[] = {
{ .rfmax =  47900, .val = 0x00 },
{ .rfmax =  61100, .val = 0x01 },
+   { .rfmax = 121200, .val = 0x02 },
 /* { .rfmax = 152600, .val = 0x02 }, */
-   { .rfmax = 121200, .val = 0x02 },
{ .rfmax = 164700, .val = 0x03 },
{ .rfmax = 203500, .val = 0x04 },
{ .rfmax = 457800, .val = 0x05 },
@@ -962,10 +962,10 @@
 static struct tda18271_cid_target_map tda18271_cid_target[] = {
{ .rfmax =  46000, .target = 0x04, .limit =  1800 },
{ .rfmax =  52200, .target = 0x0a, .limit =  1500 },
-   { .rfmax =  79100, .target = 0x01, .limit =  4000 },
+   { .rfmax =  70100, .target = 0x01, .limit =  4000 },
+/* { .rfmax =  79100, .target = 0x01, .limit =  4000 },*/
{ .rfmax = 136800, .target = 0x18, .limit =  4000 },
{ .rfmax = 156700, .target = 0x18, .limit =  4000 },
-   { .rfmax = 156700, .target = 0x18, .limit =  4000 },
{ .rfmax = 186250, .target = 0x0a, .limit =  4000 },
{ .rfmax = 23, .target = 0x0a, .limit =  4000 },
{ .rfmax = 345000, .target = 0x18, .limit =  4000 },


Re: [PATCH] Add support for Zolid Hybrid PCI card

2009-09-09 Thread spam
On Tue, Sep 08, 2009 at 05:57:12PM -0400, Michael Krufky wrote:
 
  Hi Mike,
 
 
 Henk,
 
 Why do you expect a 8295?  If your board uses the SAA7131, then we
 would expect an 8290 IF demod.
 
 Ah, I just checked the history of this email thread -- I must have
 read one of your previous emails too quickly.  :-)  Perhaps there is a
 typo in the document that you read -- tda8290 is correct.
 
 About the analog noise and quality issues that you report, perhaps
 there is some tweaking that can be done to help the situation.  I dont
 have that Zolid board, myself, so I can't reallt help much in that
 respect, unfortunately.
 
 At this point, I feel that your patch is fine to merge into the
 development repository, although I have some small cleanup requests:
 
 #1)  You can omit this line from the tda18271_config struct:
 
 .config  = 0, /* no AGC config */
 
 This is not necessary, as it is initialized at zero and this serves no
 purpose even for documentation's sake.
 
 #2) The configuration inside saa7134-cards.c should be moved to the
 end of the boards array.
 
 #3) The configuration case inside saa7134-dvb.c should be moved to the
 end of the switch..case block.
 
 I'll wait for these cleanups, then I have no issue pushing up your
 patch.  Any quality improvements that we find along the way can
 certainly be added afterwards.
 
 Good work.
 
 Regards,
 
 Mike

Hi Mike,

Did the last cleanups.
Good review! Thank you for your help.

- henk

- patch comment -

Adds support for Zolid Hybrid PCI card:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

test status analog (PAL-B):
- Sometimes picture is noisy, but it becomes crystal clear after
  switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but
  lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement
both in analog and digital modes.

Signed-off-by: henk.vergo...@gmail.com

diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Wed Sep 09 07:47:10 
2009 +0200
@@ -5296,6 +5296,27 @@
.amux = TV,
},
},
+   [SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+   .name   = Zolid Hybrid TV Tuner PCI,
+   .audio_clock= 0x00187de7,
+   .tuner_type = TUNER_PHILIPS_TDA8290,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .tuner_config   = 0,
+   .mpeg   = SAA7134_MPEG_DVB,
+   .ts_type= SAA7134_MPEG_TS_PARALLEL,
+   .inputs = {{
+   .name = name_tv,
+   .vmux = 1,
+   .amux = TV,
+   .tv   = 1,
+   }},
+   .radio = {  // untested
+   .name = name_radio,
+   .amux = TV,
+   },
+   },
 
 };
 
@@ -6429,6 +6450,12 @@
.subdevice= 0x0138, /* LifeView FlyTV Prime30 OEM */
.driver_data  = SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM,
}, {
+   .vendor   = PCI_VENDOR_ID_PHILIPS,
+   .device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+   .subvendor= PCI_VENDOR_ID_PHILIPS,
+   .subdevice= 0x2004,
+   .driver_data  = SAA7134_BOARD_ZOLID_HYBRID_PCI,
+   }, {
/* --- boards without eeprom + subsystem ID --- */
.vendor   = PCI_VENDOR_ID_PHILIPS,
.device   = PCI_DEVICE_ID_PHILIPS_SAA7134,
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c   Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c   Wed Sep 09 07:47:10 
2009 +0200
@@ -1013,6 +1013,22 @@
.probe_tuner = TDA829X_DONT_PROBE,
 };
 
+static struct tda10048_config zolid_tda10048_config = {
+   .demod_address= 0x10  1,
+   .output_mode  = TDA10048_PARALLEL_OUTPUT,
+   .fwbulkwritelen   = TDA10048_BULKWRITE_200,
+   .inversion= TDA10048_INVERSION_ON,
+   .dtv6_if_freq_khz = TDA10048_IF_3300,
+   .dtv7_if_freq_khz = TDA10048_IF_3500,
+   .dtv8_if_freq_khz = TDA10048_IF_4000,
+   .clk_freq_khz = TDA10048_CLK_16000,
+   .disable_gate_access = 1,
+};
+
+static struct tda18271_config zolid_tda18271_config = {
+   .gate= TDA18271_GATE_ANALOG,
+};
+
 /* ==
  * Core code
  */
@@ -1492,6 +1508,19 @@
   

Re: [PATCH] Add support for Zolid Hybrid PCI card

2009-09-08 Thread spam
On Mon, Sep 07, 2009 at 12:12:15PM -0400, Michael Krufky wrote:
 Henk,
 
 Something is up with your mailer, making it difficult to reply to your
 emails going to some spam account instead of your email address...
 Please look into that, maybe set up a reply-to or something.
 
 Anyway, thanks for your responses -- that clears a lot up.  I
 recommend to also create your own tda18271 config structure, as I have
 a pending pull request that will tweak the tda18271 configuration
 within that hcw_tda18271_config structure -- Id hate for your board to
 break as a result of using somebody else's config.
 
 About the SAA7131 - correct -- it is a SAA713x combined with a TDA8295
 analog IF demod.  I was just checking to see that it was actually what
 your board uses.  Looks good to me.
 
 As far as the analog input setup, have you verified that those work
 properly, or did you also copy those from the HVR1120 configuration?
 If you havent verified those yourself, I recommend removing them from
 your patch -- better to not check in untested configurations, as it
 may lead others to believe that it should work, causing support
 problems for the future.
 
 After you re-submit with the above recommended changes, I'll be happy
 to push the patch for you.
 
 Regards,
 
 Mike

Hi Mike,

I tested the analog part (PAL-B), sound and picture work but with
some issues:

- Sometimes picture is noisy, but it becomes crystal clear after
  switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but
  lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement
both in analog and digital modes.

If you look at the dmesg, analog tuner is detected as 8290 instead of
the expected 8295 could this be a problem?
 [280192.420033] tda829x 3-004b: type set to tda8290+18271


For information on the card see:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

Signed-off-by: henk.vergo...@gmail.com

diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Tue Sep 08 00:32:02 
2009 +0200
@@ -3521,6 +3521,27 @@
.gpio = 0x0800100, /* GPIO 23 HI for FM */
},
},
+   [SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+   .name   = Zolid Hybrid TV Tuner PCI,
+   .audio_clock= 0x00187de7,
+   .tuner_type = TUNER_PHILIPS_TDA8290,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .tuner_config   = 0,
+   .mpeg   = SAA7134_MPEG_DVB,
+   .ts_type= SAA7134_MPEG_TS_PARALLEL,
+   .inputs = {{
+   .name = name_tv,
+   .vmux = 1,
+   .amux = TV,
+   .tv   = 1,
+   }},
+   .radio = {  // untested
+   .name = name_radio,
+   .amux = TV,
+   },
+   },
[SAA7134_BOARD_CINERGY_HT_PCMCIA] = {
.name   = Terratec Cinergy HT PCMCIA,
.audio_clock= 0x00187de7,
@@ -6429,6 +6450,12 @@
.subdevice= 0x0138, /* LifeView FlyTV Prime30 OEM */
.driver_data  = SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM,
}, {
+   .vendor   = PCI_VENDOR_ID_PHILIPS,
+   .device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+   .subvendor= PCI_VENDOR_ID_PHILIPS,
+   .subdevice= 0x2004,
+   .driver_data  = SAA7134_BOARD_ZOLID_HYBRID_PCI,
+   }, {
/* --- boards without eeprom + subsystem ID --- */
.vendor   = PCI_VENDOR_ID_PHILIPS,
.device   = PCI_DEVICE_ID_PHILIPS_SAA7134,
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c   Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c   Tue Sep 08 00:32:02 
2009 +0200
@@ -1013,6 +1013,23 @@
.probe_tuner = TDA829X_DONT_PROBE,
 };
 
+static struct tda10048_config zolid_tda10048_config = {
+   .demod_address= 0x10  1,
+   .output_mode  = TDA10048_PARALLEL_OUTPUT,
+   .fwbulkwritelen   = TDA10048_BULKWRITE_200,
+   .inversion= TDA10048_INVERSION_ON,
+   .dtv6_if_freq_khz = TDA10048_IF_3300,
+   .dtv7_if_freq_khz = TDA10048_IF_3500,
+   .dtv8_if_freq_khz = TDA10048_IF_4000,
+   .clk_freq_khz = TDA10048_CLK_16000,
+   .disable_gate_access = 1,
+};
+
+static struct

Re: [PATCH] Add support for Zolid Hybrid PCI card

2009-09-07 Thread spam
Hmm gmail front-end encoded the attachment as binary, retry 
- snip -

This patch adds support for Zolid Hybrid TV card. The results are
pretty encouraging DVB reception and analog TV reception are confirmed
to work. Might still need to find the GPIO pin that switches AGC on
the TDA18271 for even better reception.

see:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner
for more information.

Signed-off-by: henk.vergo...@gmail.com

diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Mon Sep 07 00:16:24 
2009 +0200
@@ -3521,6 +3521,35 @@
.gpio = 0x0800100, /* GPIO 23 HI for FM */
},
},
+   [SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+   .name   = NXP Europa DVB-T hybrid reference design,
+   .audio_clock= 0x00187de7,
+   .tuner_type = TUNER_PHILIPS_TDA8290,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .tuner_config   = 3,
+   .mpeg   = SAA7134_MPEG_DVB,
+   .ts_type= SAA7134_MPEG_TS_PARALLEL,
+   .inputs = {{
+   .name = name_tv,
+   .vmux = 1,
+   .amux = TV,
+   .tv   = 1,
+   }, {
+   .name = name_comp1,
+   .vmux = 0,
+   .amux = LINE1,
+   }, {
+   .name = name_svideo,
+   .vmux = 6,
+   .amux = LINE1,
+   } },
+   .radio = {
+   .name = name_radio,
+   .amux = TV,
+   },
+   },
[SAA7134_BOARD_CINERGY_HT_PCMCIA] = {
.name   = Terratec Cinergy HT PCMCIA,
.audio_clock= 0x00187de7,
@@ -6429,6 +6458,12 @@
.subdevice= 0x0138, /* LifeView FlyTV Prime30 OEM */
.driver_data  = SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM,
}, {
+   .vendor   = PCI_VENDOR_ID_PHILIPS,
+   .device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+   .subvendor= PCI_VENDOR_ID_PHILIPS,
+   .subdevice= 0x2004,
+   .driver_data  = SAA7134_BOARD_ZOLID_HYBRID_PCI,
+   }, {
/* --- boards without eeprom + subsystem ID --- */
.vendor   = PCI_VENDOR_ID_PHILIPS,
.device   = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -6655,6 +6690,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;
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c   Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c   Mon Sep 07 00:16:24 
2009 +0200
@@ -1125,6 +1125,13 @@
goto dettach_frontend;
break;
case SAA7134_BOARD_HAUPPAUGE_HVR1120:
+   case SAA7134_BOARD_ZOLID_HYBRID_PCI:
+   /* match interface type of SAA713x and TDA10048 */
+if (saa7134_boards[dev-board].ts_type == 
SAA7134_MPEG_TS_PARALLEL) {
+   hcw_tda10048_config.output_mode = 
TDA10048_PARALLEL_OUTPUT;
+   } else {
+   hcw_tda10048_config.output_mode = 
TDA10048_SERIAL_OUTPUT;
+   }
fe0-dvb.frontend = dvb_attach(tda10048_attach,
   hcw_tda10048_config,
   dev-i2c_adap);
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h   Thu Sep 03 09:06:34 
2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134.h   Mon Sep 07 00:16:24 
2009 +0200
@@ -297,6 +297,7 @@
 #define SAA7134_BOARD_AVERMEDIA_STUDIO_505  170
 #define SAA7134_BOARD_BEHOLD_X7 171
 #define SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM 172
+#define SAA7134_BOARD_ZOLID_HYBRID_PCI 173
 
 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8


Re: [PATCH] Add support for Zolid Hybrid PCI card

2009-09-07 Thread spam
On Mon, Sep 07, 2009 at 10:18:46AM -0400, Michael Krufky wrote:
 
  This patch adds support for Zolid Hybrid TV card. The results are
  pretty encouraging DVB reception and analog TV reception are confirmed
  to work. Might still need to find the GPIO pin that switches AGC on
  the TDA18271 for even better reception.
 
  see:
  http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner
  for more information.
 
  Signed-off-by: henk.vergo...@gmail.com
 
 
 
 Henk, thanks for your contribution, but this patch has problems.  This
 should NOT be merged as it is here.  Please see below:

Thanks for the review.

 
 #1) It's just a copy of the HVR1120 configuration.  There tuner_config
 = 3 value is definitely wrong for your board.  To prove my point,
 notice that you added a case for your board to the switch..case block
 in saa7134_tda8290_callback.  This will cause
 saa7134_tda8290_18271_callback to get called, then the default case
 will do nothing and the entire thing was a no-op.
 
 The correct value for your board for tuner_config is 0.  Always try
 the defaults before blindly copying somebody else's configuration.
 
You're right, changed tuner_config to zero.

 #2) Card description reads, NXP Europa DVB-T hybrid reference design
 but the card ID is SAA7134_BOARD_ZOLID_HYBRID_PCI.  I suggest to pick
 one name for the sake of clarity, specifically, the actual board name.
  Feel free to indicate that it is based on a reference design in
 comments.
 
Fair enough.

 #3) The change in saa7134-dvb will prevent an HVR1120 and your Zolid
 board from working together in the same PC.  Please create a new case
 block for the Zolid board, and create a new configuration structure
 for the tda10048 -- do not edit the value of static structures
 on-the-fly, and dont alter configuration of cards other than that of
 the board that you are adding today.

Ok I was assuming configuration parameters get copied in the tuner
state.

 
 #4) Does your card have a saa7131 on it or some other saa713x variant?
 Is there actually a tda8290 present on the board?  Does the
 tda8290_attach function sucess or fail?  Please send in a dmesg
 snippit of the board functioning with your next patch.
 
Well the chip is labeled as SAA7131E/03/G, according to the NXP docs its a
SAA7135 combined with a TDA8295 analog IF demod.

dmesg is attached below.

 #5)  Aren't there multiple versions of this board using different
 steppings of the tda18271 tuner?  This I am not sure of, but I do
 recall having issues bringing up the Zolid board months ago -- is this
 actually working for you?

Well all the references on the net refer to a tda18271/C2 version.

I have tested dvb reception just now, with a good antenna, and it works
get good audio and video. I still need to test analog reception. 

Also I assume selectivity can be better as I assume the V_AGC pin of
the TDA18271 is connected to some GPIO pin.

 
 After you resubmit a cleaned up patch, we should see if anybody else
 out there can test this for you.  A dmesg snippit of the board's
 driver output would be nice.
 
 Cheers,
 
 Mike

Can you take a peek at the improved patch below?


dmesg:
[280156.190062] saa7130/34: v4l2 driver version 0.2.15 loaded
[280156.190234] saa7133[0]: found at :04:00.0, rev: 209, irq: 16, latency: 
64, mmio: 0xfebff800
[280156.190271] saa7133[0]: subsystem: 1131:2004, board: Zolid Hybrid TV Tuner 
PCI [card=173,autodetected]
[280156.190445] saa7133[0]: board init: gpio is 400100
[280156.190481] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared 
IRQs
[280156.372530] saa7133[0]: i2c eeprom 00: 31 11 04 20 54 20 1c 00 43 43 a9 1c 
55 d2 b2 92
[280156.372579] saa7133[0]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff 
ff ff ff ff
[280156.372622] saa7133[0]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 00 b2 
ff ff ff ff
[280156.372664] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.372715] saa7133[0]: i2c eeprom 40: ff 35 00 c0 96 10 03 32 21 05 ff ff 
ff ff ff ff
[280156.372758] saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.372800] saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.372842] saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.372885] saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.372927] saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.372969] saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.373012] saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.373054] saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.373097] saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.373139] saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[280156.373181] saa7133[0]: i2c eeprom f0: ff ff ff ff ff