Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-17 Thread Antti Palosaari
Michael Krufky wrote:
 Jarryd Beck wrote:
 Takes half a minute to load when plugging in, keyboard is slow to respond
 when tuning, and I get lots of this:

 af9013_i2c_gate_ctrl: enable:0
 af9013_i2c_gate_ctrl: enable:1

 Applied the patch again and it was all fine.

 Jarryd.
   
 Thanks for the test, Jarryd.  I will integrate this into the official
 tda18271 driver after testing again on my hardware here.  I will
 probably make it an attach-time configurable option.
 
 Regards,
 
 Mike

I did some fixes and I think driver should be now ready. I also changed 
again device plug / fw-download / usb-relink scheme. I put 500ms sleep 
to indentify_state in hope that it is enough to drop ghost device driver 
after fw is downloaded and stick reconnects.

However I tested I2C-writing with my MT2060 tuner based device by adding 
about ~50 register write at once and it did not make any harm.
Anyhow, there is now versions to test:

version without tuner small-i2c limit:
http://linuxtv.org/hg/~anttip/af9015_new/

version with tuner small-i2c limit:
http://linuxtv.org/hg/~anttip/af9015_new2/

Regards
Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sat, Mar 15, 2008 at 5:32 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
 forgot attach patch...



  Antti Palosaari wrote:
   Michael Krufky wrote:
   4.3 is not close enough to 3.8.  If you don't know how to set the demod
   to 3.8, then we can do some hacks to make it work, but signal reception
   is likely to be very poor -- better off looking in his snoop log to see
   how the windows driver sets the demod to 3.8
  
   OI have looked sniffs and tested linux driver and found that it is set
   to 3800. There is 4300 kHz set in eeprom, it is ok for 8 MHz but not for
   6 or 7. Looks like driver needs to do some quirks when this tuner is
   used. Anyhow, patch attached is hardcoded to use 3.8 now.
  
   Jarryd, please test. Also some changes to stick plug done, if it does
   not work for you can fix it as earlier.
  
   regards
   Antti


  --
  http://palosaari.fi/


I tried it with both patches separately, and both patches together. None of
them worked, and with both together I got a kernel oops, lost my keyboard
and it wouldn't even reboot so I had to cut the power.
Michael's patch didn't produce any interesting dmesg output. I included
dmesg for plugging in and tuning with antti's patch.

Jarryd.

Here is dmesg with antti's patch when I plugged it in:

usb 5-1: new high speed USB device using ehci_hcd and address 4
usb 5-1: configuration #1 chosen from 1 choice
af9015_usb_probe:
af9015_identify_state: reply:01
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
af9015_download_firmware:
af9015_usb_probe:
af9015: af9015_rw_udev: sending failed: -71 (8/0)
af9015: af9015_rw_udev: receiving failed: -71
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
af9015_download_firmware:
af9015: af9015_rw_udev: sending failed: -71 (63/0)

snip - repeated about 200 times

af9015: af9015_rw_udev: sending failed: -71 (26/0)
af9015: af9015_rw_udev: sending failed: -71 (8/0)
af9015: af9015_rw_udev: receiving failed: -71
af9015: af9015_download_firmware: boot failed: -71
dvb_usb_af9015: probe of 5-1:1.1 failed with error -71
usb 5-1: USB disconnect, address 4
dvb-usb: generic DVB-USB module successfully deinitialized and disconnected.
usb 5-1: new high speed USB device using ehci_hcd and address 5
usb 5-1: configuration #1 chosen from 1 choice
af9015_usb_probe:
af9015_identify_state: reply:02
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
af9015_eeprom_dump:
00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
af9015_read_config: xtal:2 set adc_clock:28000
af9015_read_config: tuner id1:156
af9015_read_config: spectral inversion:0
af9015_set_gpios:
af9013: firmware version:4.95.0
DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
af9015_tuner_attach:
af9015_tda18271_tuner_attach:
tda18271 1-00c0: creating new instance
af9013_i2c_gate_ctrl: enable:1
af9013_i2c_gate_ctrl: enable:0
TDA18271HD/C1 detected @ 1-00c0
tda18271_init_regs: initializing registers for device @ 1-00c0
af9013_i2c_gate_ctrl: enable:1
af9013_i2c_gate_ctrl: enable:0

snip - repeated about 30 times

input: IR-receiver inside an USB DVB receiver as /class/input/input12
dvb-usb: schedule remote query interval to 200 msecs.
dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
and connected.
af9015_init:
af9015_download_ir_table:
input: Leadtek WinFast DTV Dongle Gold as /class/input/input13
input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
usb-:00:1d.7-1

dmesg after trying to tune:

af9013_init
af9013_reset
af9013_power_ctrl: onoff:1
af9013_set_adc_ctrl: adc_clock:28000
af913_div: a:2800 b:100 x:19
af913_div: a:0 b:100 x:19 r:14680064 r:e0
adc_cw:00 00 e0
af9013_init: load ofsm settings
af9013_init: load tuner specific settings
af9013_init: setting ts mode
af9013_lock_led: onoff:1
tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
af9013_i2c_gate_ctrl: enable:1

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
  Michael's patch didn't produce any interesting dmesg output. I included
  dmesg for plugging in and tuning with antti's patch.

  Jarryd.


Just realised I didn't have debug enabled for Michael's patch. When
tuning I got lots of this:

tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
tda18271_init_regs: initializing registers for device @ 1-00c0
tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d

My keyboard was fine this time (that was the point it normally responded
really slowly), and the driver loaded instantly instead of taking nearly
half a minute.
It looks like it might be a step in the right direction, but it's still not
tuning.

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

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Antti Palosaari
Jarryd Beck wrote:
Michael's patch didn't produce any interesting dmesg output. I included
dmesg for plugging in and tuning with antti's patch.

First errors came from same situation as earlier, no_reconnect. But it 
finally still worked.

 Just realised I didn't have debug enabled for Michael's patch. When
 tuning I got lots of this:
 
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 tda18271_init_regs: initializing registers for device @ 1-00c0
 tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d
 
 My keyboard was fine this time (that was the point it normally responded
 really slowly), and the driver loaded instantly instead of taking nearly
 half a minute.
 It looks like it might be a step in the right direction, but it's still 
 not tuning.
 
 Jarryd.

Frequency control values of the demodulator seems to be ok now. Also adc 
and coeff looks correct. It is hard to say where is problem...
Can you test if demodulator can detect TPS parameter automatically? You 
can do that inserting AUTO to initial tuning file, for example set FEC 
AUTO. And then scan tuning-file

regards
Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sun, Mar 16, 2008 at 1:22 AM, Antti Palosaari [EMAIL PROTECTED] wrote:


 Jarryd Beck wrote:
 Michael's patch didn't produce any interesting dmesg output. I included
 dmesg for plugging in and tuning with antti's patch.

 First errors came from same situation as earlier, no_reconnect. But it
 finally still worked.


  Just realised I didn't have debug enabled for Michael's patch. When
  tuning I got lots of this:
 
  tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
  tda18271_init_regs: initializing registers for device @ 1-00c0
  tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d
 
  My keyboard was fine this time (that was the point it normally responded
  really slowly), and the driver loaded instantly instead of taking nearly
  half a minute.
  It looks like it might be a step in the right direction, but it's still
  not tuning.
 
  Jarryd.

 Frequency control values of the demodulator seems to be ok now. Also adc
 and coeff looks correct. It is hard to say where is problem...
 Can you test if demodulator can detect TPS parameter automatically? You
 can do that inserting AUTO to initial tuning file, for example set FEC
 AUTO. And then scan tuning-file




 regards
 Antti
 --
 http://palosaari.fi/


Sorry I'm completely lost at this point, are you talking about adding something
to /usr/share/dvb-apps/dvb-t/au-sydney_north_shore and then running
scandvb, or are you talking about something else?

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Antti Palosaari

Jarryd Beck wrote:

On Sun, Mar 16, 2008 at 1:22 AM, Antti Palosaari [EMAIL PROTECTED] wrote:

Frequency control values of the demodulator seems to be ok now. Also adc
and coeff looks correct. It is hard to say where is problem...
Can you test if demodulator can detect TPS parameter automatically? You
can do that inserting AUTO to initial tuning file, for example set FEC
AUTO. And then scan tuning-file


Sorry I'm completely lost at this point, are you talking about adding something
to /usr/share/dvb-apps/dvb-t/au-sydney_north_shore and then running
scandvb, or are you talking about something else?


yes, adding parameters to tuning-file. I added some AUTO parameters, use 
attached file to scan. Try scan au-Sydney_North_Shore_test, hopefully 
it says something more that tuning failed. It is good indicator if there 
is even PID-filter timeouts.


I have no idea how to debug more. Without device it is rather hard to 
test many things. It will help a little if we know is tuner locked. 
Mike, is it easy to add debug writing for tuner to indicate if tuner is 
locked or not locked? I have used that method earlier with mt2060 tuner...


Good luck for Kimi and Heikki todays F1 Australian GP:)

regards
Antti
--
http://palosaari.fi/
# Australia / Sydney / North Shore (aka Artarmon/Gore Hill/Willoughby)
#
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
#
# ABC VHF12
T 22650 7MHz 3/4 NONE QAM64 AUTO 1/16 NONE
# Seven VHF6
T 17750 7MHz AUTO NONE QAM64 8k 1/16 NONE
# Nine VHF8
T 191625000 7MHz 3/4 NONE AUTO 8k 1/16 NONE
# Ten VHF11
T 21950 7MHz 3/4 NONE QAM64 8k AUTO NONE
# SBS UHF34
T 57150 7MHz 2/3 NONE QAM64 8k 1/8 NONE
# D44 UHF35
T 57850 7MHz 2/3 NONE QAM64 8k 1/32 NONE
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sun, Mar 16, 2008 at 11:08 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
 Jarryd Beck wrote:
   On Sun, Mar 16, 2008 at 1:22 AM, Antti Palosaari [EMAIL PROTECTED] wrote:

  Frequency control values of the demodulator seems to be ok now. Also adc
   and coeff looks correct. It is hard to say where is problem...
   Can you test if demodulator can detect TPS parameter automatically? You
   can do that inserting AUTO to initial tuning file, for example set FEC
   AUTO. And then scan tuning-file
  

  Sorry I'm completely lost at this point, are you talking about adding 
  something
   to /usr/share/dvb-apps/dvb-t/au-sydney_north_shore and then running
   scandvb, or are you talking about something else?

  yes, adding parameters to tuning-file. I added some AUTO parameters, use
  attached file to scan. Try scan au-Sydney_North_Shore_test, hopefully
  it says something more that tuning failed. It is good indicator if there
  is even PID-filter timeouts.

  I have no idea how to debug more. Without device it is rather hard to
  test many things. It will help a little if we know is tuner locked.
  Mike, is it easy to add debug writing for tuner to indicate if tuner is
  locked or not locked? I have used that method earlier with mt2060 tuner...

  Good luck for Kimi and Heikki todays F1 Australian GP:)



  regards
  Antti
  --
  http://palosaari.fi/

 # Australia / Sydney / North Shore (aka Artarmon/Gore Hill/Willoughby)
  #
  # T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
  #
  # ABC VHF12
  T 22650 7MHz 3/4 NONE QAM64 AUTO 1/16 NONE
  # Seven VHF6
  T 17750 7MHz AUTO NONE QAM64 8k 1/16 NONE
  # Nine VHF8
  T 191625000 7MHz 3/4 NONE AUTO 8k 1/16 NONE
  # Ten VHF11
  T 21950 7MHz 3/4 NONE QAM64 8k AUTO NONE
  # SBS UHF34
  T 57150 7MHz 2/3 NONE QAM64 8k 1/8 NONE
  # D44 UHF35
  T 57850 7MHz 2/3 NONE QAM64 8k 1/32 NONE



Here's the first frequency it tuned to, as you can see the
one you set auto on is still auto, it didn't seem to autodetect
anything. It was the same for all the other frequencies as well.

 tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
WARNING:  tuning failed!!!
 tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
(tuning failed)
WARNING:  tuning failed!!!

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Antti Palosaari
Jarryd Beck wrote:
 Here's the first frequency it tuned to, as you can see the
 one you set auto on is still auto, it didn't seem to autodetect
 anything. It was the same for all the other frequencies as well.
 
 tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
 WARNING:  tuning failed!!!
 tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
 (tuning failed)
 WARNING:  tuning failed!!!

It does not matter what scan outputs as tuning parameters because it 
just shows same parameter that are set by used tuning file (at least 
when tuning fails). Driver will still try to auto detect correct 
parameters. In this case it still fails for reason or other that is not 
found yet.

regards
Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sun, Mar 16, 2008 at 11:37 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
 Jarryd Beck wrote:
   Here's the first frequency it tuned to, as you can see the
   one you set auto on is still auto, it didn't seem to autodetect
   anything. It was the same for all the other frequencies as well.
  
   tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
   WARNING:  tuning failed!!!
   tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
   (tuning failed)
   WARNING:  tuning failed!!!

  It does not matter what scan outputs as tuning parameters because it
  just shows same parameter that are set by used tuning file (at least
  when tuning fails). Driver will still try to auto detect correct
  parameters. In this case it still fails for reason or other that is not
  found yet.



  regards
  Antti
  --
  http://palosaari.fi/


So the fact that it failed isn't actually telling us anything extra then?
Would it only have been useful if it had actually worked?
Also just to make sure I'm using the right drivers here, I'm using
Michael's patch and not Antti's patch. Since it kernel oopses with
both, Antti, do you want me to try with just your patch and not
Michael's?

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Michael Krufky
Jarryd Beck wrote:
 On Sun, Mar 16, 2008 at 11:37 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
   
 Jarryd Beck wrote:
   Here's the first frequency it tuned to, as you can see the
   one you set auto on is still auto, it didn't seem to autodetect
   anything. It was the same for all the other frequencies as well.
  
   tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
   WARNING:  tuning failed!!!
   tune to: 
 22650:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_AUTO:QAM_64:TRANSMISSION_MODE_AUTO:GUARD_INTERVAL_1_16:HIERARCHY_NONE
   (tuning failed)
   WARNING:  tuning failed!!!

  It does not matter what scan outputs as tuning parameters because it
  just shows same parameter that are set by used tuning file (at least
  when tuning fails). Driver will still try to auto detect correct
  parameters. In this case it still fails for reason or other that is not
  found yet.



  regards
  Antti
  --
  http://palosaari.fi/

 

 So the fact that it failed isn't actually telling us anything extra then?
 Would it only have been useful if it had actually worked?
 Also just to make sure I'm using the right drivers here, I'm using
 Michael's patch and not Antti's patch. Since it kernel oopses with
 both, Antti, do you want me to try with just your patch and not
 Michael's?

 Jarryd.
   
