Bug 4769 - PC104plus BT848 card stop working in PAL mode when 2.4 -> 2.6 switch
Summary: PC104plus BT848 card stop working in PAL mode when 2.4 -> 2.6 switch
Status: REJECTED DOCUMENTED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(Other) (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Nickolay V. Shmyrev
URL:
Keywords:
Depends on:
Blocks: 5002
  Show dependency tree
 
Reported: 2005-06-21 01:27 UTC by Laurent Pointal
Modified: 2005-08-08 06:17 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.8 and 2.6.12-rc4
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Messages log for test with 2.6.12.1 (192.00 KB, text/plain)
2005-06-28 04:14 UTC, Laurent Pointal
Details
Messages log for test with 2.6.12.1 (60.24 KB, text/plain)
2005-06-28 04:14 UTC, Laurent Pointal
Details
kern.log with trace/debug bttv and tuner options (237.97 KB, text/plain)
2005-06-29 02:54 UTC, Laurent Pointal
Details

Description Laurent Pointal 2005-06-21 01:27:31 UTC
Distribution: Debian Sarge - kernel 2.6.8 and update to kernel 2.6.12-rc4
Hardware Environment: Embedded PC104plus
Software Environment: xawtv, remote display
Problem Description:
I have problems to make a frame grabber card working with colors 
in PAL mode after a switch from 2.4 to 2.6 kernel.

The card is an embedded PC104+ with a BT848 chip (see links to specs 
and photos). It has a camera connected on Television input slot.

The embedded system was previously installed with a 2.4.20 kernel 
from a RedHat installation. When booting bttv module identified 
tuner to 4 (found to be tuner absent) and BT848A card to 0 
(unknown/generic).
I made several tests with xawtv, and the system worked with PAL 
mode, I even made some developments do directly get images and 
send them via CORBA.

To have better support for USB+Wifi I setup another HD with a 
Debian Sarge, with a 2.6.8 kernel (updated to 2.6.12-rc4 to solve 
some problems with Wifi).
With 2.6 kernels the card is well recognized as 0 (unknown/generic), 
tuner is recognized as 0 (notuner).
But PAL mode no longer work. I could make the card work with PAL-Nc, 
but with black and white images only. I tried to force bttv driver 
options with tuner set to 4 as previously, but problem remain the 
same (see logs and pictures in links).

I tried to compare 2.4 and 2.6 sources, but they are too different 
so I cannot found the beginning of a solution.
Can a bttv driver expert give me some way to modify/test (maybe this 
is just a chip register parameter to adjust), I can modify sources to 
do some tests if necessary.


Steps to reproduce: Need a digital-logic PC104plus frame grabber...


More informations:

The frame-grabber PC104 card:
=============================
A BT848AKPF on a PC104-plus card from Digital Logic:
http://www.digitallogic.ch/english/products/datasheets/pc104_peripherials_detail.asp?id=MSMG104-Plus

Picture here (2Mb):
http://www.limsi.fr/Individu/pointal/koala/koala-frmgrab-full.jpg

The embedded system, a Koala robot:
http://www.limsi.fr/Individu/pointal/koala/


My kernel configuration:
========================
http://www.limsi.fr/Individu/pointal/koala/config-2.6.12-rc4koala


One xawtv log file:
===================
http://www.limsi.fr/Individu/pointal/koala/xawlog.txt


Pictures of xawtv running with PAL and PAL-Nc modes:
====================================================
http://www.limsi.fr/Individu/pointal/koala/capture-PAL.jpeg
http://www.limsi.fr/Individu/pointal/koala/capture-PALNc.jpeg


/var/log/messages part about bttv:
==================================
(kernel 2.6.12-rc4)
Jun 17 15:53:32 koala25 kernel: [   36.890573] Linux video capture interface: v1.00
Jun 17 15:53:32 koala25 kernel: [   38.040485] bttv: driver version 0.9.15 loaded
Jun 17 15:53:32 koala25 kernel: [   38.040575] bttv: using 8 buffers with 2080k
(520 pages) each for capture
Jun 17 15:53:32 koala25 kernel: [   38.040631] bttv: Host bridge needs ETBF enabled.
Jun 17 15:53:32 koala25 kernel: [   38.152395] bttv: Bt8xx card found (0).
Jun 17 15:53:32 koala25 kernel: [   38.152548] PCI: Found IRQ 11 for device
0000:00:09.0
Jun 17 15:53:32 koala25 kernel: [   38.152643] PCI: Sharing IRQ 11 with 0000:00:12.0
Jun 17 15:53:32 koala25 kernel: [   38.152738] bttv0: Bt848 (rev 18) at
0000:00:09.0, irq: 11, latency: 132, mmio: 0xfe000000
Jun 17 15:53:32 koala25 kernel: [   38.152912] bttv0: using:  ***
UNKNOWN/GENERIC ***  [card=0,insmod option]
Jun 17 15:53:32 koala25 kernel: [   38.153012] bttv0: enabling ETBF (430FX/VP3
compatibilty)
Jun 17 15:53:32 koala25 kernel: [   38.269493] tveeprom(bttv internal): Huh, no
eeprom present (err=-121)?
Jun 17 15:53:32 koala25 kernel: [   38.269590] bttv0: using tuner=4
Jun 17 15:53:32 koala25 kernel: [   38.269642] bttv0: i2c: checking for MSP34xx
@ 0x80... not found
Jun 17 15:53:32 koala25 kernel: [   38.271935] bttv0: i2c: checking for TDA9875
@ 0xb0... not found
Jun 17 15:53:32 koala25 kernel: [   38.274252] bttv0: i2c: checking for TDA7432
@ 0x8a... not found
Jun 17 15:53:32 koala25 kernel: [   38.276535] bttv0: i2c: checking for TDA9887
@ 0x86... not found
Jun 17 15:53:32 koala25 kernel: [   38.443859] bttv0: registered device video0
Jun 17 15:53:32 koala25 kernel: [   38.553278] bttv0: registered device vbi0


(IRQ shared with network card)
Jun 17 15:53:32 koala25 kernel: [   31.496241] e100: Intel(R) PRO/100 Network
Driver, 3.3.6-k2-NAPI
Jun 17 15:53:32 koala25 kernel: [   31.496330] e100: Copyright(c) 1999-2004
Intel Corporation
Jun 17 15:53:32 koala25 kernel: [   31.608214] PCI: Found IRQ 11 for device
0000:00:12.0
Jun 17 15:53:32 koala25 kernel: [   31.608331] PCI: Sharing IRQ 11 with 0000:00:09.0
Jun 17 15:53:32 koala25 kernel: [   31.654093] e100: eth0: e100_probe: addr
0xfc020000, irq 11, MAC addr 00:30:59:01:93:77
Jun 17 15:53:32 koala25 kernel: [   36.010904] piix4_smbus 0000:00:07.3: Found
0000:00:07.3 device
Comment 1 Nickolay V. Shmyrev 2005-06-26 03:12:08 UTC
Laurent. Your problem is interesing.

First, can you try v4l cvs from linuxtv.org. Second, are you sure that only PAL
channels are broken? And what country do you live, can't it be problem with
standard detection/setting?
Comment 2 Laurent Pointal 2005-06-27 01:16:33 UTC
Thanks for your interrest.

I will try v4l from CVS (I have only this week to test, after I be back in august).

I dont know if other channels are broken as I only used PAL because the camera
we use seem to provide a PAL video signal (its the configuration I used with 2.4).

I live in france, but I thought detection/settings only apply to tuner and the
digital logic frame grabber card has no tuner, video signal goes directly to BT
chip. Does location frequencies deal with BT chip too?

Laurent.
Comment 3 Nickolay V. Shmyrev 2005-06-27 12:58:44 UTC
Nice, we are waiting for results. Actually it looks like wrong standard
selection/detection. Probably enabling debug output and collection of some info
can help.
Comment 4 Laurent Pointal 2005-06-28 04:14:42 UTC
Created attachment 5227 [details]
Messages log for test with 2.6.12.1

I added built the kernel from 2.6.12.1 to have a recent one (previous tests was
with 2.6.12-rc4). And I activated trace/debug with module options.
Same problem, see messages log file attached.

I tried to go with V4L from CVS repository. But as I must cross compile using a
more powerful computer (embedded system has only 64MB of RAM and a PII266
processor), I mount the embedded system disk in my desktop and chroot to this
mounted system.
But I have problems to compile V4L. Eexporting KERNELRELEASE before calling
make is better (else makefile identify my host desktop linux as kernel version)
but dont achieve compilation (sources tries to get includes from
/usr/include/linux & Co which are base 2.6.8 includes of debian sarge, and some
symbols are missing).
Is ther a simple hack ?
Or, can I copy my entire sources tree of Linux and overwrite files in this
sources tree with ones from V4L CVS ?

Thanks.
Laurent.
Comment 5 Laurent Pointal 2005-06-28 04:14:50 UTC
Created attachment 5228 [details]
Messages log for test with 2.6.12.1

I added built the kernel from 2.6.12.1 to have a recent one (previous tests was
with 2.6.12-rc4). And I activated trace/debug with module options.
Same problem, see messages log file attached.

I tried to go with V4L from CVS repository. But as I must cross compile using a
more powerful computer (embedded system has only 64MB of RAM and a PII266
processor), I mount the embedded system disk in my desktop and chroot to this
mounted system.
But I have problems to compile V4L. Eexporting KERNELRELEASE before calling
make is better (else makefile identify my host desktop linux as kernel version)
but dont achieve compilation (sources tries to get includes from
/usr/include/linux & Co which are base 2.6.8 includes of debian sarge, and some
symbols are missing).
Is ther a simple hack ?
Or, can I copy my entire sources tree of Linux and overwrite files in this
sources tree with ones from V4L CVS ?

Thanks.
Laurent.
Comment 6 Laurent Pointal 2005-06-28 06:52:08 UTC
Finally I tried to compile directly on the embedded system, there were no so
much files as I thought, compile and install well.

But no better result.


Comment 7 Nickolay V. Shmyrev 2005-06-28 09:18:30 UTC
Laurent, thanks. 

I think since it's hard to build CVS for you, you need not to do that. But the
goal is to collect debugging logs from bttv driver. This can be done by passing
module option for bttv, like bttv_debug=1, bttv_irq=1 and so on. You can get
full list of options with 'modinfo'. There are also some options related to
color management, like chroma_ctl, you can also try to adjust them.
Comment 8 Laurent Pointal 2005-06-29 02:54:37 UTC
Created attachment 5237 [details]
kern.log with trace/debug bttv and tuner options

kern.log with following modules options:
bttv: tuner=4 card=0 bttv_verbose=2 bttv_debug=1 bttv_gpio=1 irq_debug=1
tuner: type=4 debug=1 tuner_debug=1
Comment 9 Andrew Morton 2005-07-28 21:54:23 UTC
Is this problem still present in 2.6.13-rc4?
Comment 10 Nickolay V. Shmyrev 2005-07-31 17:04:00 UTC
Btw, Laurent, can you confirm that hue/saturation settings in v4l application
affect nothing?
Comment 11 Laurent Pointal 2005-08-02 01:26:13 UTC
"can you confirm that hue/saturation settings in v4l application
affect nothing" 

Yes (tested with xawtv)
Comment 12 Mauro Carvalho Chehab 2005-08-05 21:52:48 UTC
Laurent,

from the picture, I noticed the board has a 28 MHz xtal. Please try to use
pll=28 as insmod option for bttv.

Mauro.
Comment 13 Gunther Mayer 2005-08-07 08:40:01 UTC
Hi,

Hi,

this picture distortion (see
http://www.limsi.fr/Individu/pointal/koala/capture-PAL.jpeg )
is caused by using wrong (or no) pll.

You need "modprobe bttv pll=28" (alternatively "modprobe bttv pll=35" depending
on your hardware).

Btw. you don't need to compile a newer driver, this option has always been
there.

-
Gunther 
Comment 14 Laurent Pointal 2005-08-08 06:17:50 UTC
I added pll=28 option for the btttv module... and all works well.

Thanks a lot.

Still dont know why it worked with 2.4 kernel... but now I can continue with the
Koala robot. I will transmit information to other places where I asked for help.

Note: I mark the bug as reject (documented), but I dont know what is exactly
kernel managers policy about bug attributes management.

Note You need to log in before you can comment on or make changes to this bug.