Skip to contentSkip to conversation

bttv problem loading takes about several minutes

DISCUSSION Halim Sahin 3 participants 7 messages Jun 17, 2009 – Jun 18, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi,
In the past I could use this card by typing modprobe bttv card=34 tuner=24 gbuffers=16
Giving this command with current drivers has some problems:
1. it takes several minutes to load bttv module.
2. capturing doesn't work any more (dropped frames etc). Tested with current v4l-dvb from hg, ubuntu 9.04, debian lenny.

I have a bt878 based card from leadtek.

Here is my output after loading the driver:

[ 3013.735459] bttv: driver version 0.9.17 loaded
[ 3013.735470] bttv: using 32 buffers with 16k (4 pages) each for capture
[ 3013.735542] bttv: Bt8xx card found (0).
[ 3013.735562] bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency: 32, mmio
: 0xf7800000
[ 3013.737762] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP [card=34,insm
od option]
[ 3013.737825] bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]
[ 3148.136017] bttv0: tuner type=24
[ 3148.136029] bttv0: i2c: checking for MSP34xx @ 0x80... not found
[ 3154.536019] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
[ 3160.936018] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
[ 3167.351398] bttv0: registered device video0
[ 3167.351434] bttv0: registered device vbi0
[ 3167.351463] bttv0: registered device radio0
[ 3167.351485] bttv0: PLL: 28636363 => 35468950 . ok
[ 3167.364182] input: bttv IR (card=34) as /class/input/input6

Please help!
Regards
Halim

Signature · 3 lines
Halim Sahin
E-Mail:				
halim.sahin (at) t-online.de
#1 lore raw
Quoted 3 lines · Halim Sahin

Hi,
In the past I could use this card by typing
modprobe bttv card=34 tuner=24 gbuffers=16

What card do you actually have? What is the PCI subsystem vendor/device and what tuner does it actually have?

Hans, the problem might be with bttv audio probing. This card has needs_tvaudio set to 0, which used to mean that tvaudio would not be probed or loaded. But with your changes to bttv audio probing this behavior has changed. Now tvaudio is always loaded and probed if another audio chip hasn't been detected. The needs_tvaudio field is totally ignored.

Quoted 41 lines

Giving this command with current drivers has some problems:
1. it takes several minutes to load bttv module.
2. capturing doesn't work any more (dropped frames etc). Tested with current v4l-dvb from hg, ubuntu 9.04, debian lenny.

I have a bt878 based card from leadtek.

Here is my output after loading the driver:

[ 3013.735459] bttv: driver version 0.9.17 loaded
[ 3013.735470] bttv: using 32 buffers with 16k (4 pages) each for capture
[ 3013.735542] bttv: Bt8xx card found (0).
[ 3013.735562] bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency: 32, mmio
: 0xf7800000
[ 3013.737762] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP [card=34,insm
od option]
[ 3013.737825] bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]
[ 3148.136017] bttv0: tuner type=24
[ 3148.136029] bttv0: i2c: checking for MSP34xx @ 0x80... not found
[ 3154.536019] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
[ 3160.936018] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
[ 3167.351398] bttv0: registered device video0
[ 3167.351434] bttv0: registered device vbi0
[ 3167.351463] bttv0: registered device radio0
[ 3167.351485] bttv0: PLL: 28636363 => 35468950 . ok
[ 3167.364182] input: bttv IR (card=34) as /class/input/input6

Please help!
Regards
Halim

--
Halim Sahin
E-Mail:
halim.sahin (at) t-online.de
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi,
The card is a
winfast tv 2000 xp rm edition
lspci -vvv says:

00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (4000ns min, 10000ns max)
Interrupt: pin A routed to IRQ 19
Region 0: Memory at f7800000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: bttv
Kernel modules: bttv

00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (1000ns min, 63750ns max)
Interrupt: pin A routed to IRQ 5
Region 0: Memory at f7000000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data <?>
Capabilities: [4c] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

HTH.
Halim

Signature · 3 lines
Halim Sahin
E-Mail:				
halim.sahin (at) t-online.de
#3 lore raw
In reply to Trent Piepho
Quoted 8 lines · On Wednesday 17 June 2009 19:11:23 Trent Piepho wrote:
Quoted 3 lines · Halim Sahin

Hi,
In the past I could use this card by typing
modprobe bttv card=34 tuner=24 gbuffers=16

What card do you actually have? What is the PCI subsystem vendor/device and what tuner does it actually have?

Quoted 6 lines

Hans, the problem might be with bttv audio probing. This card has needs_tvaudio set to 0, which used to mean that tvaudio would not be probed or loaded. But with your changes to bttv audio probing this behavior has changed. Now tvaudio is always loaded and probed if another audio chip hasn't been detected. The needs_tvaudio field is totally ignored.