You need to use that patch of mine because I dont think the af9015 i2c
likes 39-byte i2c transfers.  The patch that I sent to you breaks the
tda182x1 register initialization into 16 register chunks.

-Mike



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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Michael Krufky
Antti Palosaari wrote:
 I have no idea how to debug more. Without device it is rather hard to
 test many things. It will help a little if we know is tuner locked.
 Mike, is it easy to add debug writing for tuner to indicate if tuner
 is locked or not locked? I have used that method earlier with mt2060
 tuner...

There is a lock bit in register 0x01[6]  but I have not found it to be
reliable, especially not on the c1 part.

-Mike



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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sun, Mar 16, 2008 at 11:47 AM, Michael Krufky [EMAIL PROTECTED] wrote:
 Antti Palosaari wrote:
   I have no idea how to debug more. Without device it is rather hard to
   test many things. It will help a little if we know is tuner locked.
   Mike, is it easy to add debug writing for tuner to indicate if tuner
   is locked or not locked? I have used that method earlier with mt2060
   tuner...

  There is a lock bit in register 0x01[6]  but I have not found it to be
  reliable, especially not on the c1 part.

  -Mike




You won't believe this, but it worked. I think every time I tried both
patches together I left .no_reconnect in. I tried it again with both
patches applied, no other modifications, and it worked.

Thanks for all your help,
Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Antti Palosaari
Jarryd Beck wrote:
 You won't believe this, but it worked. I think every time I tried both
 patches together I left .no_reconnect in. I tried it again with both
 patches applied, no other modifications, and it worked.
 
 Thanks for all your help,
 Jarryd.

Great. I will finalize support for this tuner and add it to tree.

It will take some time because I will need to test whether or not there 
is maximum byte count in af9015 i2c-hardware. If yes, there is two 
solutions 1) print error to log that too long i2c-transfer = tuner 
driver needs changed. 2) Split i2c-transfer in the driver. Is there any 
other driver that splits i2c-messages?

Can you make some test to find solution where no_reconnect is not used, 
means same as no_reconnect=0 ? There is #if 0 / #if 1 definitions in 
download firmware. Also sleep in same place can be changed.

This (reconnection after fw download) is really problem. Any ideas to 
resolving it is highly welcome.

regards
Antti Palosaari
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sun, Mar 16, 2008 at 12:39 PM, Antti Palosaari [EMAIL PROTECTED] wrote:
 Jarryd Beck wrote:
   You won't believe this, but it worked. I think every time I tried both
   patches together I left .no_reconnect in. I tried it again with both
   patches applied, no other modifications, and it worked.
  
   Thanks for all your help,
   Jarryd.

  Great. I will finalize support for this tuner and add it to tree.

  It will take some time because I will need to test whether or not there
  is maximum byte count in af9015 i2c-hardware. If yes, there is two
  solutions 1) print error to log that too long i2c-transfer = tuner
  driver needs changed. 2) Split i2c-transfer in the driver. Is there any
  other driver that splits i2c-messages?

  Can you make some test to find solution where no_reconnect is not used,
  means same as no_reconnect=0 ? There is #if 0 / #if 1 definitions in
  download firmware. Also sleep in same place can be changed.

  This (reconnection after fw download) is really problem. Any ideas to
  resolving it is highly welcome.

  regards
  Antti Palosaari
  --
  http://palosaari.fi/


I'll have a fiddle with no_reconnect and the firmware download and see what
happens.
Also there's a blue light that comes on in windows when I tune, but it didn't
come on in linux when tuned. Would it be possible to work
out how to make that light come on when it has successfully tuned?

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Michael Krufky
Jarryd Beck wrote:
 On Sun, Mar 16, 2008 at 11:47 AM, Michael Krufky [EMAIL PROTECTED] wrote:
 Antti Palosaari wrote:
   I have no idea how to debug more. Without device it is rather hard to
   test many things. It will help a little if we know is tuner locked.
   Mike, is it easy to add debug writing for tuner to indicate if tuner
   is locked or not locked? I have used that method earlier with mt2060
   tuner...

  There is a lock bit in register 0x01[6]  but I have not found it to be
  reliable, especially not on the c1 part.

  -Mike



 
 You won't believe this, but it worked. I think every time I tried both
 patches together I left .no_reconnect in. I tried it again with both
 patches applied, no other modifications, and it worked.
 
 Thanks for all your help,
 Jarryd.

This is great news!  For an experiment, can you try once more without my patch 
applied?

This will just confirm whether or not we can write all 39 registers at once.

If the patch that I gave you is truly needed, then I will integrate it into the 
official driver.

Regards,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Antti Palosaari
Jarryd Beck wrote:
 Also there's a blue light that comes on in windows when I tune, but it didn't
 come on in linux when tuned. Would it be possible to work
 out how to make that light come on when it has successfully tuned?

Should be peace of cake to fix. I will check it later...

Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Jarryd Beck
On Sun, Mar 16, 2008 at 1:04 PM, Michael Krufky [EMAIL PROTECTED] wrote:

 Jarryd Beck wrote:
   On Sun, Mar 16, 2008 at 11:47 AM, Michael Krufky [EMAIL PROTECTED] wrote:
   Antti Palosaari wrote:
 I have no idea how to debug more. Without device it is rather hard to
 test many things. It will help a little if we know is tuner locked.
 Mike, is it easy to add debug writing for tuner to indicate if tuner
 is locked or not locked? I have used that method earlier with mt2060
 tuner...
  
There is a lock bit in register 0x01[6]  but I have not found it to be
reliable, especially not on the c1 part.
  
-Mike
  
  
  
  
   You won't believe this, but it worked. I think every time I tried both
   patches together I left .no_reconnect in. I tried it again with both
   patches applied, no other modifications, and it worked.
  
   Thanks for all your help,
   Jarryd.

  This is great news!  For an experiment, can you try once more without my 
 patch applied?

  This will just confirm whether or not we can write all 39 registers at once.

  If the patch that I gave you is truly needed, then I will integrate it into 
 the official driver.

  Regards,

  Mike


Takes half a minute to load when plugging in, keyboard is slow to respond
when tuning, and I get lots of this:

af9013_i2c_gate_ctrl: enable:0
af9013_i2c_gate_ctrl: enable:1

Applied the patch again and it was all fine.

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Michael Krufky
Jarryd Beck wrote:
 On Sun, Mar 16, 2008 at 1:04 PM, Michael Krufky [EMAIL PROTECTED] wrote:
   
 Jarryd Beck wrote:
   On Sun, Mar 16, 2008 at 11:47 AM, Michael Krufky [EMAIL PROTECTED] 
 wrote:
   Antti Palosaari wrote:
 I have no idea how to debug more. Without device it is rather hard to
 test many things. It will help a little if we know is tuner locked.
 Mike, is it easy to add debug writing for tuner to indicate if tuner
 is locked or not locked? I have used that method earlier with mt2060
 tuner...
  
There is a lock bit in register 0x01[6]  but I have not found it to be
reliable, especially not on the c1 part.
  
-Mike
  
  
  
  
   You won't believe this, but it worked. I think every time I tried both
   patches together I left .no_reconnect in. I tried it again with both
   patches applied, no other modifications, and it worked.
  
   Thanks for all your help,
   Jarryd.

  This is great news!  For an experiment, can you try once more without my 
 patch applied?

  This will just confirm whether or not we can write all 39 registers at once.

  If the patch that I gave you is truly needed, then I will integrate it into 
 the official driver.

  Regards,

  Mike

 

 Takes half a minute to load when plugging in, keyboard is slow to respond
 when tuning, and I get lots of this:

 af9013_i2c_gate_ctrl: enable:0
 af9013_i2c_gate_ctrl: enable:1

 Applied the patch again and it was all fine.

 Jarryd.
   
Thanks for the test, Jarryd.  I will integrate this into the official
tda18271 driver after testing again on my hardware here.  I will
probably make it an attach-time configurable option.

Regards,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-15 Thread Michael Krufky
Antti Palosaari wrote:
 Jarryd Beck wrote:
 Also there's a blue light that comes on in windows when I tune, but
 it didn't
 come on in linux when tuned. Would it be possible to work
 out how to make that light come on when it has successfully tuned?

 Should be peace of cake to fix. I will check it later...

 Antti
Antti,

I created an attach-time parameter to limit the i2c transfer size during
tda18271 initialization.  Please take a look:

http://linuxtv.org/hg/~mkrufky/tda18271/rev/8ab90c649c7b

Regards,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-14 Thread Michael Krufky
Antti Palosaari wrote:
 looks like possible bug found!

 Jarryd Beck wrote:
 On Fri, Mar 14, 2008 at 2:19 PM, Michael Krufky [EMAIL PROTECTED]
 wrote:

  This all happens very quickly on the hardware that I've tested ( a
  cx23887-based pcie card and a cypress fx2-based usb device).  I've
 also
  heard good reports on saa713x-based pci cards.  Is the i2c slow in the
  af9013 driver?

 Just checked from code and it looks like it is 60 kHz currently. It is
 not clear for me how kHz correlates to value written to register so
 let is be this time.
Hmm..  60 kHz compared to 400 kHz is a big difference, but we can deal
with that later.

  The tuner driver is programmed to use 7mhz dvbt with IF centered at
 3.8
  mhz -- is the demod set to the same?

 hmm, I think there is bug now. I compared eeprom dumps and found that
 my MT2060 has IF1 = 36125 and eeprom of this device says it should be
 IF1 =  4300. Is 4.3 Mhz close enough (we are speaking same thing?)?

4.3 is not close enough to 3.8.  If you don't know how to set the demod
to 3.8, then we can do some hacks to make it work, but signal reception
is likely to be very poor -- better off looking in his snoop log to see
how the windows driver sets the demod to 3.8


 Jerryd, change .tuner_if = 36125 to 4300 . It can be found from af9015
 module.

 How do I find out about the demod? Is the speed of af9013 a question for
 me because I have no idea.

 One thing to test speed is also commenting out program tuner part
 from af9013 so it does not ask tuner to go frequency. It did not tune
 then.

 But, I still needs debug logs of the af9013. Then I can compare much
 more easier usb-sniff and debug values got from driver.

 Antti
-Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-14 Thread Antti Palosaari
Michael Krufky wrote:
 4.3 is not close enough to 3.8.  If you don't know how to set the demod
 to 3.8, then we can do some hacks to make it work, but signal reception
 is likely to be very poor -- better off looking in his snoop log to see
 how the windows driver sets the demod to 3.8

OI have looked sniffs and tested linux driver and found that it is set 
to 3800. There is 4300 kHz set in eeprom, it is ok for 8 MHz but not for 
6 or 7. Looks like driver needs to do some quirks when this tuner is 
used. Anyhow, patch attached is hardcoded to use 3.8 now.

Jarryd, please test. Also some changes to stick plug done, if it does 
not work for you can fix it as earlier.

regards
Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-14 Thread Antti Palosaari

forgot attach patch...

Antti Palosaari wrote:

Michael Krufky wrote:

4.3 is not close enough to 3.8.  If you don't know how to set the demod
to 3.8, then we can do some hacks to make it work, but signal reception
is likely to be very poor -- better off looking in his snoop log to see
how the windows driver sets the demod to 3.8


OI have looked sniffs and tested linux driver and found that it is set 
to 3800. There is 4300 kHz set in eeprom, it is ok for 8 MHz but not for 
6 or 7. Looks like driver needs to do some quirks when this tuner is 
used. Anyhow, patch attached is hardcoded to use 3.8 now.


Jarryd, please test. Also some changes to stick plug done, if it does 
not work for you can fix it as earlier.


regards
Antti



--
http://palosaari.fi/
diff -r 67b68ae8e249 linux/drivers/media/dvb/dvb-usb/af9015.c
--- a/linux/drivers/media/dvb/dvb-usb/af9015.c	Thu Mar 13 00:58:29 2008 +0200
+++ b/linux/drivers/media/dvb/dvb-usb/af9015.c	Fri Mar 14 20:19:28 2008 +0200
@@ -18,6 +18,7 @@
 
 /* debug */
 int dvb_usb_af9015_debug = 0x3d;
+//int dvb_usb_af9015_debug = -1;
 
 module_param_named(debug, dvb_usb_af9015_debug, int, 0644);
 MODULE_PARM_DESC(
@@ -27,7 +28,10 @@ MODULE_PARM_DESC(
 
 static struct af9013_config af9015_af9013_config = {
 	.demod_address = AF9015_I2C_DEMOD,
-	.tuner_if = 36125,
+//	.tuner_if = 36125,
+//	.tuner_if = 4300,
+	.tuner_if = 3800, //7MHz
+//	.tuner_if = 3300,
 	.ts_mode = AF9013_USB,
 };
 
@@ -413,8 +417,9 @@ static int af9015_download_firmware(stru
 		err(%s: boot failed: %d, __FUNCTION__, ret);
 		goto exit;
 	}
-	msleep(20);
+	msleep(1);
 
+#if 1
 	/* boot done, ensure that firmware is running */
 	req.cmd = GET_CONFIG;
 	req.len = 1;
@@ -429,8 +434,8 @@ static int af9015_download_firmware(stru
 		err(%s: firmware did not run (%02x), __FUNCTION__, tmp);
 		return -EIO;
 	}
-
-#if 0
+#endif
+#if 1
 	/* firmware is running, reconnect device in the usb bus */
 	req.cmd = RECONNECT_USB;
 	ret = af9015_rw_udev(udev, req);
@@ -495,6 +500,7 @@ static int af9015_read_config(struct dvb
 	case AF9013_TUNER_TDA18271:
 		af9015_af9013_config.tuner = AF9013_TUNER_TDA18271;
 		af9015_af9013_config.rf_spec_inv = 1;
+//		af9015_af9013_config.rf_spec_inv = 0;
 		state-gpio3 = 0x3; /* connect tuner on GPIO3 */
 		break;
 	default:
@@ -738,18 +744,22 @@ static struct dvb_usb_device_properties 
 			},
 		}
 	},
