Re: [ivtv-devel] Fixed radio support

2005-10-07 Thread Christophe Massiot
On Thu, Sep 29, 2005, Hans Verkuil wrote:

  I'm surprised you do not have a PORT1 problem since we are supposed to
  have identical cards. Could Hauppauge ship slightly different cards with
  the same revision ID in different countries ? I have also had a look at
  the tda9887 datasheet, from what I understand PORT1 can be used for SAW
  switching or external AGC input. Maybe Hauppauge wired it to some
  component which fucks up everything. I haven't had the courage yet to
  remove the tuner cover and try to find what the chip is connected to.
 
 I'm still mystified by this chip to be honest.

Me too. I have retried the latest SVN, and my PORT1 fix is no longer
needed. Indeed the latest SVN works perfectly. I'm puzzled.

-- 
Christophe Massiot  Freebox S.A.

___
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


Re: [ivtv-devel] Fixed radio support

2005-09-29 Thread Hans Verkuil
On Thursday 29 September 2005 20:11, Christophe Massiot wrote:
 On Wed, Sep 28, 2005, Hans Verkuil wrote:
   The patch to
   ivtv-driver.c is needed because otherwise ivtv-radio -s doesn't return
   any station. It doesn't seem to disturb anything else.
  
   The patch to tuner.c is needed because otherwise I only get static from
   /dev/video24. Why did you put 0x88 in a recent commit ?
 
  According to the data sheet it should be 0x88. If you change it to 0x80
  there is no longer any sound? Are you sure? The same is true for the
  PORT2 setting. The datasheet says it's a 'don't care' setting, yet
  something seems to care!

 I have done more investigation today. I have a plugged a source into the
 external line-in of the PVR, and I have found that the sound quality is
 also very bad. This lead me to think the cx25840 was at fault. I removed
 the CX25840_SET_START_MICROCNTL(0x01) line which has been added
 recently, and most of the artefacts (clicking noises) disappeared : the
 sound from the line-in is now perfectly clean and much louder.

Interesting.

 The sound from the radio tuner is also cleaner but I still have a bit
 of background noise. However, I have tested the card under Windows and I
 got approximately the same noise. I have also tested a PVR-USB2 under
 Windows with the same result. So I'm beginning to suspect either the
 outdoor antenna, our distribution system or the tuners of the PVRs. I'll
 try tomorrow with a hi-fi tuner so I'll know for certain.

 But the good news is that Linux radio support is up to par with Windows.

 From that point I have tried to remove yesterday's patches. Programming

 0x88 into the tuner now works - either I was mistaken yesterday, or the
 MICROCNTL stuff fixed it - so the tuner patch isn't needed. However the
 PORT1 setting is a no-go : if it is enabled, ivtv-radio -s doesn't
 return anything, and tuning to a valid frequency only gives static.

 I'm surprised you do not have a PORT1 problem since we are supposed to
 have identical cards. Could Hauppauge ship slightly different cards with
 the same revision ID in different countries ? I have also had a look at
 the tda9887 datasheet, from what I understand PORT1 can be used for SAW
 switching or external AGC input. Maybe Hauppauge wired it to some
 component which fucks up everything. I haven't had the courage yet to
 remove the tuner cover and try to find what the chip is connected to.

I'm still mystified by this chip to be honest.

 I have also seen in another post that some people do not get sound on TV
 if PORT1 is not enabled. It is not my case, but maybe we should only
 enable PORT1 on TV and disable it on radio.

   Sound quality is still very bad, I can hear what kind of music it is
   but there is a lot of background noise, which is surprising because I
   have an outdoor FM antenna. Do you get perfect sound quality with your
   installation ?
 
  I have to extend my cable radio signal to my computer first. I'm
  currently using the provided aerial so I have a lousy signal. In a few
  weeks time I hope to buy some additional cabling in order to properly
  test the radio.

 In my experience the provided aerial gives good enough a signal. At
 least you may have additional noise background, but given the artefacts
 I had with the MICROCNTL stuff you can clearly hear the difference
 between the Linux and Windows drivers, if you have Windows on your
 machine.

I live in an apartment block and so I am surrounded by other apartments. I 
suspect there is quite a bit of EM pollution. 

 Do you need any sponsoring for your additional radio cabling ?

No, it's just that I have to figure out what I want (I want to lay down some 
other cables too) and when to find the time to do it.

   As requested I have loaded tuner and tda9887 with debug and secam=L,
   using the latest 0.3.9 trunk.
 
  Can you try another test: this time with option ivtv_std=3 for the ivtv
  module. This sets the standard to SECAM. The tda9887 option 'secam=L'
  should not be used for this test.

 Here you are :

Thanks.

  Are you able to do a test under Windows with this card? I'd like to see
  what Hauppauge does. Especially since I have the same tuner, but using
  PAL. It makes for a good comparison.

 I have a system running Windows. It's been very hard to get it running,
 but today we finally managed to get the 150MCE to be recognized as a 150
 with radio. What are you precisely interested in ?

I'll mail you some instructions.

 Attached is my current patch against the svn. Tell me if radio works for
 you with it.

I'll try later.

Hans

___
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


Re: [ivtv-devel] Fixed radio support

2005-09-29 Thread Hans Verkuil
On Thursday 29 September 2005 20:11, Christophe Massiot wrote:

 Attached is my current patch against the svn. Tell me if radio works for
 you with it.

Yes, it works and it sound better indeed. I think we're close to cracking it.

When you make a log under Windows, can you also make a separate log where the 
radio is started and tuned to a few channels? Thanks.

Hans

___
ivtv-devel mailing list
ivtv-devel@ivtvdriver.org
http://ivtvdriver.org/mailman/listinfo/ivtv-devel


