Re: [linux-dvb] [PATCH] Updated analog only support of Avermedia A700 cards - adds RF input support via XC2028 tuner (untested)

2008-03-18 Thread Matthias Schwarzott
On Dienstag, 18. März 2008, Mauro Carvalho Chehab wrote:
 On Sun, 16 Mar 2008 11:31:37 +0100

 For this to work, you'll need to set xc3028 parameters. This device needs a
 reset during firmware load. This is done via xc3028_callback. To reset, you
 need to turn some GPIO values, and then, return they back to their original
 values. The GPIO's are device dependent. So, you'll need to check with some
 software like Dscaler's regspy.exe what pins are changed during reset.

I can only have a look at the wiring.


 Also, there are two ways for audio to work with xc3028/2028: MTS mode and
 non-mts. You'll need to test both ways.

 A final notice: most current devices work fine with firmware v2.7. However,
 a few devices only work if you use an older firmware version.

 Could you please send us the logs with i2c_scan=1?


I do not have that hardware. I only have the A700 without XC2028 soldered on 
it. But maybe Peter can help out on this.

 Please, use the latest version of v4l-dvb, since I did some fixes for cx88
 and saa7134 there recently.

I do use latest v4l-dvb tree and create patches on top of this.
As this card is labled Hybrid+FM I should also add a radio section, I guess.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] [PATCH] Updated analog only support of Avermedia A700 cards - adds RF input support via XC2028 tuner (untested)

2008-03-16 Thread Matthias Schwarzott
Hi there!

I updated this patch to support both Avermedia A700 cards (AverTV DVB-S Pro 
and AverTV DVB-S Hybrid+FM).

The RF input of the Hybrid+FM card (with XC2028 tuner) is still untested.

I would be happy if any of the XC2028 experts could have a look at this patch.

Regards
Matthias
-- 
Matthias Schwarzott (zzam)
saa7134: add analog support for Avermedia A700 cards

Add analog support for Avermedia DVB-S Pro and
DVB-S Hybrid+FM card both labled A700 to saa7134 driver.

Still untested is support of analog tuner XC2028 on the Hybrid+FM card.

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -4196,7 +4196,56 @@ struct saa7134_board saa7134_boards[] = 
 			.name = name_radio,
 			.amux = TV,
 		}
-	}
+	},
+	[SAA7134_BOARD_AVERMEDIA_A700_PRO] = {
+		/* Matthias Schwarzott [EMAIL PROTECTED] */
+		.name   = Avermedia DVB-S Pro A700,
+		.audio_clock= 0x00187de7,
+		.tuner_type = TUNER_ABSENT,
+		.radio_type = UNSET,
+		.tuner_addr = ADDR_UNSET,
+		.radio_addr = ADDR_UNSET,
+		/* no DVB support for now */
+		/* .mpeg   = SAA7134_MPEG_DVB, */
+		.inputs = {{
+			.name = name_comp,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 6,
+			.amux = LINE1,
+		}},
+	},
+	[SAA7134_BOARD_AVERMEDIA_A700_HYBRID] = {
+		/* Matthias Schwarzott [EMAIL PROTECTED] */
+		.name   = Avermedia DVB-S Hybrid+FM A700,
+		.audio_clock= 0x00187de7,
+		.tuner_type = TUNER_XC2028,
+		.radio_type = UNSET,
+		.tuner_addr = ADDR_UNSET,
+		.radio_addr = ADDR_UNSET,
+		/* no DVB support for now */
+		/* .mpeg   = SAA7134_MPEG_DVB, */
+		.inputs = {{
+			.name = name_tv,
+			.vmux = 3, /* untested */
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 6,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = TV,
+		},
+	},
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -4429,6 +4478,18 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.driver_data  = SAA7134_BOARD_MD2819,
 	},{
 		.vendor   = PCI_VENDOR_ID_PHILIPS,
+		.device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor= 0x1461, /* Avermedia Technologies Inc */
+		.subdevice= 0xa7a1,
+		.driver_data  = SAA7134_BOARD_AVERMEDIA_A700_PRO,
+	},{
+		.vendor   = PCI_VENDOR_ID_PHILIPS,
+		.device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor= 0x1461, /* Avermedia Technologies Inc */
+		.subdevice= 0xa7a2,
+		.driver_data  = SAA7134_BOARD_AVERMEDIA_A700_HYBRID,
+	},{
+		.vendor   = PCI_VENDOR_ID_PHILIPS,
 		.device   = PCI_DEVICE_ID_PHILIPS_SAA7130,
 		.subvendor= 0x1461, /* Avermedia Technologies Inc */
 		.subdevice= 0x2115,
@@ -5537,6 +5598,15 @@ int saa7134_board_init1(struct saa7134_d
 		saa_andorl(SAA7134_GPIO_GPMODE0  2,   0x8c040007, 0x8c040007);
 		saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x0c0007cd, 0x0c0007cd);
 		break;
+	case SAA7134_BOARD_AVERMEDIA_A700_PRO:
+	case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
+		/* write windows gpio values */
+		saa_andorl(SAA7134_GPIO_GPMODE0  2,   0x80040100, 0x80040100);
+		saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x80040100, 0x00040100);
+		printk(%s: %s: hybrid analog/dvb card\n
+		   %s: Sorry, only the analog inputs are supported for now.\n,
+			dev-name,card(dev).name, dev-name);
+		break;
 	}
 	return 0;
 }
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134.h
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h
@@ -268,6 +268,8 @@ struct saa7134_format {
 #define SAA7134_BOARD_AVERMEDIA_A16D   137
 #define SAA7134_BOARD_AVERMEDIA_M115   138
 #define SAA7134_BOARD_VIDEOMATE_T750   139
+#define SAA7134_BOARD_AVERMEDIA_A700_PRO140
+#define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
 
 
 #define SAA7134_MAXBOARDS 8
Index: v4l-dvb/linux/Documentation/video4linux/CARDLIST.saa7134
===
--- v4l-dvb.orig/linux/Documentation/video4linux/CARDLIST.saa7134
+++ v4l-dvb/linux/Documentation/video4linux/CARDLIST.saa7134
@@ -138,3 +138,5 @@
 137 - AVerMedia Hybrid TV/Radio (A16D) [1461:f936]
 138 - Avermedia M115   [1461:a836]
 139 - Compro VideoMate T750[185b:c900]
+140 - Avermedia DVB-S Pro A700 [1461:a7a1]
+141 - Avermedia DVB-S Hybrid+FM A700   [1461:a7a2]
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Any improvements on the Avermedia DVB-S Pro (A700)?

2008-02-28 Thread Matthias Schwarzott
On Mittwoch, 27. Februar 2008, Eduard Huguet wrote:
 Hi, Matthias
Hi Eduard!

 I've seen that you have new patches for the card on the folder
 referenced in the wiki. Unfortunately none of them seems to work with my
 card. I'm startint to think that I'm doing something fundamentally wrong...
 But anyway, neither Kaffeine nor dvbscan seems to be able to lock to the
 satellite signal coming from the antennae (Windows can, though...).

For now I also dont get a lock :(
Even if I use the unchanged code that did work some time ago.

 So far I've tried all the available patches, both using use_frontend=0 and
 use_frontend=1 options in saa7134-dvb module. In neither case the card
 can't lock...

Same for me for now.

 Did you received my message posting the GPIO status and data from Windows
 driver? Apparently is different from what you entered in the wiki, I don't
 know why. Anyway, I tried to use my values saa7134 initialisation with no
 difference...

Yeah I got your mail, but can't interprete it. You need to tell what setting 
was used while doing the register snapshots. Like selected input 
(svideo/composite/dvb-s).

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Some tests on Avermedia A700

2008-02-17 Thread Matthias Schwarzott
On Mittwoch, 13. Februar 2008, Eduard Huguet wrote:

 OK, I don't know exactly what you mean, but I'll try to measure the
 output voltage of the input connector. I think you mean this, don't you?

 BTW, ¿where is the set_voltage app? I have media-tv/linuxtv-dvb-apps
 package installed and there is nothing with that name...


Another thing you can try is:
Boot windows and look at the GPIO values. (See v4l wiki for how to do this 
using regspy).

Use my latest diff, and try loading saa7134 with use_frontend=1 to use the 
alternative zl10313 driver.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] AVerMedia DVB-S Hybrid+FM and DVB-S Pro [A700]

2008-02-13 Thread Matthias Schwarzott
On Mittwoch, 13. Februar 2008, Peter Meszmer wrote:
 Am Dienstag, 12. Februar 2008 schrieben Sie:
  I added this to the wiki-page about A700:
  http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)
 
  Maybe we should rename the page to AverMedia_AverTV_DVB-S_A700 or
  anything similar.
 
  * Could you load saa7134 module of unpatched driver, but with parameter
  i2c_scan=1.
  * lspci -vvnn also should be interesting
  * If you have a camera, could you do a picture, so we can get info about
  the used analog tuner. I guess it is some XC30??. But to get it running
  you should contact video4linux mailinglist.
 
 
  Regards
  Matthias

 Hello Matthias,

 if I load the saa7134 module of unpatched driver, but with parameter
 i2c_scan=1, dmesg shows (Kernel 2.6.24-gentoo-r2)

 saa7130/34: v4l2 driver version 0.2.14 loaded
 saa7133[0]: found at :02:07.0, rev: 209, irq: 18, latency: 64, mmio:
 0xd3024000
 saa7133[0]: subsystem: 1461:a7a2, board: UNKNOWN/GENERIC
 [card=0,autodetected] saa7133[0]: board init: gpio is 6da00
 saa7133[0]: i2c eeprom 00: 61 14 a2 a7 ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c scan: found device @ 0x1c  [???]
 saa7133[0]: i2c scan: found device @ 0xa0  [eeprom]
 saa7133[0]: registered device video0 [v4l2]
 saa7133[0]: registered device vbi0

 and lspci -vvnn returns

 02:07.0 Multimedia controller [0480]: Philips Semiconductors
 SAA7133/SAA7135 Video Broadcast Decoder [1131:7133] (rev d1)
 Subsystem: Avermedia Technologies Inc Unknown device [1461:a7a2]
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
 Stepping- SERR- FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium TAbort-
 TAbort- MAbort- SERR- PERR- INTx-
 Latency: 64 (63750ns min, 63750ns max)
 Interrupt: pin A Route to IRQ 18
 Region 0: Memory at d3024000 (32-bit, non-prefetchable) [size=2K]
 Capabilities: [40] Power Management version 2
 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
 PME(D0-,D1-,D2-,D3hot-,D3cold-)
 Status: D0 PME-Enable- DSel=0 DScale=3 PME-
 Kernel driver in use: saa7134
 Kernel modules: saa7134

 I did some pictures too... the link to them is in a PM for you. The analog
 tuner seems to be a XC2028, but I don't see any possibilities to test the
 tuner.

added these texts to wiki.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Some tests on Avermedia A700

2008-02-13 Thread Matthias Schwarzott
On Mittwoch, 13. Februar 2008, Eduard Huguet wrote:
 Hi,
 Here you have the dmesg output of modprobe saa7134 i2c_scan=1:

 [  773.619247] saa7133[0]: found at :00:09.0, rev: 209, irq: 23,
 latency: 64, mmio: 0xf7ffa800
 [  773.619258] saa7133[0]: subsystem: 1461:a7a1, board: Avermedia A700
 [card=132,autodetected]
 [  773.619273] saa7133[0]: board init: gpio is 2f200
 [  773.865218] saa7133[0]: i2c eeprom 00: 61 14 a1 a7 ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865270] saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865312] saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865351] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865393] saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865433] saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865459] saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865702] saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865727] saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865753] saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865780] saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865810] saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865840] saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865868] saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.865897] saa7133[0]: i2c eeprom e0: 00 01 81 af ea b5 ff ff ff ff
 ff ff ff ff ff ff
 [  773.865923] saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff
 ff ff ff ff ff ff
 [  773.870157] saa7133[0]: i2c scan: found device @ 0x1c  [???]
 [  773.883118] saa7133[0]: i2c scan: found device @ 0xa0  [eeprom]
 [  773.891907] saa7133[0]: registered device video0 [v4l2]
 [  773.892250] saa7133[0]: registered device vbi0
 [  774.011780] zl1003x_attach: tuner initialization (Zarlink ZL10036
 addr=0x60) ok
 [  774.011805] DVB: registering new adapter (saa7133[0])
 [  774.011819] DVB: registering frontend 0 (Zarlink ZL10313 DVB-S)...


 These are the results of lspci -vvnn (after loading the driver):

 00:09.0 Multimedia controller [0480]: Philips Semiconductors
 SAA7133/SAA7135 Video Broadcast Decoder [1131:7133] (rev d1)
 Subsystem: Avermedia Technologies Inc Unknown device [1461:a7a1]
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
 ParErr- Stepping- SERR+ FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium TAbort-
 TAbort- MAbort- SERR- PERR- INTx-
 Latency: 64 (63750ns min, 63750ns max)
 Interrupt: pin A routed to IRQ 23
 Region 0: Memory at f7ffa800 (32-bit, non-prefetchable) [size=2K]
 Capabilities: [40] Power Management version 2
 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
 PME(D0-,D1-,D2-,D3hot-,D3cold-)
 Status: D0 PME-Enable- DSel=0 DScale=3 PME-
 Kernel driver in use: saa7134
 Kernel modules: saa7134

added note about different gpio values and eeprom content to wiki.

Regards
Matthias
-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Some tests on Avermedia A700