-	.num_device_descs = 3,
+	.num_device_descs = 2,
 	.devices = {
 		{
 			.name = Afatech AF9015 DVB-T USB2.0 stick,
-			.cold_ids = {af9015_usb_table[0], NULL},
+			.cold_ids = {af9015_usb_table[0], af9015_usb_table[1], NULL},
 			.warm_ids = {NULL},
 		},
+#if 0
 		{
 			.name = Afatech AF9015 DVB-T USB2.0 stick,
-			.cold_ids = {af9015_usb_table[1], NULL},
-			.warm_ids = {NULL},
+			.cold_ids = {NULL},
+//			.cold_ids = {af9015_usb_table[1], NULL},
+			.warm_ids = {af9015_usb_table[1], NULL},
+//			.warm_ids = {NULL},
 		},
+#endif
 		{
 			/* Leadtek Winfast DTV Dongle Gold */
 			.name = Afatech AF9015 DVB-T USB2.0 stick,
diff -r 67b68ae8e249 linux/drivers/media/dvb/frontends/af9013.c
--- a/linux/drivers/media/dvb/frontends/af9013.c	Thu Mar 13 00:58:29 2008 +0200
+++ b/linux/drivers/media/dvb/frontends/af9013.c	Fri Mar 14 20:19:28 2008 +0200
@@ -22,7 +22,7 @@
 #include af9013_priv.h
 #include af9013.h
 
-int debug;
+int debug = 1;
 
 struct af9013_state {
 	struct i2c_adapter *i2c;
@@ -347,6 +347,9 @@ static int af9013_set_adc_ctrl(struct af
 	buf[1] = (u8) ((adc_cw  0xff00)  8);
 	buf[2] = (u8) ((adc_cw  0x00ff)  16);
 
+	deb_info(adc_cw:);
+	debug_dump(buf, sizeof(buf), deb_info);
+
 	/* program */
 	for (i = 0; i  sizeof(buf); i++) {
 		ret = af9013_write_reg(state, addr++, buf[i]);
@@ -402,9 +405,31 @@ static int af9013_set_freq_ctrl(struct a
 	for (i = 0; i  sizeof(buf); i++) {
 		ret = af9013_write_reg(state, addr++, buf[i]);
 		if (ret)
+			goto exit;
+	}
+
+	/* program to dummy ram also */
+	addr = 0x9be7;
+	for (i = 0; i  sizeof(buf); i++) {
+		ret = af9013_write_reg(state, addr++, buf[i]);
+		if (ret)
+			goto exit;
+//			break;
+	}
+
+#if 1
+	/* program other fcw FIXME */
+	addr = 0x9bea;
+	buf[0] = 0xec;
+	buf[1] = 0xa0;
+	buf[2] = 0x6e;
+	for (i = 0; i  sizeof(buf); i++) {
+		ret = af9013_write_reg(state, addr++, buf[i]);
+		if (ret)
 			break;
 	}
-
+#endif
+exit:
 	return ret;
 }
 
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Jarryd Beck
On Thu, Mar 13, 2008 at 1:20 PM, Jarryd Beck [EMAIL PROTECTED] wrote:

 On Thu, Mar 13, 2008 at 10:11 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
   Jarryd Beck wrote:
 On Thu, Mar 13, 2008 at 8:14 AM,  [EMAIL PROTECTED] wrote:
  
 Then, please turn ON debug, repeat your tests, and post again with
  dmesg.  I am not familiar with the af9015 driver, but for tda18271, 
 set
  debug=1.  (you must unload all modules first -- do 'make unload' in 
 the
  v4l-dvb dir, then replug your device)

  -Mike



 Sorry I'm unsure where to set debug.

 Jarryd.
  
I added initial support for this tda-tuner to the driver. Jarryd, can
you test?
http://linuxtv.org/hg/~anttip/af9015_new/
  
There is debug switch in af9013 module that may be helpful if it does
not work. You can enable it as described or if it is too hard to play
with modprobe just edit af9013.c file in frontend directory and set
debug=1 by hard coding.
If it does not work you can also try set GPIO3 setting (af9015) to 0xb
instead 0x3 used currently. Also try to change rf-spectral inversion to
see if it helps. Firmware should be ok and all other settings as well as
I can see from usb-sniffs. With little lucky it should start working.
  
regards
Antti
--
http://palosaari.fi/
  

  Thanks, but now for some reason all I get is this:

  usb 2-10: new high speed USB device using ehci_hcd and address 6

 usb 2-10: configuration #1 chosen from 1 choice
  input: Leadtek WinFast DTV Dongle Gold as /class/input/input8

 input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
  usb-:00:02.1-10

 af9015_usb_probe:
  af9015_identify_state: reply:01
  dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,

 will try to load a firmware
  dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
  af9015_download_firmware:
  usbcore: registered new interface driver dvb_usb_af9015

  Jarryd.


I found the problem, the driver I had set .no_reconnect = 1 in
af9015_properties, the one in af9015_new didn't. So after I changed
that I tried again, it still didn't work. I enabled debugging and tried
to tune to a channel and this is what I got in dmesg.

usb 2-10: new high speed USB device using ehci_hcd and address 27
usb 2-10: configuration #1 chosen from 1 choice
af9015_usb_probe:
af9015_identify_state: reply:01
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
af9015_download_firmware:
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
af9015_eeprom_dump:
00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
af9015_read_config: xtal:2 set adc_clock:28000
af9015_read_config: tuner id1:156
af9015_read_config: spectral inversion:0
af9015_set_gpios:
af9013: firmware version:4.95.0
DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
af9015_tuner_attach:
af9015_tda18271_tuner_attach:
tda18271 5-00c0: creating new instance
TDA18271HD/C1 detected @ 5-00c0
tda18271_init_regs: initializing registers for device @ 5-00c0
input: IR-receiver inside an USB DVB receiver as /class/input/input39
dvb-usb: schedule remote query interval to 200 msecs.
dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
and connected.
af9015_init:
af9015_download_ir_table:
input: Leadtek WinFast DTV Dongle Gold as /class/input/input40
input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
usb-:00:02.1-10
tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
tda18271_init_regs: initializing registers for device @ 5-00c0
tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d
tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
tda18271_init_regs: initializing registers for device @ 5-00c0
tda18271_set_standby_mode: sm = 1, sm_lt = 0, sm_xt = 0

Jarryd.

___
linux-dvb mailing list
linux-dvb@linuxtv.org

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Antti Palosaari
Jarryd Beck wrote:
 I found the problem, the driver I had set .no_reconnect = 1 in
 af9015_properties, the one in af9015_new didn't. So after I changed
 that I tried again, it still didn't work. I enabled debugging and tried
 to tune to a channel and this is what I got in dmesg.

I know this no_reconnect problem. But haven't found proper correction 
yet. Looks like sometimes with some hw / sw configuration it reconnects 
USB-bus after firmware download and sometimes not. When there is 
no_reconnect set it is possible that driver loads twice (two adapters) 
and it causes race condition when two drivers are accessing same hw same 
time and it hangs (remote polling causes hangs very soon after plug).
You can help and test if it is OK set no_reconnect=0 and remove #if 0 
-killed code by changing it to #if 1 in line where is comment firmware 
is running, reconnect device in the usb bus. This forces AF9015 chipset 
reconnect USB.

 
 usb 2-10: new high speed USB device using ehci_hcd and address 27
 usb 2-10: configuration #1 chosen from 1 choice
 af9015_usb_probe:
 af9015_identify_state: reply:01
 dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
 will try to load a firmware
 dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
 af9015_download_firmware:
 dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
 dvb-usb: will pass the complete MPEG2 transport stream to the software 
 demuxer.
 DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
 af9015_eeprom_dump:
 00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
 10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
 20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
 30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
 40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
 50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
 60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
 70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
 80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
 90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
 a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
 b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
 c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 af9015_read_config: xtal:2 set adc_clock:28000
 af9015_read_config: tuner id1:156
 af9015_read_config: spectral inversion:0
 af9015_set_gpios:
 af9013: firmware version:4.95.0
 DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
 af9015_tuner_attach:
 af9015_tda18271_tuner_attach:
 tda18271 5-00c0: creating new instance
 TDA18271HD/C1 detected @ 5-00c0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 input: IR-receiver inside an USB DVB receiver as /class/input/input39
 dvb-usb: schedule remote query interval to 200 msecs.
 dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
 and connected.
 af9015_init:
 af9015_download_ir_table:
 input: Leadtek WinFast DTV Dongle Gold as /class/input/input40
 input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
 usb-:00:02.1-10
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 tda18271_set_standby_mode: sm = 1, sm_lt = 0, sm_xt = 0

There is no debug logs from af9013 demodulator module. You can enable 
logs by modprobe af9013 debug=1. Remember rmmod modules first from 
memory rmmod dvb_usb_af9015 af9013 mt2060 dvb_usb dvb_core

af9013 debug should log rather much useful data when tuning to channel. 
Did you try change GPIO3 as mentioned earlier?

regards
Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Jarryd Beck
On Fri, Mar 14, 2008 at 11:13 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
 Jarryd Beck wrote:
   I found the problem, the driver I had set .no_reconnect = 1 in
   af9015_properties, the one in af9015_new didn't. So after I changed
   that I tried again, it still didn't work. I enabled debugging and tried
   to tune to a channel and this is what I got in dmesg.

  I know this no_reconnect problem. But haven't found proper correction
  yet. Looks like sometimes with some hw / sw configuration it reconnects
  USB-bus after firmware download and sometimes not. When there is
  no_reconnect set it is possible that driver loads twice (two adapters)
  and it causes race condition when two drivers are accessing same hw same
  time and it hangs (remote polling causes hangs very soon after plug).
  You can help and test if it is OK set no_reconnect=0 and remove #if 0
  -killed code by changing it to #if 1 in line where is comment firmware
  is running, reconnect device in the usb bus. This forces AF9015 chipset
  reconnect USB.



  
   usb 2-10: new high speed USB device using ehci_hcd and address 27
   usb 2-10: configuration #1 chosen from 1 choice
   af9015_usb_probe:
   af9015_identify_state: reply:01
   dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
   will try to load a firmware
   dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
   af9015_download_firmware:
   dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
   dvb-usb: will pass the complete MPEG2 transport stream to the software 
 demuxer.
   DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
   af9015_eeprom_dump:
   00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
   10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
   20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
   30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
   40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
   50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
   60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
   70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
   80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
   90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
   a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
   b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
   c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   af9015_read_config: xtal:2 set adc_clock:28000
   af9015_read_config: tuner id1:156
   af9015_read_config: spectral inversion:0
   af9015_set_gpios:
   af9013: firmware version:4.95.0
   DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
   af9015_tuner_attach:
   af9015_tda18271_tuner_attach:
   tda18271 5-00c0: creating new instance
   TDA18271HD/C1 detected @ 5-00c0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   input: IR-receiver inside an USB DVB receiver as /class/input/input39
   dvb-usb: schedule remote query interval to 200 msecs.
   dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
   and connected.
   af9015_init:
   af9015_download_ir_table:
   input: Leadtek WinFast DTV Dongle Gold as /class/input/input40
   input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
   usb-:00:02.1-10
   tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d
   tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   tda18271_set_standby_mode: sm = 1, sm_lt = 0, sm_xt = 0

  There is no debug logs from af9013 demodulator module. You can enable
  logs by modprobe af9013 debug=1. Remember rmmod modules first from
  memory rmmod dvb_usb_af9015 af9013 mt2060 dvb_usb dvb_core

  af9013 debug should log rather much useful data when tuning to channel.
  Did you try change GPIO3 as mentioned earlier?



  regards
  Antti
  --
  http://palosaari.fi/


I tried what you said, it works with no_reconnect = 1 and #if 0, and it also
works with no_reconnect = 0 and #if 1, but no_reconnect = 0 and #if 0
doesn't work. It has a fit if I use no_reconnect = 1 and #if 1. It
gives me a lot
of this:
Mar 14 13:42:17 localhost kernel: af9015: af9015_rw_udev: receiving failed: -22
Mar 14 13:42:17 localhost kernel: dvb-usb: error while querying for an
remote control event.

I also tried changing the rf_spec_inv and gpio3 but that didn't seem to
do anything. It seems like it's the tuner, from dmesg the rest seems to be
working fine.

Here is dmesg with debug enabled on af9013 too:

usb 2-10: new high speed USB device using ehci_hcd and address 7
usb 2-10: configuration #1 chosen from 1 choice
af9015_usb_probe:
af9015_identify_state: reply:01
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Michael Krufky
Jarryd Beck wrote:
 On Fri, Mar 14, 2008 at 11:13 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
   
 Jarryd Beck wrote:
   I found the problem, the driver I had set .no_reconnect = 1 in
   af9015_properties, the one in af9015_new didn't. So after I changed
   that I tried again, it still didn't work. I enabled debugging and tried
   to tune to a channel and this is what I got in dmesg.

  I know this no_reconnect problem. But haven't found proper correction
  yet. Looks like sometimes with some hw / sw configuration it reconnects
  USB-bus after firmware download and sometimes not. When there is
  no_reconnect set it is possible that driver loads twice (two adapters)
  and it causes race condition when two drivers are accessing same hw same
  time and it hangs (remote polling causes hangs very soon after plug).
  You can help and test if it is OK set no_reconnect=0 and remove #if 0
  -killed code by changing it to #if 1 in line where is comment firmware
  is running, reconnect device in the usb bus. This forces AF9015 chipset
  reconnect USB.



  
   usb 2-10: new high speed USB device using ehci_hcd and address 27
   usb 2-10: configuration #1 chosen from 1 choice
   af9015_usb_probe:
   af9015_identify_state: reply:01
   dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
   will try to load a firmware
   dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
   af9015_download_firmware:
   dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
   dvb-usb: will pass the complete MPEG2 transport stream to the software 
 demuxer.
   DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
   af9015_eeprom_dump:
   00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
   10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
   20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
   30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
   40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
   50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
   60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
   70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
   80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
   90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
   a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
   b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
   c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   af9015_read_config: xtal:2 set adc_clock:28000
   af9015_read_config: tuner id1:156
   af9015_read_config: spectral inversion:0
   af9015_set_gpios:
   af9013: firmware version:4.95.0
   DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
   af9015_tuner_attach:
   af9015_tda18271_tuner_attach:
   tda18271 5-00c0: creating new instance
   TDA18271HD/C1 detected @ 5-00c0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   input: IR-receiver inside an USB DVB receiver as /class/input/input39
   dvb-usb: schedule remote query interval to 200 msecs.
   dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
   and connected.
   af9015_init:
   af9015_download_ir_table:
   input: Leadtek WinFast DTV Dongle Gold as /class/input/input40
   input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
   usb-:00:02.1-10
   tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 0x1d
   tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   tda18271_set_standby_mode: sm = 1, sm_lt = 0, sm_xt = 0

  There is no debug logs from af9013 demodulator module. You can enable
  logs by modprobe af9013 debug=1. Remember rmmod modules first from
  memory rmmod dvb_usb_af9015 af9013 mt2060 dvb_usb dvb_core

  af9013 debug should log rather much useful data when tuning to channel.
  Did you try change GPIO3 as mentioned earlier?



  regards
  Antti
  --
  http://palosaari.fi/

 

 I tried what you said, it works with no_reconnect = 1 and #if 0, and it also
 works with no_reconnect = 0 and #if 1, but no_reconnect = 0 and #if 0
 doesn't work. It has a fit if I use no_reconnect = 1 and #if 1. It
 gives me a lot
 of this:
 Mar 14 13:42:17 localhost kernel: af9015: af9015_rw_udev: receiving failed: 
 -22
 Mar 14 13:42:17 localhost kernel: dvb-usb: error while querying for an
 remote control event.

 I also tried changing the rf_spec_inv and gpio3 but that didn't seem to
 do anything. It seems like it's the tuner, from dmesg the rest seems to be
 working fine.

 Here is dmesg with debug enabled on af9013 too:

 usb 2-10: new high speed USB device using ehci_hcd and address 7
 usb 2-10: configuration #1 chosen from 1 choice
 af9015_usb_probe:
 af9015_identify_state: 

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Jarryd Beck
On Fri, Mar 14, 2008 at 2:19 PM, Michael Krufky [EMAIL PROTECTED] wrote:

 Jarryd Beck wrote:
   On Fri, Mar 14, 2008 at 11:13 AM, Antti Palosaari [EMAIL PROTECTED] 
 wrote:
  
   Jarryd Beck wrote:
 I found the problem, the driver I had set .no_reconnect = 1 in
 af9015_properties, the one in af9015_new didn't. So after I changed
 that I tried again, it still didn't work. I enabled debugging and tried
 to tune to a channel and this is what I got in dmesg.
  
I know this no_reconnect problem. But haven't found proper correction
yet. Looks like sometimes with some hw / sw configuration it reconnects
USB-bus after firmware download and sometimes not. When there is
no_reconnect set it is possible that driver loads twice (two adapters)
and it causes race condition when two drivers are accessing same hw same
time and it hangs (remote polling causes hangs very soon after plug).
You can help and test if it is OK set no_reconnect=0 and remove #if 0
-killed code by changing it to #if 1 in line where is comment firmware
is running, reconnect device in the usb bus. This forces AF9015 chipset
reconnect USB.
  
  
  

 usb 2-10: new high speed USB device using ehci_hcd and address 27
 usb 2-10: configuration #1 chosen from 1 choice
 af9015_usb_probe:
 af9015_identify_state: reply:01
 dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
 will try to load a firmware
 dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
 af9015_download_firmware:
 dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
 dvb-usb: will pass the complete MPEG2 transport stream to the software 
 demuxer.
 DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
 af9015_eeprom_dump:
 00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
 10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
 20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
 30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
 40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
 50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
 60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
 70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
 80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
 90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
 a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
 b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
 c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 af9015_read_config: xtal:2 set adc_clock:28000
 af9015_read_config: tuner id1:156
 af9015_read_config: spectral inversion:0
 af9015_set_gpios:
 af9013: firmware version:4.95.0
 DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
 af9015_tuner_attach:
 af9015_tda18271_tuner_attach:
 tda18271 5-00c0: creating new instance
 TDA18271HD/C1 detected @ 5-00c0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 input: IR-receiver inside an USB DVB receiver as /class/input/input39
 dvb-usb: schedule remote query interval to 200 msecs.
 dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
 and connected.
 af9015_init:
 af9015_download_ir_table:
 input: Leadtek WinFast DTV Dongle Gold as /class/input/input40
 input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
 usb-:00:02.1-10
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 
 0x1d
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 tda18271_set_standby_mode: sm = 1, sm_lt = 0, sm_xt = 0
  
There is no debug logs from af9013 demodulator module. You can enable
logs by modprobe af9013 debug=1. Remember rmmod modules first from
memory rmmod dvb_usb_af9015 af9013 mt2060 dvb_usb dvb_core
  
af9013 debug should log rather much useful data when tuning to channel.
Did you try change GPIO3 as mentioned earlier?
  
  
  
regards
Antti
--
http://palosaari.fi/
  
  
  
   I tried what you said, it works with no_reconnect = 1 and #if 0, and it 
 also
   works with no_reconnect = 0 and #if 1, but no_reconnect = 0 and #if 0
   doesn't work. It has a fit if I use no_reconnect = 1 and #if 1. It
   gives me a lot
   of this:
   Mar 14 13:42:17 localhost kernel: af9015: af9015_rw_udev: receiving 
 failed: -22
   Mar 14 13:42:17 localhost kernel: dvb-usb: error while querying for an
   remote control event.
  
   I also tried changing the rf_spec_inv and gpio3 but that didn't seem to
   do anything. It seems 

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Jarryd Beck
On Fri, Mar 14, 2008 at 2:22 PM, Jarryd Beck [EMAIL PROTECTED] wrote:

 On Fri, Mar 14, 2008 at 2:19 PM, Michael Krufky [EMAIL PROTECTED] wrote:
  
   Jarryd Beck wrote:
 On Fri, Mar 14, 2008 at 11:13 AM, Antti Palosaari [EMAIL PROTECTED] 
 wrote:

 Jarryd Beck wrote:
   I found the problem, the driver I had set .no_reconnect = 1 in
   af9015_properties, the one in af9015_new didn't. So after I changed
   that I tried again, it still didn't work. I enabled debugging and 
 tried
   to tune to a channel and this is what I got in dmesg.

  I know this no_reconnect problem. But haven't found proper correction
  yet. Looks like sometimes with some hw / sw configuration it 
 reconnects
  USB-bus after firmware download and sometimes not. When there is
  no_reconnect set it is possible that driver loads twice (two adapters)
  and it causes race condition when two drivers are accessing same hw 
 same
  time and it hangs (remote polling causes hangs very soon after plug).
  You can help and test if it is OK set no_reconnect=0 and remove #if 0
  -killed code by changing it to #if 1 in line where is comment 
 firmware
  is running, reconnect device in the usb bus. This forces AF9015 
 chipset
  reconnect USB.



  
   usb 2-10: new high speed USB device using ehci_hcd and address 27
   usb 2-10: configuration #1 chosen from 1 choice
   af9015_usb_probe:
   af9015_identify_state: reply:01
   dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
   will try to load a firmware
   dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
   af9015_download_firmware:
   dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
   dvb-usb: will pass the complete MPEG2 transport stream to the 
 software demuxer.
   DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
   af9015_eeprom_dump:
   00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
   10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
   20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
   30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
   40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
   50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
   60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
   70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
   80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
   90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
   a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
   b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
   c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
   af9015_read_config: xtal:2 set adc_clock:28000
   af9015_read_config: tuner id1:156
   af9015_read_config: spectral inversion:0
   af9015_set_gpios:
   af9013: firmware version:4.95.0
   DVB: registering frontend 0 (Afatech AF9013 DVB-T)...
   af9015_tuner_attach:
   af9015_tda18271_tuner_attach:
   tda18271 5-00c0: creating new instance
   TDA18271HD/C1 detected @ 5-00c0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   input: IR-receiver inside an USB DVB receiver as 
 /class/input/input39
   dvb-usb: schedule remote query interval to 200 msecs.
   dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
   and connected.
   af9015_init:
   af9015_download_ir_table:
   input: Leadtek WinFast DTV Dongle Gold as /class/input/input40
   input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
   usb-:00:02.1-10
   tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   tda18271_tune: freq = 21950, ifc = 380, bw = 700, std = 
 0x1d
   tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
   tda18271_init_regs: initializing registers for device @ 5-00c0
   tda18271_set_standby_mode: sm = 1, sm_lt = 0, sm_xt = 0

  There is no debug logs from af9013 demodulator module. You can enable
  logs by modprobe af9013 debug=1. Remember rmmod modules first from
  memory rmmod dvb_usb_af9015 af9013 mt2060 dvb_usb dvb_core

  af9013 debug should log rather much useful data when tuning to 
 channel.
  Did you try change GPIO3 as mentioned earlier?



  regards
  Antti
  --
  http://palosaari.fi/



 I tried what you said, it works with no_reconnect = 1 and #if 0, and it 
 also
 works with no_reconnect = 0 and #if 1, but no_reconnect = 0 and #if 0
 doesn't work. It has a fit if I use no_reconnect = 1 and #if 1. It
 gives me a lot
 of this:

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Antti Palosaari
Jarryd Beck wrote:
 and when I try to tune it I get this:
 
 af9013_init
 af9013_reset
 af9013_power_ctrl: onoff:1
 af9013_set_adc_ctrl: adc_clock:28000
 af913_div: a:2800 b:100 x:19
 af913_div: a:0 b:100 x:19 r:14680064 r:e0
 af9013_init: load ofsm settings
 af9013_init: load tuner specific settings
 af9013_init: setting ts mode
 af9013_lock_led: onoff:1
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 
 the last two lines are repeated about another 30 times and it
 just sits there doing nothing. Also for some reason it makes
 my keyboard really slow to respond just while it's tuning.

Sounds weird. tda18271 driver does own i2c transaction for every 
register write / read. Thats why it opens and closes i2c-gate of the 
af9013 (about i2c-gate: tuner is wired to demodulator and demodulator 
keeps gate that should be open and close every time when access to tuner 
is needed). I don't know if this really takes so much cpu-time from 
af9013/5 that it slows down or so much disk IO from your computer to 
write all logs to disk. Anyhown, i2c-bus of the af9015/3 can be 
increased from driver. It is 400kHz currently if I remember correctly.

There is still missing all best information from your logs. I put here 
successful case with logs where AF9015 + MT2060 (tuner) is tuned to 
channel. I need same kind information to see if demodulator is 
programmed correctly. There could be even bug because I have only 8MHz 
BW and you have 7MHz, maybe there is no test for 7MHz at all.


Mar 14 06:11:27 crope-laptop kernel: [15962.068300] usb 2-1: new high 
speed USB device using ehci_hcd and address 19
Mar 14 06:11:27 crope-laptop kernel: [15962.120712] usb 2-1: 
configuration #1 chosen from 1 choice
Mar 14 06:11:27 crope-laptop kernel: [15962.126234] input: Afatech DVB-T 
2 as /devices/pci:00/:00:02.1/usb2/2-1/2-1:1.1/input/input26
Mar 14 06:11:27 crope-laptop kernel: [15962.143945] input,hidraw0: USB 
HID v1.01 Keyboard [Afatech DVB-T 2] on usb-:00:02.1-1
Mar 14 06:11:27 crope-laptop kernel: [15962.185417] af9015_usb_probe:
Mar 14 06:11:27 crope-laptop kernel: [15962.186118] 
af9015_identify_state: reply:01
Mar 14 06:11:27 crope-laptop kernel: [15962.186123] dvb-usb: found a 
'Afatech AF9015 DVB-T USB2.0 stick' in cold state, will try to load a 
firmware
Mar 14 06:11:27 crope-laptop kernel: [15962.191522] dvb-usb: downloading 
firmware from file 'dvb-usb-af9015.fw'
Mar 14 06:11:27 crope-laptop kernel: [15962.191526] 
af9015_download_firmware:
Mar 14 06:11:27 crope-laptop kernel: [15962.228754] usbcore: registered 
new interface driver dvb_usb_af9015
Mar 14 06:11:27 crope-laptop kernel: [15962.228878] usb 2-1: USB 
disconnect, address 19
Mar 14 06:11:27 crope-laptop kernel: [15962.231248] dvb-usb: generic 
DVB-USB module successfully deinitialized and disconnected.
Mar 14 06:11:27 crope-laptop kernel: [15962.334815] usb 2-1: new high 
speed USB device using ehci_hcd and address 20
Mar 14 06:11:28 crope-laptop kernel: [15962.471565] usb 2-1: 
configuration #1 chosen from 1 choice
Mar 14 06:11:28 crope-laptop kernel: [15962.483220] af9015_usb_probe:
Mar 14 06:11:28 crope-laptop kernel: [15962.484851] 
af9015_identify_state: reply:02
Mar 14 06:11:28 crope-laptop kernel: [15962.484857] dvb-usb: found a 
'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
Mar 14 06:11:28 crope-laptop kernel: [15962.484910] dvb-usb: will pass 
the complete MPEG2 transport stream to the software demuxer.
Mar 14 06:11:28 crope-laptop kernel: [15962.485346] DVB: registering new 
adapter (Afatech AF9015 DVB-T USB2.0 stick)
Mar 14 06:11:28 crope-laptop kernel: [15962.485557] af9015_eeprom_dump:
Mar 14 06:11:28 crope-laptop kernel: [15962.538409] 00: 2c 75 9b 0b 00 
00 00 00 a4 15 16 90 00 02 01 02
Mar 14 06:11:28 crope-laptop kernel: [15962.765844] 10: 00 80 00 fa fa 
10 40 ef 01 30 31 30 31 31 30 30
Mar 14 06:11:28 crope-laptop kernel: [15962.629342] 20: 34 30 36 30 30 
30 30 31 ff ff ff ff ff ff ff ff
Mar 14 06:11:28 crope-laptop kernel: [15962.672188] 30: 00 00 3a 01 00 
08 02 00 1d 8d c4 04 82 ff ff ff
Mar 14 06:11:28 crope-laptop kernel: [15962.696172] 40: ff ff ff ff ff 
08 02 00 1d 8d c4 04 82 ff ff ff
Mar 14 06:11:28 crope-laptop kernel: [15962.729650] 50: ff ff ff ff ff 
24 00 00 04 03 09 04 10 03 41 00
Mar 14 06:11:28 crope-laptop kernel: [15962.760627] 60: 66 00 61 00 74 
00 65 00 63 00 68 00 10 03 44 00
Mar 14 06:11:28 crope-laptop kernel: [15962.791231] 70: 56 00 42 00 2d 
00 54 00 20 00 32 00 20 03 30 00
Mar 14 06:11:28 crope-laptop kernel: [15962.823208] 80: 31 00 30 00 31 
00 31 00 30 00 30 00 34 00 30 00
Mar 14 06:11:28 crope-laptop kernel: [15962.855187] 90: 36 00 30 00 30 
00 30 00 30 00 31 00 00 ff ff ff
Mar 14 06:11:28 crope-laptop kernel: 

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Michael Krufky
Jarryd Beck wrote:
 On Fri, Mar 14, 2008 at 2:22 PM, Jarryd Beck [EMAIL PROTECTED] wrote:
   
 Here is dmesg with debug enabled on af9013 too:

 usb 2-10: new high speed USB device using ehci_hcd and address 7
 usb 2-10: configuration #1 chosen from 1 choice
 af9015_usb_probe:
 af9015_identify_state: reply:01
 dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
 will try to load a firmware
 dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
 af9015_download_firmware:
 dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in warm state.
 dvb-usb: will pass the complete MPEG2 transport stream to the software 
 demuxer.
 DVB: registering new adapter (Afatech AF9015 DVB-T USB2.0 stick)
 af9015_eeprom_dump:
 00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
 10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
 20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
 30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
 40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
 50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
 60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
 70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
 80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
 90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
 a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
 b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
 c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 af9015_read_config: xtal:2 set adc_clock:28000
 af9015_read_config: tuner id1:156
 af9015_read_config: spectral inversion:0
 af9015_set_gpios:
 af9013: firmware version:4.95.0
 DVB: registering frontend 2 (Afatech AF9013 DVB-T)...
 af9015_tuner_attach:
 af9015_tda18271_tuner_attach:
 tda18271 5-00c0: creating new instance
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 TDA18271HD/C1 detected @ 5-00c0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 [...]
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 input: IR-receiver inside an USB DVB receiver as /class/input/input9
 dvb-usb: schedule remote query interval to 200 msecs.
 dvb-usb: Afatech AF9015 DVB-T USB2.0 stick successfully initialized
 and connected.
 af9015_init:
 af9015_download_ir_table:
 input: Leadtek WinFast DTV Dongle Gold as /class/input/input10
 input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
 usb-:00:02.1-10

 and when I try to tune it I get this:

 af9013_init
 af9013_reset
 af9013_power_ctrl: onoff:1
 af9013_set_adc_ctrl: adc_clock:28000
 af913_div: a:2800 b:100 x:19
 af913_div: a:0 b:100 x:19 r:14680064 r:e0
 af9013_init: load ofsm settings
 af9013_init: load tuner specific settings
 af9013_init: setting ts mode
 af9013_lock_led: onoff:1
 tda18271_set_standby_mode: sm = 0, sm_lt = 0, sm_xt = 0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0
 tda18271_init_regs: initializing registers for device @ 5-00c0
 af9013_i2c_gate_ctrl: enable:1
 af9013_i2c_gate_ctrl: enable:0

 the last two lines are repeated about another 30 times and it
 just sits there doing nothing. Also for some reason it makes
 my keyboard really slow to respond just while it's tuning.

 Jarryd.

The tda18271c1 driver does many i2c transactions during a tune request.
This involves image rejection filter calibration, if it hasnt already
been done at least once, and rf tracking filter calibration on every 
 tune.
  
This all happens very quickly on the hardware that I've tested ( a
cx23887-based pcie card and a cypress fx2-based usb device).  I've also
heard good reports on saa713x-based pci cards.  Is the i2c slow in the
af9013 driver?
  
The tuner driver is programmed to use 7mhz dvbt with IF centered at 3.8
mhz -- is the demod set to the same?
  
-Mike
  

  How do I find out about the demod? Is the speed of af9013 a question for
  me because I have no idea.
 
 Somewhere along the way demod_address in a struct is set to AF9015_I2C_DEMOD
 which is 0x38. Is that what you wanted?
   
I was hoping that Antti might know the answers those questions.

Anyhow, there is something else related to the tuner that we can try.  In the 
snoop log, I see that no i2c transactions are longer than 16 bytes.  The linux 
driver writes 39 registers at once during its 

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Antti Palosaari
Michael Krufky wrote:
 This all happens very quickly on the hardware that I've tested ( a
 cx23887-based pcie card and a cypress fx2-based usb device).  I've also
 heard good reports on saa713x-based pci cards.  Is the i2c slow in the
 af9013 driver?

I will check this later, probably it is possible to speed up. I need to 
take look of the usb-sniffs.

 The tuner driver is programmed to use 7mhz dvbt with IF centered at 3.8
 mhz -- is the demod set to the same?

hmm, good point. I don't know. There is parameter tuner IF that is set 
to 36125 kHz. Any idea or help?

regards
Antti

-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Antti Palosaari
Jarryd Beck wrote:
 Somewhere along the way demod_address in a struct is set to AF9015_I2C_DEMOD
 which is 0x38. Is that what you wanted?

No, it is demodulator i2c-address.

Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-13 Thread Antti Palosaari
looks like possible bug found!

Jarryd Beck wrote:
 On Fri, Mar 14, 2008 at 2:19 PM, Michael Krufky [EMAIL PROTECTED] wrote:

  This all happens very quickly on the hardware that I've tested ( a
  cx23887-based pcie card and a cypress fx2-based usb device).  I've also
  heard good reports on saa713x-based pci cards.  Is the i2c slow in the
  af9013 driver?

Just checked from code and it looks like it is 60 kHz currently. It is 
not clear for me how kHz correlates to value written to register so let 
is be this time.

  The tuner driver is programmed to use 7mhz dvbt with IF centered at 3.8
  mhz -- is the demod set to the same?

hmm, I think there is bug now. I compared eeprom dumps and found that my 
MT2060 has IF1 = 36125 and eeprom of this device says it should be IF1 = 
  4300. Is 4.3 Mhz close enough (we are speaking same thing?)?

Jerryd, change .tuner_if = 36125 to 4300 . It can be found from af9015 
module.

 How do I find out about the demod? Is the speed of af9013 a question for
 me because I have no idea.

One thing to test speed is also commenting out program tuner part from 
af9013 so it does not ask tuner to go frequency. It did not tune then.

But, I still needs debug logs of the af9013. Then I can compare much 
more easier usb-sniff and debug values got from driver.

Antti
-- 
http://palosaari.fi/

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Michael Krufky
On Tue, Mar 11, 2008 at 11:06 PM, Jarryd Beck [EMAIL PROTECTED] wrote:
   
 Also when I plugged it in, it sat there for about 10 seconds before
 finishing loading (dmesg printed another 5 lines about the device
 after about 10 seconds), but still no tuning.
  
Can I see those five lines?  ;-)
  
While you're at it, you may as well include dmesg from the point that the 
 bridge driver loads and on.
  

  Here's dmesg from the point it starts up until it finishes printing stuff.

  usb 2-10: new high speed USB device using ehci_hcd and address 22
  usb 2-10: configuration #1 chosen from 1 choice
  af9015_usb_probe:
  af9015_identify_state: reply:01
  dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in cold state, will
  try to load a firmware
  dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
  af9015_download_firmware:
  dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in warm state.
  dvb-usb: will pass the complete MPEG2 transport stream to the software 
 demuxer.
  DVB: registering new adapter (Leadtek Winfast DTV Dongle Gold)
  af9015_eeprom_dump:
  00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
  10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
  20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
  30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
  40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
  50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
  60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
  70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
  80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
  90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
  a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
  b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
  c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  af9015_read_config: xtal:2 set adc_clock:28000
  af9015_read_config: tuner id1:156
  af9015_read_config: spectral inversion:0
  af9015_set_gpios:
  af9013: firmware version:4.95.0
  DVB: registering frontend 2 (Afatech AF9013 DVB-T)...
  af9015_tuner_attach:
  tda18271_tuner_attach:
  tda18271 5-00c0: creating new instance

 TDA18271HD/C1 detected @ 5-00c0
  input: IR-receiver inside an USB DVB receiver as /class/input/input34
  dvb-usb: schedule remote query interval to 200 msecs.
  dvb-usb: Leadtek Winfast DTV Dongle Gold successfully initialized and 
 connected.
  af9015_init:
  af9015_download_ir_table:
  input: Leadtek WinFast DTV Dongle Gold as /class/input/input35
  input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
  usb-:00:02.1-10



  This is channel 7's entry in channels.conf:
  7 
 Digital:17750:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:514:1312


Jarryd,

I've analyzed the snoop that you've taken of the windows driver, and I
conclude that the driver is basically doing exactly the same that the
linux driver would do.  The only thing that I cannot verify is whether
or not the tda18211 uses the same table values as the tda18271c1.
Based on the traffic in your snoop, it looks like the exact same
algorithm is used, but based on a new set of tables -- I will not be
able to confirm that without a tda18211 datasheet.  The only thing
that you can do is try the tda18271 driver and hopefully it will work.

Have you tried to tune yet?  There is a space in your channels.conf,
7 Digital -- you may want to change that to something like,
7Digital so that command line applications will work.

Good Luck,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Antti Palosaari

hello
I looked sniffs and find correct demodulator initialization values for 
this NXP tuner. Copy  paste correct table from attached file and try. 
Hopefully it works. I compared your sniff to mt2060 and qt1010 based 
devices and there was still some minor differences to check.


regards,
Antti

Michael Krufky wrote:

On Tue, Mar 11, 2008 at 11:06 PM, Jarryd Beck [EMAIL PROTECTED] wrote:

 

Also when I plugged it in, it sat there for about 10 seconds before
finishing loading (dmesg printed another 5 lines about the device
after about 10 seconds), but still no tuning.
 
   Can I see those five lines?  ;-)
 
   While you're at it, you may as well include dmesg from the point that the 
