Estoy trabajando con una tarjeta DVR TW-100-4, chipset TW6816. Hay un
driver disponible para tarjetas con este chipset en
https://gitorious.org/tw68/tw68-v2
que compila bien, se incrusta en el kernel, crea los dispositivos y
funciona, pero a medias.
Pude contactar el fabricante y me enviaron las fuentes de un driver.
Este sí debería funcionar, pero me da errores compilando. La ayuda que
necesito de ustedes es que me indiquen por dónde debo buscar, porque
los mensajes de error no son muy claros.
Los copio aquí por si a ustedes les da una pista, pero si alguien
quiere los fuentes para revisarlos se los envío sin ningún problema.
$ make
**************************************************************************
* Building Techwell TW680x driver... *
* Type "make help" for a list of available targets. *
**************************************************************************
make -C /lib/modules/`uname -r`/build
M="/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working"
clean
make[1]: Entering directory `/usr/src/kernels/2.6.32.26-175.fc12.i686'
make[1]: Leaving directory `/usr/src/kernels/2.6.32.26-175.fc12.i686'
make -C /lib/modules/`uname -r`/build
M="/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working"
modules
make[1]: Entering directory `/usr/src/kernels/2.6.32.26-175.fc12.i686'
CC [M] /home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.o
In file included from
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttvp.h:65,
from
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:39:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv.h:361:
error: ‘BUS_ID_SIZE’ undeclared here (not in a function)
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_SwitchingChannel’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:242:
warning: unused variable ‘NextInput’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:240:
warning: unused variable ‘tv’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:239:
warning: unused variable ‘timeout’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘audio_mux’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:1598:
error: ‘VIDIOC_INT_S_AUDIO_ROUTING’ undeclared (first use in this
function)
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:1598:
error: (Each undeclared identifier is reported only once
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:1598:
error: for each function it appears in.)
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘buffer_queue’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:2458:
warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long
int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:2453:
warning: unused variable ‘flags’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘buffer_release’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:2480:
warning: unused variable ‘item’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:2479:
warning: unused variable ‘btv’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘bttv_try_fmt’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:3532:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has
type ‘const struct bttv_format *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_do_ioctl’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:4680:
warning: ISO C90 forbids mixed declarations and code
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:4902:
warning: unused variable ‘tpf’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_ioctl’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:4983:
warning: passing argument 1 of ‘video_usercopy’ from incompatible
pointer type
include/media/v4l2-ioctl.h:298: note: expected ‘struct file *’ but
argument is of type ‘struct inode *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:4983:
warning: passing argument 2 of ‘video_usercopy’ makes integer from
pointer without a cast
include/media/v4l2-ioctl.h:298: note: expected ‘unsigned int’ but
argument is of type ‘struct file *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:4983:
warning: passing argument 4 of ‘video_usercopy’ makes pointer from
integer without a cast
include/media/v4l2-ioctl.h:298: note: expected ‘v4l2_kioctl’ but
argument is of type ‘long unsigned int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:4983:
error: too many arguments to function ‘video_usercopy’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘bttv_poll’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5090:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 3 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5158:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 3 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_open’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5200:
error: implicit declaration of function ‘lock_kernel’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5317:
error: implicit declaration of function ‘unlock_kernel’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
At top level:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5434:
error: ‘v4l_compat_ioctl32’ undeclared here (not in a function)
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5453:
warning: initialization from incompatible pointer type
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5467:
warning: initialization from incompatible pointer type
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘radio_open’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5498:
error: ‘AUDC_SET_RADIO’ undeclared (first use in this function)
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘radio_ioctl’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5566:
warning: passing argument 1 of ‘video_usercopy’ from incompatible
pointer type
include/media/v4l2-ioctl.h:298: note: expected ‘struct file *’ but
argument is of type ‘struct inode *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5566:
warning: passing argument 2 of ‘video_usercopy’ makes integer from
pointer without a cast
include/media/v4l2-ioctl.h:298: note: expected ‘unsigned int’ but
argument is of type ‘struct file *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5566:
warning: passing argument 4 of ‘video_usercopy’ makes pointer from
integer without a cast
include/media/v4l2-ioctl.h:298: note: expected ‘v4l2_kioctl’ but
argument is of type ‘long unsigned int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5566:
error: too many arguments to function ‘video_usercopy’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
At top level:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5616:
warning: initialization from incompatible pointer type
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_irq_next_video’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5840:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 4 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5840:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 5 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5854:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 4 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5864:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 4 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5765:
warning: unused variable ‘FieldChange’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_irq_wakeup_video’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5980:
warning: format ‘%d’ expects type ‘int’, but argument 3 has type
‘__kernel_suseconds_t’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5993:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 3 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5993:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 4 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:5993:
warning: format ‘%d’ expects type ‘int’, but argument 5 has type
‘__kernel_suseconds_t’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6014:
warning: ISO C90 forbids mixed declarations and code
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6038:
warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long
unsigned int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6057:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 3 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6057:
warning: format ‘%d’ expects type ‘int’, but argument 4 has type
‘__kernel_suseconds_t’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6077:
warning: ISO C90 forbids mixed declarations and code
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6103:
warning: format ‘%x’ expects type ‘unsigned int’, but argument 3 has
type ‘struct bttv_buffer *’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6103:
warning: format ‘%d’ expects type ‘int’, but argument 4 has type
‘__kernel_suseconds_t’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6122:
warning: ISO C90 forbids mixed declarations and code
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_clear_buffer_state’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6186:
warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long
int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_irq_timeout’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6250:
warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long
int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_irq_switch_video’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6420:
warning: unused variable ‘rc’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_isr’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6687:
warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long
int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6722:
warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long
int’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6717:
warning: unused variable ‘DeltaTime’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6716:
warning: unused variable ‘CurrentTime’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:6617:
warning: unused variable ‘flags’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘bttv_remove’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:7263:
warning: unused variable ‘i’
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:
In function ‘tw_init_module’:
/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.c:7552:
warning: passing argument 1 of ‘bus_unregister’ from incompatible
pointer type
include/linux/device.h:72: note: expected ‘struct bus_type *’ but
argument is of type ‘struct pci_driver *’
make[2]: *** [/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working/bttv-driver.o]
Error 1
make[1]: *** [_module_/home/amijares/tmp/sdk/TW680x_TW68816_Linux_20100630/Video-TW/driver-2.6.28-working]
Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32.26-175.fc12.i686'
make: *** [modules] Error 2
Nota: En esta máquina tengo Fedora 12, pero donde se está instalando
la tarjeta corre Debian estable amd64 y da exactamente el mismo error.
Gracias por la ayuda que me puedan brindar. Lo que les pido es que me
ayuden a descifrar qué anda mal o qué me falta.
Saludos
Alberto mijares
_______________________________________________
l-desarrollo mailing list
l-desa...@velug.org.ve
http://listas.velug.org.ve/mailman/listinfo/l-desarrollo