Re: [ivtv-devel] Fixed radio support

2005-09-28 Thread Christophe Massiot
On Tue, Sep 27, 2005, Hans Verkuil wrote:

  What strikes me most is that on machine A, cat /dev/video0 doesn't
  return anything,
 
 Strange. Any dmesg output?

I'm starting another thread for that.

  Lastly, what's the md5sum of the HcwMakoA.ROM file you're using ? I
  have found two versions and I'd like to use the same as you.
 
 3a4803384f749d644ee1f1ca9dcb12fa  /lib/modules/HcwMakoA.ROM

That did the trick ! I had (probably) older versions of the file taken
from the installation CDs :
3a4803384f749d644ee1f1ca9dcb12fa  /lib/modules/HcwMakoA.ROM
a6f6a90a3be338cdb89d59e835798408  /lib/modules/HcwMakoA.ROM.bak
c5749da3eb141e87634ff1e2c1e6f390  /lib/modules/HcwMakoA.ROM.bak2

The other two versions were causing the /dev/video24 = 0x...
problem. Now with the patch below I can hear the radios. The patch to
ivtv-driver.c is needed because otherwise ivtv-radio -s doesn't return
any station. It doesn't seem to disturb anything else.

The patch to tuner.c is needed because otherwise I only get static from
/dev/video24. Why did you put 0x88 in a recent commit ?

Sound quality is still very bad, I can hear what kind of music it is but
there is a lot of background noise, which is surprising because I have
an outdoor FM antenna. Do you get perfect sound quality with your
installation ?

As requested I have loaded tuner and tda9887 with debug and secam=L,
using the latest 0.3.9 trunk.
Without my patch I only get static and the logs are :
ivtv:  START INIT IVTV 
ivtv: version 0.3.9 (development svn snapshot revision 2715) loading
ivtv: Linux version: 2.6.13.2-nosmp PENTIUM4 gcc-3.3
ivtv: In case of problems please include the debug info
ivtv: between the START INIT IVTV and END INIT IVTV lines when
ivtv: mailing the ivtv-devel mailinglist.
ivtv: Autodetected WinTV PVR 150 card (iTVC16 based)
PCI: Found IRQ 5 for device :03:03.0
tveeprom: ivtv version
tveeprom: Hauppauge: model = 26559, rev = C260, serial# = 7706446
tveeprom: tuner = LG S001D MK3 (idx = 60, type = 38)
tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom = 0x74, v4l2 
= 0x00400e17)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv: i2c attach to card #0 ok [client=tveeprom[50], addr=50]
cx25840: loading /lib/modules/HcwMakoA.ROM
ivtv: i2c attach to card #0 ok [client=cx25840, addr=44]
ivtv: i2c attach to card #0 ok [client=wm8775, addr=1b]
tda9885/6/7: (ivtv) chip found @ 0x86
ivtv: i2c attach to card #0 ok [client=tda9887, addr=43]
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
ivtv: i2c attach to card #0 ok [client=(tuner unset), addr=61]
ivtv: loading /lib/modules/ivtv-fw-enc.bin
ivtv: Encoder revision: 0x02040002
ivtv: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv: Allocate DMA encoder YUV stream: 161 x 12960 buffers (2048KB total)
ivtv: Allocate DMA encoder VBI stream: 80 x 26208 buffers (2048KB total)
ivtv: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB total)
ivtv: Create encoder radio stream
tuner: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3)) by ivtv i2c 
driver #0
tda9885/6/7: switching to v4l2
tda9885/6/7: configure for: PAL-BG
tda9885/6/7: writing: b=0xd4 c=0x70 e=0x09
tda9885/6/7: configure for: PAL-BG
tda9885/6/7: writing: b=0x14 c=0x70 e=0x09
tuner: tv freq set to 400.00
tuner: tv 0x1b 0x6f 0x8e 0x02
ivtv: Initialized WinTV PVR 150, card #0
ivtv:   END INIT IVTV  
tuner: tv 0x1b 0x6f 0x8e 0x02
tda9885/6/7: configure for: Radio Stereo
tda9885/6/7: writing: b=0x0c c=0x90 e=0x1d
tuner: radio freq set to 0.00
tuner: radio freq (0.00) out of range (65-108)
tuner: radio freq set to 105.06
tuner: radio 0x09 0x0b 0x88 0x19
tuner: radio freq set to 105.06
tuner: radio 0x09 0x0b 0x88 0x19

With my patch I get a noisy radio (but still a radio) and the logs are :
ivtv:  START INIT IVTV 
ivtv: version 0.3.9 (development svn snapshot revision 2715M) loading
ivtv: Linux version: 2.6.13.2-nosmp PENTIUM4 gcc-3.3
ivtv: In case of problems please include the debug info
ivtv: between the START INIT IVTV and END INIT IVTV lines when
ivtv: mailing the ivtv-devel mailinglist.
ivtv: Autodetected WinTV PVR 150 card (iTVC16 based)
PCI: Found IRQ 5 for device :03:03.0
tveeprom: ivtv version
tveeprom: Hauppauge: model = 26559, rev = C260, serial# = 7706446
tveeprom: tuner = LG S001D MK3 (idx = 60, type = 38)
tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom =
0x74, v4l2 = 0x00400e17)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv: i2c attach to card #0 ok [client=tveeprom[50], addr=50]
cx25840: loading /lib/modules/HcwMakoA.ROM
ivtv: i2c attach to card #0 ok [client=cx25840, addr=44]
ivtv: i2c attach to card #0 ok [client=wm8775, addr=1b]
tda9885/6/7: (ivtv) chip found @ 0x86
ivtv: i2c attach to card #0 ok [client=tda9887,