bridge driver loads and on.
 

 Here's dmesg from the point it starts up until it finishes printing stuff.

 usb 2-10: new high speed USB device using ehci_hcd and address 22
 usb 2-10: configuration #1 chosen from 1 choice
 af9015_usb_probe:
 af9015_identify_state: reply:01
 dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in cold state, will
 try to load a firmware
 dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
 af9015_download_firmware:
 dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in warm state.
 dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
 DVB: registering new adapter (Leadtek Winfast DTV Dongle Gold)
 af9015_eeprom_dump:
 00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
 10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
 20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
 30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
 40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
 50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
 60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
 70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
 80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
 90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
 a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
 b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
 c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 af9015_read_config: xtal:2 set adc_clock:28000
 af9015_read_config: tuner id1:156
 af9015_read_config: spectral inversion:0
 af9015_set_gpios:
 af9013: firmware version:4.95.0
 DVB: registering frontend 2 (Afatech AF9013 DVB-T)...
 af9015_tuner_attach:
 tda18271_tuner_attach:
 tda18271 5-00c0: creating new instance

TDA18271HD/C1 detected @ 5-00c0
 input: IR-receiver inside an USB DVB receiver as /class/input/input34
 dvb-usb: schedule remote query interval to 200 msecs.
 dvb-usb: Leadtek Winfast DTV Dongle Gold successfully initialized and 