2008-02-13 Thread Matthias Schwarzott
On Sonntag, 10. Februar 2008, Eduard Huguet wrote:
 En/na Matthias Schwarzott ha escrit:
  On Samstag, 9. Februar 2008, Eduard Huguet wrote:
  Hi, Matthias
 
  Hi Eduard!
 
  I've been performing some tests using your patch for this card.
  Right now neither dvbscan nor kaffeine are able to find any channel on
  Astra (the sat. my dish points to).
 
  However, Kaffeine has been giving me some interesting results: with your
  driver as is it's getting me a 13-14% signal level and ~52% SNR when
  scanning. Then, thinking that the problem is related to the low signal I
  have I've changed the gain levels used to program the tuner: you were
  using default values of 0 for all (in zl1003x_set_gain_params()
  function, variables rfg, ba and bg), and I've changed them top the
  maximum (according to the documentation: rfg=1, ba=bg=3). With that, I'm
  getting a 18% signal level, which is higher but still too low apparently
  to get a lock.
 
  I've stopped here, because I really don't have the necessary background
  to keep tweaking the driver. I just wanted to share it with you, as
  maybe you have some idea on how to continue or what else could be done.
 
  So I can do only this guess:
  I changed demod driver to invert the Polarization voltage for a700 card.
  This is controlled by member-variable voltage_inverted.
 
  static struct mt312_config avertv_a700_mt312 = {
  .demod_address = 0x0e,
  .voltage_inverted = 1,
  };
 
  Can you try to comment the voltage_inverted line here (saa7134-dvb.c:
  line 865).
 
  BUT: If this helps we need to find out how to detect which card needs
  this enabled/disabled.
 
  Regards
  Matthias

 Hi,
   Nothing :(. Removing (or setting it to 0) the voltage_inverted member
 doesn't seem to make any difference. I'm starting to suspect that there
 is something wrong with my antennae setup, so I'll test it later using
 an standalone STB or by plugging the card into a Windows computer and
 using the supplied drivers.

Even better: Tune to a channel and measure the voltage the card outputs on LNB 
connector.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Some tests on Avermedia A700

2008-02-13 Thread Matthias Schwarzott
On Mittwoch, 13. Februar 2008, Eduard Huguet wrote:
 En/na Matthias Schwarzott ha escrit:
  On Sonntag, 10. Februar 2008, Eduard Huguet wrote:
  En/na Matthias Schwarzott ha escrit:
  On Samstag, 9. Februar 2008, Eduard Huguet wrote:
  Hi, Matthias
 
  Hi Eduard!
 
  I've been performing some tests using your patch for this card.
  Right now neither dvbscan nor kaffeine are able to find any channel on
  Astra (the sat. my dish points to).
 
  However, Kaffeine has been giving me some interesting results: with
  your driver as is it's getting me a 13-14% signal level and ~52% SNR
  when scanning. Then, thinking that the problem is related to the low
  signal I have I've changed the gain levels used to program the tuner:
  you were using default values of 0 for all (in
  zl1003x_set_gain_params() function, variables rfg, ba and bg),
  and I've changed them top the maximum (according to the documentation:
  rfg=1, ba=bg=3). With that, I'm getting a 18% signal level, which is
  higher but still too low apparently to get a lock.
 
  I've stopped here, because I really don't have the necessary
  background to keep tweaking the driver. I just wanted to share it with
  you, as maybe you have some idea on how to continue or what else could
  be done.
 
  So I can do only this guess:
  I changed demod driver to invert the Polarization voltage for a700
  card. This is controlled by member-variable voltage_inverted.
 
  static struct mt312_config avertv_a700_mt312 = {
  .demod_address = 0x0e,
  .voltage_inverted = 1,
  };
 
  Can you try to comment the voltage_inverted line here (saa7134-dvb.c:
  line 865).
 
  BUT: If this helps we need to find out how to detect which card needs
  this enabled/disabled.
 
  Regards
  Matthias
 
  Hi,
Nothing :(. Removing (or setting it to 0) the voltage_inverted member
  doesn't seem to make any difference. I'm starting to suspect that there
  is something wrong with my antennae setup, so I'll test it later using
  an standalone STB or by plugging the card into a Windows computer and
  using the supplied drivers.
 
  Even better: Tune to a channel and measure the voltage the card outputs
  on LNB connector.
 
  Regards
  Matthias

 Oops :D. Could you please elaborate a bit on this? I don't know what is
 the LNB connector you are referring to. Plus, I don't have right now any
 voltimeter, but if needed I'll grab one from work tomorrow.


So, as I started playing with my A700 card, I discovered that the 
input-connector on the card, where one attaches the coax-cable to the 
lnb/dish, sent out wrong voltage.

13V / 18V was swapped. So I patched mt312 driver and added the setting 
voltage_inverted to reverse it.
Instead of just guessing what happens it is interesting to just call the 
dvb-apps example app set_voltage and measure what voltage the hw outputs.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] AVerMedia DVB-S Hybrid+FM and DVB-S Pro [A700]

2008-02-13 Thread Matthias Schwarzott
On Donnerstag, 7. Februar 2008, Peter Meszmer wrote:
 Hello,

 I'm watching this list for quite a while now, looking forward to see my
 Avermedia AVerTV DVB-S Hybrid+FM supported.
 This card looks very similar to the Avermedia AVerTV DVB-S Pro [A700], so I
 tried the two existing patches. Finally, Matthias Schwarzott's (zzam)
 patch a700_full_20080204 did it.

 DVB-S is working very well using Kaffeine 0.8.5, input via S-Video or
 Composite worked, since I bought the card, and is still working.

 Is it possible, to add the cards ID (1461:a7a2) to the list?

I uploaded a new patch that has this pci id added to the list.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Some tests on Avermedia A700

2008-02-12 Thread Matthias Schwarzott
On Monday 11 February 2008, you wrote:
 En/na Eduard Huguet ha escrit:
  En/na Matthias Schwarzott ha escrit:
  On Samstag, 9. Februar 2008, Eduard Huguet wrote:
  Hi, Matthias
 
  Hi Eduard!
 
  I've been performing some tests using your patch for this card.
  Right now neither dvbscan nor kaffeine are able to find any channel on
  Astra (the sat. my dish points to).
 
  However, Kaffeine has been giving me some interesting results: with
  your driver as is it's getting me a 13-14% signal level and ~52% SNR
  when scanning. Then, thinking that the problem is related to the low
  signal I have I've changed the gain levels used to program the tuner:
  you were using default values of 0 for all (in
  zl1003x_set_gain_params() function, variables rfg, ba and bg),
  and I've changed them top the maximum (according to the documentation:
  rfg=1, ba=bg=3). With that, I'm getting a 18% signal level, which is
  higher but still too low apparently to get a lock.
 
  I've stopped here, because I really don't have the necessary background
  to keep tweaking the driver. I just wanted to share it with you, as
  maybe you have some idea on how to continue or what else could be done.
 
  So I can do only this guess:
  I changed demod driver to invert the Polarization voltage for a700 card.
  This is controlled by member-variable voltage_inverted.
 
  static struct mt312_config avertv_a700_mt312 = {
  .demod_address = 0x0e,
  .voltage_inverted = 1,
  };
 
  Can you try to comment the voltage_inverted line here (saa7134-dvb.c:
  line 865).
 
  BUT: If this helps we need to find out how to detect which card needs
  this enabled/disabled.
 
  Regards
  Matthias
 
  Hi,
Nothing :(. Removing (or setting it to 0) the voltage_inverted
  member doesn't seem to make any difference. I'm starting to suspect
  that there is something wrong with my antennae setup, so I'll test it
  later using an standalone STB or by plugging the card into a Windows
  computer and using the supplied drivers.
 
  Regards,
Eduard

 By the way (sorry if I'm being molest...): I will leave the card in this
 PC for now, as it's easier fo me to test and develop. As I have also
 Windows here ¿is there any way we could do any reverse enginnering from
 Windows driver, etc...?


I already asked you to compare eeprom output in dmesg. But did you also 
compare GPIO messages - like init-values read after startup (to detect 
different wiring)?
This is from my dmesg output: saa7133[0]: board init: gpio is a600

Or just attach dmesg output after a cold boot and loading saa7134 driver (with 
i2c_scan=1).

Maybe I create a patch where you can select the other existing zl10313 driver.
So we can compare the logs / functionality.

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] AVerMedia DVB-S Hybrid+FM and DVB-S Pro [A700]

2008-02-12 Thread Matthias Schwarzott
On Thursday 07 February 2008, you wrote:
 Am Donnerstag, 7. Februar 2008 schrieben Sie:
  @Peter:
  1. Maybe you want to start a page in the wiki dedicated to your card.
  Or should we check for similarity and merge both of these cards into one
  page?
 
  At least I am interested in the eeprom content of your card.
 
  I should request some schematics from Avermedia to maybe get gpio
  controlling correct. (Like resetting chips, ir ...)
 
  Regards
  Matthias

 Hello Matthias,

 the eeprom content is slightly different form the one shown on the wiki:

 saa7133[0]: found at :02:07.0, rev: 209, irq: 18, latency: 64, mmio:
 0xd3024000
 saa7133[0]: subsystem: 1461:a7a2, board: Avermedia A700
 [card=132,autodetected]
 saa7133[0]: board init: gpio is 48a00
 saa7133[0]: i2c eeprom 00: 61 14 a2 a7 ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom e0: 00 01 81 af d7 09 ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 saa7133[0]: registered device video0 [v4l2]
 saa7133[0]: registered device vbi0
 DVB: registering new adapter (saa7133[0])

I added this to the wiki-page about A700:
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

Maybe we should rename the page to AverMedia_AverTV_DVB-S_A700 or anything 
similar.

* Could you load saa7134 module of unpatched driver, but with parameter 
i2c_scan=1.
* lspci -vvnn also should be interesting
* If you have a camera, could you do a picture, so we can get info about the 
used analog tuner. I guess it is some XC30??. But to get it running you 
should contact video4linux mailinglist.


Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Some tests on Avermedia A700

2008-02-09 Thread Matthias Schwarzott
On Samstag, 9. Februar 2008, Eduard Huguet wrote:
 Hi, Matthias
Hi Eduard!

 I've been performing some tests using your patch for this card.
 Right now neither dvbscan nor kaffeine are able to find any channel on
 Astra (the sat. my dish points to).

 However, Kaffeine has been giving me some interesting results: with your
 driver as is it's getting me a 13-14% signal level and ~52% SNR when
 scanning. Then, thinking that the problem is related to the low signal I
 have I've changed the gain levels used to program the tuner: you were
 using default values of 0 for all (in zl1003x_set_gain_params()
 function, variables rfg, ba and bg), and I've changed them top the
 maximum (according to the documentation: rfg=1, ba=bg=3). With that, I'm
 getting a 18% signal level, which is higher but still too low apparently
 to get a lock.

 I've stopped here, because I really don't have the necessary background
 to keep tweaking the driver. I just wanted to share it with you, as
 maybe you have some idea on how to continue or what else could be done.


So I can do only this guess:
I changed demod driver to invert the Polarization voltage for a700 card.
This is controlled by member-variable voltage_inverted.

static struct mt312_config avertv_a700_mt312 = {
.demod_address = 0x0e,
.voltage_inverted = 1,
};

Can you try to comment the voltage_inverted line here (saa7134-dvb.c: line 
865).

BUT: If this helps we need to find out how to detect which card needs this 
enabled/disabled.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] AVerMedia DVB-S Hybrid+FM and DVB-S Pro [A700]

2008-02-07 Thread Matthias Schwarzott
On Donnerstag, 7. Februar 2008, Eduard Huguet wrote:
 Hi,
 ¿Have you been able to make the DVB-S part work, so? I've been
 trying these days using ZZam's patch only (Tino's one also mentioned in
 the wiki doesn't apply for now), and I was completely unable to get a
 lock on any frequency.

 I thought it was because the driver was incomplete (without Tino's
 patch...), but if it works for you then I'll probably need to check my
 antenna, satellite, etc...

 My card is the DVB-S Pro simple (not hybrid), but I don't think this
 makes any difference.

 Best regards,
   Eduard Huguet


 (PS: sorry for double posting. I forgot to change the subject  title
 before.)

Hi Eduard, Peter!

@Eduard:
Can you please compare the dmesg output (especially the eeprom dump) of your 
card to the one listed on the wiki-page.

http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

@Peter:
1. Maybe you want to start a page in the wiki dedicated to your card.
Or should we check for similarity and merge both of these cards into one page?

At least I am interested in the eeprom content of your card.

I should request some schematics from Avermedia to maybe get gpio controlling 
correct. (Like resetting chips, ir ...)

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Patch for analog part for Avermedia A700 fails to apply

2008-02-05 Thread Matthias Schwarzott
On Tuesday 05 February 2008, you wrote:
 Hi,

Hi!

 Bad news: I've been unsuccesfully trying to apply the new patches (as
 mentioned in the wiki), with the following results:

 1.- analog part applies just fine:

 mediacenter v4l-dvb # patch -p1  ../1_avertv_A700_analog_part.diff
 patching file linux/drivers/media/video/saa7134/saa7134-cards.c
 patching file linux/drivers/media/video/saa7134/saa7134.h
 patching file linux/Documentation/video4linux/CARDLIST.saa7134