The log is from bttv version 0.9.17. The new code is only present in version 0.9.18. So this is definitely not related to any of my changes.

The text "bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]" comes from the call to bttv_gpio_tracking in bttv_probe, then the next text "bttv0: tuner type=24" comes from early in bttv_init_card2, before any i2c modules have been loaded.

The code in bttv_probe (bttv-driver.c) does this:

        if (bttv_verbose)
                bttv_gpio_tracking(btv,"init");

        /* needs to be done before i2c is registered */
        bttv_init_card1(btv);

        /* register i2c + gpio */
        init_bttv_i2c(btv);

        /* some card-specific stuff (needs working i2c) */
        bttv_init_card2(btv);

So it looks like it can be either bttv_init_card1 or init_bttv_i2c that is causing the delay.

Halim, can you try to put some printk() statements in between the calls above to see which call is taking so long? Actually, it would be nice if you are able to 'drill-down' as well in whatever function is causing the delay, since I truly don't see what might be delaying things for you.

Regards,

Hans

Quoted 44 lines
Quoted 44 lines

Giving this command with current drivers has some problems:
1. it takes several minutes to load bttv module.
2. capturing doesn't work any more (dropped frames etc). Tested with current v4l-dvb from hg, ubuntu 9.04, debian lenny.

I have a bt878 based card from leadtek.

Here is my output after loading the driver:

[ 3013.735459] bttv: driver version 0.9.17 loaded
[ 3013.735470] bttv: using 32 buffers with 16k (4 pages) each for
capture [ 3013.735542] bttv: Bt8xx card found (0).
[ 3013.735562] bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency:

32, mmio

: 0xf7800000

[ 3013.737762] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP
[card=34,insm od option]
[ 3013.737825] bttv0: gpio: en=00000000, out=00000000 in=003ff502
[init] [ 3148.136017] bttv0: tuner type=24
[ 3148.136029] bttv0: i2c: checking for MSP34xx @ 0x80... not found
[ 3154.536019] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
[ 3160.936018] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
[ 3167.351398] bttv0: registered device video0
[ 3167.351434] bttv0: registered device vbi0
[ 3167.351463] bttv0: registered device radio0
[ 3167.351485] bttv0: PLL: 28636363 => 35468950 . ok
[ 3167.364182] input: bttv IR (card=34) as /class/input/input6

Please help!
Regards
Halim

--
Halim Sahin
E-Mail:
halim.sahin (at) t-online.de
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
#4 lore raw

Hi,

Quoted 3 lines · Hans Verkuil

The log is from bttv version 0.9.17. The new code is only present in version 0.9.18. So this is definitely not related to any of my changes.

Yes it's from a debian lenny kernel 2.6.26. But I have tested latest v4l-dvb with the same result under 2.6.28 (ubuntu 9.04).

Quoted 14 lines

The code in bttv_probe (bttv-driver.c) does this:

        if (bttv_verbose)
                bttv_gpio_tracking(btv,"init");

        /* needs to be done before i2c is registered */
        bttv_init_card1(btv);

        /* register i2c + gpio */
        init_bttv_i2c(btv);

        /* some card-specific stuff (needs working i2c) */
        bttv_init_card2(btv);
Quoted 7 lines

So it looks like it can be either bttv_init_card1 or init_bttv_i2c that is causing the delay.

Halim, can you try to put some printk() statements in between the calls above to see which call is taking so long? Actually, it would be nice if you are able to 'drill-down' as well in whatever function is causing the delay, since I truly don't see what might be delaying things for you.

Yes I will test this tomorrow.

Thanks a lot!
Halim

#5 lore raw
In reply to Hans Verkuil

Hi,

Quoted 22 lines · Hans Verkuil

The log is from bttv version 0.9.17. The new code is only present in version 0.9.18. So this is definitely not related to any of my changes.

The text "bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]" comes from the call to bttv_gpio_tracking in bttv_probe, then the next text "bttv0: tuner type=24" comes from early in bttv_init_card2, before any i2c modules have been loaded.

The code in bttv_probe (bttv-driver.c) does this:

        if (bttv_verbose)
                bttv_gpio_tracking(btv,"init");

        /* needs to be done before i2c is registered */
        bttv_init_card1(btv);

        /* register i2c + gpio */
        init_bttv_i2c(btv);

        /* some card-specific stuff (needs working i2c) */
        bttv_init_card2(btv);
Quoted 7 lines

So it looks like it can be either bttv_init_card1 or init_bttv_i2c that is causing the delay.

Halim, can you try to put some printk() statements in between the calls above to see which call is taking so long? Actually, it would be nice if you are able to 'drill-down' as well in whatever function is causing the delay, since I truly don't see what might be delaying things for you.