connected.
 af9015_init:
 af9015_download_ir_table:
 input: Leadtek WinFast DTV Dongle Gold as /class/input/input35
 input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
 usb-:00:02.1-10



 This is channel 7's entry in channels.conf:
 7 
Digital:17750:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:514:1312



Jarryd,

I've analyzed the snoop that you've taken of the windows driver, and I
conclude that the driver is basically doing exactly the same that the
linux driver would do.  The only thing that I cannot verify is whether
or not the tda18211 uses the same table values as the tda18271c1.
Based on the traffic in your snoop, it looks like the exact same
algorithm is used, but based on a new set of tables -- I will not be
able to confirm that without a tda18211 datasheet.  The only thing
that you can do is try the tda18271 driver and hopefully it will work.

Have you tried to tune yet?  There is a space in your channels.conf,
7 Digital -- you may want to change that to something like,
7Digital so that command line applications will work.

Good Luck,

Mike

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



--
http://palosaari.fi/
0023980 9bd5 0800 0001 9bd6 0800 0003 9bbe 0800
0023af0 9bd5 0800 0001 9bd6 0800 0007 d1a0 0101
0023ca0 9bd5 0800 0001 9bd6 0800 0006 9bbe 0800
0023e10 0800 0008   9bd5 0800 0001 9bd6
0023fa0 9bd5 0800 0001 9bd6 0800 0007 d1a0 0101
0024150 9bee 0100 0001  9bd5 0800 0001 9bd6
0024300 0080 9bee 0100 0001 9bd5 0800 0001 9bd6
00244d0 d73b 0103   9bd5 0800 0001 9bd6
0024670 9bd5 0800 0001 9bd6 0800 0004 d1a0 0101
0036740 9bd5 2062 29b2 0003 32d5  89d6 0001

[EMAIL PROTECTED] Files]$ hexdump -s 0x23980 -n 366 -e '1/2 { 0x%04x,  
2/1 0x%02x,  1/1  0x%02x },  1/1 \n' AF15BDA.sys
{ 0x9bd5, 0x00, 0x08, 0x01 }, 
{ 0x9bd6, 0x00, 0x08, 0x03 }, 
{ 0x9bbe, 0x00, 0x08, 0x01 }, 
{ 0xd1a0, 0x01, 0x01, 0x01 }, 
{ 0xd000, 0x00, 0x01, 0x01 }, 
{ 0xd000, 0x01, 0x01, 0x00 }, 
{ 0xd001, 0x01, 0x01, 0x01 }, 
{ 0xd001, 0x00, 0x01, 0x00 }, 
{ 

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread mkrufky
Michael Krufky wrote:
 On Tue, Mar 11, 2008 at 11:06 PM, Jarryd Beck [EMAIL PROTECTED] 
 wrote:
  
 Also when I plugged it in, it sat there for about 10 seconds 
 before
 finishing loading (dmesg printed another 5 lines about the device
 after about 10 seconds), but still no tuning.
  
Can I see those five lines?  ;-)
  
While you're at it, you may as well include dmesg from the point 
 that the bridge driver loads and on.
  

  Here's dmesg from the point it starts up until it finishes printing 
 stuff.

  usb 2-10: new high speed USB device using ehci_hcd and address 22
  usb 2-10: configuration #1 chosen from 1 choice
  af9015_usb_probe:
  af9015_identify_state: reply:01
  dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in cold state, will
  try to load a firmware
  dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
  af9015_download_firmware:
  dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in warm state.
  dvb-usb: will pass the complete MPEG2 transport stream to the 
 software demuxer.
  DVB: registering new adapter (Leadtek Winfast DTV Dongle Gold)
  af9015_eeprom_dump:
  00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
  10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
  20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
  30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
  40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
  50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
  60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
  70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
  80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
  90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
  a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
  b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
  c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  af9015_read_config: xtal:2 set adc_clock:28000
  af9015_read_config: tuner id1:156
  af9015_read_config: spectral inversion:0
  af9015_set_gpios:
  af9013: firmware version:4.95.0
  DVB: registering frontend 2 (Afatech AF9013 DVB-T)...
  af9015_tuner_attach:
  tda18271_tuner_attach:
  tda18271 5-00c0: creating new instance

 TDA18271HD/C1 detected @ 5-00c0
  input: IR-receiver inside an USB DVB receiver as /class/input/input34
  dvb-usb: schedule remote query interval to 200 msecs.
  dvb-usb: Leadtek Winfast DTV Dongle Gold successfully initialized 
 and connected.
  af9015_init:
  af9015_download_ir_table:
  input: Leadtek WinFast DTV Dongle Gold as /class/input/input35
  input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
  usb-:00:02.1-10



  This is channel 7's entry in channels.conf:
  7 

