TW6805 card - xawtv OK - zmu OK - ZM does not display images

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
wbrack
Posts: 16
Joined: Fri Jan 08, 2010 1:00 am
Location: Hong Kong

Driver source code updated

Post by wbrack »

I made a few changes to the handling of the switching of video input which will (hopefully) improve the driver's handling of single-chip boards with multiple inputs, as well as correct a few minor problems. I also updated the Version Number of the driver to be Version 0.0.3. As usual, the updated source is at http://gitorious.org/tw68/tw68-v2.

Bill
TW68xx Driver Developer
wbrack
Posts: 16
Joined: Fri Jan 08, 2010 1:00 am
Location: Hong Kong

Improvements for TW6800 chips

Post by wbrack »

moorsey, antov and others with TW6800 chips:

Thanks to some good work by robby in helping to debug problems, the driver's handling of the TW6800 has been improved. It's still not doing as well as with the TW6802 and TW6805, but is progressing. The source for the improved code is at http://gitorious.org/tw68/tw68-v2, and is Version 0.0.4.

Bill
TW68xx Driver Developer
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

hi all!

Just a quick post to say thanks for the work done on the TW6800 driver, great there is some improvement on that, very exciting.

I wish I could help a little more, but am limited as to when I can test the card, with it being running live currently. Will hopefully get some more time to play with the latest driver soon!

Cheers
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Post by moorsey »

hi all again!

Well, the Windows box is pretty much crashing a few times a day now, so no point leaving it running. Have had a play with the latest driver this morning.

Unfortunately, couldn't get a picture at all this time around, think I did everything the same as last time

downloaded driver
installed mplayer and xawtv
make run in the driver folder (mplayer fails)
make install in the driver folder
ran xawtv -hwscan (4 devices showing as OK)
ran xawtv with any of the inputs and I get input output errors

Very odd, managed to get some images last time, more time to play with it now anyway :D
iddqd
Posts: 1
Joined: Wed Feb 10, 2010 5:31 am

opensuse

Post by iddqd »

Hi all.
Recently I have tried to build module on openSuse 11.2.
Compile seems ok, but module not loading:

Code: Select all

linux-cctv:/home/user/techwell/tw68-v2 # make
make -C /lib/modules/2.6.31.5-0.1-desktop/build M=/home/user/techwell/tw68-v2 modules
make[1]: Entering directory `/usr/src/linux-2.6.31.5-0.1'
  CC [M]  /home/user/techwell/tw68-v2/tw68-core.o
/home/user/techwell/tw68-v2/tw68-core.c: In function ‘tw68_initdev’:
/home/user/techwell/tw68-v2/tw68-core.c:708: warning: ‘DMA_nnBIT_MASK’ is deprecated
  CC [M]  /home/user/techwell/tw68-v2/tw68-cards.o
  CC [M]  /home/user/techwell/tw68-v2/tw68-video.o
  CC [M]  /home/user/techwell/tw68-v2/tw68-vbi.o
  CC [M]  /home/user/techwell/tw68-v2/tw68-ts.o
  CC [M]  /home/user/techwell/tw68-v2/tw68-risc.o
  CC [M]  /home/user/techwell/tw68-v2/tw68-tvaudio.o
  LD [M]  /home/user/techwell/tw68-v2/tw68.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "preempt_schedule" [/home/user/techwell/tw68-v2/tw68.ko] undefined!
  CC      /home/user/techwell/tw68-v2/tw68.mod.o
  LD [M]  /home/user/techwell/tw68-v2/tw68.ko
make[1]: Leaving directory `/usr/src/linux-2.6.31.5-0.1'

--------------------------------------------------------------------
linux-cctv:/home/user/techwell/tw68-v2 # make insmod
make -C /lib/modules/2.6.31.5-0.1-desktop/build M=/home/user/techwell/tw68-v2 modules
make[1]: Entering directory `/usr/src/linux-2.6.31.5-0.1'
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "preempt_schedule" [/home/user/techwell/tw68-v2/tw68.ko] undefined!
make[1]: Leaving directory `/usr/src/linux-2.6.31.5-0.1'
make: [insmod] Error 1 (ignored)
insmod: error inserting 'tw68.ko': -1 Invalid module format
make: *** [insmod] Error 1
What can i try to do?
wbrack
Posts: 16
Joined: Fri Jan 08, 2010 1:00 am
Location: Hong Kong

Post by wbrack »

iddqd -

This looks like a problem within the particular OpenSuSe kernel that you are using, since the kernel symbol "preempt_schedule" is missing. I will continue searching through reports for other drivers, but in the mean time could you please try updating your kernel to a later release?

