Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] PCTV SAT CI : sometimes fails in bttv_i2c_wait_done



Hi.

I have been trying to get the PCTV SAT CI card to work with the latest dvb
driver included in the 2.6.5 kernel (bttv, bt878, dvb_bt8xx, dst)
The result is that sometimes it works flawlessly but sometimes it refuses to 
start at all by reporting 

May  1 03:23:16 phoenix kernel: dst_check_ci: write not successful, maybe no 
card?
May  1 03:23:16 phoenix kernel: dst_attach: dst_check_ci failed

This seems to be related to some sort of initialization: the times it worked I 
have first rebooted to windows, started the Pinnacle grabbing program, 
choosen some channels and then rebooted to linux by just resetting the 
machine.

I have added some debugging output to the bttv i2c routines and I got the 
following output:

[root@phoenix linux-2.6.5]# modprobe bttv irq_debug=1 bttv_debug=1 
bttv_verbose=1 bttv_gpio=1
[root@phoenix linux-2.6.5]# modprobe bt878
[root@phoenix linux-2.6.5]# modprobe dvb_bt8xx
[root@phoenix linux-2.6.5]# modprobe dst dst_debug=1 dst_verbose=1

May  1 03:38:56 phoenix kernel: bttv: driver version 0.9.14 loaded
May  1 03:38:56 phoenix kernel: bttv: using 8 buffers with 2080k (520 pages) 
each for capture
May  1 03:38:56 phoenix kernel: bttv: Bt8xx card found (0).
May  1 03:38:56 phoenix kernel: PCI: Found IRQ 10 for device 0000:00:0a.0
May  1 03:38:56 phoenix kernel: PCI: Sharing IRQ 10 with 0000:00:0a.1
May  1 03:38:56 phoenix kernel: bttv0: Bt878 (rev 17) at 0000:00:0a.0, irq: 
10, latency: 32, mmio: 0xe3000000
May  1 03:38:56 phoenix kernel: bttv0: detected: Pinnacle PCTV SAT CI 
[card=113], PCI subsystem ID is 11bd:0026
May  1 03:38:56 phoenix kernel: bttv0: using: Twinhan DST + clones 
[card=113,autodetected]
May  1 03:38:56 phoenix kernel: i2c_add_adapter: adding adapter 0
May  1 03:38:56 phoenix kernel: bttv0: using tuner=4
May  1 03:38:56 phoenix kernel: bttv0: add subdevice "dvb0"
May  1 03:39:04 phoenix kernel: bttv0: unloading
May  1 03:39:04 phoenix kernel: i2c_del_adapter: adapter unregistered
May  1 03:39:08 phoenix kernel: bttv: driver version 0.9.14 loaded
May  1 03:39:08 phoenix kernel: bttv: using 8 buffers with 2080k (520 pages) 
each for capture
May  1 03:39:08 phoenix kernel: bttv: Bt8xx card found (0).
May  1 03:39:08 phoenix kernel: PCI: Found IRQ 10 for device 0000:00:0a.0
May  1 03:39:08 phoenix kernel: PCI: Sharing IRQ 10 with 0000:00:0a.1
May  1 03:39:08 phoenix kernel: bttv0: Bt878 (rev 17) at 0000:00:0a.0, irq: 
10, latency: 32, mmio: 0xe3000000
May  1 03:39:08 phoenix kernel: bttv0: detected: Pinnacle PCTV SAT CI 
[card=113], PCI subsystem ID is 11bd:0026
May  1 03:39:08 phoenix kernel: bttv0: using: Twinhan DST + clones 
[card=113,autodetected]
May  1 03:39:08 phoenix kernel: i2c_add_adapter: adding adapter 0
May  1 03:39:08 phoenix kernel: bttv0: using tuner=4
May  1 03:39:08 phoenix kernel: bttv0: add subdevice "dvb0"
May  1 03:39:11 phoenix kernel: bt878: AUDIO driver version 0.0.0 loaded
May  1 03:39:11 phoenix kernel: bt878: Bt878 AUDIO function found (0).
May  1 03:39:11 phoenix kernel: PCI: Found IRQ 10 for device 0000:00:0a.1
May  1 03:39:11 phoenix kernel: PCI: Sharing IRQ 10 with 0000:00:0a.0
May  1 03:39:11 phoenix kernel: bt878(0): Bt878 (rev 17) at 00:0a.1, irq: 10, 
latency: 32, memory: 0xe2800000
May  1 03:39:17 phoenix kernel: init_dvbdev: getting major 250
May  1 03:39:17 phoenix kernel: dvb_bt8xx: enumerating available bttv cards...
May  1 03:39:17 phoenix kernel: dvb_bt8xx: matching card 0 as DST DVB-S
May  1 03:39:17 phoenix kernel: dvb_bt8xx: card match terminated
May  1 03:39:17 phoenix kernel: i2c-core: driver dvb_bt8xx registered.
May  1 03:39:17 phoenix kernel: attach: checking "bt878 #0 [hw]"
May  1 03:39:17 phoenix kernel: find by pci: checking "bt878 #0 [hw]"
May  1 03:39:17 phoenix kernel: attach: "bt878 #0 [hw]", to card 0
May  1 03:39:17 phoenix kernel: dvb_bt8xx: loading card
May  1 03:39:17 phoenix kernel: DVB: registering new adapter (DST) 
(dvb/adapter0).
May  1 03:39:17 phoenix kernel: dvb_bt8xx_load_card: registered bus for card0
May  1 03:39:17 phoenix kernel: DVB: registering device...
May  1 03:39:17 phoenix kernel: DVB: register adapter0/demux0 @ minor: 4 
(0x04)
May  1 03:39:17 phoenix kernel: DVB: registering device...
May  1 03:39:17 phoenix kernel: DVB: register adapter0/dvr0 @ minor: 5 (0x05)
May  1 03:39:17 phoenix kernel: DVB: registering device...
May  1 03:39:17 phoenix kernel: DVB: register adapter0/net0 @ minor: 7 (0x07)
May  1 03:39:17 phoenix kernel: dvb_bt8xx: card load terminated
May  1 03:39:23 phoenix kernel: dst_attach: check ci
May  1 03:39:23 phoenix kernel: bt878 find by dvb adap: checking "DST"
May  1 03:39:23 phoenix kernel: bt878 find by dvb adap: found card nr 0
May  1 03:39:24 phoenix kernel: write_dst writing 0x00 0x06 0x00 0x00 0x00 
0x00 0x00 0xfa
May  1 03:39:24 phoenix kernel: i2c_transfer: transfer for algo bt878
May  1 03:39:24 phoenix kernel: bttv_i2c_xfer: xfer
May  1 03:39:24 phoenix kernel: bttv0: irq loop=0 fc=0 riscs=0, 
riscc=fffffffc, bits: I2CDONE* GPINT
May  1 03:39:24 phoenix kernel: bttv_i2c_wait_done: rc=0, btv->i2c_done=768
May  1 03:39:24 phoenix kernel: bttv_i2c_sendbytes: i2c_wait_done returned 0 
(timeout)
May  1 03:39:24 phoenix kernel: bttv_i2c_sendbytes: got error -5
May  1 03:39:24 phoenix kernel: bttv_i2c_xfer: error -5
May  1 03:39:24 phoenix kernel: i2c_transfer: returning -5
May  1 03:39:24 phoenix kernel: write_dst: write_dst error (err == -5, len == 
0x08, b0 == 0x00)
May  1 03:39:25 phoenix kernel: i2c_transfer: transfer for algo bt878
May  1 03:39:25 phoenix kernel: bttv_i2c_xfer: xfer
May  1 03:39:25 phoenix kernel: bttv0: irq loop=0 fc=0 riscs=0, 
riscc=fffffffc, bits: I2CDONE* GPINT
May  1 03:39:25 phoenix kernel: bttv_i2c_wait_done: rc=0, btv->i2c_done=768
May  1 03:39:25 phoenix kernel: bttv_i2c_sendbytes: i2c_wait_done returned 0 
(timeout)
May  1 03:39:25 phoenix kernel: bttv_i2c_sendbytes: got error -5
May  1 03:39:25 phoenix kernel: bttv_i2c_xfer: error -5
May  1 03:39:25 phoenix kernel: i2c_transfer: returning -5
May  1 03:39:25 phoenix kernel: write_dst: write_dst error (err == -5, len == 
0x08, b0 == 0x00)
May  1 03:39:26 phoenix kernel: i2c_transfer: transfer for algo bt878
May  1 03:39:26 phoenix kernel: bttv_i2c_xfer: xfer
May  1 03:39:26 phoenix kernel: bttv0: irq loop=0 fc=0 riscs=0, 
riscc=fffffffc, bits: I2CDONE* GPINT
May  1 03:39:26 phoenix kernel: bttv_i2c_wait_done: rc=0, btv->i2c_done=768
May  1 03:39:26 phoenix kernel: bttv_i2c_sendbytes: i2c_wait_done returned 0 
(timeout)
May  1 03:39:26 phoenix kernel: bttv_i2c_sendbytes: got error -5
May  1 03:39:26 phoenix kernel: bttv_i2c_xfer: error -5
May  1 03:39:26 phoenix kernel: i2c_transfer: returning -5
May  1 03:39:26 phoenix kernel: write_dst: write_dst error (err == -5, len == 
0x08, b0 == 0x00)
May  1 03:39:27 phoenix kernel: i2c_transfer: transfer for algo bt878
May  1 03:39:27 phoenix kernel: bttv_i2c_xfer: xfer
May  1 03:39:27 phoenix kernel: bttv0: irq loop=0 fc=0 riscs=0, 
riscc=fffffffc, bits: I2CDONE* GPINT
May  1 03:39:27 phoenix kernel: bttv_i2c_wait_done: rc=0, btv->i2c_done=768
May  1 03:39:27 phoenix kernel: bttv_i2c_sendbytes: i2c_wait_done returned 0 
(timeout)
May  1 03:39:27 phoenix kernel: bttv_i2c_sendbytes: got error -5
May  1 03:39:27 phoenix kernel: bttv_i2c_xfer: error -5
May  1 03:39:27 phoenix kernel: i2c_transfer: returning -5
May  1 03:39:27 phoenix kernel: write_dst: write_dst error (err == -5, len == 
0x08, b0 == 0x00)
May  1 03:39:28 phoenix kernel: dst_check_ci: write not successful, maybe no 
card?
May  1 03:39:28 phoenix kernel: dst_attach: dst_check_ci failed

So finally bttv_i2c_wait_done seems to fail with error code 0 that the 
comments in the code associate to a timeout.
In fact btv->i2c_done is 768 which stands for

	bt848.h:#define BT848_INT_GPINT   (1<<9)
	bt848.h:#define BT848_INT_I2CDONE (1<<8)

while bttv_i2c_wait_done seems to expect the BT848_INT_RACK bit.

I'm a newbie in complex device driver programming and also in dvb thus I'm 
unable to interpret the results correctly.

I'm not a newbie in programming so if it's needed (and if someone can guide) 
me I can hack the kernel code to provide better debugging output.

Any hints ?

-- 

Szymon Stefanek

------------------------------------------------------------------------------
-
- The statement below is true.
- The statement above is false.
-
------------------------------------------------------------------------------


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index