Digital:17750:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRAN
SMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:514:1312 



 Jarryd,

 I've analyzed the snoop that you've taken of the windows driver, and I
 conclude that the driver is basically doing exactly the same that the
 linux driver would do.  The only thing that I cannot verify is whether
 or not the tda18211 uses the same table values as the tda18271c1.
 Based on the traffic in your snoop, it looks like the exact same
 algorithm is used, but based on a new set of tables -- I will not be
 able to confirm that without a tda18211 datasheet.  The only thing
 that you can do is try the tda18271 driver and hopefully it will work.

 Have you tried to tune yet?  There is a space in your channels.conf,
 7 Digital -- you may want to change that to something like,
 7Digital so that command line applications will work.



Antti Palosaari wrote:
 hello
 I looked sniffs and find correct demodulator initialization values for 
 this NXP tuner. Copy  paste correct table from attached file and try. 
 Hopefully it works. I compared your sniff to mt2060 and qt1010 based 
 devices and there was still some minor differences to check.

 regards,
 Antti


Antti,

Please remember not to top-post.

Jarryd,

I have done further analysis on the snoop logs.  Not only is the driver 
using the same protocol as the tda18271 linux driver, it also seems to 
use the same table values as used with the tda18271c1 -- The linux 
driver should work on your tuner without any modification at all.

Regards,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Jarryd Beck
  
   Jarryd,
  
   I've analyzed the snoop that you've taken of the windows driver, and I
   conclude that the driver is basically doing exactly the same that the
   linux driver would do.  The only thing that I cannot verify is whether
   or not the tda18211 uses the same table values as the tda18271c1.
   Based on the traffic in your snoop, it looks like the exact same
   algorithm is used, but based on a new set of tables -- I will not be
   able to confirm that without a tda18211 datasheet.  The only thing
   that you can do is try the tda18271 driver and hopefully it will work.
  
   Have you tried to tune yet?  There is a space in your channels.conf,
   7 Digital -- you may want to change that to something like,
   7Digital so that command line applications will work.
  



 Antti Palosaari wrote:
   hello
   I looked sniffs and find correct demodulator initialization values for
   this NXP tuner. Copy  paste correct table from attached file and try.
   Hopefully it works. I compared your sniff to mt2060 and qt1010 based
   devices and there was still some minor differences to check.
  
   regards,
   Antti
  

  Antti,

  Please remember not to top-post.

  Jarryd,

  I have done further analysis on the snoop logs.  Not only is the driver
  using the same protocol as the tda18271 linux driver, it also seems to
  use the same table values as used with the tda18271c1 -- The linux
  driver should work on your tuner without any modification at all.

  Regards,

  Mike


I've got another tuner which works, so I know I'm tuning correctly, it just
doesn't actually tune. I tried with mplayer, it just sat there saying
dvb_tune Freq: 21950 and did nothing. It also made my whole
computer go really slow, I don't know what it was actually doing.

Antti, as I said I've never done anything like this before so I have no
idea what I'm doing, so I have no idea where to paste which table.

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Michael Krufky
On Wed, Mar 12, 2008 at 4:36 PM, Jarryd Beck [EMAIL PROTECTED] wrote:

   
 Jarryd,

 I've analyzed the snoop that you've taken of the windows driver, and I
 conclude that the driver is basically doing exactly the same that the
 linux driver would do.  The only thing that I cannot verify is whether
 or not the tda18211 uses the same table values as the tda18271c1.
 Based on the traffic in your snoop, it looks like the exact same
 algorithm is used, but based on a new set of tables -- I will not be
 able to confirm that without a tda18211 datasheet.  The only thing
 that you can do is try the tda18271 driver and hopefully it will work.

 Have you tried to tune yet?  There is a space in your channels.conf,
 7 Digital -- you may want to change that to something like,
 7Digital so that command line applications will work.

  
  
  
   Antti Palosaari wrote:
 hello
 I looked sniffs and find correct demodulator initialization values for
 this NXP tuner. Copy  paste correct table from attached file and try.
 Hopefully it works. I compared your sniff to mt2060 and qt1010 based
 devices and there was still some minor differences to check.

 regards,
 Antti

  
Antti,
  
Please remember not to top-post.
  
Jarryd,
  
I have done further analysis on the snoop logs.  Not only is the driver
using the same protocol as the tda18271 linux driver, it also seems to
use the same table values as used with the tda18271c1 -- The linux
driver should work on your tuner without any modification at all.
  
Regards,
  
Mike
  

  I've got another tuner which works, so I know I'm tuning correctly, it just
  doesn't actually tune. I tried with mplayer, it just sat there saying
  dvb_tune Freq: 21950 and did nothing. It also made my whole
  computer go really slow, I don't know what it was actually doing.

  Antti, as I said I've never done anything like this before so I have no
  idea what I'm doing, so I have no idea where to paste which table.

Please try using tzap.  This will show you FE status once every
second.  Let it run for a whole minute -- maybe there is some noise
that may cause it to take a longer time to lock (if that's the case,
then there are some tweaks that we can do.)  Show us the femon output
produced by running tzap.

-Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Jarryd Beck
On Thu, Mar 13, 2008 at 7:54 AM, Michael Krufky [EMAIL PROTECTED] wrote:

 On Wed, Mar 12, 2008 at 4:36 PM, Jarryd Beck [EMAIL PROTECTED] wrote:
  
 
   Jarryd,
  
   I've analyzed the snoop that you've taken of the windows driver, 
 and I
   conclude that the driver is basically doing exactly the same that 
 the
   linux driver would do.  The only thing that I cannot verify is 
 whether
   or not the tda18211 uses the same table values as the tda18271c1.
   Based on the traffic in your snoop, it looks like the exact same
   algorithm is used, but based on a new set of tables -- I will not be
   able to confirm that without a tda18211 datasheet.  The only thing
   that you can do is try the tda18271 driver and hopefully it will 
 work.
  
   Have you tried to tune yet?  There is a space in your channels.conf,
   7 Digital -- you may want to change that to something like,
   7Digital so that command line applications will work.
  



 Antti Palosaari wrote:
   hello
   I looked sniffs and find correct demodulator initialization values 
 for
   this NXP tuner. Copy  paste correct table from attached file and 
 try.
   Hopefully it works. I compared your sniff to mt2060 and qt1010 based
   devices and there was still some minor differences to check.
  
   regards,
   Antti
  

  Antti,

  Please remember not to top-post.

  Jarryd,

  I have done further analysis on the snoop logs.  Not only is the driver
  using the same protocol as the tda18271 linux driver, it also seems to
  use the same table values as used with the tda18271c1 -- The linux
  driver should work on your tuner without any modification at all.

  Regards,

  Mike

  
I've got another tuner which works, so I know I'm tuning correctly, it 
 just
doesn't actually tune. I tried with mplayer, it just sat there saying
dvb_tune Freq: 21950 and did nothing. It also made my whole
computer go really slow, I don't know what it was actually doing.
  
Antti, as I said I've never done anything like this before so I have no
idea what I'm doing, so I have no idea where to paste which table.

  Please try using tzap.  This will show you FE status once every
  second.  Let it run for a whole minute -- maybe there is some noise
  that may cause it to take a longer time to lock (if that's the case,
  then there are some tweaks that we can do.)  Show us the femon output
  produced by running tzap.

  -Mike


$ tzap -a 2 TEN Digital
using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0'
tuning to 21950 Hz
video pid 0x0200, audio pid 0x028a
status 01 | signal  | snr  | ber  | unc  |

$ femon -a 2
using '/dev/dvb/adapter2/frontend0'
FE: Afatech AF9013 DVB-T (TERRESTRIAL)
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 00 | signal  | snr  | ber  | unc  |
status 01 | signal  | snr  | ber  | unc  |

The status 00 lines were from before I started tzap, after I started tzap
it did nothing for half a minute, then printed the status 01 line, then
sat there for another half a minute, and I killed it at that point.
My computer was also taking quite a few seconds to respond to
me pressing the keyboard for the whole time I was tuning it.

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread mkrufky
Jarryd Beck wrote:
 On Thu, Mar 13, 2008 at 7:54 AM, Michael Krufky [EMAIL PROTECTED]
wrote:
   
 On Wed, Mar 12, 2008 at 4:36 PM, Jarryd Beck [EMAIL PROTECTED]
wrote:
  
 
   Jarryd,
  
   I've analyzed the snoop that you've taken of the windows
driver, and I
   conclude that the driver is basically doing exactly the same
that the
   linux driver would do.  The only thing that I cannot verify is
whether
   or not the tda18211 uses the same table values as the
tda18271c1.
   Based on the traffic in your snoop, it looks like the exact
same
   algorithm is used, but based on a new set of tables -- I will
not be
   able to confirm that without a tda18211 datasheet.  The only
thing
   that you can do is try the tda18271 driver and hopefully it
will work.
  
   Have you tried to tune yet?  There is a space in your
channels.conf,
   7 Digital -- you may want to change that to something like,
   7Digital so that command line applications will work.
  



 Antti Palosaari wrote:
   hello
   I looked sniffs and find correct demodulator initialization
values for
   this NXP tuner. Copy  paste correct table from attached file
and try.
   Hopefully it works. I compared your sniff to mt2060 and qt1010
based
   devices and there was still some minor differences to check.
  
   regards,
   Antti
  

  Antti,

  Please remember not to top-post.

  Jarryd,

  I have done further analysis on the snoop logs.  Not only is the
driver
  using the same protocol as the tda18271 linux driver, it also
seems to
  use the same table values as used with the tda18271c1 -- The linux
  driver should work on your tuner without any modification at all.

  Regards,

  Mike

  
I've got another tuner which works, so I know I'm tuning correctly,
it just
doesn't actually tune. I tried with mplayer, it just sat there saying
dvb_tune Freq: 21950 and did nothing. It also made my whole
computer go really slow, I don't know what it was actually doing.
  
Antti, as I said I've never done anything like this before so I have
no
idea what I'm doing, so I have no idea where to paste which table.

  Please try using tzap.  This will show you FE status once every
  second.  Let it run for a whole minute -- maybe there is some noise
  that may cause it to take a longer time to lock (if that's the case,
  then there are some tweaks that we can do.)  Show us the femon output
  produced by running tzap.

  -Mike

 

 $ tzap -a 2 TEN Digital
 using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0'
 tuning to 21950 Hz
 video pid 0x0200, audio pid 0x028a
 status 01 | signal  | snr  | ber  | unc  |

 $ femon -a 2
 using '/dev/dvb/adapter2/frontend0'
 FE: Afatech AF9013 DVB-T (TERRESTRIAL)
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 01 | signal  | snr  | ber  | unc  |

 The status 00 lines were from before I started tzap, after I started tzap
 it did nothing for half a minute, then printed the status 01 line, then
 sat there for another half a minute, and I killed it at that point.
 My computer was also taking quite a few seconds to respond to
 me pressing the keyboard for the whole time I was tuning it.

 Jarryd.
   
What shows in dmesg during the above?

-Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Jarryd Beck
On Thu, Mar 13, 2008 at 8:09 AM,  [EMAIL PROTECTED] wrote:

 Jarryd Beck wrote:
   On Thu, Mar 13, 2008 at 7:54 AM, Michael Krufky [EMAIL PROTECTED]
  wrote:
  
   On Wed, Mar 12, 2008 at 4:36 PM, Jarryd Beck [EMAIL PROTECTED]
  wrote:

   
 Jarryd,

 I've analyzed the snoop that you've taken of the windows
  driver, and I
 conclude that the driver is basically doing exactly the same
  that the
 linux driver would do.  The only thing that I cannot verify is
  whether
 or not the tda18211 uses the same table values as the
  tda18271c1.
 Based on the traffic in your snoop, it looks like the exact
  same
 algorithm is used, but based on a new set of tables -- I will
  not be
 able to confirm that without a tda18211 datasheet.  The only
  thing
 that you can do is try the tda18271 driver and hopefully it
  will work.

 Have you tried to tune yet?  There is a space in your
  channels.conf,
 7 Digital -- you may want to change that to something like,
 7Digital so that command line applications will work.

  
  
  
   Antti Palosaari wrote:
 hello
 I looked sniffs and find correct demodulator initialization
  values for
 this NXP tuner. Copy  paste correct table from attached file
  and try.
 Hopefully it works. I compared your sniff to mt2060 and qt1010
  based
 devices and there was still some minor differences to check.

 regards,
 Antti

  
Antti,
  
Please remember not to top-post.
  
Jarryd,
  
I have done further analysis on the snoop logs.  Not only is the
  driver
using the same protocol as the tda18271 linux driver, it also
  seems to
use the same table values as used with the tda18271c1 -- The linux
driver should work on your tuner without any modification at all.
  
Regards,
  
Mike
  

  I've got another tuner which works, so I know I'm tuning correctly,
  it just
  doesn't actually tune. I tried with mplayer, it just sat there saying
  dvb_tune Freq: 21950 and did nothing. It also made my whole
  computer go really slow, I don't know what it was actually doing.

  Antti, as I said I've never done anything like this before so I have
  no
  idea what I'm doing, so I have no idea where to paste which table.
  
Please try using tzap.  This will show you FE status once every
second.  Let it run for a whole minute -- maybe there is some noise
that may cause it to take a longer time to lock (if that's the case,
then there are some tweaks that we can do.)  Show us the femon output
produced by running tzap.
  
-Mike
  
  
  
   $ tzap -a 2 TEN Digital
   using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0'
   tuning to 21950 Hz
   video pid 0x0200, audio pid 0x028a
   status 01 | signal  | snr  | ber  | unc  |
  
   $ femon -a 2
   using '/dev/dvb/adapter2/frontend0'
   FE: Afatech AF9013 DVB-T (TERRESTRIAL)
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 01 | signal  | snr  | ber  | unc  |
  
   The status 00 lines were from before I started tzap, after I started tzap
   it did nothing for half a minute, then printed the status 01 line, then
   sat there for another half a minute, and I killed it at that point.
   My computer was also taking quite a few seconds to respond to
   me pressing the keyboard for the whole time I was tuning it.
  
   Jarryd.
  
  What shows in dmesg during the above?

  -Mike