Bill
TW68xx Driver Developer
davjo
Posts: 3
Joined: Sat Feb 20, 2010 10:23 am

warning: ‘DMA_nnBIT_MASK’ is deprecated

Post by davjo »

Hi
I am very new to Linux, but I have managed to build, the driver with a warning - warning: ‘DMA_nnBIT_MASK’ is deprecated.
The driver appears to load ok and xawtc can see a signal from the video camera, but it is not recognisable, just lines no matter what setting I use.
Using Suse 11.2 abd a card with 8 techwell 6805 chips. xawtc sees only 4 possible channels.

Any advice is very much appreciated.

David
davjo
Posts: 3
Joined: Sat Feb 20, 2010 10:23 am

further progress

Post by davjo »

OK, I had the camera connected to a channel that was not channel 1, by changing the connector I used to attach the camera to the card I get a clear picture from the camera on xawtc composite1 input, none of the other channels appear to work and ZM does not give an image at all, the montage screen shows state Idle, 0 fps and a black screen.

Thanks for any help
David
wbrack
Posts: 16
Joined: Fri Jan 08, 2010 1:00 am
Location: Hong Kong

Post by wbrack »

davjo -

For the 'warning' please see my reply to iddqd.

If you have an 8-chip card, that will give you 8 separate devices (/dev/video0 .... /dev/video7 if there are no other video interfaces). Depending upon the particular card, the manufacturer might advertise it as "16 channels" and provide 16 separate BNC connections. If that's the case, each of those connectors connects to one "device", and the connection will be either "Composite1" or "Composite2" (8 devices * 2 inputs == 16 channels). The mapping between the connector and the device/channel could well be different between different manufacturers.

Bill
TW68xx Driver Developer
whatboy
Posts: 304
Joined: Mon Aug 31, 2009 10:31 pm

Post by whatboy »

The Card I have lists...
Camera 8 right molex /dev/video4 Channel0 Camera 9
Camera 8 left molex /dev/video4 Channel1 Camera10
Camera 7 right molex /dev/video5 Channel0 Camera11
Camera 7 left molex /dev/video5 Channel1 Camera12
Camera 6 right molex /dev/video6 Channel0 Camera13
Camera 6 left molex /dev/video6 Channel1 Camera14
Camera 5 right molex /dev/video7 Channel0 Camera15
Camera 5 left molex /dev/video7 Channel1 Camera16
Camera 4 right molex /dev/video0 Channel0 Camera 1
Camera 4 left molex /dev/video0 Channel1 Camera 2
Camera 3 right molex /dev/video1 Channel0 Camera 3
Camera 3 left molex /dev/video1 Channel1 Camera 4
Camera 2 right molex /dev/video2 Channel0 Camera 5
Camera 2 left molex /dev/video2 Channel1 Camera 6
Camera 1 right molex /dev/video3 Channel0 Camera 7
Camera 1 left molex /dev/video3 Channel1 Camera 8
davjo
Posts: 3
Joined: Sat Feb 20, 2010 10:23 am

Post by davjo »

Thanks I am using kernel 2.6.31.12 -0.1.1 which I think is the latest released one. I have just spent 4 hours trying to get a later test kernel 2.6.33 to install, but cannot.
I did mention I was new to linux, my 4th attempt to use linux over the years. I am not unintelligent, but linux makes me believe I am thick as a short plank of wood. It wants ksym but I cannot find a package called ksym.

I do not think that the kernel is the issue, it is something else otherwise no-one else would be able to compile it, but what I just do not know.

If I cannot get it running by tonight I will go back to xp. I have spent ALL of my free time for 1 whole week installing package after package to try to get ZM to work - it should not be this difficult.

I do appreciate any help.
Thanks
wbrack
Posts: 16
Joined: Fri Jan 08, 2010 1:00 am
Location: Hong Kong

Post by wbrack »

I understand your frustration, but hope you can understand my perspective. The driver is distributed in source form, because it is not yet a built-in part of the Linux kernel. The user must compile the driver under his particular operating system. The compilation process results in a "kernel module" which is then installed by the user in order to provide the functionality required to handle the TW68xx card.

In your case, the compilation is producing one warning message which does not appear on my system (which is running a Fedora 12 distribution). Worse, when you try to load the module your system is telling you that a particular symbol (preempt_schedule), which your system told the compilation to use, is not present within your kernel.