It is just listed extra as this patch is the only one I think is correct and I 
hope it gets applied to v4l-dvb in near future. (Maybe after some others have 
verified it.)


 2.- Your patch (ZZam's) gives some warnings:



 Apparently the A700 section is duplicated. I assume that the second section
 is the good one, as the first gives only option for analog input. This is
 probably related to the patch no aplying cleanly. I've removed the 1st
 section and now it seems to compile fine.

So you found out the hard way, that patch 1 (analog-only) is already part of 
my patch and you should only apply one of these.


 3.- Tino's patch gets worse. It even doesn't apply:


I guess this patch is also influenced by some new added cards.

Regards
  Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Patch for analog part for Avermedia A700 fails to apply

2008-01-29 Thread Matthias Schwarzott
On Dienstag, 29. Januar 2008, Eduard Huguet wrote:
 Hi,
 I'm just trying to apply the first patch mentioned on the wiki for this
 cardad I'm getting the following result:

 From
 http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_%28A700%29
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_%2528A700%
2529


 # patch -p1  ../1_avertv_A700_analog_part.diff

 patching file linux/drivers/media/video/saa7134/saa7134-cards.c
 Hunk #1 succeeded at 3992 with fuzz 2 (offset 41 lines).
 Hunk #2 succeeded at 4243 (offset 41 lines).
 Hunk #3 succeeded at 5233 (offset 59 lines).
 patching file linux/drivers/media/video/saa7134/saa7134.h
 Hunk #1 FAILED at 260.
 1 out of 1 hunk FAILED -- saving rejects to file
 linux/drivers/media/video/saa7134/saa7134.h.rej
 patching file linux/Documentation/video4linux/CARDLIST.saa7134
 Hunk #1 FAILED at 129.
 1 out of 1 hunk FAILED -- saving rejects to file
 linux/Documentation/video4linux/CARDLIST.saa7134.rej


 linux/drivers/media/video/saa7134/saa7134.h.rej:

 ***
 *** 260,265 
   #define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 128
   #define SAA7134_BOARD_BEHOLD_607_9FM  129
   #define SAA7134_BOARD_BEHOLD_M6   130

   #define SAA7134_MAXBOARDS 8
   #define SAA7134_INPUT_MAX 8
 --- 260,266 
   #define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 128
   #define SAA7134_BOARD_BEHOLD_607_9FM  129
   #define SAA7134_BOARD_BEHOLD_M6   130
 + #define SAA7134_BOARD_AVERMEDIA_A700  131

   #define SAA7134_MAXBOARDS 8
   #define SAA7134_INPUT_MAX 8



Sure the patch is too old. There was added a new card to saa7134 driver. So I 
needed to update the patch.
You can now get the patch from my last mail (it was attached).
http://thread.gmane.org/gmane.linux.drivers.dvb/38943/focus=38952

Or you re-download the file linked from the wiki. I uploaded the new version.

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] saa7134-dvb: add missing dvb_atta ch call ( for tda10046_attach )

2008-01-26 Thread Matthias Schwarzott
On Samstag, 26. Januar 2008, Hartmut Hackmann wrote:
 Hi,

 Matthias Schwarzott schrieb:
  Hi there!
  The attached small patch adds a missing dvb_attach wrapping around
  tda10046_attach.
  So it removes the hard dependency of saa7134-dvb on tda1004x module.
 
  I have only tested compiling as I don not have the hardware.
 
  Greetings
  Matthias

 I don't have this hardware either but your patch is right.
 Can you please resend it with your signature like

 Signed-off-by: Hartmut Hackmann [EMAIL PROTECTED]

 (of corse with your name and e-mail address)

 Please do this soon otherwise it will not make it into the next
 kernel release.

Here you have it :)

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Regards
Matthias

-- 
Matthias Schwarzott (zzam)
saa7134-dvb: add missing dvb_attach around tda10046_attach

This patch adds a possibly missing dvb_attach for tda10046_attach.
This removes the hard dependency of saa7134-dvb on tda1004x module.

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1007,8 +1007,9 @@ static int dvb_init(struct saa7134_dev *
 		}
 		break;
 	case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
-		dev-dvb.frontend = tda10046_attach(medion_cardbus,
-		dev-i2c_adap);
+		dev-dvb.frontend = dvb_attach(tda10046_attach,
+	   medion_cardbus,
+	   dev-i2c_adap);
 		if (dev-dvb.frontend) {
 			dev-original_demod_sleep = dev-dvb.frontend-ops.sleep;
 			dev-dvb.frontend-ops.sleep = philips_europa_demod_sleep;
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[linux-dvb] saa7134-dvb: add missing dvb_attach call (for tda10046_attach)

2008-01-24 Thread Matthias Schwarzott
Hi there!
The attached small patch adds a missing dvb_attach wrapping around 
tda10046_attach.
So it removes the hard dependency of saa7134-dvb on tda1004x module.

I have only tested compiling as I don not have the hardware.

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1007,8 +1007,9 @@ static int dvb_init(struct saa7134_dev *
 		}
 		break;
 	case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
-		dev-dvb.frontend = tda10046_attach(medion_cardbus,
-		dev-i2c_adap);
+		dev-dvb.frontend = dvb_attach(tda10046_attach,
+	   medion_cardbus,
+	   dev-i2c_adap);
 		if (dev-dvb.frontend) {
 			dev-original_demod_sleep = dev-dvb.frontend-ops.sleep;
 			dev-dvb.frontend-ops.sleep = philips_europa_demod_sleep;
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] AverMedia DVB-S Pro Howto?

2008-01-20 Thread Matthias Schwarzott
On Sonntag, 20. Januar 2008, Eduard Huguet wrote:
 Hi,
 I'm try to make this card work using the lastest patches that has been
 published in this list. However, I'm somewhat lost about what patches and
 in which order must be applied to a clean HG tree. I've tried to apply the
 patches mentiones in these threads:


- Analog inputs:
http://www.mail-archive.com/linux-dvb@linuxtv.org/msg27833.html
- zl10036 driver:
http://www.mail-archive.com/linux-dvb@linuxtv.org/msg28565.html
- zl10313 into mt312:
http://www.mail-archive.com/linux-dvb@linuxtv.org/msg28566.html
- DVB-S support for A700:
http://www.mail-archive.com/linux-dvb@linuxtv.org/msg28567.html

 However, almost none of they apply cleanly into a freshly download HG tree.
 I'm willing to help on this card, at least as a beta-tester. I'm a C++
 developer, so I'm not scared about compiling, repositories, patches, etc...

Hi Eduart!

I try to make it easier for users to try out the patches. I try to document 
the necessary steps in the wiki on this page:
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

I like to create one large patch to be applied against latest hg version and 
hope to get this finished these days.

But please mind that the drivers really are development status only. So they 
work most of the time but I cannot tell why if not :)

Matthias
-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] PATCH: New driver for Zarlink ZL10313 based Compro S350/S300

2008-01-14 Thread Matthias Schwarzott
On Sonntag, 13. Januar 2008, Tino Reichardt wrote:
 * Jan D. Louw [EMAIL PROTECTED] wrote:
  On Sunday 30 December 2007 11:36:12 Tino Reichardt wrote:
   * Jan D. Louw [EMAIL PROTECTED] wrote:
Hi List,
   
Attached is a new driver for the Zarlink ZL10313/ZL10039 based Compro
S350/S300 budget DVB-S cards. Everything except 2 way diseqc should
work.
  
   I will test it on my Avermedia DVB-S Pro, which is ZL10313/ZL10036
   based.
  
   Is it a good idea to rename the the driver to zl1031x.c / zl1003x.c ?
  
   zl1031x.c: zl100312/zl100313/intel6313
   zl1003x.c: zl10036/zl10037/zl10038/zl10039 tuner
  
   Thanks for the driver, I will try it out ;)
 
  Many have suggested the possibility of combining the vp310,mt312,zl313
  and intel 6313 demodulators into a single driver. Now that the 313 is
  working this will be easier.
 
  Unfortunately the zl10036 tuner register map differs from the zl10039
  tuner, so this driver will definitely not work for you. However, writing
  s zl10036 driver would be trivial, as a full datasheet is available.

 Hello again,

 I have updated my old zl10036 patch, which is located @
 http://www.mcmilk.de/projects/dvb-card/patches/

 It uses the whole patch from Jan D. Louw and adds support for the
 zarlink zl10036/38 tuners. But there is some bug in zl1003x_set_params()
 function ... so It doesn't get tuned.

 There is also a file called everything.log.txt - this is some test
 tuning to german channels.

 Jan D. Louw, have you an idea, what is wrong in that function ?

Hi Tino! Hi List!

as you know I already did some work regarding zl10036 and mt312/zl10313.
I did manage to let the whole thing run. Just it got back to crashing my 
machine so I cannot provide a patch-series yet.

So I need to check where my memory-access bug lies. Then I can provide a 
working zl10036 driver (largely rewritten from your version). But still 
bandwidth handling is not good - just good enough to get a lock :)

Second I have a patch-series to change mt312 driver to support zl10313 as 
zl10313 is almost identical mt312 (from driver perspective).

Maybe this will be done in 1 or 2 weeks (I hope so).

Regards
Matthias

-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] zl10036 driver

2008-01-14 Thread Matthias Schwarzott
Hi Tino! Hi list!

The crash was not in my code. So I can announce it now.

This is a driver for zl10036 tuner chip.
It works as far that I get a lock (with zl10313 demod).

Maybe the bandwidth handling may be improved (like feeding demod freq drift 
back into tuner and enlarging bandwidth with that value).

At least for this large tuning step size (2MHz for now, we maybe need to add 
2MHz or real difference to wanted freq to bandwidth filter).

Or just setting bandwidth to maximum for tuning and lower it once locked.
Implementing this can create a new tune algo instead of zig-zag: faster tuning 
in just one step :)

Regards
Matthias

-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/dvb/frontends/Kconfig
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/Kconfig
+++ v4l-dvb/linux/drivers/media/dvb/frontends/Kconfig
@@ -330,6 +330,13 @@ config DVB_TUNER_QT1010
 	help
 	  A driver for the silicon tuner QT1010 from Quantek.
 
+config DVB_ZL1003X
+	tristate Zarlink ZL1003X silicon tuner
+	depends on DVB_CORE  I2C
+	default m if DVB_FE_CUSTOMISE
+	help
+	  A DVB-S silicon tuner module. Say Y when you want to support this tuner.
+
 config DVB_TUNER_MT2060
 	tristate Microtune MT2060 silicon IF tuner
 	depends on I2C
Index: v4l-dvb/linux/drivers/media/dvb/frontends/Makefile
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/Makefile
+++ v4l-dvb/linux/drivers/media/dvb/frontends/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_DVB_TDA1004X) += tda1004x.o
 obj-$(CONFIG_DVB_SP887X) += sp887x.o
 obj-$(CONFIG_DVB_NXT6000) += nxt6000.o
 obj-$(CONFIG_DVB_MT352) += mt352.o
+obj-$(CONFIG_DVB_ZL1003X) += zl1003x.o
 obj-$(CONFIG_DVB_ZL10353) += zl10353.o
 obj-$(CONFIG_DVB_CX22702) += cx22702.o
 obj-$(CONFIG_DVB_TDA10021) += tda10021.o
