Re: Help required for TVP5151 on Overo
Hi Laurent, thanks for your reply... I'll disable device tree usage. Also, I'll try to use a previous kernel (3.17) hoping it works. Regards Francesco Il 05/02/2015 15:57, Laurent Pinchart ha scritto: Hi Francesco, On Thursday 05 February 2015 15:29:59 Francesco Marletta wrote: Hi Laurent, I'm trying to use the kernel of the linuxtv repository, omap3isp/tvp5151 branch,but the kernel don't starts... can you, please, send me the kernel command line that you have used? I'm afraid I haven't kept the .config file around. I might also have rebased the working branch without testing the result, so it might just not work on 3.18-rc4. I'm sorry not to be able to help you for now. Also, have you used device tree ? No, I was using legacy boot. The OMAP3 ISP driver doesn't support DT yet. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help required for TVP5151 on Overo
Hi Laurent, I'm trying to use the kernel of the linuxtv repository, omap3isp/tvp5151 branch,but the kernel don't starts... can you, please, send me the kernel command line that you have used? Also, have you used device tree ? Regards Francesco Il 02/12/2014 00:41, Laurent Pinchart ha scritto: Hi Francesco, On Wednesday 19 November 2014 10:33:06 Francesco Marletta wrote: Hi Carlos, thanks for your response. I've read your message on permalink. I'm not sure the ISP is broken, or at least it may be broken but it can be fixed. I'm trying to work the tvp5151 board described in [1], the author states (and told me) that it was successfull in using that board, using a patch that he also publish, but my board is not working (using the same patch set). Maybe there is something different in my kernel, even if the version is the same? For what it's worth, I've successfully used that tvp5151 board with a Gumstix Overo using the mainline kernel. Changes required to the OAMP3 ISP driver have been pushed to mainline. Some changes were required to the tvp5151 driver too, some have made it upstream, but I haven't had time to clean up and submit the rest of the tvp5151 modifications. I've pushed the patches to git://linuxtv.org/pinchartl/media.git omap3isp/tvp5151 I'm going to try applying the patch by hand, to check if there is something different respect the source that the patch is made from. It will be useful to me to have a kernel (with modules) that works with that board, this way I could check if the problem is in the hw or in the sw. I'll continue to try. [1] http://www.sleepyrobot.com/?p=253 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help required for TVP5151 on Overo
Hi Laurent, I'm finally started working on this problem... but the code from the git repository you specified don't compile: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- ... CC [M] drivers/media/i2c/tvp5150.o drivers/media/i2c/tvp5150.c: In function ‘tvp5150_set_format’: drivers/media/i2c/tvp5150.c:967:24: error: ‘V4L2_MBUS_FMT_UYVY8_2X8’ undeclared (first use in this function) drivers/media/i2c/tvp5150.c:967:24: note: each undeclared identifier is reported only once for each function it appears in drivers/media/i2c/tvp5150.c: In function ‘tvp5150_get_format’: drivers/media/i2c/tvp5150.c:982:24: error: ‘V4L2_MBUS_FMT_UYVY8_2X8’ undeclared (first use in this function) drivers/media/i2c/tvp5150.c: In function ‘tvp5150_enum_mbus_code’: drivers/media/i2c/tvp5150.c:998:15: error: ‘V4L2_MBUS_FMT_UYVY8_2X8’ undeclared (first use in this function) drivers/media/i2c/tvp5150.c: In function ‘tvp5150_enum_frame_size’: drivers/media/i2c/tvp5150.c:1008:38: error: ‘V4L2_MBUS_FMT_UYVY8_2X8’ undeclared (first use in this function) make[3]: *** [drivers/media/i2c/tvp5150.o] Errore 1 make[2]: *** [drivers/media/i2c] Errore 2 make[1]: *** [drivers/media] Errore 2 make: *** [drivers] Errore 2 I cloned the repos with: git clone git://linuxtv.org/pinchartl/media.git linux_omap3isp_tvp5151 cd linux_omap3isp_tvp5151 Choosed the branch for tvp5151 with: git branch tvp5151_for_overo remotes/origin/omap3isp/tvp5151 git checkout tvp5151_for_overo Then configured the kernel with: make mrproper make ARCH=arm omap2plus_defconfig make ARCH=arm menuconfig And finally compiled as stated before. Maybe there is a special branch that I should use? Regards, Francesco Il 12/12/2014 23:50, Laurent Pinchart ha scritto: Hi Francesco, On Friday 12 December 2014 16:38:02 Francesco Marletta wrote: Hi Laurent, I'll check the patches you indicated on git://linuxtv.org/pinchartl/media.git omap3isp/tvp5151 Which version of the kernel are these patches for? Do you know that, if you clone the above tree and checkout the omap3isp/tvp5151 branch, you will get a Linux kernel source tree with complete history and a Makefile that contains the version number ? :-) http://git.linuxtv.org/cgit.cgi/pinchartl/media.git/tree/Makefile?h=omap3isp/tvp5151 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Strange behaviour of sizeof(struct v4l2_queryctrl)
Hello to anyone, I'm working on a problem with V4L2 on Linux Kernel 2.6.37. The problem arise when I try to query a video device to list the controls it provides. When is call ioctl(fd, VIDIOC_QUERYCTRL, queryctrl) the function doesn't return 0 and errno is set to EINVAL This happen for every control, even for the controls that the driver provides (checked in the code) like brightness. After adding a lot of printk in the videodev.ko module I found that the problem is caused by a wrong value of VIDIOC_QUERYCTRL, that in the kernel module is 0xC0485624 while in userspace application is 0xC0445624. I digged the kernel source to understand what's happening, and discovered the definition of VIDIOC_QUERYCTRL: #define VIDIOC_QUERYCTRL_IOWR('V', 36, struct v4l2_queryctrl) dove: #define _IOWR(type,nr,size) \ _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) with #define _IOC(dir,type,nr,size) \ (((dir) _IOC_DIRSHIFT) | \ ((type) _IOC_TYPESHIFT) | \ ((nr) _IOC_NRSHIFT) | \ ((size) _IOC_SIZESHIFT)) and #define _IOC_NRSHIFT0 #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) #define _IOC_NRBITS 8 #define _IOC_TYPEBITS 8 #define _IOC_SIZEBITS 14 #define _IOC_NONE 0U #define _IOC_WRITE 1U #define _IOC_READ 2U #define _IOC_TYPECHECK(t) (sizeof(t)) thus, the _IOC definition means: _IOC(dir,type,nr,size) = [dir|size|type|nr] that, for the aftermentioned values means: 0xC0445624 = [3|044|56|24] == size = 0x44 = 68 0xC0485624 = [3|048|56|24] == size = 0x48 = 72 To be sure that the number 68 and 72 are correct, I added a printk() in the videodev.ko module and a println() in the userspace application to print sizeof(struct v4l2_queryctrl), and the outputs are: Kernel module: printk([DBG] %s() ~ sizeof(struct v4l2_queryctrl): %u\n, __func__, sizeof(struct v4l2_queryctrl)); = [DBG] videodev_init() ~ sizeof(struct v4l2_queryctrl): 72 Userspace application: printf([dbg] sizeof(struct v4l2_queryctrl): %u\n, sizeof(struct v4l2_queryctrl)); = [dbg] sizeof(struct v4l2_queryctrl): 68 In both cases (module and application), there is the inclusion of linux/videodev2.h. When I compiled the application I istructed the compiler to pick the same kernel header of the module, with a proper CFLAGS += -IPATH in the Makefile. Any idea about this strangeness? Regards Francesco -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Strange behaviour of sizeof(struct v4l2_queryctrl)
Hello again, I was able to solve the problem... now the userspace program use the correct value for VIDIOC_QUERYCTRL. Regards Francesco Il 27/01/2015 11:43, Francesco Marletta ha scritto: Hello to anyone, I'm working on a problem with V4L2 on Linux Kernel 2.6.37. The problem arise when I try to query a video device to list the controls it provides. When is call ioctl(fd, VIDIOC_QUERYCTRL, queryctrl) the function doesn't return 0 and errno is set to EINVAL This happen for every control, even for the controls that the driver provides (checked in the code) like brightness. After adding a lot of printk in the videodev.ko module I found that the problem is caused by a wrong value of VIDIOC_QUERYCTRL, that in the kernel module is 0xC0485624 while in userspace application is 0xC0445624. I digged the kernel source to understand what's happening, and discovered the definition of VIDIOC_QUERYCTRL: #define VIDIOC_QUERYCTRL_IOWR('V', 36, struct v4l2_queryctrl) dove: #define _IOWR(type,nr,size) \ _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) with #define _IOC(dir,type,nr,size) \ (((dir) _IOC_DIRSHIFT) | \ ((type) _IOC_TYPESHIFT) | \ ((nr) _IOC_NRSHIFT) | \ ((size) _IOC_SIZESHIFT)) and #define _IOC_NRSHIFT0 #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) #define _IOC_NRBITS 8 #define _IOC_TYPEBITS 8 #define _IOC_SIZEBITS 14 #define _IOC_NONE 0U #define _IOC_WRITE 1U #define _IOC_READ 2U #define _IOC_TYPECHECK(t) (sizeof(t)) thus, the _IOC definition means: _IOC(dir,type,nr,size) = [dir|size|type|nr] that, for the aftermentioned values means: 0xC0445624 = [3|044|56|24] == size = 0x44 = 68 0xC0485624 = [3|048|56|24] == size = 0x48 = 72 To be sure that the number 68 and 72 are correct, I added a printk() in the videodev.ko module and a println() in the userspace application to print sizeof(struct v4l2_queryctrl), and the outputs are: Kernel module: printk([DBG] %s() ~ sizeof(struct v4l2_queryctrl): %u\n, __func__, sizeof(struct v4l2_queryctrl)); = [DBG] videodev_init() ~ sizeof(struct v4l2_queryctrl): 72 Userspace application: printf([dbg] sizeof(struct v4l2_queryctrl): %u\n, sizeof(struct v4l2_queryctrl)); = [dbg] sizeof(struct v4l2_queryctrl): 68 In both cases (module and application), there is the inclusion of linux/videodev2.h. When I compiled the application I istructed the compiler to pick the same kernel header of the module, with a proper CFLAGS += -IPATH in the Makefile. Any idea about this strangeness? Regards Francesco -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Strange behaviour of sizeof(struct v4l2_queryctrl)
Hello to anyone, I'm working on a problem with V4L2 on Linux Kernel 2.6.37. The problem arise when I try to query a video device to list the controls it provides. When is call ioctl(fd, VIDIOC_QUERYCTRL, queryctrl) the function doesn't return 0 and errno is set to EINVAL This happen for every control, even for the controls that the driver provides (checked in the code) like brightness. After adding a lot of printk in the videodev.ko module I found that the problem is caused by a wrong value of VIDIOC_QUERYCTRL, that in the kernel module is 0xC0485624 while in userspace application is 0xC0445624. I digged the kernel source to understand what's happening, and discovered the definition of VIDIOC_QUERYCTRL: #define VIDIOC_QUERYCTRL_IOWR('V', 36, struct v4l2_queryctrl) dove: #define _IOWR(type,nr,size) \ _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) with #define _IOC(dir,type,nr,size) \ (((dir) _IOC_DIRSHIFT) | \ ((type) _IOC_TYPESHIFT) | \ ((nr) _IOC_NRSHIFT) | \ ((size) _IOC_SIZESHIFT)) and #define _IOC_NRSHIFT0 #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) #define _IOC_NRBITS 8 #define _IOC_TYPEBITS 8 #define _IOC_SIZEBITS 14 #define _IOC_NONE 0U #define _IOC_WRITE 1U #define _IOC_READ 2U #define _IOC_TYPECHECK(t) (sizeof(t)) thus, the _IOC definition means: _IOC(dir,type,nr,size) = [dir|size|type|nr] that, for the aftermentioned values means: 0xC0445624 = [3|044|56|24] == size = 0x44 = 68 0xC0485624 = [3|048|56|24] == size = 0x48 = 72 To be sure that the number 68 and 72 are correct, I added a printk() in the videodev.ko module and a println() in the userspace application to print sizeof(struct v4l2_queryctrl), and the outputs are: Kernel module: printk([DBG] %s() ~ sizeof(struct v4l2_queryctrl): %u\n, __func__, sizeof(struct v4l2_queryctrl)); = [DBG] videodev_init() ~ sizeof(struct v4l2_queryctrl): 72 Userspace application: printf([dbg] sizeof(struct v4l2_queryctrl): %u\n, sizeof(struct v4l2_queryctrl)); = [dbg] sizeof(struct v4l2_queryctrl): 68 In both cases (module and application), there is the inclusion of linux/videodev2.h. When I compiled the application I istructed the compiler to pick the same kernel header of the module, with a proper CFLAGS += -IPATH in the Makefile. Any idea about this strangeness? Regards Francesco -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help required for TVP5151 on Overo
Il giorno Sat, 13 Dec 2014 00:50:10 +0200 Laurent Pinchart laurent.pinch...@ideasonboard.com ha scritto: Hi Francesco, On Friday 12 December 2014 16:38:02 Francesco Marletta wrote: Hi Laurent, I'll check the patches you indicated on git://linuxtv.org/pinchartl/media.git omap3isp/tvp5151 Which version of the kernel are these patches for? Do you know that, if you clone the above tree and checkout the omap3isp/tvp5151 branch, you will get a Linux kernel source tree with complete history and a Makefile that contains the version number ? :-) http://git.linuxtv.org/cgit.cgi/pinchartl/media.git/tree/Makefile?h=omap3isp/tvp5151 Yes, I know that... I was just asking to have a memo on the email. Regards -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help required for TVP5151 on Overo
Hi Laurent, I'll check the patches you indicated on git://linuxtv.org/pinchartl/media.git omap3isp/tvp5151 Which version of the kernel are these patches for? Regards Francesco Il giorno Tue, 02 Dec 2014 01:41:23 +0200 Laurent Pinchart laurent.pinch...@ideasonboard.com ha scritto: Hi Francesco, On Wednesday 19 November 2014 10:33:06 Francesco Marletta wrote: Hi Carlos, thanks for your response. I've read your message on permalink. I'm not sure the ISP is broken, or at least it may be broken but it can be fixed. I'm trying to work the tvp5151 board described in [1], the author states (and told me) that it was successfull in using that board, using a patch that he also publish, but my board is not working (using the same patch set). Maybe there is something different in my kernel, even if the version is the same? For what it's worth, I've successfully used that tvp5151 board with a Gumstix Overo using the mainline kernel. Changes required to the OAMP3 ISP driver have been pushed to mainline. Some changes were required to the tvp5151 driver too, some have made it upstream, but I haven't had time to clean up and submit the rest of the tvp5151 modifications. I've pushed the patches to git://linuxtv.org/pinchartl/media.git omap3isp/tvp5151 I'm going to try applying the patch by hand, to check if there is something different respect the source that the patch is made from. It will be useful to me to have a kernel (with modules) that works with that board, this way I could check if the problem is in the hw or in the sw. I'll continue to try. [1] http://www.sleepyrobot.com/?p=253 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Help required for TVP5151 on Overo
Hello to everyone, I'd like to know who have used the TVP5151 video decoder with the OMAP3 Overo module. I'm trying to have the processor to capture the video from a TVP5151 boarda, but without success (both gstreamer and yavta wait forever the data from the V4L2 subsystem). Thanks in advance! -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Help required for TVP5151 on Overo
Hi Carlos, thanks for your response. I've read your message on permalink. I'm not sure the ISP is broken, or at least it may be broken but it can be fixed. I'm trying to work the tvp5151 board described in [1], the author states (and told me) that it was successfull in using that board, using a patch that he also publish, but my board is not working (using the same patch set). Maybe there is something different in my kernel, even if the version is the same? I'm going to try applying the patch by hand, to check if there is something different respect the source that the patch is made from. It will be useful to me to have a kernel (with modules) that works with that board, this way I could check if the problem is in the hw or in the sw. I'll continue to try. Regards Francesco [1] http://www.sleepyrobot.com/?p=253 Il giorno Wed, 19 Nov 2014 10:15:36 +0100 Carlos Sanmartín Bustos carsa...@gmail.com ha scritto: Hi Francesco, Yesterday I sent a mail asking about similar behaviour in another OMAP3 board [1], I'm starting to think that OMAP3 ISP is broken in latest kernel versions. I hope someone give us a solution. Regards, Carlos [1] http://permalink.gmane.org/gmane.linux.drivers.video-input-infrastructure/84744 2014-11-19 9:46 GMT+01:00 Francesco Marletta fmarle...@movia.biz: Hello to everyone, I'd like to know who have used the TVP5151 video decoder with the OMAP3 Overo module. I'm trying to have the processor to capture the video from a TVP5151 boarda, but without success (both gstreamer and yavta wait forever the data from the V4L2 subsystem). Thanks in advance! -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Help required for TVP5151 on Overo
Hello to everyone, I'd like to know who have used the TVP5151 video decoder with the OMAP3 Overo module. I'm trying to have the processor to capture the video from a TVP5151 boarda, but without success (both gstreamer and yavta wait forever the data from the V4L2 subsystem). Thanks in advance! -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html