These two points - the compilation warning, and the missing kernel symbol - seem, to me, to point to some problem which is specific to the openSuse distribution which you are using. Other users, including Fedora, Debian and Ubuntu distributions, are not encountering the problem. I don't see any indication that there is anything wrong with the TW68 driver code which causes your problem; rather, it appears to me that there is some incompatibility with the openSuse distribution that you are using.

I don't believe that you are unintelligent, or even that you are "thick". I fully support the concept that you should not have to have a degree in computer science in order to use your system. If you want to pursue a solution to your Linux problem, then I would suggest you ask for help on an openSuse forum, list or chat room where there should be people far more capable of pursuing and solving the problem than I am.

Bill
TW68xx Driver Developer
whatboy
Posts: 304
Joined: Mon Aug 31, 2009 10:31 pm

Post by whatboy »

From time to time zm stops due to errors on the card... or sumtin... I got this on /var/log/messages

Code: Select all

Feb 24 20:45:31 server kernel: tw6804[2]: irq loop done - clearing mask (orig 0x00000008, cur 0x00000008)
Feb 24 20:45:32 server kernel: tw6804[2]/0: [f340fd80/0] timeout - dma=0x2ed1e000
Feb 24 20:47:26 server kernel: tw68: v4l2 driver version 0.0.4 loaded
Feb 24 20:47:26 server kernel: tw6804[0]: found at 0000:02:04.0, rev: 16, irq: 16, latency: 32, mmio: 0xe8000000
Feb 24 20:47:26 server kernel: tw6804[0]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:26 server kernel: tw6804[0]: Unable to determine board type, using generic values
Feb 24 20:47:26 server kernel: IRQ 16/tw6804[0]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:26 server kernel: tw6804[0]: registered device video0 [v4l2]
Feb 24 20:47:26 server kernel: tw6804[0]: registered device vbi0
Feb 24 20:47:26 server kernel: tw6804[1]: found at 0000:02:05.0, rev: 16, irq: 17, latency: 32, mmio: 0xe8002000
Feb 24 20:47:26 server kernel: tw6804[1]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:26 server kernel: tw6804[1]: Unable to determine board type, using generic values
Feb 24 20:47:26 server kernel: IRQ 17/tw6804[1]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:26 server kernel: tw6804[1]: registered device video1 [v4l2]
Feb 24 20:47:26 server kernel: tw6804[1]: registered device vbi1
Feb 24 20:47:26 server kernel: tw6804[2]: found at 0000:02:06.0, rev: 16, irq: 18, latency: 32, mmio: 0xe8004000
Feb 24 20:47:26 server kernel: tw6804[2]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:26 server kernel: tw6804[2]: Unable to determine board type, using generic values
Feb 24 20:47:26 server kernel: IRQ 18/tw6804[2]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:26 server kernel: tw6804[2]: registered device video2 [v4l2]
Feb 24 20:47:26 server kernel: tw6804[2]: registered device vbi2
Feb 24 20:47:26 server kernel: tw6804[3]: found at 0000:02:07.0, rev: 16, irq: 19, latency: 32, mmio: 0xe8006000
Feb 24 20:47:26 server kernel: tw6804[3]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:26 server kernel: tw6804[3]: Unable to determine board type, using generic values
Feb 24 20:47:26 server kernel: IRQ 19/tw6804[3]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:26 server kernel: tw6804[3]: registered device video3 [v4l2]
Feb 24 20:47:26 server kernel: tw6804[3]: registered device vbi3
Feb 24 20:47:26 server kernel: tw6804[4]: found at 0000:02:08.0, rev: 16, irq: 16, latency: 32, mmio: 0xe8008000
Feb 24 20:47:26 server kernel: tw6804[4]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:26 server kernel: tw6804[4]: Unable to determine board type, using generic values
Feb 24 20:47:26 server kernel: IRQ 16/tw6804[4]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:26 server kernel: tw6804[4]: registered device video4 [v4l2]
Feb 24 20:47:26 server kernel: tw6804[4]: registered device vbi4
Feb 24 20:47:26 server kernel: tw6804[5]: found at 0000:02:09.0, rev: 16, irq: 17, latency: 32, mmio: 0xe800a000
Feb 24 20:47:26 server kernel: tw6804[5]: subsystem: 1797:6804, board: GENERIC [card=0,autodetected]
Feb 24 20:47:26 server kernel: tw6804[5]: Unable to determine board type, using generic values
Feb 24 20:47:27 server kernel: IRQ 17/tw6804[5]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:27 server kernel: tw6804[5]: registered device video5 [v4l2]
Feb 24 20:47:27 server kernel: tw6804[5]: registered device vbi5
Feb 24 20:47:27 server kernel: tw6804[6]: found at 0000:02:0a.0, rev: 16, irq: 18, latency: 32, mmio: 0xe800c000
Feb 24 20:47:27 server kernel: tw6804[6]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:27 server kernel: tw6804[6]: Unable to determine board type, using generic values
Feb 24 20:47:27 server kernel: IRQ 18/tw6804[6]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:27 server kernel: tw6804[6]: registered device video6 [v4l2]
Feb 24 20:47:27 server kernel: tw6804[6]: registered device vbi6
Feb 24 20:47:27 server kernel: tw6804[7]: found at 0000:02:0b.0, rev: 16, irq: 19, latency: 32, mmio: 0xe800e000
Feb 24 20:47:27 server kernel: tw6804[7]: subsystem: 0000:0000, board: GENERIC [card=0,autodetected]
Feb 24 20:47:27 server kernel: tw6804[7]: Unable to determine board type, using generic values
Feb 24 20:47:27 server kernel: IRQ 19/tw6804[7]: IRQF_DISABLED is not guaranteed on shared IRQs
Feb 24 20:47:27 server kernel: tw6804[7]: registered device video7 [v4l2]
Feb 24 20:47:27 server kernel: tw6804[7]: registered device vbi7
I have to stop ZM, then recompile the TW68xx driver install and restart ZM again, it will work for several days, and again it will die... same thing...
whatboy
Posts: 304
Joined: Mon Aug 31, 2009 10:31 pm