Index: v4l-dvb/linux/drivers/media/dvb/frontends/zl1003x.c
===
--- /dev/null
+++ v4l-dvb/linux/drivers/media/dvb/frontends/zl1003x.c
@@ -0,0 +1,692 @@
+/**
+ * Driver for Zarlink zl1003x DVB-S silicon tuner
+ *
+ * Copyright (C) 2006 Tino Reichardt
+ * Copyright (C) 2007 Matthias Schwarzott [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ **
+ * The data sheet for this tuner can be found at:
+ *http://www.mcmilk.de/projects/dvb-card/datasheets/ZL10036.pdf
+ *
+ * This one is working: (at my Avermedia DVB-S Pro)
+ * - zl10036 (40pin, FTA)
+ *
+ * These are planned:
+ * - zl10038 (40pin, FTA with DVB-S2 - nearly the same as zl10036)
+ * - zl10037 (28pin, with pay tv support)
+ * - zl10039 (28pin, FTA)
+ */
+
+#include linux/module.h
+#include linux/dvb/frontend.h
+#include asm/types.h
+
+#include zl1003x.h
+
+static int zl1003x_debug;
+#define dprintk(level, args...) \
+	do { if (zl1003x_debug  level) printk(KERN_DEBUG zl1003x:  args); \
+	} while (0)
+
+#define deb_info(args...)  dprintk(0x01, args)
+#define deb_i2c(args...)  dprintk(0x02, args)
+
+struct zl1003x_state {
+	struct i2c_adapter *i2c;
+	const struct zl1003x_config *config;
+	u32 frequency;
+	u8 br, bf;
+};
+
+
+/* This driver assumes the tuner is driven by a 10.111MHz Cristal */
+#define _XTAL 10111
+
+#if 0
+/* Using a divider of 64 leads to a reference Frequency/step size of 158kHz */
+#define _RDIV 64
+#define _RDIV_REG 0x05
+#elif 0
+/* Using a divider of 10 leads to a reference Frequency/step size of 1011kHz */
+#define _RDIV 10
+#define _RDIV_REG 0x0a
+#else
+/* Using a divider of 10 leads to a reference Frequency/step size of 2022kHz */
+#define _RDIV 5
+#define _RDIV_REG 0x09
+#endif
+
+#define _FR   (_XTAL/_RDIV)
+
+#define STATUS_POR 0x80
+#define STATUS_FL  0x40
+
+/* read/write for zl10036 and zl10038 */
+
+static int zl10036_read_status_reg(struct zl1003x_state *state)
+{
+	u8 status;
+	struct i2c_msg msg[1] = {
+		{ .addr = state-config-tuner_address, .flags = I2C_M_RD,
+		  .buf = status, .len = sizeof(status) },
+	};
+
+	if (i2c_transfer(state-i2c, msg, 1) != 1) {
+		printk(KERN_ERR %s: i2c read failed at addr=%02x\n,
+			__FUNCTION__, state-config-tuner_address);
+		return -EIO;
+	}
+
+	deb_i2c(R(status): %02x  [FL=%d]\n, status,
+		(status  STATUS_FL) ? 1 : 0);
+	if (status  STATUS_POR)
+		deb_info(zl1003x: Power-On-Reset bit enabled - 
+			may need to reinitialize tuner\n);
+
+	return status

[linux-dvb] [PATCH] add support for zl10313 into mt312-driver

2008-01-14 Thread Matthias Schwarzott
Hi there!

The attached patches should add support for zl10313 chip to mt312-driver.

This driver now works for my A700 dvb-s card.

@Jan D. Louw: I used register write logs of your driver to compare them to 
mt312 driver. Maybe this driver works also for your Compro card.


01_mt312-fix-22k: Sets the correct diseqc frequency.
02_mt312-var-types: changes data types for read/write functions to u8* instead 
of void*.
03_mt312-changable-xtal: Handle xtal freq. and multiplicator in state instead 
of hardcoding them
04_mt312-add-zl10313-support.diff: Adds basic support for zl10313

Regards
Matthias
-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -1,7 +1,8 @@
 /*
-Driver for Zarlink VP310/MT312 Satellite Channel Decoder
+Driver for Zarlink VP310/MT312/ZL10313 Satellite Channel Decoder
 
 Copyright (C) 2003 Andreas Oberritter [EMAIL PROTECTED]
+Copyright (C) 2008 Matthias Schwarzott [EMAIL PROTECTED]
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -55,6 +56,7 @@ static int debug;
 	} while (0)
 
 #define MT312_PLL_CLK		1000UL	/* 10 MHz */
+#define MT312_PLL_CLK_10_111	10111000UL	/* 10.111 MHz */
 
 static int mt312_read(struct mt312_state *state, const enum mt312_reg_addr reg,
 		  u8 *buf, const size_t count)
@@ -264,6 +266,32 @@ static int mt312_initfe(struct dvb_front
 			return ret;
 	}
 
+	switch (state-id) {
+	case ID_ZL10313:
+		/* enable ADC */
+		ret = mt312_writereg(state, GPP_CTRL, 0x80);
+		if (ret  0)
+			return ret;
+
+		/* for optimal ADC performance according to datasheet */
+		buf[0] = 0x80;
+		buf[1] = 0xB0;
+		ret = mt312_write(state, HW_CTRL, buf, 2);
+		if (ret  0)
+			return ret;
+
+		/* enable MPEG output */
+		ret = mt312_writereg(state, HW_CTRL, 0x00);
+		if (ret  0)
+			return ret;
+
+		ret = mt312_writereg(state, MPEG_CTRL, 0x00);
+		if (ret  0)
+			return ret;
+
+		break;
+	}
+
 	/* SYS_CLK */
 	buf[0] = mt312_div(state-xtal * state-freq_mult * 2, 100);
 
@@ -278,21 +306,28 @@ static int mt312_initfe(struct dvb_front
 	if (ret  0)
 		return ret;
 
-	ret = mt312_writereg(state, OP_CTRL, 0x53);
-	if (ret  0)
-		return ret;
+	switch (state-id) {
+	case ID_VP310:
+	case ID_MT312:
+		/* this code seems to prevent zl10313 from delivering useful data */
 
-	/* TS_SW_LIM */
-	buf[0] = 0x8c;
-	buf[1] = 0x98;
+		ret = mt312_writereg(state, OP_CTRL, 0x53);
+		if (ret  0)
+			return ret;
 
-	ret = mt312_write(state, TS_SW_LIM_L, buf, sizeof(buf));
-	if (ret  0)
-		return ret;
+		/* TS_SW_LIM */
+		buf[0] = 0x8c;
+		buf[1] = 0x98;
 
-	ret = mt312_writereg(state, CS_SW_LIM, 0x69);
-	if (ret  0)
-		return ret;
+		ret = mt312_write(state, TS_SW_LIM_L, buf, sizeof(buf));
+		if (ret  0)
+			return ret;
+
+		ret = mt312_writereg(state, CS_SW_LIM, 0x69);
+		if (ret  0)
+			return ret;
+		break;
+	}
 
 	return 0;
 }
@@ -321,6 +356,9 @@ static int mt312_send_master_cmd(struct 
 	if (ret  0)
 		return ret;
 
+	/* is this needed? */
+	msleep(100);
+
 	/* set DISEQC_MODE[2:0] to zero if a return message is expected */
 	if (c-msg[0]  0x02) {
 		ret = mt312_writereg(state, DISEQC_MODE, (diseqc_mode  0x40));
@@ -492,6 +530,9 @@ static int mt312_set_frontend(struct dvb
 	int ret;
 	u8 buf[5], config_val;
 	u16 sr;
+	u32 real_frequency;
+	s16 foffset = 0;
+	s8 fr_off;
 
 	const u8 fec_tab[10] =
 	{ 0x00, 0x01, 0x02, 0x04, 0x3f, 0x08, 0x10, 0x20, 0x3f, 0x3f };
@@ -549,6 +590,7 @@ static int mt312_set_frontend(struct dvb
 		break;
 
 	case ID_MT312:
+	case ID_ZL10313:
 		break;
 
 	default:
@@ -561,6 +603,20 @@ static int mt312_set_frontend(struct dvb
 			fe-ops.i2c_gate_ctrl(fe, 0);
 	}
 
+#if 0
+	// should a demod handle this - or a tune algo call demod functions?
+	if (state-id == ID_ZL10313  fe-ops.tuner_ops.get_frequency) {
+		fe-ops.tuner_ops.get_frequency(fe, real_frequency);
+		foffset = p-frequency - real_frequency;
+		fr_off = foffset / 32;
+		dprintk(%s: Foffset %d - %i\n, __FUNCTION__,
+			foffset, fr_off);
+		ret = mt312_writereg(state, FR_OFF, fr_off);
+		if (ret  0)
+			return ret;
+	}
+#endif
+
 	/* sr = (u16)(sr * 256.0 / 100.0) */
 	sr = mt312_div(p-u.qpsk.symbol_rate * 4, 15625);
 
@@ -614,11 +670,25 @@ static int mt312_i2c_gate_ctrl(struct dv
 {
 	struct mt312_state *state = fe-demodulator_priv;
 
-	if (enable) {
-		return mt312_writereg(state, GPP_CTRL, 0x40);
-	} else {
-		return mt312_writereg(state, GPP_CTRL, 0x00);
-	}
+	u8 val = 0x00;
+	int ret;
+
+	ret = mt312_readreg(state, GPP_CTRL, val);
+	if (ret  0)
+		goto error;
+
+	/* just preserver this bit for now */
+//	val = 0x80;
+
+	if (enable)
+		val |= 0x40;
+	else
+		val = ~0x40;
+
+	ret = mt312_writereg(state, GPP_CTRL, val);
+
+error:
+	return ret;
 }
 
 static int mt312_sleep

[linux-dvb] Avermedia Avertv A700 DVB-S Pro support

2008-01-14 Thread Matthias Schwarzott
Hi there!

This patch should make the A700 finally run. (At least I get a lock at most 
tries :) )

After adding zl10036 and zl10313 support one needs also these patches to use 
a700 card for dvb:

01_avertv_A700_analog: already sent patch to support analog inputs
02_mt312-invertable-voltage: adds setting inverted_voltage for different 
wiring of voltage pin.
03_avertv_A700_dvb: adds support for dvb part of A700.
This tries to reset the demod via gpio - hope it works.

Regards
Matthias

-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -420,10 +420,11 @@ static int mt312_set_voltage(struct dvb_
 	struct mt312_state *state = fe-demodulator_priv;
 	const u8 volt_tab[3] = { 0x00, 0x40, 0x00 };
 
+	u8 flip_bits = state-config-voltage_inverted ? 0x40 : 0x00;
 	if (v  SEC_VOLTAGE_OFF)
 		return -EINVAL;
 
-	return mt312_writereg(state, DISEQC_MODE, volt_tab[v]);
+	return mt312_writereg(state, DISEQC_MODE, volt_tab[v] ^ flip_bits);
 }
 
 static int mt312_read_status(struct dvb_frontend *fe, fe_status_t *s)
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.h
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.h
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.h
@@ -31,6 +31,9 @@
 struct mt312_config {
 	/* the demodulator's i2c address */
 	u8 demod_address;
+
+	/* inverted voltage setting */
+	int voltage_inverted:1;
 };
 
 #if defined(CONFIG_DVB_MT312) || (defined(CONFIG_DVB_MT312_MODULE)  defined(MODULE))
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -3951,6 +3951,25 @@ struct saa7134_board saa7134_boards[] = 
 		},
 		.mpeg  = SAA7134_MPEG_EMPRESS,
 	},
+	[SAA7134_BOARD_AVERMEDIA_A700] = {
+		/* Matthias Schwarzott [EMAIL PROTECTED] */
+		.name   = Avermedia A700,
+		.audio_clock= 0x00187de7,
+		.tuner_type = TUNER_ABSENT,
+		.radio_type = UNSET,
+		.tuner_addr = ADDR_UNSET,
+		.radio_addr = ADDR_UNSET,
+		/* no DVB support for now */
+		.inputs = {{
+			.name = name_comp,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 6,
+			.amux = LINE1,
+		}},
+	},
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -4183,6 +4202,12 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.driver_data  = SAA7134_BOARD_MD2819,
 	},{
 		.vendor   = PCI_VENDOR_ID_PHILIPS,
+		.device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor= 0x1461, /* Avermedia Technologies Inc */
+		.subdevice= 0xa7a1,
+		.driver_data  = SAA7134_BOARD_AVERMEDIA_A700,
+	},{
+		.vendor   = PCI_VENDOR_ID_PHILIPS,
 		.device   = PCI_DEVICE_ID_PHILIPS_SAA7130,
 		.subvendor= 0x1461, /* Avermedia Technologies Inc */
 		.subdevice= 0x2115,
@@ -5149,6 +5174,14 @@ int saa7134_board_init1(struct saa7134_d
 		saa_andorl(SAA7134_GPIO_GPMODE0  2,   0x8c040007, 0x8c040007);
 		saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x0c0007cd, 0x0c0007cd);
 		break;
+	case SAA7134_BOARD_AVERMEDIA_A700:
+		/* write windows gpio values */
+		saa_andorl(SAA7134_GPIO_GPMODE0  2,   0x80040100, 0x80040100);
+		saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x80040100, 0x00040100);
+		printk(%s: %s: hybrid analog/dvb card\n
+		   %s: Sorry, only the analog inputs are supported for now.\n,
+			dev-name,card(dev).name, dev-name);
+		break;
 	}
 	return 0;
 }
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134.h
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h
@@ -260,6 +260,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 128
 #define SAA7134_BOARD_BEHOLD_607_9FM	129
 #define SAA7134_BOARD_BEHOLD_M6		130
+#define SAA7134_BOARD_AVERMEDIA_A700	131
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
Index: v4l-dvb/linux/Documentation/video4linux/CARDLIST.saa7134
===
--- v4l-dvb.orig/linux/Documentation/video4linux/CARDLIST.saa7134
+++ v4l-dvb/linux/Documentation/video4linux/CARDLIST.saa7134
@@ -129,3 +129,4 @@
 128 - Beholder BeholdTV Columbus TVFM  [:5201]
 129 - Beholder BeholdTV 607 / BeholdTV 609 [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093]
 130 - Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193]
+131 - Avermedia A700   [1461:a7a1]
Index: v4l-dvb/linux/drivers/media/video/saa7134/Kconfig

Re: [linux-dvb] System fails to boot on adding second DVB-T PCI card

2008-01-10 Thread Matthias Schwarzott
On Donnerstag, 10. Januar 2008, John Drescher wrote:
  is there a way to somehow blacklist videobuf.ko w/o having to remove
  it? The reason is that packagewise this belongs to the kernel rpm
  which is managed by the upstream vendor (e.g. Red Hat, Fedora) and I
  wouldn't want to nuke it - it would return anyway with the next kernel
  update.

 On gentoo there is a file:

 /etc/modprobe.d/blacklist

 for this purpose I have no idea on any other linux version.

 John

Hi there!

This file does just add the blacklist line into modprobe config file. But I 
doubt it will work for videodev-module as the original hotplug/udev event is 
not about videodev but about saa7134 module.
So you maybe need to blacklist saa7134.

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] PATCH: New driver for Zarlink ZL10313 based Compro S350/S300

2007-12-30 Thread Matthias Schwarzott
On Sonntag, 30. Dezember 2007, Tino Reichardt wrote:
 * Jan D. Louw [EMAIL PROTECTED] wrote:
  On Sunday 30 December 2007 11:36:12 Tino Reichardt wrote:
   * Jan D. Louw [EMAIL PROTECTED] wrote:
Hi List,
   
Attached is a new driver for the Zarlink ZL10313/ZL10039 based Compro
S350/S300 budget DVB-S cards. Everything except 2 way diseqc should
work.
  
   I will test it on my Avermedia DVB-S Pro, which is ZL10313/ZL10036
   based.
  
   Is it a good idea to rename the the driver to zl1031x.c / zl1003x.c ?
  
   zl1031x.c: zl100312/zl100313/intel6313
   zl1003x.c: zl10036/zl10037/zl10038/zl10039 tuner
  
   Thanks for the driver, I will try it out ;)
 
  Many have suggested the possibility of combining the vp310,mt312,zl313
  and intel 6313 demodulators into a single driver. Now that the 313 is
  working this will be easier.
 
  Unfortunately the zl10036 tuner register map differs from the zl10039
  tuner, so this driver will definitely not work for you. However, writing
  s zl10036 driver would be trivial, as a full datasheet is available.

 I did somewriting in january 2007, but I ahdn't the knowledge of dvb-s
 and its internals. Know, since you have done the zl10039, I will give it
 a second try ;)

Hi!

I already did some work on the Avermedia dvb-s pro based on your patches. But 
it did not work correctly until now.
I listed all data here: 
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

The analog patch works and I hope it can get included into the v4l-dvb repo.

For the other parts:
I suggest to either do one zl1003x driver for zl10036, zl10037, zl10038, 
zl10039, ce5037 and ce5039.

Or do two drivers:
a: for zl10036 and zl10038 (without special register addresses)
b: for zl10037, zl10039, ce5037 and ce5039 (with normal register addresses)

I also suggest to do one driver for vp310, mt312 and zl10313.

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] AverMedia DVB-S Pro

2007-12-29 Thread Matthias Schwarzott
On Freitag, 28. Dezember 2007, Eduard Huguet wrote:
 Hi,
Hi Eduard!

 I've just bought this device, and I'd like to know if there is any
 possibility that is soon supported under Linux. Currently it seems it's
 not, but I really don't know how's the state on it actually.


Until now it is not yet supported. But I hope to make it work somewhere in the 
future.

Page in wiki:
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

There is a small patch to make analog in work.
But DVB support still needs some more changes to support the zl10313. I hope 
to find the relevant places to change mt312 driver.

