Most recent kernel where this bug did not occur: 2.6.14 Distribution: Archlinux Hardware Environment: saa7134 based Pinnacle PCTV Stereo card Software Environment: tvtime or whatever TV application Problem Description: Tuner is no longer detected. Output from 2.6.14: Nov 27 11:12:14 server saa7130/34: v4l2 driver version 0.2.14 loaded Nov 27 11:12:14 server ACPI: PCI Interrupt 0000:00:0d.0[A] -> GSI 17 (level, low) -> IRQ 16 Nov 27 11:12:14 server saa7134[0]: found at 0000:00:0d.0, rev: 1, irq: 16, latency: 32, mmio: 0xcfff6c00 Nov 27 11:12:14 server saa7134[0]: subsystem: 11bd:002b, board: Pinnacle PCTV Stereo (saa7134) [card=26,autodetected] Nov 27 11:12:14 server saa7134[0]: board init: gpio is 0 Nov 27 11:12:14 server saa7134[0]: i2c eeprom 00: bd 11 2b 00 f8 f8 1c 00 43 43 a9 1c 55 d2 b2 92 Nov 27 11:12:14 server saa7134[0]: i2c eeprom 10: 00 00 19 0e ff 20 ff ff ff ff ff ff ff ff ff ff Nov 27 11:12:14 server saa7134[0]: i2c eeprom 20: 01 40 01 03 03 ff 03 01 08 ff 00 53 ff ff ff ff Nov 27 11:12:14 server saa7134[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Nov 27 11:12:14 server tuner 0-0060: chip found @ 0xc0 (saa7134[0]) Nov 27 11:12:14 server tuner 0-0060: Chip ID is not zero. It is not a TEA5767 Nov 27 11:12:14 server tuner 0-0060: microtune: companycode=3cbf part=42 rev=2f Nov 27 11:12:14 server tuner 0-0060: microtune MT2050 found, OK Nov 27 11:12:14 server usb 3-1: new full speed USB device using ohci_hcd and address 2 Nov 27 11:12:14 server tda9885/6/7: chip found @ 0x86 Nov 27 11:12:14 server saa7134[0]: registered device video0 [v4l2] Nov 27 11:12:14 server saa7134[0]: registered device vbi0 Output from 2.6.15-rc3 and rc5: saa7130/34: v4l2 driver version 0.2.14 loaded ACPI: PCI Interrupt 0000:00:0d.0[A] -> GSI 17 (level, low) -> IRQ 16 saa7134[0]: found at 0000:00:0d.0, rev: 1, irq: 16, latency: 32, mmio: 0xcfff6c00 saa7134[0]: subsystem: 11bd:002b, board: Pinnacle PCTV Stereo (saa7134) [card=26,autodetected] saa7134[0]: board init: gpio is 0 saa7134[0]: i2c eeprom 00: bd 11 2b 00 f8 f8 1c 00 43 43 a9 1c 55 d2 b2 92 saa7134[0]: i2c eeprom 10: 00 00 19 0e ff 20 ff ff ff ff ff ff ff ff ff ff saa7134[0]: i2c eeprom 20: 01 40 01 03 03 ff 03 01 08 ff 00 53 ff ff ff ff saa7134[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[0]: i2c eeprom 40: ff 07 00 c0 86 ff 01 01 ff ff ff ff ff ff ff ff saa7134[0]: i2c eeprom 50: 0c 22 17 34 02 7f 67 46 ff ff ff ff ff ff ff ff saa7134[0]: i2c eeprom 60: 03 03 19 71 fb ff ff ff ff ff ff ff ff ff ff ff saa7134[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff tuner 0-0060: Chip ID is not zero. It is not a TEA5767 tuner 0-0060: chip found @ 0xc0 (saa7134[0]) tuner 0-0060: microtune: companycode=0000 part=00 rev=00 tuner 0-0060: microtune unknown found, not (yet?) supported, sorry :-/ tda9887 0-0043: chip found @ 0x86 (saa7134[0]) tda9887 0-0043: i2c i/o error: rc == -5 (should be 4) saa7134[0]: registered device video0 [v4l2] saa7134[0]: registered device vbi0 After this update, my tuner is no longer detected and TV input stays blank in tvtime or whatever other application that uses v4l.
The "i2c i/o error -5" is -EIO being returned by saa7134_i2c_xfer. However this part of the saa7134 driver did not change since 2.6.14. Please load the saa7134 driver with parameter i2c_debug=2, and provide the logs for both 2.6.15-rc5 and 2.6.14 for comparison.
Created attachment 6761 [details] output of saa7134 modprobe with debug turned on
We should isolate the bug if it is related to V4L infrastructure or something else. Please test it again with 2.6.14 and v4l tree (you can download it from http://linuxtv.org) Just download latest snapshot or CVS tree, do make/make install it will override kernel's v4l drivers. Please use the following insmod options: tuner tuner_debug=1 show_i2c=1 tda9887 debug=1 saa7134 i2c_scan=1 i2c_debug=2
Created attachment 6762 [details] i2c output with 2.6.14
Created attachment 6763 [details] kernel log output with new requested options, 2.6.15-rc5
Created attachment 6764 [details] 2.6.14 with updated v4l snapshot... doesn't work either
please try to disable IR with saa7134 disable_ir=1
Doesn't change anything in the detection of the tuner. What I notice as main difference between the two dmesg outputs: Dec 4 16:44:06 server tuner 0-0060: MT20xx hexdump: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 4 16:44:06 server tuner 0-0060: microtune: companycode=0000 part=00 rev=00 Dec 4 16:44:06 server tuner 0-0060: microtune unknown found, not (yet?) supported, sorry :-/ or this: Nov 29 07:21:56 server tuner 0-0060: microtune: companycode=3cbf part=42 rev=2f Nov 29 07:21:56 server tuner 0-0060: microtune MT2050 found, OK Somehow the MT20xx hexdump data isn't assigned somewhere in 2.6.15.
Jan, sorry for bothering, can you try also with option no_autodetect to tuner module (and with a reboot I suspect, to return i2c bus to working state).
This is what I get with no_autodetect: tuner 0-0043: MT20xx hexdump: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 tuner 0-0043: microtune: companycode=1010 part=10 rev=10 tuner 0-0043: microtune unknown found, not (yet?) supported, sorry :-/
I've just remembered that we have the following probably related comment in tda sources: - Pinnacle PCTV (Jul.2002 Version with MT2032, bttv) TDA9887 (world), TDA9885 (USA) Note: OP2 of tda988x must be set to 1, else MT2032 is disabled! Please make sure you have correct port2 option to tda9887
Bingo, that brought back my TV tuner :) Seems there's a change in the code that doesn't set this option by default anymore. Putting "options tda9887 port2=1" in modprobe.conf fixes my tuner detection.
Patch added to v4l tree. Fix will be sent to kernel at the next patchset.
With 2.6.15 final I have to set the port2=1 option for tda9887 /etc/modprobe.conf, load the tda9887 module first and then load up the saa7134 module. When I load saa7134 first, which autoloads the tuner modules, no tuner is detected.
To be correct on this one: the port2=1 workaround is required for 2.6.14 final also. The last version I had on my system that worked out of the box was 2.6.14-rc4.
Sorry, Jan. Can you confirm that with recent v4l-dvb cvs error is reproduced and port2=1 is still needed?