Latest working kernel version: 2.6.26.1 Earliest failing kernel version: 2.6.26.2 Distribution: ArchLinux Hardware Environment: Hauppauge WinTV PCI - FM, with conexant chip Software Environment: Problem Description: With the new kernel (2.6.26.2) it's not possible to manually set the tuner type for my conexant based tv - card. The card is not detected correctly (seems to be a hardware error). So I had to set the tuner manually to 38. In the current version the type is recognized in the cx88xx module but in dmesg the tuner-simple module states, that the tuner type is set to 0. It seems to be a similar problem like in: http://lkml.org/lkml/2008/7/21/154 but related to the cx88xx module. Fix: http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.26.y.git;a=commit;h=b0c31e8936d72641893663c1f16a49d9a34c6d06 Steps to reproduce: Because my card is not recognized correctly, I use the following script to load my modules correctly: odprobe -r cx88-dvb cx88-blackbird cx8802 cx88-alsa cx8800 cx88xx tuner tuner-simple modprobe tuner-simple debug=1 modprobe cx88xx tuner=38 modprobe cx8800 After running this script dmesg states: tda9887 2-0043: destroying instance tuner-simple 2-0061: destroying instance Linux video capture interface: v2.00 cx88/0: cx2388x v4l2 driver version 0.0.6 loaded ACPI: PCI Interrupt 0000:01:07.0[A] -> Link [APC1] -> GSI 16 (level, high) -> IRQ 16 cx88[0]: subsystem: 0070:3401, board: Hauppauge WinTV 34xxx models [card=1,autodetected] cx88[0]: TV tuner type 38, Radio tuner type -1 tuner' 2-0043: chip found @ 0x86 (cx88[0]) tda9887 2-0043: creating new instance tda9887 2-0043: tda988[5/6/7] found tuner' 2-0061: chip found @ 0xc2 (cx88[0]) tveeprom 2-0050: Encountered bad packet header [00]. Corrupt or not a Hauppauge eeprom. cx88[0]: warning: unknown hauppauge model #0 cx88[0]: hauppauge eeprom: model=0 tuner-simple 2-0061: creating new instance tuner-simple 2-0061: type set to 0 (Temic PAL (4002 FH5)) tuner-simple 2-0061: tuner 0 atv rf input will be autoselected tuner-simple 2-0061: tuner 0 dtv rf input will be autoselected tuner-simple 2-0061: using tuner params #0 (pal) tuner-simple 2-0061: freq = 400.00 (6400), range = 1, config = 0x8e, cb = 0x04 tuner-simple 2-0061: Freq= 400.00 MHz, V_IF=38.93 MHz, Offset=0.00 MHz, div=7023 tuner-simple 2-0061: tv 0x1b 0x6f 0x8e 0x04 input: cx88 IR (Hauppauge WinTV 34xxx as /class/input/input9 cx88[0]/0: found at 0000:01:07.0, rev: 5, irq: 16, latency: 32, mmio: 0xe6000000 cx88[0]/0: registered device video0 [v4l2] cx88[0]/0: registered device vbi0 tuner-simple 2-0061: desired params (ntsc) undefined for tuner 0 tuner-simple 2-0061: using tuner params #0 (pal) tuner-simple 2-0061: freq = 400.00 (6400), range = 1, config = 0x8e, cb = 0x04 tuner-simple 2-0061: Freq= 400.00 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=7132 tuner-simple 2-0061: tv 0x1b 0xdc 0x8e 0x04 From my point of view this line is critical: tuner-simple 2-0061: type set to 0 (Temic PAL (4002 FH5)) This should type 38 instead. Greetings Marcel
Is noone interested in this bug? The behaviour was confirmed in: http://bbs.archlinux.org/viewtopic.php?pid=408795#p408795
I have the same problem with a newer kernel (2.6.28). modprobe cx88xx card=40 tuner=63 gives me : tuner-simple 2-0061: type set to 63 (Temic PAL (4002 FH5)) Actually i should get something like this : tuner-simple 0-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner) Please help us! Because of this problem, i can't use my tv card. :( Thank you.
Created attachment 19572 [details] Fix tuner message There are two separate issues happening here: 1) The driver is incorrectly reporting that it changed tuner type; 2) The driver is not accepting to setup a tuner on some boards. The enclosed patch should fix (1). Could you please test it? After having this working, we can address the second issue.
Thank you a lot for taking care of this problem. :) This is really well-appreciated!! So according to your patch, we can see that it is impossible to setup the tuner : [ 7.121483] cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded [ 7.122050] cx88[0]: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB -T/Hybrid [card=40,autodetected], frontend(s): 1 [ 7.122053] cx88[0]: TV tuner type 63, Radio tuner type -1 [ 7.165625] cx88/0: cx2388x v4l2 driver version 0.0.6 loaded [ 7.391234] tda829x_probe: driver disabled by Kconfig [ 7.391238] tuner' 2-0043: chip found @ 0x86 (cx88[0]) [ 7.391241] tda9887 2-0043: creating new instance [ 7.391243] tda9887 2-0043: tda988[5/6/7] found [ 7.394041] tuner' 2-0061: chip found @ 0xc2 (cx88[0]) [ 7.394851] tuner' 2-0063: chip found @ 0xc6 (cx88[0]) [ 7.432298] tveeprom 2-0050: Encountered bad packet header [17]. Corrupt or n ot a Hauppauge eeprom. [ 7.432302] cx88[0]: warning: unknown hauppauge model #0 [ 7.432303] cx88[0]: hauppauge eeprom: model=0 [ 7.433573] tuner-simple 2-0061: creating new instance [ 7.433575] tuner-simple 2-0061: type set to 0 (Temic PAL (4002 FH5)) [ 7.434920] tda9887 2-0043: i2c i/o error: rc == -6 (should be 4) [ 7.435725] tda9887 2-0043: i2c i/o error: rc == -6 (should be 4) [ 7.435797] input: cx88 IR (Hauppauge WinTV-HVR110 as /devices/pci0000:00/000 0:00:09.0/0000:01:09.2/input/input4 [ 7.443030] cx88[0]/2: cx2388x 8802 Driver Manager [ 7.443306] ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19 [ 7.443315] cx88-mpeg driver manager 0000:01:09.2: PCI INT A -> Link[APC4] -> GSI 19 (level, low) -> IRQ 19 [ 7.443322] cx88[0]/2: found at 0000:01:09.2, rev: 5, irq: 19, latency: 32, m mio: 0xfa000000 [ 7.443338] cx8802_probe() allocating 1 frontend(s) [ 7.443359] cx8800 0000:01:09.0: PCI INT A -> Link[APC4] -> GSI 19 (level, lo w) -> IRQ 19 [ 7.443364] cx88[0]/0: found at 0000:01:09.0, rev: 5, irq: 19, latency: 32, m mio: 0xf8000000 [ 7.443393] cx88[0]/0: registered device video0 [v4l2] [ 7.443409] cx88[0]/0: registered device vbi0 [ 7.464411] cx88/2: cx2388x dvb driver version 0.0.6 loaded [ 7.464414] cx88/2: registering cx8802 driver, type: dvb access: shared [ 7.464418] cx88[0]/2: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 D VB-T/Hybrid [card=40] [ 7.464421] cx88[0]/2: cx2388x based DVB/ATSC card [ 7.467238] tuner-simple 2-0061: attaching existing instance [ 7.467241] tuner-simple 2-0061: couldn't set type to 63. Using 0 (Temic PAL (4002 FH5)) instead [ 7.468872] tda9887 2-0043: i2c i/o error: rc == -6 (should be 4) [ 7.469856] DVB: registering new adapter (cx88[0]) [ 7.469859] DVB: registering adapter 0 frontend 0 (Conexant CX22702 DVB-T)... Kernel version : 2.6.28 Distribution : Gentoo Hardware Environment : Hauppauge HVR-1100 And, thank you again!
I didn't notice it before but .. why does tuner-simple try to setup the tuner type twice ?
I read a little bit the log and the code (tuner-simple.c and tuner-i2c.h) and noticed a few things : - first, the card model is set to 0 (hauppauge eeprom: model=0) - then, a new tuner instance is created : [ 7.391241] tda9887 2-0043: creating new instance - so, it goes through the following test : switch (instance) { case 0: mutex_unlock(&tuner_simple_list_mutex); return NULL; case 1: fe->tuner_priv = priv; priv->type = type; priv->tun = &tuners[type]; priv->nr = simple_devcount++; break; default: fe->tuner_priv = priv; break; } - as "instance" is equal to 1, it tries to setup the tuner type : [ 7.433575] tuner-simple 2-0061: type set to 0 (Temic PAL (4002 FH5)) :( - then, the good card type is reported : [ 7.464418] cx88[0]/2: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB-T/Hybrid [card=40] - then : [ 7.467238] tuner-simple 2-0061: attaching existing instance If tuner-simple attaches the existing instance, "instance" should keep on beeing equal to 1, shouldn't it ? Actually, this is not the case : instance is incremented by 1, and therefore is equal to 2. - and finally when it goes through the same test than previously (switch ...case ...), tuner-simple is not able to setup the tuner type (for example priv->type = type). Manually setting instance to 1 before this important test "fixes" but ok i admit that it is not really a good fix. :p Maybe attaching an existing instance shouldn't increment the number of instances ...
Created attachment 19726 [details] Fixes tveeprom bug This patch fixes the tveeprom bug. Please test again and give us some feedback.
It works for me : cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded [ 6.884986] cx88[0]: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB-T/Hybrid [card=40,autodetected], frontend(s): 1 [ 6.884990] cx88[0]: TV tuner type 63, Radio tuner type -1 [ 6.912378] cx88/0: cx2388x v4l2 driver version 0.0.6 loaded [ 7.126438] tda829x_probe: driver disabled by Kconfig [ 7.126441] tuner' 2-0043: chip found @ 0x86 (cx88[0]) [ 7.126445] tda9887 2-0043: creating new instance [ 7.126447] tda9887 2-0043: tda988[5/6/7] found [ 7.129244] tuner' 2-0061: chip found @ 0xc2 (cx88[0]) [ 7.130054] tuner' 2-0063: chip found @ 0xc6 (cx88[0]) [ 7.167506] tveeprom 2-0050: Encountered bad packet header [17]. Corrupt or not a Hauppauge eeprom. [ 7.167509] cx88[0]: warning: unknown hauppauge model #0 [ 7.167510] cx88[0]: hauppauge eeprom: model=0 [ 7.169823] input: cx88 IR (Hauppauge WinTV-HVR110 as /devices/pci0000:00/0000:00:09.0/0000:01:09.2/input/input4 [ 7.177032] cx88[0]/2: cx2388x 8802 Driver Manager [ 7.177306] ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19 [ 7.177316] cx88-mpeg driver manager 0000:01:09.2: PCI INT A -> Link[APC4] -> GSI 19 (level, low) -> IRQ 19 [ 7.177322] cx88[0]/2: found at 0000:01:09.2, rev: 5, irq: 19, latency: 32, mmio: 0xfa000000 [ 7.177338] cx8802_probe() allocating 1 frontend(s) [ 7.177616] cx8800 0000:01:09.0: PCI INT A -> Link[APC4] -> GSI 19 (level, low) -> IRQ 19 [ 7.177621] cx88[0]/0: found at 0000:01:09.0, rev: 5, irq: 19, latency: 32, mmio: 0xf8000000 [ 7.177655] cx88[0]/0: registered device video1 [v4l2] [ 7.177671] cx88[0]/0: registered device vbi0 [ 7.177723] tuner' 2-0061: tuner type not set [ 7.200515] cx88/2: cx2388x dvb driver version 0.0.6 loaded [ 7.200518] cx88/2: registering cx8802 driver, type: dvb access: shared [ 7.200521] cx88[0]/2: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB-T/Hybrid [card=40] [ 7.200524] cx88[0]/2: cx2388x based DVB/ATSC card [ 7.203336] tuner-simple 2-0061: creating new instance [ 7.203338] tuner-simple 2-0061: Instance en mode 1<6>tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner) [ 7.205998] DVB: registering new adapter (cx88[0]) [ 7.206004] DVB: registering adapter 0 frontend 0 (Conexant CX22702 DVB-T)... Thank you a lot! :)
Ok, this solved the tveeprom bug. Now, there's just one thing bothering me: Why aren't you able to read the tuner type from the Hauppauge's eeprom? Is your board really a Hauppauge's one, or it is some clone? Could you please test it again but this time loading tveeprom before cx88 stuff, with this option: modprobe tveeprom debug=1
Tveeprom debugging : [ 106.946809] cx88[0]: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB-T/Hybrid [card=40,insmod option], frontend(s): 1 [ 106.946812] cx88[0]: TV tuner type 63, Radio tuner type -1 [ 107.071251] tda829x_probe: driver disabled by Kconfig [ 107.071254] tuner' 2-0043: chip found @ 0x86 (cx88[0]) [ 107.071258] tda9887 2-0043: creating new instance [ 107.071259] tda9887 2-0043: tda988[5/6/7] found [ 107.074265] tuner' 2-0061: chip found @ 0xc2 (cx88[0]) [ 107.075079] tuner' 2-0063: chip found @ 0xc6 (cx88[0]) [ 107.112594] tveeprom 2-0050: full 256-byte eeprom dump: [ 107.112596] tveeprom 2-0050: 00: 17 00 00 00 70 00 02 94 00 00 00 00 20 77 00 40 [ 107.112601] tveeprom 2-0050: 10: ee 42 04 f0 73 05 21 00 84 08 00 06 39 6f 01 00 [ 107.112606] tveeprom 2-0050: 20: 50 28 8d 72 07 70 73 09 19 7f 73 0a f4 64 72 0b [ 107.112611] tveeprom 2-0050: 30: 2f 72 0e 01 72 0f 01 72 10 01 72 11 ff 79 9c 00 [ 107.112617] tveeprom 2-0050: 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112622] tveeprom 2-0050: 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112626] tveeprom 2-0050: 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112631] tveeprom 2-0050: 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112636] tveeprom 2-0050: 80: 00 00 00 00 84 09 00 04 20 77 00 40 ee 42 04 f0 [ 107.112642] tveeprom 2-0050: 90: 73 05 21 00 84 08 00 06 39 6f 01 00 50 28 8d 72 [ 107.112647] tveeprom 2-0050: a0: 07 70 73 09 19 7f 73 0a f4 64 72 0b 2f 72 0e 01 [ 107.112652] tveeprom 2-0050: b0: 72 0f 01 72 10 01 72 11 ff 79 9c 00 00 00 00 00 [ 107.112657] tveeprom 2-0050: c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112662] tveeprom 2-0050: d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112667] tveeprom 2-0050: e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112672] tveeprom 2-0050: f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 107.112678] tveeprom 2-0050: Encountered bad packet header [17]. Corrupt or not a Hauppauge eeprom. [ 107.112681] cx88[0]: warning: unknown hauppauge model #0 [ 107.112682] cx88[0]: hauppauge eeprom: model=0 [ 107.115819] input: cx88 IR (Hauppauge WinTV-HVR110 as /devices/pci0000:00/0000:00:09.0/0000:01:09.0/input/input4 [ 107.124059] cx88[0]/0: found at 0000:01:09.0, rev: 5, irq: 19, latency: 32, mmio: 0xf8000000 [ 107.124108] cx88[0]/0: registered device video1 [v4l2] [ 107.124126] cx88[0]/0: registered device vbi0 [ 107.124179] tuner' 2-0061: tuner type not set [ 107.138718] cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded [ 107.138739] cx88[0]/2: cx2388x 8802 Driver Manager [ 107.138754] cx88-mpeg driver manager 0000:01:09.2: PCI INT A -> Link[APC4] -> GSI 19 (level, low) -> IRQ 19 [ 107.138760] cx88[0]/2: found at 0000:01:09.2, rev: 5, irq: 19, latency: 32, mmio: 0xfa000000 [ 107.138767] cx8802_probe() allocating 1 frontend(s) [ 107.153755] cx88/2: cx2388x dvb driver version 0.0.6 loaded [ 107.153758] cx88/2: registering cx8802 driver, type: dvb access: shared [ 107.153762] cx88[0]/2: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB-T/Hybrid [card=40] [ 107.153765] cx88[0]/2: cx2388x based DVB/ATSC card [ 107.156810] tuner-simple 2-0061: creating new instance [ 107.156811] tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner) [ 107.159556] DVB: registering new adapter (cx88[0]) [ 107.159560] DVB: registering adapter 0 frontend 0 (Conexant CX22702 DVB-T)... So DVB works correctly but analog tv doesn't work because the tuner type is not set. ;) Thank you ;)
And yes, this card is really an Hauppauge HVR-1100. ;)