And maybe someone needs to contact Avermedia to get more info about the wiring 
of the card (needed for IR support).

Regards
Matthias


-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] [PATCH] mt312: coding style improvements

2007-12-21 Thread Matthias Schwarzott
On Freitag, 21. Dezember 2007, Mauro Carvalho Chehab wrote:
 On Thu, 20 Dec 2007, Andreas Oberritter wrote:
  Matthias Schwarzott wrote:
  Changing mt312 driver today.
 
  The first patch improves codingstyle - I did fix almost all things
  checkpatch lists.
  I did not change if ((ret = func(a))  0) {
 
  The second patch does remove extra KERN_DEBUG from dprintk calls, as
  dprintk already adds KERN_DEBUG:
  #define dprintk(args...) \
  do { \
  if (debug) printk(KERN_DEBUG mt312:  args); \
  } while (0)
 
  Thank you, Matthias!
 
  Mauro, can you please apply both patches to your tree?

 Sure.

 Mathias/Andreas,

 Could you send the patches to me? I couldn't find them on my mailboxes.

So here are they!

mt312_codingstyle: fix almost all issues listed by checkpatch
mt312_remove_extra_KERN_DEBUG: removes extra KERN_DEBUG from dprintk calls


checkpatch also lists this:
ERROR: do not use assignment in if condition
if ((ret = mt312_readreg(state, VIT_MODE, vit_mode))  0)
return ret;

As this pattern is used in many lines of many drivers I wonder if this also 
should be changed or not?

Matthias
-- 
Matthias Schwarzott (zzam)
Fixes issues listed by checkpatch

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -37,9 +37,9 @@
 
 
 struct mt312_state {
-	struct i2c_adapter* i2c;
+	struct i2c_adapter *i2c;
 	/* configuration settings */
-	const struct mt312_config* config;
+	const struct mt312_config *config;
 	struct dvb_frontend frontend;
 
 	u8 id;
@@ -49,14 +49,15 @@ struct mt312_state {
 static int debug;
 #define dprintk(args...) \
 	do { \
-		if (debug) printk(KERN_DEBUG mt312:  args); \
+		if (debug) \
+			printk(KERN_DEBUG mt312:  args); \
 	} while (0)
 
 #define MT312_SYS_CLK		9000UL	/* 90 MHz */
 #define MT312_LPOWER_SYS_CLK	6000UL	/* 60 MHz */
 #define MT312_PLL_CLK		1000UL	/* 10 MHz */
 
-static int mt312_read(struct mt312_state* state, const enum mt312_reg_addr reg,
+static int mt312_read(struct mt312_state *state, const enum mt312_reg_addr reg,
 		  void *buf, const size_t count)
 {
 	int ret;
@@ -79,7 +80,7 @@ static int mt312_read(struct mt312_state
 		return -EREMOTEIO;
 	}
 
-	if(debug) {
+	if (debug) {
 		int i;
 		dprintk(R(%d):, reg  0x7f);
 		for (i = 0; i  count; i++)
@@ -90,14 +91,14 @@ static int mt312_read(struct mt312_state
 	return 0;
 }
 
-static int mt312_write(struct mt312_state* state, const enum mt312_reg_addr reg,
+static int mt312_write(struct mt312_state *state, const enum mt312_reg_addr reg,
 		   const void *src, const size_t count)
 {
 	int ret;
 	u8 buf[count + 1];
 	struct i2c_msg msg;
 
-	if(debug) {
+	if (debug) {
 		int i;
 		dprintk(W(%d):, reg  0x7f);
 		for (i = 0; i  count; i++)
@@ -123,13 +124,13 @@ static int mt312_write(struct mt312_stat
 	return 0;
 }
 
-static inline int mt312_readreg(struct mt312_state* state,
+static inline int mt312_readreg(struct mt312_state *state,
 const enum mt312_reg_addr reg, u8 *val)
 {
 	return mt312_read(state, reg, val, 1);
 }
 
-static inline int mt312_writereg(struct mt312_state* state,
+static inline int mt312_writereg(struct mt312_state *state,
  const enum mt312_reg_addr reg, const u8 val)
 {
 	return mt312_write(state, reg, val, 1);
@@ -140,12 +141,12 @@ static inline u32 mt312_div(u32 a, u32 b
 	return (a + (b / 2)) / b;
 }
 
-static int mt312_reset(struct mt312_state* state, const u8 full)
+static int mt312_reset(struct mt312_state *state, const u8 full)
 {
 	return mt312_writereg(state, RESET, full ? 0x80 : 0x40);
 }
 
-static int mt312_get_inversion(struct mt312_state* state,
+static int mt312_get_inversion(struct mt312_state *state,
 			   fe_spectral_inversion_t *i)
 {
 	int ret;
@@ -160,7 +161,7 @@ static int mt312_get_inversion(struct mt
 	return 0;
 }
 
-static int mt312_get_symbol_rate(struct mt312_state* state, u32 *sr)
+static int mt312_get_symbol_rate(struct mt312_state *state, u32 *sr)
 {
 	int ret;
 	u8 sym_rate_h;
@@ -172,7 +173,8 @@ static int mt312_get_symbol_rate(struct 
 	if ((ret = mt312_readreg(state, SYM_RATE_H, sym_rate_h))  0)
 		return ret;
 
-	if (sym_rate_h  0x80) {	/* symbol rate search was used */
+	if (sym_rate_h  0x80) {
+		/* symbol rate search was used */
 		if ((ret = mt312_writereg(state, MON_CTRL, 0x03))  0)
 			return ret;
 
@@ -192,7 +194,8 @@ static int mt312_get_symbol_rate(struct 
 
 		dec_ratio = ((buf[0]  5)  0x07) * 32;
 
-		if ((ret = mt312_read(state, SYM_RAT_OP_H, buf, sizeof(buf)))  0)
+		if ((ret = mt312_read(state, SYM_RAT_OP_H, buf,
+ sizeof(buf)))  0)
 			return ret;
 
 		sym_rat_op = (buf[0]  8) | buf[1];
@@ -207,7 +210,7 @@ static int mt312_get_symbol_rate(struct 
 	return 0;
 }
 
-static int mt312_get_code_rate(struct mt312_state* state

Re: [linux-dvb] [PATCH] mt312: coding style improvements

2007-12-21 Thread Matthias Schwarzott
On Freitag, 21. Dezember 2007, Mauro Carvalho Chehab wrote:

 Less relevant CodingStyle problems are marked as WARNING. As this is an
 ERROR, seems good to fix.

 In the above case, the code is still not so bad, but there are some
 constructions that look worse, like:

 if ((ret=foo())) {
   bar;
 }

Yeah - really looks worse.

 (I found this kind of construction on some code I've touched recently on
 V4L)

 While this would be good to fix, I don't see any need for rushing it.

As you tell fixing is good. Then I can post the patch now, as I am doing more 
changes on mt312.c it will help to get easy things done and commited first.

Matthias

-- 
Matthias Schwarzott (zzam)
Fixes all occurences of assignment in if.
checkpatch marks them as ERROR.

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -152,7 +152,8 @@ static int mt312_get_inversion(struct mt
 	int ret;
 	u8 vit_mode;
 
-	if ((ret = mt312_readreg(state, VIT_MODE, vit_mode))  0)
+	ret = mt312_readreg(state, VIT_MODE, vit_mode);
+	if (ret  0)
 		return ret;
 
 	if (vit_mode  0x80)	/* auto inversion was used */
@@ -170,15 +171,18 @@ static int mt312_get_symbol_rate(struct 
 	u16 monitor;
 	u8 buf[2];
 
-	if ((ret = mt312_readreg(state, SYM_RATE_H, sym_rate_h))  0)
+	ret = mt312_readreg(state, SYM_RATE_H, sym_rate_h);
+	if (ret  0)
 		return ret;
 
 	if (sym_rate_h  0x80) {
 		/* symbol rate search was used */
-		if ((ret = mt312_writereg(state, MON_CTRL, 0x03))  0)
+		ret = mt312_writereg(state, MON_CTRL, 0x03);
+		if (ret  0)
 			return ret;
 
-		if ((ret = mt312_read(state, MONITOR_H, buf, sizeof(buf)))  0)
+		ret = mt312_read(state, MONITOR_H, buf, sizeof(buf));
+		if (ret  0)
 			return ret;
 
 		monitor = (buf[0]  8) | buf[1];
@@ -186,16 +190,18 @@ static int mt312_get_symbol_rate(struct 
 		dprintk(sr(auto) = %u\n,
 		   mt312_div(monitor * 15625, 4));
 	} else {
-		if ((ret = mt312_writereg(state, MON_CTRL, 0x05))  0)
+		ret = mt312_writereg(state, MON_CTRL, 0x05);
+		if (ret  0)
 			return ret;
 
-		if ((ret = mt312_read(state, MONITOR_H, buf, sizeof(buf)))  0)
+		ret = mt312_read(state, MONITOR_H, buf, sizeof(buf));
+		if (ret  0)
 			return ret;
 
 		dec_ratio = ((buf[0]  5)  0x07) * 32;
 
-		if ((ret = mt312_read(state, SYM_RAT_OP_H, buf,
- sizeof(buf)))  0)
+		ret = mt312_read(state, SYM_RAT_OP_H, buf, sizeof(buf));
+		if (ret  0)
 			return ret;
 
 		sym_rat_op = (buf[0]  8) | buf[1];
@@ -219,7 +225,8 @@ static int mt312_get_code_rate(struct mt
 	int ret;
 	u8 fec_status;
 
-	if ((ret = mt312_readreg(state, FEC_STATUS, fec_status))  0)
+	ret = mt312_readreg(state, FEC_STATUS, fec_status);
+	if (ret  0)
 		return ret;
 
 	*cr = fec_tab[(fec_status  4)  0x07];
@@ -234,15 +241,17 @@ static int mt312_initfe(struct dvb_front
 	u8 buf[2];
 
 	/* wake up */
-	if ((ret = mt312_writereg(state, CONFIG,
-			(state-frequency == 60 ? 0x88 : 0x8c)))  0)
+	ret = mt312_writereg(state, CONFIG,
+			(state-frequency == 60 ? 0x88 : 0x8c));
+	if (ret  0)
 		return ret;
 
 	/* wait at least 150 usec */
 	udelay(150);
 
 	/* full reset */
-	if ((ret = mt312_reset(state, 1))  0)
+	ret = mt312_reset(state, 1);
+	if (ret  0)
 		return ret;
 
 /* Per datasheet, write correct values. 09/28/03 ACCJr.
@@ -251,8 +260,8 @@ static int mt312_initfe(struct dvb_front
 		u8 buf_def[8] = { 0x14, 0x12, 0x03, 0x02,
   0x01, 0x00, 0x00, 0x00 };
 
-		if ((ret = mt312_write(state, VIT_SETUP, buf_def,
-   sizeof(buf_def)))  0)
+		ret = mt312_write(state, VIT_SETUP, buf_def, sizeof(buf_def));
+		if (ret  0)
 			return ret;
 	}
 
@@ -263,23 +272,28 @@ static int mt312_initfe(struct dvb_front
 	/* DISEQC_RATIO */
 	buf[1] = mt312_div(MT312_PLL_CLK, 15000 * 4);
 
-	if ((ret = mt312_write(state, SYS_CLK, buf, sizeof(buf)))  0)
+	ret = mt312_write(state, SYS_CLK, buf, sizeof(buf));
+	if (ret  0)
 		return ret;
 
-	if ((ret = mt312_writereg(state, SNR_THS_HIGH, 0x32))  0)
+	ret = mt312_writereg(state, SNR_THS_HIGH, 0x32);
+	if (ret  0)
 		return ret;
 
-	if ((ret = mt312_writereg(state, OP_CTRL, 0x53))  0)
+	ret = mt312_writereg(state, OP_CTRL, 0x53);
+	if (ret  0)
 		return ret;
 
 	/* TS_SW_LIM */
 	buf[0] = 0x8c;
 	buf[1] = 0x98;
 
-	if ((ret = mt312_write(state, TS_SW_LIM_L, buf, sizeof(buf)))  0)
+	ret = mt312_write(state, TS_SW_LIM_L, buf, sizeof(buf));
+	if (ret  0)
 		return ret;
 
-	if ((ret = mt312_writereg(state, CS_SW_LIM, 0x69))  0)
+	ret = mt312_writereg(state, CS_SW_LIM, 0x69);
+	if (ret  0)
 		return ret;
 
 	return 0;
@@ -295,24 +309,26 @@ static int mt312_send_master_cmd(struct 
 	if ((c-msg_len == 0) || (c-msg_len  sizeof(c-msg)))
 		return -EINVAL;
 
-	if ((ret = mt312_readreg(state, DISEQC_MODE, diseqc_mode))  0)
+	ret = mt312_readreg(state, DISEQC_MODE, diseqc_mode);
+	if (ret  0)
 		return ret

[linux-dvb] [PATCH] mt312: fix diseqc ratio

2007-12-21 Thread Matthias Schwarzott
Hi Andreas, Hi list!

The attached patch fixes the diseqc ratio / the frequency of the emitted 
diseqc signal. Code sets this to 15kHz, but correct is 

It should not change the behaviour of any driver, as the only driver that 
attaches mt312 is flexcop-fe and this uses its own diseqc routines.

Matthias
-- 
Matthias Schwarzott (zzam)
Corrects the frequency of the
emitted diseqc signal to 22kHz.

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -270,7 +270,7 @@ static int mt312_initfe(struct dvb_front
 MT312_SYS_CLK) * 2, 100);
 
 	/* DISEQC_RATIO */
-	buf[1] = mt312_div(MT312_PLL_CLK, 15000 * 4);
+	buf[1] = mt312_div(MT312_PLL_CLK, 22000 * 4);
 
 	ret = mt312_write(state, SYS_CLK, buf, sizeof(buf));
 	if (ret  0)
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[linux-dvb] [PATCH] mt312: coding style improvements

2007-12-20 Thread Matthias Schwarzott
Hi Andreas, Hi List!

Changing mt312 driver today.

The first patch improves codingstyle - I did fix almost all things checkpatch 
lists.
I did not change if ((ret = func(a))  0) {

The second patch does remove extra KERN_DEBUG from dprintk calls, as dprintk 
already adds KERN_DEBUG:
#define dprintk(args...) \
do { \
if (debug) printk(KERN_DEBUG mt312:  args); \
} while (0)

Matthias

-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -37,9 +37,9 @@
 
 
 struct mt312_state {
-	struct i2c_adapter* i2c;
+	struct i2c_adapter *i2c;
 	/* configuration settings */
-	const struct mt312_config* config;
+	const struct mt312_config *config;
 	struct dvb_frontend frontend;
 
 	u8 id;
@@ -49,14 +49,15 @@ struct mt312_state {
 static int debug;
 #define dprintk(args...) \
 	do { \
-		if (debug) printk(KERN_DEBUG mt312:  args); \
+		if (debug) \
+			printk(KERN_DEBUG mt312:  args); \
 	} while (0)
 
 #define MT312_SYS_CLK		9000UL	/* 90 MHz */
 #define MT312_LPOWER_SYS_CLK	6000UL	/* 60 MHz */
 #define MT312_PLL_CLK		1000UL	/* 10 MHz */
 
-static int mt312_read(struct mt312_state* state, const enum mt312_reg_addr reg,
+static int mt312_read(struct mt312_state *state, const enum mt312_reg_addr reg,
 		  void *buf, const size_t count)
 {
 	int ret;
@@ -79,7 +80,7 @@ static int mt312_read(struct mt312_state
 		return -EREMOTEIO;
 	}
 
-	if(debug) {
+	if (debug) {
 		int i;
 		dprintk(R(%d):, reg  0x7f);
 		for (i = 0; i  count; i++)
@@ -90,14 +91,14 @@ static int mt312_read(struct mt312_state
 	return 0;
 }
 
-static int mt312_write(struct mt312_state* state, const enum mt312_reg_addr reg,
+static int mt312_write(struct mt312_state *state, const enum mt312_reg_addr reg,
 		   const void *src, const size_t count)
 {
 	int ret;
 	u8 buf[count + 1];
 	struct i2c_msg msg;
 
-	if(debug) {
+	if (debug) {
 		int i;
 		dprintk(W(%d):, reg  0x7f);
 		for (i = 0; i  count; i++)
@@ -123,13 +124,13 @@ static int mt312_write(struct mt312_stat
 	return 0;
 }
 
-static inline int mt312_readreg(struct mt312_state* state,
+static inline int mt312_readreg(struct mt312_state *state,
 const enum mt312_reg_addr reg, u8 *val)
 {
 	return mt312_read(state, reg, val, 1);
 }
 
-static inline int mt312_writereg(struct mt312_state* state,
+static inline int mt312_writereg(struct mt312_state *state,
  const enum mt312_reg_addr reg, const u8 val)
 {
 	return mt312_write(state, reg, val, 1);
@@ -140,12 +141,12 @@ static inline u32 mt312_div(u32 a, u32 b
 	return (a + (b / 2)) / b;
 }
 
-static int mt312_reset(struct mt312_state* state, const u8 full)
+static int mt312_reset(struct mt312_state *state, const u8 full)
 {
 	return mt312_writereg(state, RESET, full ? 0x80 : 0x40);
 }
 
-static int mt312_get_inversion(struct mt312_state* state,
+static int mt312_get_inversion(struct mt312_state *state,
 			   fe_spectral_inversion_t *i)
 {
 	int ret;
@@ -160,7 +161,7 @@ static int mt312_get_inversion(struct mt
 	return 0;
 }
 
-static int mt312_get_symbol_rate(struct mt312_state* state, u32 *sr)
+static int mt312_get_symbol_rate(struct mt312_state *state, u32 *sr)
 {
 	int ret;
 	u8 sym_rate_h;
@@ -192,7 +193,8 @@ static int mt312_get_symbol_rate(struct 
 
 		dec_ratio = ((buf[0]  5)  0x07) * 32;
 
-		if ((ret = mt312_read(state, SYM_RAT_OP_H, buf, sizeof(buf)))  0)
+		if ((ret = mt312_read(state, SYM_RAT_OP_H, buf,
+ sizeof(buf)))  0)
 			return ret;
 
 		sym_rat_op = (buf[0]  8) | buf[1];
@@ -207,7 +209,7 @@ static int mt312_get_symbol_rate(struct 
 	return 0;
 }
 
-static int mt312_get_code_rate(struct mt312_state* state, fe_code_rate_t *cr)
+static int mt312_get_code_rate(struct mt312_state *state, fe_code_rate_t *cr)
 {
 	const fe_code_rate_t fec_tab[8] =
 	{ FEC_1_2, FEC_2_3, FEC_3_4, FEC_5_6, FEC_6_7, FEC_7_8,
@@ -224,14 +226,15 @@ static int mt312_get_code_rate(struct mt
 	return 0;
 }
 
-static int mt312_initfe(struct dvb_frontend* fe)
+static int mt312_initfe(struct dvb_frontend *fe)
 {
 	struct mt312_state *state = fe-demodulator_priv;
 	int ret;
 	u8 buf[2];
 
 	/* wake up */
-	if ((ret = mt312_writereg(state, CONFIG, (state-frequency == 60 ? 0x88 : 0x8c)))  0)
+	if ((ret = mt312_writereg(state, CONFIG,
+			(state-frequency == 60 ? 0x88 : 0x8c)))  0)
 		return ret;
 
 	/* wait at least 150 usec */
@@ -241,17 +244,20 @@ static int mt312_initfe(struct dvb_front
 	if ((ret = mt312_reset(state, 1))  0)
 		return ret;
 
-// Per datasheet, write correct values. 09/28/03 ACCJr.
-// If we don't do this, we won't get FE_HAS_VITERBI in the VP310.
+/* Per datasheet, write correct values. 09/28/03 ACCJr.
+ * If we don't do this, we won't get FE_HAS_VITERBI in the VP310. */
 	{
-		u8 buf_def[8]={0x14, 0x12, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00};
+		u8 buf_def[8] = { 0x14

Re: [linux-dvb] [PATCH] mt312: coding style improvements

2007-12-20 Thread Matthias Schwarzott
On Donnerstag, 20. Dezember 2007, Andreas Oberritter wrote:
 Matthias Schwarzott wrote:
  Changing mt312 driver today.
 
  The first patch improves codingstyle - I did fix almost all things
  checkpatch lists.


  I did not change if ((ret = func(a))  0) {
 

Btw. what do you think about this coding pattern?

Should that also be changed to (as checkpatch suggests):
ret = func(a);
if (ret  0) {

As the first form seems to be used in very many lines and different drivers.

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] DVB-S card for 3.8 GHz frequency range?

2007-12-07 Thread Matthias Schwarzott
On Freitag, 7. Dezember 2007, Bernhard Rosenkraenzer wrote:
  Hi,

  I'm trying to record the Ethiopian Schoolnet DVB-S channels -
 unfortunately they seem to be broadcast at really weird frequencies
 (3.887 GHz, Symbol rate 2650) that none of the DVB-S cards I tried
 can handle (the cards I tried seem to be limited to the 10 GHz-12 GHz
 range).

  Is there any card (PCI preferred, but USB would be ok) that can
 receive DVB-S broadcasts at 3.887 GHz, or is there anything that could
 be used to shift the signal to a reasonable frequency?

Well normally the LNB shifts the frequency to a reasonable range that can be 
carried on coax cables. It just seems that your LNB is no normal Ku band one.
So you must have have one with another local-oszilator frequency (C-Band?).
Wikipedia tells me: A typical C-band satellite uses 3.7–4.2 GHz for 
downlink.
Local oscillator: 5.15 GHz

It should be enough to configure the software using the correct LO frequency. 
Then you should be able to receive the channel.

Matthias
-- 
Matthias Schwarzott (zzam)

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

Re: [linux-dvb] [PATCH] Support for Avermedia DVB-S Pro (A700) - Analog inputs only

2007-12-04 Thread Matthias Schwarzott
On Freitag, 30. November 2007, Matthias Schwarzott wrote:
 Hi list!

 The attached patch adds support for the analog inputs (composite and
 svideo) of the Avermedia AverTV DVB-S Pro (A700) card. It is based on
 saa7135HL chip. DVB support is nothing I could provide for now :(
 So I decided it would be better to get analog only to work and tested :)

 Wiki-page I created for this card is here:
 http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

Adding signed off by:
Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] DVB_CARDS: KWORLD DVB-S100 setup on Gentoo Linux

2007-12-04 Thread Matthias Schwarzott
On Montag, 3. Dezember 2007, Flavio wrote:
 Hi there!

 Have anybody here got installed her/his KWORLD DVB-S100 card?
 I trying to get it working on Gentoo Linux but, unfortunately I don't
 know how to set the DVB_CARDS environment variable on my make.conf
 file.

 Here's what I'm talking about:
 http://www.linuxtv.org/vdrwiki/index.php/Gentoo_DVB_driver#Installing_firmw
are_files


So you see DVB_CARDS is only used for installing firmware files.

Did you manage to install driver first?
Either taking kernel-ones, or install v4l-dvb-hg package.

Matthias

-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] [PATCH] Support for Avermedia DVB-S Pro (A700) - Analog inputs only

2007-11-30 Thread Matthias Schwarzott
Hi list!

The attached patch adds support for the analog inputs (composite and svideo) 
of the Avermedia AverTV DVB-S Pro (A700) card. It is based on saa7135HL chip.
DVB support is nothing I could provide for now :(
So I decided it would be better to get analog only to work and tested :)

Wiki-page I created for this card is here:
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)


Testing:
* Composite did work.
* As I have no svideo devices I connected my composite device to one of the 
pins of svideo connector and got a bw-image. So I guess it should work.

* Audio capturing using saa7134-alsa did work - but it showed me three mute 
and three volume control-meters in mixer. And only the mute switch did work 
to select the correct input. Is that something I could improve in my patch?

So what remains to do:
* IR receiver
* DVB

Matthias

-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -3592,6 +3592,25 @@ struct saa7134_board saa7134_boards[] = 
 			.tv = 1,
 		}},
 	},
+	[SAA7134_BOARD_AVERMEDIA_A700] = {
+		/* Matthias Schwarzott [EMAIL PROTECTED] */
+		.name   = Avermedia A700,
+		.audio_clock= 0x00187de7,
+		.tuner_type = TUNER_ABSENT,
+		.radio_type = UNSET,
+		.tuner_addr = ADDR_UNSET,
+		.radio_addr = ADDR_UNSET,
+		/* no DVB support for now */
+		.inputs = {{
+			.name = name_comp,
+			.vmux = 1,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 6,
+			.amux = LINE1,
+		}},
+	},
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3824,6 +3843,12 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.driver_data  = SAA7134_BOARD_MD2819,
 	},{
 		.vendor   = PCI_VENDOR_ID_PHILIPS,
+		.device   = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor= 0x1461, /* Avermedia Technologies Inc */
+		.subdevice= 0xa7a1,
+		.driver_data  = SAA7134_BOARD_AVERMEDIA_A700,
+	},{
+		.vendor   = PCI_VENDOR_ID_PHILIPS,
 		.device   = PCI_DEVICE_ID_PHILIPS_SAA7130,
 		.subvendor= 0x1461, /* Avermedia Technologies Inc */
 		.subdevice= 0x2115,
@@ -4614,6 +4639,14 @@ int saa7134_board_init1(struct saa7134_d
 		saa_andorl(SAA7134_GPIO_GPMODE0  2,   0x8c040007, 0x8c040007);
 		saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x0c0007cd, 0x0c0007cd);
 		break;
+	case SAA7134_BOARD_AVERMEDIA_A700:
+		/* write windows gpio values */
+		saa_andorl(SAA7134_GPIO_GPMODE0  2,   0x80040100, 0x80040100);
+		saa_andorl(SAA7134_GPIO_GPSTATUS0  2, 0x80040100, 0x00040100);
+		printk(%s: %s: hybrid analog/dvb card\n
+		   %s: Sorry, only the analog inputs are supported for now.\n,
+			dev-name,card(dev).name,dev-name);
+		break;
 	}
 	return 0;
 }
Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134.h
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134.h
@@ -247,6 +247,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_SABRENT_TV_PCB05 115
 #define SAA7134_BOARD_10MOONSTVMASTER3 116
 #define SAA7134_BOARD_AVERMEDIA_SUPER_007  117
+#define SAA7134_BOARD_AVERMEDIA_A700   118
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
Index: v4l-dvb/linux/Documentation/video4linux/CARDLIST.saa7134
===
--- v4l-dvb.orig/linux/Documentation/video4linux/CARDLIST.saa7134
+++ v4l-dvb/linux/Documentation/video4linux/CARDLIST.saa7134
@@ -116,3 +116,4 @@
 115 - Sabrent PCMCIA TV-PCB05  [0919:2003]
 116 - 10MOONS TM300 TV Card[1131:2304]
 117 - Avermedia Super 007  [1461:f01d]
+118 - Avermedia A700   [1461:a7a1]
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] Tuning Regression on Hauppauge Nova-T Stick for just one channel (driver dvb_usb_dib0700)

2007-11-21 Thread Matthias Schwarzott
On Mittwoch, 22. August 2007, Matthias Schwarzott wrote:
 Hi there!

 My Hauppauge Nova-T Stick works for all but one frequency now. And this did
 also work some time ago.

 Failing channel:
 Das Erste;BR:18450:B7Y0:T:0:513:514=deu:516:0:32:8468:12289:0

 Some working channels:

 ZDF;ZDFmobil:57800:C23D12M16B8T8G4Y0:T:0:545:546=deu,547=2ch:551:0:514:
8468:514:0 RTL Television,RTL;RTL
 World:83400:M32B8Y0:T:0:337:338=deu:343:0:16405:8468:13314:0
 SAT.1;ProSiebenSat.1:62600:M32B8Y0:T:0:385:386=deu:391:0:16408:8468:130
57:0
 ProSieben;ProSiebenSat.1:62600:M32B8Y0:T:0:305:306=deu:311:0:16403:8468
:13057:0 RTL2;RTL
 World:83400:M32B8Y0:T:0:353:354=deu:359:0:16406:8468:13314:0 kabel
 eins;ProSiebenSat.1:62600:M32B8Y0:T:0:161:162=deu:167:0:16394:8468:1305
7:0

 All other channels have frequencies above: 578 MHz and have a bandwidth of
 8Mhz, the failing is at 184MHz + bw of 7MHz.

 I can add some logs if needed (and I am telled which).

 Here some log of mt2060 module:
 MT2060: IF1: 1220MHz
 MT2060: PLL freq=184500kHz  f_lo1=1404500kHz  f_lo2=1183850kHz
 MT2060: PLL div1=87  num1=50  div2=73  num2=8115
 MT2060: PLL [1..5]: 9c 57 23 fb 93

 MT2060: IF1: 1220MHz
 MT2060: PLL freq=578000kHz  f_lo1=1798000kHz  f_lo2=1183850kHz
 MT2060: PLL div1=112  num1=24  div2=73  num2=8115
 MT2060: PLL [1..5]: 46 70  3 fb 93

I updated to todays v4l-dvb and it still does not work :(

dmesg log of module loading:
dib0700: loaded with support for 5 different device-types
dvb-usb: found a 'Hauppauge Nova-T Stick' in cold state, will try to load a 
firmware
Device driver 5-6 lacks bus and class support for being resumed.
dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.10.fw'
dib0700: firmware started successfully.
dvb-usb: found a 'Hauppauge Nova-T Stick' in warm state.
Device driver i2c-3 lacks bus and class support for being resumed.
dvb-usb: will pass the complete MPEG2 transport stream to the software 
demuxer.
DVB: registering new adapter (Hauppauge Nova-T Stick)
Device driver i2c-4 lacks bus and class support for being resumed.
DVB: registering frontend 0 (DiBcom 7000MA/MB/PA/PB/MC)...
MT2060: successfully identified (IF1 = 1220)
input: IR-receiver inside an USB DVB receiver as /class/input/input15
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: Hauppauge Nova-T Stick successfully initialized and connected.
usbcore: registered new interface driver dvb_usb_dib0700
USB driver dvb_usb_dib0700 lacks resume support.


So what can I do to get more light into this?

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] RE : Tuning Regression on Hauppauge Nova-T Stick forjust one channel (driver dvb_usb_dib0700)

2007-11-21 Thread Matthias Schwarzott
On Mittwoch, 21. November 2007, Thierry Lelegard wrote:
 Your failing channel is VHF channel 6 while your working channels are UHF.
 Is the Hauppauge Nova-T Stick supposed to work with VHF?
 Maybe an antenna or other reception-related problem with VHF?
 -Thierry


Yeah - I know the failing channel is VHF and it is the only one with a 
bandwitdh of 7MHz - all other channels are UHF with 8MHz bandwidth.

It is a minimal selfmade cable antenna. And tuning worked on this channel some 
months ago.

Matthias

-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] [PATCH] saa7134 needs tveeprom

2007-11-21 Thread Matthias Schwarzott
Hi list!

The module saa7134 uses tveeprom, but Kconfig does not enable it.

The attached patch inserts VIDEO_TVEEPROM to config VIDEO_SAA7134.

Matthias
-- 
Matthias Schwarzott (zzam)
Index: v4l-dvb/linux/drivers/media/video/saa7134/Kconfig
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/Kconfig
+++ v4l-dvb/linux/drivers/media/video/saa7134/Kconfig
@@ -4,6 +4,7 @@ config VIDEO_SAA7134
 	select VIDEOBUF_DMA_SG
 	select VIDEO_IR
 	select VIDEO_TUNER
+	select VIDEO_TVEEPROM
 	select CRC32
 	---help---
 	  This is a video4linux driver for Philips SAA713x based
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] VideoMate S350, need community advice

2007-11-06 Thread Matthias Schwarzott
On Dienstag, 6. November 2007, Anton P. Linevich wrote:
 Hello, ppl.
 just digging your maillist archive and found some topics about
 Compro Videomate S350 (DVB-T300)
 I'am curious if somebody can get video from DVB-S VideoMate S350 card
 nowadays...

 My test machine is i686, Linux 2.6.22-14, modules from (trunk)
 http://linuxtv.org/hg/v4l-dvb here is my dmesg after 'modprobe saa7134
 card=70':

  saa7130/34: v4l2 driver version 0.2.14 loaded
  saa7130[0]: found at :01:00.0, rev: 1, irq: 22, latency: 32, mmio:
 0xfb00 saa7130[0]: subsystem: 185b:c900, board: Compro Videomate
 DVB-T300 [card=70,insmod option] saa7130[0]: board init: gpio is 843f00
  input: saa7134 IR (Compro Videomate DV as /class/input/input4
  tuner' 2-0068: chip found @ 0xd0 (saa7130[0])
  saa7130[0]: i2c eeprom 00: 5b 18 00 c9 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
  saa7130[0]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff ff ff ff ff
  saa7130[0]: i2c eeprom 20: 01 40 01 02 02 01 03 01 08 ff 00 87 ff ff ff ff
  saa7130[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  saa7130[0]: i2c eeprom 40: ff d6 00 c0 86 1c 02 01 02 ff ff ff ff ff ff ff
  saa7130[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff cb
  saa7130[0]: i2c eeprom 60: 30 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  saa7130[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  tuner' 2-0068: tuner type not set
  tuner' 2-0068: tuner type not set
  saa7130[0]: registered device video1 [v4l2]
  saa7130[0]: registered device vbi1
  saa7134 ALSA driver for DMA sound loaded
  saa7130[0]/alsa: saa7130[0] at 0xfb00 irq 22 registered as card -2
  saa7130[0]/dvb: frontend initialization failed

 Well, last line saying that my card is hopeless under linux? Or I need dig
 more?!

Best you first provide good pictures (both sides of the card) and a list of 
contained ICs. (I suggest to add it to the linuxtv.org dvb-wiki).

Please alsa add lspci -vvnn output, and dmesg after using modprobe saa7134 
i2c_scan=1


If I am right this card is based on similar chips as the AverTV DVB-S Pro 
A700, that I try to add support for at the moment.
http://www.linuxtv.org/wiki/index.php/AVerMedia_AVerTV_DVB-S_Pro_(A700)

Matthias

-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] [Patch] Removing duplicated KERN_DEBUG from dprintk calls in mt312.c

2007-10-24 Thread Matthias Schwarzott
Hi list!

This patch removes duplicated KERN_DEBUG flags from dprintk calls in mt312.c

This is the definition of dprintk there:
#define dprintk(args...) \
do { \
if (debug) printk(KERN_DEBUG mt312:  args); \
} while (0)


most calls look like this:
dprintk(R(%d), reg  0x7f);

but some do:
dprintk(KERN_DEBUG sr(auto) = %u\n,
   mt312_div(monitor * 15625, 4));

The attached patch removes the duplicated KERN_DEBUG flag.

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)
This patch removes duplicated KERN_DEBUG flags from dprintk calls in mt312.c.

#define dprintk(args...) \
do { \
if (debug) printk(KERN_DEBUG mt312:  args); \
} while (0)

So no caller need to specify KERN_DEBUG.

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Index: v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
===
--- v4l-dvb.orig/linux/drivers/media/dvb/frontends/mt312.c
+++ v4l-dvb/linux/drivers/media/dvb/frontends/mt312.c
@@ -181,7 +181,7 @@ static int mt312_get_symbol_rate(struct 
 
 		monitor = (buf[0]  8) | buf[1];
 
-		dprintk(KERN_DEBUG sr(auto) = %u\n,
+		dprintk(sr(auto) = %u\n,
 		   mt312_div(monitor * 15625, 4));
 	} else {
 		if ((ret = mt312_writereg(state, MON_CTRL, 0x05))  0)
@@ -197,9 +197,9 @@ static int mt312_get_symbol_rate(struct 
 
 		sym_rat_op = (buf[0]  8) | buf[1];
 
-		dprintk(KERN_DEBUG sym_rat_op=%d dec_ratio=%d\n,
+		dprintk(sym_rat_op=%d dec_ratio=%d\n,
 		   sym_rat_op, dec_ratio);
-		dprintk(KERN_DEBUG *sr(manual) = %lu\n,
+		dprintk(*sr(manual) = %lu\n,
 		   (((MT312_PLL_CLK * 8192) / (sym_rat_op + 8192)) *
 			2) - dec_ratio);
 	}
@@ -376,7 +376,7 @@ static int mt312_read_status(struct dvb_
 	if ((ret = mt312_read(state, QPSK_STAT_H, status, sizeof(status)))  0)
 		return ret;
 
-	dprintk(KERN_DEBUG QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x, FEC_STATUS: 0x%02x\n, status[0], status[1], status[2]);
+	dprintk(QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x, FEC_STATUS: 0x%02x\n, status[0], status[1], status[2]);
 
 	if (status[0]  0xc0)
 		*s |= FE_HAS_SIGNAL;	/* signal noise ratio */
@@ -422,7 +422,7 @@ static int mt312_read_signal_strength(st
 
 	*signal_strength = agc;
 
-	dprintk(KERN_DEBUG agc=%08x err_db=%hd\n, agc, err_db);
+	dprintk(agc=%08x err_db=%hd\n, agc, err_db);
 
 	return 0;
 }
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[linux-dvb] [Patch] saa7134: fix NULL dereference at suspend time for cards without IR receiver

2007-10-18 Thread Matthias Schwarzott
Hi there!

I played around with some new (not supported) card based on saa7134
(Avermedia dvb-s pro A700).
This lead to suspend crashing when saa7134 module was loaded.

Reason is: saa7134_suspend unconditionally calls  saa7134_ir_stop:

void saa7134_ir_stop(struct saa7134_dev *dev)
{
if (dev-remote-polling)
del_timer_sync(dev-remote-timer);
}

So this must fail if dev-remote is NULL. cx88 driver seems to have the same 
layout, but this one already has the NULL-check implemented.

This patch now checks dev-remote before calling saa7134_ir_stop.

Matthias
-- 
Matthias Schwarzott (zzam)
saa7134: fix NULL dereference at suspend time for cards without IR receiver

Calling saa7134_ir_stop at suspend is no good idea
for saa7134 cards without remote control.

Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Index: v4l-dvb/linux/drivers/media/video/saa7134/saa7134-core.c
===
--- v4l-dvb.orig/linux/drivers/media/video/saa7134/saa7134-core.c
+++ v4l-dvb/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -1284,7 +1284,9 @@ static int saa7134_suspend(struct pci_de
 	del_timer(dev-video_q.timeout);
 	del_timer(dev-vbi_q.timeout);
 	del_timer(dev-ts_q.timeout);
-	saa7134_ir_stop(dev);
+
+	if (dev-remote)
+		saa7134_ir_stop(dev);
 
 	pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
 	pci_save_state(pci_dev);
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[linux-dvb] Tuning Regression on Hauppauge Nova-T Stick for just one channel

2007-08-22 Thread Matthias Schwarzott
Hi there!

My Hauppauge Nova-T Stick works for all but one frequency now. And this did 
also work some time ago.

Failing channel:
Das Erste;BR:18450:B7Y0:T:0:513:514=deu:516:0:32:8468:12289:0

Some working channels:

ZDF;ZDFmobil:57800:C23D12M16B8T8G4Y0:T:0:545:546=deu,547=2ch:551:0:514:8468:514:0
RTL Television,RTL;RTL 
World:83400:M32B8Y0:T:0:337:338=deu:343:0:16405:8468:13314:0
SAT.1;ProSiebenSat.1:62600:M32B8Y0:T:0:385:386=deu:391:0:16408:8468:13057:0
ProSieben;ProSiebenSat.1:62600:M32B8Y0:T:0:305:306=deu:311:0:16403:8468:13057:0
RTL2;RTL World:83400:M32B8Y0:T:0:353:354=deu:359:0:16406:8468:13314:0
kabel 
eins;ProSiebenSat.1:62600:M32B8Y0:T:0:161:162=deu:167:0:16394:8468:13057:0

All other channels have frequencies above: 578 MHz and have a bandwidth of 
8Mhz, the failing is at 184MHz + bw of 7MHz.

I can add some logs if needed (and I am telled which).

Here some log of mt2060 module:
MT2060: IF1: 1220MHz
MT2060: PLL freq=184500kHz  f_lo1=1404500kHz  f_lo2=1183850kHz
MT2060: PLL div1=87  num1=50  div2=73  num2=8115
MT2060: PLL [1..5]: 9c 57 23 fb 93

MT2060: IF1: 1220MHz
MT2060: PLL freq=578000kHz  f_lo1=1798000kHz  f_lo2=1183850kHz
MT2060: PLL div1=112  num1=24  div2=73  num2=8115
MT2060: PLL [1..5]: 46 70  3 fb 93

Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Microtune mt2131 driver wanted badly.

2007-07-17 Thread Matthias Schwarzott
On Dienstag, 17. Juli 2007, lwtbenben wrote:
  Dear Mike:
 Can the mt2131 driver in ~mkrufky repo work?


 在2007-07-13,Michael Krufky [EMAIL PROTECTED] 写道:
 lwtbenben wrote:  Hi,Michael Krufky Sorry for my misunderstanding, but I
 just do not know where to find the cx23885 dev tree.  Did you mean the
 standard linux kernel source tree or somewhere else?  As your kindness,
 would you please send the mt2131.c and mt2131.h to this mail.  Thank you
 so much.  Kevin Liu   在2007-07-13,Michael Krufky [EMAIL PROTECTED]
 写道:  lwtbenben wrote:  Hello, everyone.  I am now using a usb card with
 mt2131 as its tuner.  I googled these info on website: 
 b/linux/drivers/media/dvb/frontends/mt2131.c | 642 +++ 
 b/linux/drivers/media/dvb/frontends/mt2131.h | 70...   But I just can
 not find mt2131.c and mt2131.h on linuxtv.org   Could someone give me
 some advice?  By the way, could someone tell me the difference between the
 mt2131 and mt2060?  Thank you . mt2131 is completely different from the
 mt2060 There is a driver work-in-progress, that you can find in the cx23885
 dev tree. The driver works, but it is not yet ready for release. I have
 nothing else to report at this time. -- Michael Krufky  Kevin, The driver
 has not yet been released. If you want to take a look at the mercurial
 repositories, you will find mt2131.[ch] in
 linux/drivers/media/dvb/frontends/ , in this repo:
 http://linuxtv.org/hg/~mkrufky/cx23885 You should not use this driver yet,
 as it is not yet complete. I spoke to the author today, and we plan to
 clean up any remaining issues and work towards a release in the near
 future. I can not provide any more information at this time. Cheers, Mike

^^ This mail is just formatted ugly
Couldn't you just use a MUA that is able to send pretty formatted text mails.

Thanks
Matthias


-- 
Matthias Schwarzott (zzam)

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

Re: [linux-dvb] Repeated assignment of DVB frontend numbers with multiple DVB tuner cards

2007-07-15 Thread Matthias Schwarzott
On Sonntag, 15. Juli 2007, pat-lkml wrote:
 subscriptions wrote:
  I have a Gentoo box running 2.6.21-gentoo-r4 kernel with three DVB cards
  (four tuners) in it.
 


  Making the nxt6000 module not load automatically would be the easiest,
  but neither the blacklist method not renaming the file seems to work.
 
  Are there hidden options available when loading the modules??
 
It seems necessary to get some ways to load dvb modules in fixed order, or a 
least number the dvb adapters consistently.
1. add option like alsa: index=#
2. just load modules in correct order
3. Do some udev rules like it is done for network devices to make them 
persistent based on mac-addr.

  Note: At one stage I had all frontends loading correctly but had to
  reload Linux on the HTPC and now have this issue.
 
  dmesg and lsmod output posted below:

 snip

 Under the lasted udev on gentoo(and maybe other distros), modules listed
 in /etc/modules.autoload.d/kernel-n.m are automatically blacklisted so
 udev doesn't screw up load order.  Simply updating to this should fix
 it.  I'm not sure whether this is in stable yet, however.

Well, it is the ebuild udev-113-r2, and this code just got added 3 days ago. I 
doubt that other distos use that, as I wrote this on my own, and did not see 
similar stuff otherwhere up to now.
It will not be stable before at least one month.

Matthias


-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] Unfetchable firmware file tt_budget_217g.zip / tda10045tda10046

2007-06-27 Thread Matthias Schwarzott
Hi there!

Next bad news about unfetchable file for get_dvb_firmware.
The file http://www.technotrend.de/new/217g/tt_budget_217g.zip is disappeared 
like the tt_Premium_217g.zip file some days ago.

The file tt_budget_217g.zip is used for da10045 and tda10046.

@adq:
Is it possible (or have you already done that) to ask technotrend if they 
could provide just the needed (small) file, or allow redistribution?
As that should be cheeper with respect to used download-bandwidth to fetch 
just some 100kB than 10 or 20 MB for the zipfiles.

Matthias
-- 
Matthias Schwarzott (zzam)

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


[linux-dvb] Firmware download disappearing from Vendor Page

2007-06-13 Thread Matthias Schwarzott
Hi there!

Another time the fetching of some firmware with get_dvb_firmware fails. This 
time it is for 
# get_dvb_firmware sp8870

That tries to fetch http://www.technotrend.de/new/217g/tt_Premium_217g.zip, 
but this file is no longer available.

See also this bug: http://bugs.gentoo.org/show_bug.cgi?id=181908

Greetings
  Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Why is evbug loaded by dvb-ttpci

2007-04-12 Thread Matthias Schwarzott
On Donnerstag, 12. April 2007, Helmut Auer wrote:
 Hi List
 When I insmod the dvb-ttpci module the module evbug will also be loaded and
 is flooding my sysmessages with every keystroke. What going wrong there ?

I think you definitely should blacklist the evbug module, as it is just a 
debug tool.
It gets autoloaded as it has this alias:
# modinfo evbug
...
alias:  input:b*v*p*e*-e*k*r*a*m*l*s*f*w*

That means it gets loaded too, if any modprobe request comes for an 
input-device.
You can trace the udev events at that time by running udevmonitor [--env] 
while modprobing.

The problem is that every input-device has in sysfs an modalias attribute that 
triggers an modprobe call - I don't know why these entries are there - 
perhaps it can be considered as a bug.


Newest udev-ebuild (=106-r4) for gentoo does 
contain /etc/modprobe.d/blacklist with an entry to disable evbug autoloading.
 blacklist evbug

Matthias

-- 
Matthias Schwarzott (zzam)

___
linux-dvb mailing list
[EMAIL PROTECTED]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [Bulk] Re: [Bulk] [linux-dvb] ati hdtv wonder in gentoo amd64

2007-04-11 Thread Matthias Schwarzott
On Mittwoch, 11. April 2007, Markus Rechberger wrote:
 
  I just tried rebuilding v4l-dvb-hg, and it errored out with the same
  message as before.  I'm goign to try and revert to the gentoo sources
  again to see what happens.

 (didn't read everything here)

 but regarding I cannot emerge v4l-dvb-hg, I get build error

  /var/tmp/portage/media-tv/v4l-dvb-hg-0.1-r2/work/v4l-dvb/v4l/...

What is the exact problem with that directory name?
And of which repository do we speak?

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] Re: udev fails to create device nodes for WinTV Nova-T

2007-02-22 Thread Matthias Schwarzott
On Donnerstag, 22. Februar 2007, Emyr Thomas wrote:
 Thanks Darren


 Anyway, the card is being recognised now, but I now have another problem.
 udev creates incorrect device nodes for the dvb card. It creates
 /dev/dvb0.demux0 etc. instead of /dev/dvb0/demux0

 Any ideas how I can fix this?

Yes!
Update udev, or at least add something like this to your rules:
SUBSYSTEM==dvb, PROGRAM=/bin/sh -c 'K=%k; K=$${K#dvb}; printf 
dvb/adapter%%i/%%s $${K.*} $${K#*.}', NAME=%c, GROUP=video


Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] DiB0700 firmware update (all DiBx700-devices, Nova-T 500, Nova-T Stick and others)

2007-02-06 Thread Matthias Schwarzott
On Dienstag, 6. Februar 2007, Patrick Boettcher wrote:
 Hi all,

 Anyone who has problems with the mentioned devices: can you please try the
 attached test-firwmare together with the necessary patch for the latest
 v4l-dvb from HG?

 Please report if something is improved or not. There are several things
 inside: mainly solving small issues for Windows and adding new features.


Works for me with a Hauppauge Nova-T Stick
usb-ids: 2040:7050

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)

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


Re: [linux-dvb] [PATCH] Add PHYS-string and connecton to pci-device for nicer usage by udev

2007-01-17 Thread Matthias Schwarzott
Hi Oliver, hi Mailing list!

Sent second time, this time with signed-off-by, and to maintainer of changed 
code.

On Wednesday 10 January 2007 18:34, Matthias Schwarzott wrote:

 The attached patch a PHYS-string and a connection to the relevant
 pci-device to let udev now this and create more user-friendly/persistent
 links on the event-device. Code with some changes taken from budget-ci.c

 With that patch, udev-103 creates:
 /dev/input/by-path/pci-\:00\:0a.0--event-ir


 Nevertheless input-handling for av7110 needs some changes: one can for
 example only use input-connector of first card.

 Other possible (simpler) change: Change name of input device and attach
 name of dvb-device.


Signed-off-by: Matthias Schwarzott [EMAIL PROTECTED]

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)
Matthias Schwarzott [EMAIL PROTECTED]:

Add PHYS-string to help udev and
others using EVIOCPHYS ioctl to
identify the input device node.

Code taken (with little changes) from budget-ci.c

diff -r e37679b39df8 linux/drivers/media/dvb/ttpci/av7110_ir.c
--- a/linux/drivers/media/dvb/ttpci/av7110_ir.c	Tue Jan 09 12:20:59 2007 -0200
+++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c	Wed Jan 10 15:49:35 2007 +0100
@@ -16,6 +16,7 @@ static int av_cnt;
 static int av_cnt;
 static struct av7110 *av_list[4];
 static struct input_dev *input_dev;
+static char input_phys[32];
 
 static u8 delay_timer_finished;
 
@@ -231,8 +232,28 @@ int __devinit av7110_ir_init(struct av71
 		if (!input_dev)
 			return -ENOMEM;
 
+		snprintf(input_phys, sizeof(input_phys),
+			pci-%s/ir0, pci_name(av7110-dev-pci));
+
 		input_dev-name = DVB on-card IR receiver;
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,5,0)
+		input_dev-phys = input_phys;
+		input_dev-id.bustype = BUS_PCI;
+		input_dev-id.version = 1;
+		if (av7110-dev-pci-subsystem_vendor) {
+			input_dev-id.vendor = av7110-dev-pci-subsystem_vendor;
+			input_dev-id.product = av7110-dev-pci-subsystem_device;
+		} else {
+			input_dev-id.vendor = av7110-dev-pci-vendor;
+			input_dev-id.product = av7110-dev-pci-device;
+		}
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,15)
+		input_dev-cdev.dev = av7110-dev-pci-dev;
+#else
+		input_dev-dev = av7110-dev-pci-dev;
+#endif
+#endif
 		set_bit(EV_KEY, input_dev-evbit);
 		set_bit(EV_REP, input_dev-evbit);
 		input_register_keys();
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[linux-dvb] [PATCH] Add PHYS-string and connecton to pci-device for nicer usage by udev

2007-01-10 Thread Matthias Schwarzott
Hi there!

The attached patch a PHYS-string and a connection to the relevant pci-device 
to let udev now this and create more user-friendly/persistent links on the 
event-device. Code with some changes taken from budget-ci.c

With that patch, udev-103 creates:
/dev/input/by-path/pci-\:00\:0a.0--event-ir


Nevertheless input-handling for av7110 needs some changes: one can for example
only use input-connector of first card.

Other possible (simpler) change: Change name of input device and attach name 
of dvb-device.

Greetings
Matthias

-- 
Matthias Schwarzott (zzam)
Matthias Schwarzott [EMAIL PROTECTED]:

Add PHYS-string to help udev and
others using EVIOCPHYS ioctl to
identify the input device node.

Code taken (with little changes) from budget-ci.c

diff -r e37679b39df8 linux/drivers/media/dvb/ttpci/av7110_ir.c
--- a/linux/drivers/media/dvb/ttpci/av7110_ir.c	Tue Jan 09 12:20:59 2007 -0200
+++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c	Wed Jan 10 15:49:35 2007 +0100
@@ -16,6 +16,7 @@ static int av_cnt;
 static int av_cnt;
 static struct av7110 *av_list[4];
 static struct input_dev *input_dev;
+static char input_phys[32];
 
 static u8 delay_timer_finished;
 
@@ -231,8 +232,28 @@ int __devinit av7110_ir_init(struct av71
 		if (!input_dev)
 			return -ENOMEM;
 
+		snprintf(input_phys, sizeof(input_phys),
+			pci-%s/ir0, pci_name(av7110-dev-pci));
+
 		input_dev-name = DVB on-card IR receiver;
 
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,5,0)
+		input_dev-phys = input_phys;
+		input_dev-id.bustype = BUS_PCI;
+		input_dev-id.version = 1;
+		if (av7110-dev-pci-subsystem_vendor) {
+			input_dev-id.vendor = av7110-dev-pci-subsystem_vendor;
+			input_dev-id.product = av7110-dev-pci-subsystem_device;
+		} else {
+			input_dev-id.vendor = av7110-dev-pci-vendor;
+			input_dev-id.product = av7110-dev-pci-device;
+		}
+#if LINUX_VERSION_CODE = KERNEL_VERSION(2,6,15)
+		input_dev-cdev.dev = av7110-dev-pci-dev;
+#else
+		input_dev-dev = av7110-dev-pci-dev;
+#endif
+#endif
 		set_bit(EV_KEY, input_dev-evbit);
 		set_bit(EV_REP, input_dev-evbit);
 		input_register_keys();
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[linux-dvb] Bug: Usage counter of module dvb_usb_dtt200u (Device: WideView WT-220U PenType Receiver)

2006-11-10 Thread Matthias Schwarzott
Hi There!

I have these days a dvb-t stick of a friend to test it with Linux and vdr.
Now the first bug I discovered (using v4l-dvb-hg).

Operations:

Loading dvb-usb-dtt200u (Usage Count: 0)
Plugging the device in (usage Count: 0)
Unplugging it (Usage Count: 4294967294)
Plugging it in (Usage Count: 4294967294)
Second time unplugging (Usage Count: 4294967292)

Observation: Plugging it in does not change usage counter.
Unplugging decrements it by two.


Part of dmesg:
DVB: registering new adapter (WideView WT-220U PenType Receiver 
(Typhoon/Freecom)).
DVB: registering frontend 2 (WideView USB DVB-T)...
input: IR-receiver inside an USB DVB receiver as /class/input/input6
dvb-usb: schedule remote query interval to 300 msecs.
dvb-usb: WideView WT-220U PenType Receiver (Typhoon/Freecom) successfully 
initialized and connected.
dvb-usb: recv bulk message failed: -110
usb 5-6: USB disconnect, address 6
dvb-usb: WideView WT-220U PenType Receiver (Typhoon/Freecom) successfully 
deinitialized and disconnected.
dvb-usb: WideView WT-220U PenType Receiver (Typhoon/Freecom) successfully 
deinitialized and disconnected.



Notice the one line for connect and the two for disconnect.

More bugs will follow ;)

Matthias

-- 
Matthias Schwarzott
Gentoo Developer
http://www.gentoo.org

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