nothing new

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread mkrufky
Jarryd Beck wrote:
 On Thu, Mar 13, 2008 at 8:09 AM,  [EMAIL PROTECTED] wrote:
   
 Jarryd Beck wrote:
   On Thu, Mar 13, 2008 at 7:54 AM, Michael Krufky [EMAIL PROTECTED]
  wrote:
  
   On Wed, Mar 12, 2008 at 4:36 PM, Jarryd Beck [EMAIL PROTECTED]
  wrote:

   
 Jarryd,

 I've analyzed the snoop that you've taken of the windows
  driver, and I
 conclude that the driver is basically doing exactly the
same
  that the
 linux driver would do.  The only thing that I cannot verify
is
  whether
 or not the tda18211 uses the same table values as the
  tda18271c1.
 Based on the traffic in your snoop, it looks like the exact
  same
 algorithm is used, but based on a new set of tables -- I
will
  not be
 able to confirm that without a tda18211 datasheet.  The
only
  thing
 that you can do is try the tda18271 driver and hopefully it
  will work.

 Have you tried to tune yet?  There is a space in your
  channels.conf,
 7 Digital -- you may want to change that to something
like,
 7Digital so that command line applications will work.

  
  
  
   Antti Palosaari wrote:
 hello
 I looked sniffs and find correct demodulator initialization
  values for
 this NXP tuner. Copy  paste correct table from attached
file
  and try.
 Hopefully it works. I compared your sniff to mt2060 and
qt1010
  based
 devices and there was still some minor differences to check.

 regards,
 Antti

  
Antti,
  
Please remember not to top-post.
  
Jarryd,
  
I have done further analysis on the snoop logs.  Not only is
the
  driver
using the same protocol as the tda18271 linux driver, it also
  seems to
use the same table values as used with the tda18271c1 -- The
linux
driver should work on your tuner without any modification at
all.
  
Regards,
  
Mike
  

  I've got another tuner which works, so I know I'm tuning
correctly,
  it just
  doesn't actually tune. I tried with mplayer, it just sat there
saying
  dvb_tune Freq: 21950 and did nothing. It also made my whole
  computer go really slow, I don't know what it was actually doing.

  Antti, as I said I've never done anything like this before so I
have
  no
  idea what I'm doing, so I have no idea where to paste which
table.
  
Please try using tzap.  This will show you FE status once every
second.  Let it run for a whole minute -- maybe there is some noise
that may cause it to take a longer time to lock (if that's the case,
then there are some tweaks that we can do.)  Show us the femon
output
produced by running tzap.
  
-Mike
  
  
  
   $ tzap -a 2 TEN Digital
   using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0'
   tuning to 21950 Hz
   video pid 0x0200, audio pid 0x028a
   status 01 | signal  | snr  | ber  | unc  |
  
   $ femon -a 2
   using '/dev/dvb/adapter2/frontend0'
   FE: Afatech AF9013 DVB-T (TERRESTRIAL)
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 00 | signal  | snr  | ber  | unc  |
   status 01 | signal  | snr  | ber  | unc  |
  
   The status 00 lines were from before I started tzap, after I started
tzap
   it did nothing for half a minute, then printed the status 01 line,
then
   sat there for another half a minute, and I killed it at that point.
   My computer was also taking quite a few seconds to respond to
   me pressing the keyboard for the whole time I was tuning it.
  
   Jarryd.
  
  What shows in dmesg during the above?

  -Mike

 

 nothing new

 Jarryd.
   

Then, please turn ON debug, repeat your tests, and post again with 
dmesg.  I am not familiar with the af9015 driver, but for tda18271, set 
debug=1.  (you must unload all modules first -- do 'make unload' in the 
v4l-dvb dir, then replug your device)

-Mike



Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Jarryd Beck
On Thu, Mar 13, 2008 at 8:14 AM,  [EMAIL PROTECTED] wrote:

 Jarryd Beck wrote:
   On Thu, Mar 13, 2008 at 8:09 AM,  [EMAIL PROTECTED] wrote:
  
   Jarryd Beck wrote:
 On Thu, Mar 13, 2008 at 7:54 AM, Michael Krufky [EMAIL PROTECTED]
wrote:

 On Wed, Mar 12, 2008 at 4:36 PM, Jarryd Beck [EMAIL PROTECTED]
wrote:
  
 
   Jarryd,
  
   I've analyzed the snoop that you've taken of the windows
driver, and I
   conclude that the driver is basically doing exactly the
  same
that the
   linux driver would do.  The only thing that I cannot verify
  is
whether
   or not the tda18211 uses the same table values as the
tda18271c1.
   Based on the traffic in your snoop, it looks like the exact
same
   algorithm is used, but based on a new set of tables -- I
  will
not be
   able to confirm that without a tda18211 datasheet.  The
  only
thing
   that you can do is try the tda18271 driver and hopefully it
will work.
  
   Have you tried to tune yet?  There is a space in your
channels.conf,
   7 Digital -- you may want to change that to something
  like,
   7Digital so that command line applications will work.
  



 Antti Palosaari wrote:
   hello
   I looked sniffs and find correct demodulator initialization
values for
   this NXP tuner. Copy  paste correct table from attached
  file
and try.
   Hopefully it works. I compared your sniff to mt2060 and
  qt1010
based
   devices and there was still some minor differences to check.
  
   regards,
   Antti
  

  Antti,

  Please remember not to top-post.

  Jarryd,

  I have done further analysis on the snoop logs.  Not only is
  the
driver
  using the same protocol as the tda18271 linux driver, it also
seems to
  use the same table values as used with the tda18271c1 -- The
  linux
  driver should work on your tuner without any modification at
  all.

  Regards,

  Mike

  
I've got another tuner which works, so I know I'm tuning
  correctly,
it just
doesn't actually tune. I tried with mplayer, it just sat there
  saying
dvb_tune Freq: 21950 and did nothing. It also made my whole
computer go really slow, I don't know what it was actually doing.
  
Antti, as I said I've never done anything like this before so I
  have
no
idea what I'm doing, so I have no idea where to paste which
  table.

  Please try using tzap.  This will show you FE status once every
  second.  Let it run for a whole minute -- maybe there is some noise
  that may cause it to take a longer time to lock (if that's the case,
  then there are some tweaks that we can do.)  Show us the femon
  output
  produced by running tzap.

  -Mike



 $ tzap -a 2 TEN Digital
 using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0'
 tuning to 21950 Hz
 video pid 0x0200, audio pid 0x028a
 status 01 | signal  | snr  | ber  | unc  |

 $ femon -a 2
 using '/dev/dvb/adapter2/frontend0'
 FE: Afatech AF9013 DVB-T (TERRESTRIAL)
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 00 | signal  | snr  | ber  | unc  |
 status 01 | signal  | snr  | ber  | unc  |

 The status 00 lines were from before I started tzap, after I started
  tzap
 it did nothing for half a minute, then printed the status 01 line,
  then
 sat there for another half a minute, and I killed it at that point.
 My computer was also taking quite a few seconds to respond to
 me pressing the keyboard for the whole time I was tuning it.

 Jarryd.

What shows in dmesg during the above?
  

Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread mkrufky
Jarryd Beck wrote:
 On Thu, Mar 13, 2008 at 8:14 AM,  [EMAIL PROTECTED] wrote:
   
  Then, please turn ON debug, repeat your tests, and post again with
  dmesg.  I am not familiar with the af9015 driver, but for tda18271, set
  debug=1.  (you must unload all modules first -- do 'make unload' in the
  v4l-dvb dir, then replug your device)
 
 Sorry I'm unsure where to set debug.
   
You have two options.

option 1)

after unloading all modules, load the given module with the debug insmod 
option.

To see the available insmod options, use modinfo.  For instance, 
'modinfo tda18271' will show you the tuner drivers available options.

Load the driver using the option, modprobe tda18271 debug=1 ... then 
plug in the stick.

...

option 2)

set the insmod option in your boot script.  I run Ubuntu... to enable 
debug for my tuner. i edit /etc/modprobe.d/options and add the following 
line:

options tda18271 debug=1

...then unload all modules, and replug the stick...   or reboot your 
machine, then replug the stick.

regards,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread ras243-dvb
 status 00 | signal  | snr  | ber  | unc  |
 status 01 | signal  | snr  | ber  | unc  |

I'm not familiar enough with the hardware and I don't know if this will help
but this is the same thing I was seeing when I was getting the dvico dual
digital 4 working in Australia.  It wasn't a problem with the tuner but rather
a sampling frequency issue with the demodulator.  I'm posting this after a
digest message so ignore this if you've already sorted it out.

Regards,
Roger.

Send instant messages to your online friends http://au.messenger.yahoo.com 

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-12 Thread Jarryd Beck
On Thu, Mar 13, 2008 at 10:11 AM, Antti Palosaari [EMAIL PROTECTED] wrote:
 Jarryd Beck wrote:
   On Thu, Mar 13, 2008 at 8:14 AM,  [EMAIL PROTECTED] wrote:

   Then, please turn ON debug, repeat your tests, and post again with
dmesg.  I am not familiar with the af9015 driver, but for tda18271, set
debug=1.  (you must unload all modules first -- do 'make unload' in the
v4l-dvb dir, then replug your device)
  
-Mike
  
  
  
   Sorry I'm unsure where to set debug.
  
   Jarryd.

  I added initial support for this tda-tuner to the driver. Jarryd, can
  you test?
  http://linuxtv.org/hg/~anttip/af9015_new/

  There is debug switch in af9013 module that may be helpful if it does
  not work. You can enable it as described or if it is too hard to play
  with modprobe just edit af9013.c file in frontend directory and set
  debug=1 by hard coding.
  If it does not work you can also try set GPIO3 setting (af9015) to 0xb
  instead 0x3 used currently. Also try to change rf-spectral inversion to
  see if it helps. Firmware should be ok and all other settings as well as
  I can see from usb-sniffs. With little lucky it should start working.

  regards
  Antti
  --
  http://palosaari.fi/


Thanks, but now for some reason all I get is this:

usb 2-10: new high speed USB device using ehci_hcd and address 6
usb 2-10: configuration #1 chosen from 1 choice
input: Leadtek WinFast DTV Dongle Gold as /class/input/input8
input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
usb-:00:02.1-10
af9015_usb_probe:
af9015_identify_state: reply:01
dvb-usb: found a 'Afatech AF9015 DVB-T USB2.0 stick' in cold state,
will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
af9015_download_firmware:
usbcore: registered new interface driver dvb_usb_af9015

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-11 Thread Jarryd Beck
  Can you take logs with vendor WHQL driver and sent for further analysis?
  http://www.afatech.com/EN/support.aspx

  Antti

  --
  http://palosaari.fi


For some reason windows didn't like that driver. When I used the installer
nothing happened, and when I used device manager it said this folder
contains no information about your device.
So I made a snoop with the driver on the CD, I hope it's good enough.

I uploaded the snoop to
http://download.yousendit.com/2B0B420876BFB959

While it was snooping, I plugged it in, tuned the card to a tv channel
and pulled it out as quick as I could.
If it helps, the channel was channel 7, sydney, australia.

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-11 Thread Michael Krufky
On Tue, Mar 11, 2008 at 5:05 PM, Jarryd Beck [EMAIL PROTECTED] wrote:
   Can you take logs with vendor WHQL driver and sent for further analysis?
http://www.afatech.com/EN/support.aspx
  
Antti
  
--
http://palosaari.fi
  

  For some reason windows didn't like that driver. When I used the installer
  nothing happened, and when I used device manager it said this folder
  contains no information about your device.
  So I made a snoop with the driver on the CD, I hope it's good enough.

  I uploaded the snoop to
  http://download.yousendit.com/2B0B420876BFB959

  While it was snooping, I plugged it in, tuned the card to a tv channel
  and pulled it out as quick as I could.
  If it helps, the channel was channel 7, sydney, australia.


This helps.  I can tell that your tda18211 is located at 0xC0, and
it contains 0x83 in its ID register.  This is the same ID byte that
the tda18271c1 uses to identify itself -- hopefully that implies
driver compatability, but we won't know for sure until you try it.

The windows driver is only using the primary sixteen registers  --  I
don't know if the device even HAS the 23 extended registers that the
tda18271 has...  The driver that you're running does not seem to touch
the extended registers at all.  It's possible that the driver is
simply blasting the register bytes to the tuner, without doing any
calibration explicitly -- that could explain the 16 byte blasts
without any transactions to the extended registers not sure --
this is all speculation.

One thing I can say -- the Linux tda18271 driver should be able to
detect your tuner at 0xC0  (0x60)  as a tda18271c1 -- It's worth a
try, and could certainly be possible that the driver *may* work as-is,
although I suspect that some tweaking will be needed.

Regards,

Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-11 Thread Jarryd Beck
  One thing I can say -- the Linux tda18271 driver should be able to
  detect your tuner at 0xC0  (0x60)  as a tda18271c1 -- It's worth a
  try, and could certainly be possible that the driver *may* work as-is,
  although I suspect that some tweaking will be needed.

  Regards,

  Mike


I changed it's i2c as loaded by af9015 to 0xC0, then got this in
dmesg:

TDA18271HD/C1 detected @ 5-00c0

Also when I plugged it in, it sat there for about 10 seconds before
finishing loading (dmesg printed another 5 lines about the device
after about 10 seconds), but still no tuning.

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-11 Thread Michael Krufky
Jarryd Beck wrote:
  One thing I can say -- the Linux tda18271 driver should be able to
  detect your tuner at 0xC0  (0x60)  as a tda18271c1 -- It's worth a
  try, and could certainly be possible that the driver *may* work as-is,
  although I suspect that some tweaking will be needed.

  Regards,

  Mike

 
 I changed it's i2c as loaded by af9015 to 0xC0, then got this in
 dmesg:
 
 TDA18271HD/C1 detected @ 5-00c0
 
 Also when I plugged it in, it sat there for about 10 seconds before
 finishing loading (dmesg printed another 5 lines about the device
 after about 10 seconds), but still no tuning.

Can I see those five lines?  ;-)

While you're at it, you may as well include dmesg from the point that the 
bridge driver loads and on.

I don't know how the AF9015 works, but Antti does.  What demod is on this 
device? ...or is that part of the AF9015?

After googling some more, I found that the tda18211 supports DVB-T, ATSC and 
QAM ...  Seems to be a digital-only tuner, while the tda18271 supports both 
digital and analog.

The IF frequencies used for the tda18211 are the same as the default settings 
for the tda18271c1.

- QAM: IF output centered at 4 and 5 MHz (bandwidth = 6 and 8 MHz respectively)
- DVB-T: IF output centered at 3.3, 3.8 and 4.3 MHz (bandwidth = 6, 7 and 8MHz 
respectively)
- ATSC: IF output centered at 3.25 MHz (bandwidth = 6MHz)

