em28xx v4l-info returns gibberish on igepv2
I have an usb capture card that accepts composite and svideo and outputs raw video through v4l2.
When running the card on my laptop (ubuntu karmic) I am able to use gstreamer to dump the raw video to a file. It comes out as yuv and can be easily played back.
However when I plug it into our embedded arm board (it's an igepv2 which runs on an omap3530 soc) the same gstreamer command results in a near empty file. Here is part of a hexdump:
chimp@ll-1:~$ hexdump output.yuv | head 0000000 4747 4746 0000 0000 0000 0000 0000 0000 0000010 0000 0000 0000 0000 0000 0000 0000 0000 * 00005a0 4847 4747 0000 0000 0000 0000 0000 0000 00005b0 0000 0000 0000 0000 0000 0000 0000 0000 * 00ca800 4847 4748 0000 0000 0000 0000 0000 0000 00ca810 0000 0000 0000 0000 0000 0000 0000 0000
Running v4l-info reveals some sort of problem with it parsing the capabilities of the card:
standards
VIDIOC_ENUMSTD(0)
index : 0
id : 0xb00000000000 [(null),(null),(null)]
name : ""
frameperiod.numerator : 0
frameperiod.denominator : 1001
framelines : 30000
Full output here http://pastebin.com/0Ah6SYTX
While running it on my laptop I get the seemingly correct response:
standards
VIDIOC_ENUMSTD(0)
index : 0
id : 0xb000 [NTSC_M,NTSC_M_JP,?]
name : "NTSC"
frameperiod.numerator : 1001
frameperiod.denominator : 30000
framelines : 525
Full output from laptop here http://pastebin.com/JNmMHVt2
The igepv2 board is currently running 2.6.33-rc8 however I also tested it on the 2.6.28.10 kernel and same problem occurred.
Finally here is the output from dmesg when its plugged in:
[ 2085.872894] em28xx: New device @ 480 Mbps (eb1a:2860, interface 0, class 0) [ 2085.873138] em28xx #0: chip ID is em2860 [ 2085.987823] em28xx #0: board has no eeprom [ 2086.012329] em28xx #0: Identified as Unknown EM2750/28xx video grabber (card=1) [ 2086.031188] em28xx #0: found i2c device @ 0x4a [saa7113h] [ 2086.072143] em28xx #0: Your board has no unique USB ID. [ 2086.081451] em28xx #0: A hint were successfully done, based on i2c devicelist hash. [ 2086.093231] em28xx #0: This method is not 100% failproof. [ 2086.102722] em28xx #0: If the board were missdetected, please email this log to: [ 2086.114257] em28xx #0: V4L Mailing List <[email protected]> [ 2086.125030] em28xx #0: Board detected as EM2860/SAA711X Reference Design [ 2086.135925] em28xx #0: Registering snapshot button... [ 2086.155548] input: em28xx snapshot button as /devices/platform/ehci-omap.0/usb1/1-1/input/input1 [ 2086.645385] saa7115 2-0025: saa7113 found (1f7113d0e100000) @ 0x4a (em28xx #0) [ 2087.566986] em28xx #0: Config register raw data: 0x00 [ 2087.629058] em28xx #0: v4l2 driver version 0.1.2 [ 2088.277679] em28xx #0: V4L2 video device registered as video1 [ 2088.277709] em28xx #0: V4L2 VBI device registered as vbi0
Signature · 13 lines
John Banks - Head of Engineering Noonan Media Ltd www.noonanmedia.com MB: +44 779 62 64 707 E: [email protected] -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 6 lines · John Banks
I have an usb capture card that accepts composite and svideo and outputs raw video through v4l2.
When running the card on my laptop (ubuntu karmic) I am able to use gstreamer to dump the raw video to a file. It comes out as yuv and can be easily played back.
Hi John
I saw your question on #linuxtv yesterday, and reached out to you but I guess you didn't see the message.
I did some ARM work for the em28xx last year, and assuming there has been no regression, it should be working fine. The fact that even the enumstd ioctl is returning zero'd data suggests that you've got some sort of basic userland/kernel communications problem, since that command has no interaction with the hardware at all (the driver fills out the result with statically defined data). It might also be some sort of bug in v4l2-info.
Have you tried writing a quick 50-line C program that performs the ioctl and dumps the result? That might help you narrow down whether it's a v4l2-info problem.
Without a board though, I'm not quite sure how I could debug this.
Devin
Signature · 7 lines
Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
Quoted 21 lines · Devin Heitmueller
Quoted 6 lines · John Banks
I have an usb capture card that accepts composite and svideo and outputs raw video through v4l2.
When running the card on my laptop (ubuntu karmic) I am able to use gstreamer to dump the raw video to a file. It comes out as yuv and can be easily played back.
Hi John
I saw your question on #linuxtv yesterday, and reached out to you but I guess you didn't see the message.
I did some ARM work for the em28xx last year, and assuming there has been no regression, it should be working fine. The fact that even the enumstd ioctl is returning zero'd data suggests that you've got some sort of basic userland/kernel communications problem, since that command has no interaction with the hardware at all (the driver fills out the result with statically defined data). It might also be some sort of bug in v4l2-info.
Quoted 8 lines
Have you tried writing a quick 50-line C program that performs the ioctl and dumps the result? That might help you narrow down whether it's a v4l2-info problem.
Without a board though, I'm not quite sure how I could debug this.
Devin
Hey Devin,
Sorry I must have missed your message on irc, I had hung around for most of the day, must have just missed you at the end.
Having never used ioctl before I spent most of the day reading up.
I created a dump as you suggested and you are right, it seems to be a v4l-info problem.
chimp@ll-1:~/source/ioctl$ ./ioctl index: 0 id: 34592 name: NTSC frameperiod-numerator: 1001 frameperiod-denominator: 30000 framelines: 525 reserved:
As you can see I get the correct output. I think it has to do with the size of variables created in struct-v4l2.c as they don't match the declaration in videodev2.h
Anyway this doesn't help to explain why I get the 0000's seen in the hexdump of the file. I had been hoping that it was incorrectly reading the variables it needed in order for it to create the output correctly.
I was originally using the gstreamer v4l2src module that was in the repositories but I tried compiling the gstreamer provided by TI (it contains extra plugins for use on the dsp) but the same problem occurred.
If I want to further track down this problem, where should I look?
Cheers
Signature · 12 lines
John Banks - Head of Engineering Noonan Media Ltd www.noonanmedia.com MB: +44 779 62 64 707 E: [email protected] -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
Hi John,
Quoted 8 lines · John Banks
As you can see I get the correct output. I think it has to do with the size of variables created in
struct-v4l2.cas they don't match the declaration invideodev2.hAnyway this doesn't help to explain why I get the 0000's seen in the hexdump of the file. I had been hoping that it was incorrectly reading the variables it needed in order for it to create the output correctly.
Quoted 6 lines
I was originally using the gstreamer v4l2src module that was in the repositories but I tried compiling the gstreamer provided by TI (it contains extra plugins for use on the dsp) but the same problem occurred.
If I want to further track down this problem, where should I look?
At this point, your best bet would probably to be to build v4l-info program from source and add some debugging (for example, dumping out the sizes of some of the structs). If you can reproduce it, then nailing down the issue is just a matter of iterative debugging.
Devin
Signature · 7 lines
Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- video4linux-list mailing list Unsubscribe mailto:[email protected]?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list