Post by whatboy »

oh and getting this too...

Code: Select all

Feb 25 11:05:19 server kernel: tw6804[2]: irq loop done - clearing mask (orig 0x00000008, cur 0x00000008)
Feb 25 11:05:20 server kernel: tw6804[2]/0: [f3a58480/0] timeout - dma=0x00b76000
Feb 25 11:06:06 server kernel: tw6804[1]: irq loop done - clearing mask (orig 0x00000008, cur 0x00000008)
Feb 25 11:06:07 server kernel: tw6804[1]/0: [f3a58180/0] timeout - dma=0x04550000
ifprentice
Posts: 2
Joined: Sat Mar 13, 2010 8:44 pm

Techwell 6805 driver - 'make' problem

Post by ifprentice »

I've downloaded the tw68-v2 tar from gitorious, expanded it and try to 'make', I get a series of errors (output appended). I'm assuming I need some extra files or libraries, but don't know how to get them. I'm using UBUNTU 9.04

I'm a noob, so please phrase your replies accordingly!

ian@basement:~/downloads/tw68-tw68-v2$ make
make -C /lib/modules/2.6.28-18-generic/build M=/home/ian/downloads/tw68-tw68-v2 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-18-generic'
CC [M] /home/ian/downloads/tw68-tw68-v2/tw68-core.o
In file included from /home/ian/downloads/tw68-tw68-v2/tw68-core.c:43:
/home/ian/downloads/tw68-tw68-v2/tw68.h:46:31: error: media/v4l2-device.h: No such file or directory
In file included from /home/ian/downloads/tw68-tw68-v2/tw68-core.c:43:
/home/ian/downloads/tw68-tw68-v2/tw68.h:344: error: field ‘v4l2_dev’ has incomplete type
/home/ian/downloads/tw68-tw68-v2/tw68.h: In function ‘to_tw68_dev’:
/home/ian/downloads/tw68-tw68-v2/tw68.h:478: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/ian/downloads/tw68-tw68-v2/tw68.h:478: warning: initialization from incompatible pointer type
/home/ian/downloads/tw68-tw68-v2/tw68-core.c: In function ‘tw68_initdev’:
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:658: error: implicit declaration of function ‘v4l2_device_register’
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:894: error: implicit declaration of function ‘v4l2_device_unregister’
/home/ian/downloads/tw68-tw68-v2/tw68-core.c: In function ‘tw68_finidev’:
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:904: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:904: warning: initialization from incompatible pointer type
/home/ian/downloads/tw68-tw68-v2/tw68-core.c: In function ‘tw68_suspend’:
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:956: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:956: warning: initialization from incompatible pointer type
/home/ian/downloads/tw68-tw68-v2/tw68-core.c: In function ‘tw68_resume’:
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:986: warning: type defaults to ‘int’ in declaration of ‘__mptr’
/home/ian/downloads/tw68-tw68-v2/tw68-core.c:986: warning: initialization from incompatible pointer type
make[2]: *** [/home/ian/downloads/tw68-tw68-v2/tw68-core.o] Error 1
make[1]: *** [_module_/home/ian/downloads/tw68-tw68-v2] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-18-generic'
make: *** [all] Error 2
Post Reply