...I am looking at the snoop log some more -- My earlier statement was wrong -- 
I *do* see the driver programming all 39 registers, and now I do see 
calibration transactions taking place.

I can see from this snoop that the value that belongs in the linux driver's 
std_bits parameter should be 0x19.  It looks like the windows driver starts 
off with 0x18, and after some wiggling, locks at 0x19.   Maybe it is first 
trying to tune to a 7 MHz DVB-T channel, then changes to 8 MHz.

You said that you tuned to channel 7, sydney, australia -- is that an 8 MHz 
channel?  What frequency is it on?

-Mike

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-11 Thread Steven Toth

 You said that you tuned to channel 7, sydney, australia -- is that an 8 MHz 
 channel?  What frequency is it on?

Australia uses 7MHz channels in VHF and UHF.

- Steve

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-11 Thread Jarryd Beck
  
   Also when I plugged it in, it sat there for about 10 seconds before
   finishing loading (dmesg printed another 5 lines about the device
   after about 10 seconds), but still no tuning.

  Can I see those five lines?  ;-)

  While you're at it, you may as well include dmesg from the point that the 
 bridge driver loads and on.


Here's dmesg from the point it starts up until it finishes printing stuff.

usb 2-10: new high speed USB device using ehci_hcd and address 22
usb 2-10: configuration #1 chosen from 1 choice
af9015_usb_probe:
af9015_identify_state: reply:01
dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in cold state, will
try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-af9015.fw'
af9015_download_firmware:
dvb-usb: found a 'Leadtek Winfast DTV Dongle Gold' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Leadtek Winfast DTV Dongle Gold)
af9015_eeprom_dump:
00: 31 c2 bb 0b 00 00 00 00 13 04 29 60 00 02 01 02
10: 00 80 00 fa fa 10 40 ef 01 30 31 30 31 30 32 30
20: 35 30 35 30 30 30 30 31 ff ff ff ff ff ff ff ff
30: 00 00 3a 01 00 08 02 00 cc 10 00 00 9c ff ff ff
40: ff ff ff ff ff 08 02 00 1d 8d c4 04 82 ff ff ff
50: ff ff ff ff ff 26 00 00 04 03 09 04 10 03 4c 00
60: 65 00 61 00 64 00 74 00 65 00 6b 00 30 03 57 00
70: 69 00 6e 00 46 00 61 00 73 00 74 00 20 00 44 00
80: 54 00 56 00 20 00 44 00 6f 00 6e 00 67 00 6c 00
90: 65 00 20 00 47 00 6f 00 6c 00 64 00 20 03 30 00
a0: 31 00 30 00 31 00 30 00 31 00 30 00 31 00 30 00
b0: 36 00 30 00 30 00 30 00 30 00 31 00 00 ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
af9015_read_config: xtal:2 set adc_clock:28000
af9015_read_config: tuner id1:156
af9015_read_config: spectral inversion:0
af9015_set_gpios:
af9013: firmware version:4.95.0
DVB: registering frontend 2 (Afatech AF9013 DVB-T)...
af9015_tuner_attach:
tda18271_tuner_attach:
tda18271 5-00c0: creating new instance
TDA18271HD/C1 detected @ 5-00c0
input: IR-receiver inside an USB DVB receiver as /class/input/input34
dvb-usb: schedule remote query interval to 200 msecs.
dvb-usb: Leadtek Winfast DTV Dongle Gold successfully initialized and connected.
af9015_init:
af9015_download_ir_table:
input: Leadtek WinFast DTV Dongle Gold as /class/input/input35
input: USB HID v1.01 Keyboard [Leadtek WinFast DTV Dongle Gold] on
usb-:00:02.1-10


  You said that you tuned to channel 7, sydney, australia -- is that an 8 
 MHz channel?  What frequency is it on?


This is channel 7's entry in channels.conf:
7 
Digital:17750:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:513:514:1312

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-10 Thread Jarryd Beck
  I think that the tda18271 driver will work with your tuner, but we may
  need to make some small adjustments.  If you look in tda18271-fe.c ,
  you'll find the code that autodetects between a TDA18271c1 and a
  TDA18271c2 ...

I just realised there's a problem with versions of code. I'm using
the code from http://www.linuxtv.org/hg/~anttip/af9015
However I suppose you want me to use the code from the main
repository. Needless to say it doesn't work with 0x60 or 0x61
as the address for the tuner.
Also if I could somehow get this working with the right
code, I don't know how to set up the values in the tda182171_config
struct.

Jarryd.

On Mon, Mar 10, 2008 at 3:28 PM, Michael Krufky [EMAIL PROTECTED] wrote:
 On Mon, Mar 10, 2008 at 12:46 PM, Michael Krufky [EMAIL PROTECTED]
  wrote:
   Jarryd Beck wrote:
 Would someone be interested in writing tuner drivers for the NXP
 18211HDC1 tuner?
 I recently bought the Winfast DTV Dongle Gold which uses an AF9015
 chip and the NXP tuner.
 I've managed to get it working up to the point of needing the tuner,
 after that nothing works.
 I have no idea how to write tuner code, so if someone is interested, I
 can supply all the
 info I've got about the card and test whatever you write.

 Jarryd.
  
Try the tda18271 driver -- I am under the impression that the tda18211
is a dvb-t only subset of the tda18271, but I dont have a tda18211 to
test with and find out, nor do I have a tda18211 spec to look at.  :-(
  
Good Luck,
  
Mike

 Jarryd Beck wrote:
   I tried that, but I wasn't sure about a few things, I was kind of making 
 stuff
   up as I went along.
  
   Can you tell me if I've done this right?
  
   At the af9015_tuner_attach function I wrote a function
   tda18211_tuner_attach which
   calls dvb_attach. The one thing I'm not sure about is the function
   tda18271_attach
   has a parameter u8 addr. I don't know what that is supposed to do or where 
 I am
   supposed to get it from.
  
   You can look up a datasheet from the nxp site, it appears it goes under 
 the name
   tda18211HD, I don't know what the C1 at the end means, I'm hoping it's the 
 same
   thing. The datasheet isn't very useful though, it pretty much only has a
   circuit diagram and a couple of numbers on it.
  
   Jarryd.
  
  

  Jarryd,

  Please don't drop cc to the mailing list (added back), and also remember
  not to top quote.

  The addr parameter is the i2c address of the tuner.  It is most likely
  0x60 or 0x61.

  For an example of how to attach the tda18271 driver, look in
  cx23885-dvb.c for CX23885_BOARD_HAUPPAUGE_HVR1800 where alt_tuner is 1.

  The datasheet on the nxp site wont help me -- i need to see the register
  map.

  I think that the tda18271 driver will work with your tuner, but we may
  need to make some small adjustments.  If you look in tda18271-fe.c ,
  you'll find the code that autodetects between a TDA18271c1 and a
  TDA18271c2 ...   If the autodetection fails for your tuner, you might
  want to try hardcoding it to the tda18271c1.  If that works, then I'll
  ask you to enable the register dump debug option (debug = 4) in the
  tda18271 driver and send me a dmesg snippit.  That should help us to add
  the autodetection later.

  hth,

  Mike



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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-10 Thread Antti Palosaari
Jarryd Beck wrote:
  I think that the tda18271 driver will work with your tuner, but we may
  need to make some small adjustments.  If you look in tda18271-fe.c ,
  you'll find the code that autodetects between a TDA18271c1 and a
  TDA18271c2 ...
 
 I just realised there's a problem with versions of code. I'm using
 the code from http://www.linuxtv.org/hg/~anttip/af9015
 However I suppose you want me to use the code from the main
 repository. Needless to say it doesn't work with 0x60 or 0x61
 as the address for the tuner.

You can update af9015-tree to master level easily:
hg pull -u http://linuxtv.org/hg/v4l-dvb
hg merge


 Also if I could somehow get this working with the right
 code, I don't know how to set up the values in the tda182171_config
 struct.

Take USB-sniffs and look there correct configuration values.

regards
Antti
-- 
http://palosaari.fi

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-10 Thread Jarryd Beck
  You can update af9015-tree to master level easily:
  hg pull -u http://linuxtv.org/hg/v4l-dvb
  hg merge

Thanks, that worked well.


   Also if I could somehow get this working with the right
   code, I don't know how to set up the values in the tda182171_config
   struct.

  Take USB-sniffs and look there correct configuration values.

I've looked at usb sniffs, and unfortunately I have no idea what I'm
looking at, I don't have a clue what goes where. I've never even
looked at a driver for anything before, so this is all new to me.

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-10 Thread Jarryd Beck
On Tue, Mar 11, 2008 at 12:38 AM, Michael Krufky [EMAIL PROTECTED] wrote:
 Jarryd Beck wrote:
I think that the tda18271 driver will work with your tuner, but we may
need to make some small adjustments.  If you look in tda18271-fe.c ,
you'll find the code that autodetects between a TDA18271c1 and a
TDA18271c2 ...
  
  
   [snip]

 
   Also if I could somehow get this working with the right
   code, I don't know how to set up the values in the tda182171_config
   struct.
  

  Jarryd,

  Assuming that there is no tda829x analog demod present, and that this is
  a digital-only device, try something like this:

  static struct tda18271_config jarryd_tda18271_config = {
 .gate = TDA18271_GATE_DIGITAL
  }


  You should leave .std_map as NULL unless you need to override the default 
 values per standard.

  The value in the .std_bits corresponds to the lower five bits in EP3 
 (register 0x05 [4:0])

  Most likely, the driver's default setting will work for you, but you
  may find that the vendor chose a different value if you sniff the usb
  traffic from the windows driver.  This value is directly tied to the IF
  frequency between the tuner and demod.

  -Mike Krufky



That didn't work, the problem is I can't tell where it's going wrong and
I don't understand usb sniffs. I have a few questions:
When af9015 reads the tuner, the existing tuners set the spectral
inversion state-gpio3. Do you know what state-gpio3 does?
The code then goes on to read the spectral inversion, but there's
a comment there saying it's always 0, and the existing tuners
have theirs set to 1, what should I set it to for this one?

If it's the case that some of the other values in the config are wrong,
how would I go about making sense of a usb sniff?

Jarryd.

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-10 Thread Antti Palosaari
Jarryd Beck wrote:
 
 That didn't work, the problem is I can't tell where it's going wrong and
 I don't understand usb sniffs. I have a few questions:
 When af9015 reads the tuner, the existing tuners set the spectral
 inversion state-gpio3. Do you know what state-gpio3 does?

It connects tuner, probably turns power on. I don't if it needed or not 
in your device. At least it is needed when used AF9015 reference design 
with MT2060 or MT2061 tuners.

 The code then goes on to read the spectral inversion, but there's
 a comment there saying it's always 0, and the existing tuners
 have theirs set to 1, what should I set it to for this one?

Don't care this setting before you have got tuner attached. Tuner module 
will print message to log when it was attached. That's good indicator to 
see that communication to tuner works. After that you should try to find 
correct settings for all other things.

 If it's the case that some of the other values in the config are wrong,
 how would I go about making sense of a usb sniff?

Can you take logs with vendor WHQL driver and sent for further analysis?
http://www.afatech.com/EN/support.aspx

Antti

-- 
http://palosaari.fi

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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-09 Thread Michael Krufky
Jarryd Beck wrote:
 Would someone be interested in writing tuner drivers for the NXP
 18211HDC1 tuner?
 I recently bought the Winfast DTV Dongle Gold which uses an AF9015
 chip and the NXP tuner.
 I've managed to get it working up to the point of needing the tuner,
 after that nothing works.
 I have no idea how to write tuner code, so if someone is interested, I
 can supply all the
 info I've got about the card and test whatever you write.

 Jarryd.

Try the tda18271 driver -- I am under the impression that the tda18211 
is a dvb-t only subset of the tda18271, but I dont have a tda18211 to 
test with and find out, nor do I have a tda18211 spec to look at.  :-(

Good Luck,

Mike


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


Re: [linux-dvb] NXP 18211HDC1 tuner

2008-03-09 Thread Michael Krufky
On Mon, Mar 10, 2008 at 12:46 PM, Michael Krufky [EMAIL PROTECTED] 
wrote:
 Jarryd Beck wrote:
   Would someone be interested in writing tuner drivers for the NXP
   18211HDC1 tuner?
   I recently bought the Winfast DTV Dongle Gold which uses an AF9015
   chip and the NXP tuner.
   I've managed to get it working up to the point of needing the tuner,
   after that nothing works.
   I have no idea how to write tuner code, so if someone is interested, I
   can supply all the
   info I've got about the card and test whatever you write.
  
   Jarryd.

  Try the tda18271 driver -- I am under the impression that the tda18211
  is a dvb-t only subset of the tda18271, but I dont have a tda18211 to
  test with and find out, nor do I have a tda18211 spec to look at.  :-(

  Good Luck,

  Mike
Jarryd Beck wrote:
 I tried that, but I wasn't sure about a few things, I was kind of making stuff
 up as I went along.

 Can you tell me if I've done this right?

 At the af9015_tuner_attach function I wrote a function
 tda18211_tuner_attach which
 calls dvb_attach. The one thing I'm not sure about is the function
 tda18271_attach
 has a parameter u8 addr. I don't know what that is supposed to do or where I 
 am
 supposed to get it from.

 You can look up a datasheet from the nxp site, it appears it goes under the 
 name
 tda18211HD, I don't know what the C1 at the end means, I'm hoping it's the 
 same
 thing. The datasheet isn't very useful though, it pretty much only has a
 circuit diagram and a couple of numbers on it.

 Jarryd.

   

Jarryd,

Please don't drop cc to the mailing list (added back), and also remember 
not to top quote.

The addr parameter is the i2c address of the tuner.  It is most likely 
0x60 or 0x61.

For an example of how to attach the tda18271 driver, look in 
cx23885-dvb.c for CX23885_BOARD_HAUPPAUGE_HVR1800 where alt_tuner is 1.

The datasheet on the nxp site wont help me -- i need to see the register 
map.

I think that the tda18271 driver will work with your tuner, but we may 
need to make some small adjustments.  If you look in tda18271-fe.c , 
you'll find the code that autodetects between a TDA18271c1 and a 
TDA18271c2 ...   If the autodetection fails for your tuner, you might 
want to try hardcoding it to the tda18271c1.  If that works, then I'll 
ask you to enable the register dump debug option (debug = 4) in the 
tda18271 driver and send me a dmesg snippit.  That should help us to add 
the autodetection later.

hth,

Mike


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