Hi Laurent, 2011/1/14 Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>: > Hi Enric, > > On Thursday 13 January 2011 13:27:43 Enric Balletbà i Serra wrote: >> 2011/1/12 Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>: >> > On Wednesday 12 January 2011 12:58:04 Enric Balletbà i Serra wrote: >> >> Hi all, >> >> >> >> As explained in my first mail I would like port the tvp515x driver to >> >> new media framework, I'm a newbie with the v4l2 API and of course with >> >> the new media framework API, so sorry if next questions are stupid or >> >> trivial (please, patience with me). >> >> >> >> My idea is follow this link schem: >> >> >> >> --------------------------------------- >> >> -------------------------------------------- >> >> Â---------------------     |  Â|               Â| 1 >> >> >> >> | ----------> | OMAP3 ISP CCDC OUTPUT | >> >> | TVP515x Â| 0 | -----> | 0 | OMAP3 ISP CCDC Â--- | >> >> >> >> -------------------------------------------- >> >> Â--------------------     Â|  Â|               Â| 2 | >> >>                 --------------------------------------- >> > >> > ASCII art would look much better if you drew it in a non-proportional >> > font, with 80 character per line at most. >> > >> >> Where: >> >> Â* TVP515x is /dev/v4l-subdev8 c 81 15 >> >> Â* OMAP3 ISP CCDC is /dev/v4l-subdev2 c 81 4 >> >> Â* OMAP3 ISP CCDC OUTPUT is /dev/video2 c 81 5 >> >> >> >> Then activate these links with >> >> >> >> Â./media-ctl -r -l '"tvp5150 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 >> >> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]' >> >> ÂResetting all links to disabled >> >> ÂSetting up link 16:0 -> 5:0 [1] >> >> ÂSetting up link 5:1 -> 6:0 [1] >> >> >> >> I'm on the right way or I'm completely lost ? >> > >> > That's correct. >> > >> >> I think the next step is adapt the tvp515x driver to new media >> >> framework, I'm not sure how to do this, someone can give some points ? >> > >> > You need to implement subdev pad operations. get_fmt and set_fmt are >> > required. >> >> I configured the TVP5151 to Â8-bit 4:2:3 YCbCr output format. Is 8-bit >> 4:2:3 YCbCr output format implemented in OMAP3 ISP CCDC Â? > > I suppose you mean 4:2:2. The CCDC doesn't support that yet. > >> >> Once this is done, I suppose I can test using gstreamer, for example >> >> using something like this. >> >> >> >>  Âgst-launch v4l2src device=/dev/video2 ! ffmpegcolorspace ! >> >> xvimagesink >> >> >> >> I'm right in this point ? >> > >> > You need to specify the format explicitly. It must be identical to the >> > format configured on pad CCDC:1. >> >> Can you give me an example using gstreamer ? > > I'm not a gstreamer expert, sorry. > >> Running yavta I get >> >> # ./yavta -f SGRBG10 -s 720x525 -n 4 --capture=4 --skip 3 -F /dev/video2 >> Device /dev/video2 opened: OMAP3 ISP CCDC output (media). >> Video format set: width: 720 height: 525 buffer size: 756000 >> Video format: BA10 (30314142) 720x525 >> 4 buffers requested. >> length: 756000 offset: 0 >> Buffer 0 mapped at address 0x400f2000. >> length: 756000 offset: 757760 >> Buffer 1 mapped at address 0x40385000. >> length: 756000 offset: 1515520 >> Buffer 2 mapped at address 0x40466000. >> length: 756000 offset: 2273280 >> Buffer 3 mapped at address 0x405ed000. >> Unable to start streaming: 22. >> Unable to dequeue buffer (22). >> 4 buffers released. >> >> I know the format is not correct, but, is the "Unable to start >> streaming: 22" error related to the format or is related to another >> problem ? > > That usually means that the format configured on the video device node > (SGRBG10 720x525 in this case) is different than the format setup on the > connected subdev output (CCDC pad 1 in this case). My guess is that you > probably forgot to setup formats on the subdev pads (using media-ctl -f). Right and solved, thanks, one little step more. Now seems yavta is blocked dequeuing a buffer ( VIDIOC_DQBUF ), with strace I get $ strace ./yavta -f SGRBG10 -s 720x525 -n 1 --capture=1 -F /dev/video2 mmap2(NULL, 756000, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x4011f000 write(1, "Buffer 0 mapped at address 0x401"..., 39Buffer 0 mapped at address 0x4011f000. ) = 39 ioctl(3, VIDIOC_QBUF or VT_SETACTIVATE, 0xbede36cc) = 0 ioctl(3, VIDIOC_STREAMON, 0xbede365c) = 0 gettimeofday({10879, 920196}, NULL) = 0 ioctl(3, VIDIOC_DQBUF and the code where stops is here ispqueue.c 913 buf = list_first_entry(&queue->queue, struct isp_video_buffer, stream); 914 ret = isp_video_buffer_wait(buf, nonblocking); Any idea ? Thanks in advance Enric > > -- > Regards, > > Laurent Pinchart > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html