Bug 7825

Summary: KNC1 DVB-C cam module not working on driver load
Product: v4l-dvb Reporter: Jeroen Asselman (jeroen)
Component: ttpciAssignee: ttpci (v4l-dvb_ttpci)
Status: CLOSED OBSOLETE    
Severity: normal CC: alan, protasnb, tlinden
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.27 Subsystem:
Regression: No Bisected commit-id:
Attachments: New PCIID 0884:0020

Description Jeroen Asselman 2007-01-15 03:15:32 UTC
Distribution gentoo (2006.1 profile)
Hardware: AMD Athlon 64 X2 3800+
Output of lspci:
00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)
00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)
00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)
00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)
00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)
00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)
00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:09.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a4)
00:0a.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a4)
00:0a.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
00:0b.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:0b.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a4)
00:0d.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio
Controller (rev a2)
00:0f.0 IDE interface: nVidia Corporation CK804 IDE (rev f3)
00:10.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:11.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:12.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
00:13.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)
00:16.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:17.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM
Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Miscellaneous Control
01:00.0 Mass storage controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II
Controller (rev 01)
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit
Ethernet Controller (rev 15)
03:00.0 VGA compatible controller: nVidia Corporation GeForce 6200
TurboCache(TM) (rev a1)
04:06.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture
(rev 11)
04:06.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
04:07.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)
04:08.0 RAID bus controller: 3ware Inc 7xxx/8xxx-series PATA/SATA-RAID (rev 01)
04:0b.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000
Controller (PHY/Link)

Using gcc 4.1.1

The Cam module won't work on driver load. The error is "dvb_ca adaptor 0: PC
card did not respond  :( ". 

Steps to reproduce:
Make sure the CAM module is inserted in the CI slot.
Load the budget-av driver: "modprobe budget-av".

The following log appears in dmesg:

saa7146: register extension 'budget_av'.
ACPI: PCI Interrupt 0000:04:07.0[A] -> Link [LNKB] -> GSI 17 (level, low) -> IRQ 90
saa7146: found saa7146 @ mem ffffc2000019ec00 (revision 1, irq 90) (0x1894,0x0020).
saa7146 (0): dma buffer size 192512
DVB: registering new adapter (KNC1 DVB-C).
adapter failed MAC signature check
encoded MAC from EEPROM was
ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff
KNC1-0: MAC addr = 00:09:d6:6d:5a:f0
DVB: registering frontend 0 (Philips TDA10021 DVB-C)...
budget-av: ci interface initialised.
budget-av: cam inserted A

and after some time:

dvb_ca adaptor 0: PC card did not respond :( 

The steps can repeated if the driver is unloaded using:
modprobe -r budget_av budget budget_ci budget_core


However, if the drivers are loaded and the message "dvb_ca adaptor 0: PC card
did not respond  :( " appeared and I remove the CAM module from the CI, and then
reinsert it again the following messages appear:
budget-av: cam ejected 5
budget-av: cam inserted B
dvb_ca adapter 0: DVB CAM detected and initialised successfully 

After which the CAM module is actually working.
Comment 1 Natalie Protasevich 2007-06-21 22:24:47 UTC
Please test with the latest kernel (2.6.22-rc4), is the problem still there?
Thanks.
Comment 2 Jeroen Asselman 2007-07-29 03:36:51 UTC
with Linux version 2.6.22-gentoo-r2

budget-av: cam inserted A
dvb_ca adaptor 0: PC card did not respond :(
Comment 3 Mauro Carvalho Chehab 2007-11-06 09:46:45 UTC
There where some fixes at the development tree. Could you please try it? The development tree is available at:

http://linuxtv.org/hg/v4l-dvb
Comment 4 Jeroen Asselman 2007-11-06 13:45:43 UTC
fetched the version as of 2007-11-06, however still the same problem

Linux video capture interface: v2.00
saa7146: register extension 'budget_av'.
ACPI: PCI Interrupt 0000:04:07.0[A] -> Link [LNKB] -> GSI 18 (level, low) -> IRQ 18
saa7146: found saa7146 @ mem ffffc20000746c00 (revision 1, irq 18) (0x1894,0x0020).
saa7146 (0): dma buffer size 192512
DVB: registering new adapter (KNC1 DVB-C)
adapter failed MAC signature check
encoded MAC from EEPROM was ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff
KNC1-0: MAC addr = 00:09:d6:6d:5a:f0
TDA10021: i2c-addr = 0x0c, id = 0x7c
DVB: registering frontend 0 (Philips TDA10021 DVB-C)...
budget-av: ci interface initialised.
budget-av: cam inserted A
dvb_ca adaptor 0: PC card did not respond :(
Comment 5 Oliver Endriss 2007-11-07 19:27:53 UTC
(Sorry, due to lack of hardware I cannot be of much help in this case.)
If you have some basic programming knowledge, you might have a look into budget-av.c, ciintf_init(). You  might try whether it helps if you insert delays there.
Please provide a patch if you are able to fix the problem.
Comment 6 NotTheEvilOne 2008-01-25 08:39:23 UTC
Created attachment 14576 [details]
New PCIID 0884:0020
Comment 7 NotTheEvilOne 2008-01-25 08:40:08 UTC
whoops - wrong bug ... sorry for bugspamming (please ignore / delete the patch)
Comment 8 Jeroen Asselman 2009-02-03 07:19:08 UTC
The problem seems to be that the power off / on is not happening. The card remains running. 
Is there a command that can be sent so the attribute memory can be re-read? 
Comment 9 tlinden 2009-08-22 21:45:37 UTC
I can confirm that this bug still exists in Fedora 10 with kernel
  Linux fenix 2.6.27.29-170.2.79.fc10.i686 #1 SMP Fri Aug 14 21:11:41 EDT 2009 i686 i686 i386 GNU/Linux

saa7146: register extension 'budget_av'.
budget_av 0000:02:05.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
saa7146: found saa7146 @ mem f8840000 (revision 1, irq 17) (0x1894,0x0021).
saa7146 (0): dma buffer size 192512
DVB: registering new adapter (KNC1 DVB-C Plus)
adapter failed MAC signature check
encoded MAC from EEPROM was ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff
saa7146_vv: saa7146 (0): registered device video0 [v4l2]
KNC1-0: MAC addr = 00:09:d6:6d:5c:c4
TDA10021: i2c-addr = 0x0c, id = 0x7c
DVB: registering frontend 0 (Philips TDA10021 DVB-C)...
budget-av: ci interface initialised.
budget-av: cam inserted A
dvb_ca adaptor 0: PC card did not respond :(

Only if I have the CI and CAM modules installed in the computer, then I get these error messages
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)

Remving the CAM with the Conax card has never worked for me
DVB: TDA10021(0): _tda10021_writereg, writereg error (reg == 0x01, val == 0x78, ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
budget-av: cam ejected 5
budget-av: cam inserted A
DVB: TDA10021(0): _tda10021_writereg, writereg error (reg == 0x06, val == 0x77, ret == -121)
DVB: TDA10021(0): _tda10021_writereg, writereg error (reg == 0x16, val == 0x00, ret == -121)
dvb_ca adaptor 0: PC card did not respond :(
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
DVB: TDA10021: tda10021_readreg: readreg error (ret == -121)
Comment 10 Alan 2012-05-17 14:20:23 UTC
Closing old bugs as obsolete. If incorrect please reopen with current status/kernel etc