So I have tested latest v4l-dvb from hg.
The mentioned code was changed like this:
if (bttv_verbose)
{

printk ("bttv_gpio_tracking(bt");
                bttv_gpio_tracking(btv,"init");
}
        /* needs to be done before i2c is registered */

printk("bttv_init_card1(btv);");
printk(" bttv_init_card1(btv);");

        bttv_init_card1(btv);

        /* register i2c + gpio */
printk("        init_bttv_i2c(btv);");
        init_bttv_i2c(btv);

Result:

[ 1069.277781] bttv: driver version 0.9.18 loaded
[ 1069.277788] bttv: using 8 buffers with 2080k (520 pages) each for capture
[ 1069.277886] bttv: Bt8xx card found (0).
[ 1069.277906] bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency: 32, mmio
: 0xf7800000
[ 1069.278105] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP [card=34,insm
od option]
[ 1069.278167] bttv_gpio_tracking(bt<7>bttv0: gpio: en=00000000, out=00000000 in
=003ff502 [init]
[ 1069.278173] bttv_init_card1(btv);        bttv_init_card1(btv);        init_bt

tv_i2c(btv);<6>bttv0: tuner type=24

Quoted 57 lines

Regards,

Hans

Quoted 44 lines
Quoted 44 lines

Giving this command with current drivers has some problems:
1. it takes several minutes to load bttv module.
2. capturing doesn't work any more (dropped frames etc). Tested with current v4l-dvb from hg, ubuntu 9.04, debian lenny.

I have a bt878 based card from leadtek.

Here is my output after loading the driver:

[ 3013.735459] bttv: driver version 0.9.17 loaded
[ 3013.735470] bttv: using 32 buffers with 16k (4 pages) each for
capture [ 3013.735542] bttv: Bt8xx card found (0).
[ 3013.735562] bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency:

32, mmio

: 0xf7800000

[ 3013.737762] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP
[card=34,insm od option]
[ 3013.737825] bttv0: gpio: en=00000000, out=00000000 in=003ff502
[init] [ 3148.136017] bttv0: tuner type=24
[ 3148.136029] bttv0: i2c: checking for MSP34xx @ 0x80... not found
[ 3154.536019] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
[ 3160.936018] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
[ 3167.351398] bttv0: registered device video0
[ 3167.351434] bttv0: registered device vbi0
[ 3167.351463] bttv0: registered device radio0
[ 3167.351485] bttv0: PLL: 28636363 => 35468950 . ok
[ 3167.364182] input: bttv IR (card=34) as /class/input/input6

Please help!
Regards
Halim

--
Halim Sahin
E-Mail:
halim.sahin (at) t-online.de
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Halim Sahin
E-Mail:				
halim.sahin (at) t-online.de
#6 lore raw

ok more details: Re: bttv problem loading takes about several minutes

Hi,
sorry for the nusable output!
I found the time consuming funktion:

        bttv_init_card2(btv);
This takes about 4 min. today.
my new testcode:
        /* needs to be done before i2c is registered */

printk("linke 2:bttv_init_card1(btv);\n");

        bttv_init_card1(btv);

        /* register i2c + gpio */

printk("line 3: init_bttv_i2c(btv);\n");

        init_bttv_i2c(btv);

        /* some card-specific stuff (needs working i2c) */
printk("line4:         some card-specific stuff needs working i2c \n");
        bttv_init_card2(btv);

printk("irq init\n");

        init_irqreg(btv);

dmesg output:

[ 2282.430209] bttv: driver version 0.9.18 loaded
[ 2282.430216] bttv: using 8 buffers with 2080k (520 pages) each for capture
[ 2282.430313] bttv: Bt8xx card found (0).
[ 2282.430334] bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency: 32, mmio
: 0xf7800000
[ 2282.430777] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP [card=34,insm
od option]
[ 2282.430839] bttv_gpio_tracking(bt
[ 2282.430843] bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]
[ 2282.430845] linke 2:bttv_init_card1(btv);
[ 2282.430859] line 3: init_bttv_i2c(btv);
[ 2282.430917] line4:         some card-specific stuff needs working i2c
[ 2282.430922] bttv0: tuner type=24

Ok here is the 4 min dely and after that the following linkes were printed out:

[ 2416.836017] bttv0: audio absent, no audio device found!
[ 2416.836024] irq init
[ 2416.840551] bttv0: registered device video1
[ 2416.840684] bttv0: registered device vbi0
[ 2416.840716] bttv0: registered device radio0
[ 2416.840736] bttv0: PLL: 28636363 => 35468950 .<6>bttv0: PLL: 28636363 => 3546
8950 . ok
[ 2416.856221] input: bttv IR (card=34) as /devices/pci0000:00/0000:00:0b.0/inpu
t/input10
[ 2416.864069]  ok

Hope that helps!
Regards
Halim

Signature · 3 lines
Halim Sahin
E-Mail:				
halim.sahin (at) t-online.de