fcam-dev support for new kernels -- Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > > mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// I modified fcam-dev to work with new kernel interface. It can now display picture preview using SDL, and has somehow working autogain and autofocus. It even includes very simple gui for manual focus and manual gain/exposure. gitlab.com fcam-dev branch good. Due to missing timestamping support, everything is quite slow. Auto white balance does not work. 5 Mpix mode does not work (probably kernel problem), and I do have hack in my kernel so that capture interface works. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: square-only image on Nokia N900 camera -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
On Fri 2016-07-01 13:01:54, Pavel Machek wrote: > On Fri 2016-07-01 10:50:25, Pavel Machek wrote: > > Hi! > > > > > On gitlab is the latest version of pipeline setup if python. I also > > > got fcam to work (slowly) on the camera, with autofocus and > > > autogain. Capturing from preview modes works fine, but image quality > > > is not good, as expected. Capturing raw GRBG10 images works, but > > > images are square, with values being outside square being 0. > > > > > > Same problem is there with yavta and fcam-dev capture, so I suspect > > > there's something in kernel. If you have an idea what could be wrong / > > > what to try, let me know. If omap3isp works for you in v4.6, and > > > produces expected rectangular images, that would be useful to know, > > > too. > > > > > > Python capture script is at > > > > > > https://gitlab.com/tui/tui/commit/266b6eb302dcf1481e3e90a05bf98180e5759168 > > > > I switched to the front camera (vs6555 pixel array 2-0010 + vs6555 > > binner 2-0010) and got same effect: preview image works fine, raw > > image is square. Still kernel v4.6. > > Same issue with kernel v4.7-rc5. And this seems to fix it. Now image fills whole frame. But I still can't get 5MP format to work, it fails with: [ 497.929016] check_format checking px 808534338 808534338, h 1968 1968, w 2592 2592, bpline 5184 5184, size 10202112 10202112 field 1 1 [ 497.929107] configuring for 2592(5184)x1968 [ 497.936248] stream on success [ 498.020233] omap3isp 480bc000.isp: CCDC won't become idle! [ 525.563476] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP CCDC commit 5268a954cd6af4853ad8e05f32ff4741c245e65e Author: Pavel Date: Fri Jul 1 21:34:35 2016 +0200 This seems to fix stuff for me -- now square limitation of images is gone. diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index 5c52ae8..0e052e6 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -1185,7 +1185,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) /* Use the raw, unprocessed data when writing to memory. The H3A and * histogram modules are still fed with lens shading corrected data. */ - syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR; +// syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR; + syn_mode |= ISPCCDC_SYN_MODE_VP2SDR; if (ccdc->output & CCDC_OUTPUT_MEMORY) syn_mode |= ISPCCDC_SYN_MODE_WEN; -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: square-only image on Nokia N900 camera -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
On Fri 2016-07-01 10:50:25, Pavel Machek wrote: > Hi! > > > On gitlab is the latest version of pipeline setup if python. I also > > got fcam to work (slowly) on the camera, with autofocus and > > autogain. Capturing from preview modes works fine, but image quality > > is not good, as expected. Capturing raw GRBG10 images works, but > > images are square, with values being outside square being 0. > > > > Same problem is there with yavta and fcam-dev capture, so I suspect > > there's something in kernel. If you have an idea what could be wrong / > > what to try, let me know. If omap3isp works for you in v4.6, and > > produces expected rectangular images, that would be useful to know, > > too. > > > > Python capture script is at > > > > https://gitlab.com/tui/tui/commit/266b6eb302dcf1481e3e90a05bf98180e5759168 > > I switched to the front camera (vs6555 pixel array 2-0010 + vs6555 > binner 2-0010) and got same effect: preview image works fine, raw > image is square. Still kernel v4.6. Same issue with kernel v4.7-rc5. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: square-only image on Nokia N900 camera -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi! > On gitlab is the latest version of pipeline setup if python. I also > got fcam to work (slowly) on the camera, with autofocus and > autogain. Capturing from preview modes works fine, but image quality > is not good, as expected. Capturing raw GRBG10 images works, but > images are square, with values being outside square being 0. > > Same problem is there with yavta and fcam-dev capture, so I suspect > there's something in kernel. If you have an idea what could be wrong / > what to try, let me know. If omap3isp works for you in v4.6, and > produces expected rectangular images, that would be useful to know, > too. > > Python capture script is at > > https://gitlab.com/tui/tui/commit/266b6eb302dcf1481e3e90a05bf98180e5759168 I switched to the front camera (vs6555 pixel array 2-0010 + vs6555 binner 2-0010) and got same effect: preview image works fine, raw image is square. Still kernel v4.6. Ideas welcome, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
square-only image on Nokia N900 camera -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi! On gitlab is the latest version of pipeline setup if python. I also got fcam to work (slowly) on the camera, with autofocus and autogain. Capturing from preview modes works fine, but image quality is not good, as expected. Capturing raw GRBG10 images works, but images are square, with values being outside square being 0. Same problem is there with yavta and fcam-dev capture, so I suspect there's something in kernel. If you have an idea what could be wrong / what to try, let me know. If omap3isp works for you in v4.6, and produces expected rectangular images, that would be useful to know, too. Python capture script is at https://gitlab.com/tui/tui/commit/266b6eb302dcf1481e3e90a05bf98180e5759168 Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > As omap3isp driver supports only one endpoint on ccp2 interface, > but cameras on N900 require different strobe settings, so far > it is not possible to have both cameras correctly working with > the same board DTS. DTS patch in the series has the correct > settings for the front camera. This is a problem still to be > solved. > > The needed pipeline could be made with: > > media-ctl -r > media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' > media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' > media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' > > and tested with: > > mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// > Ok, I played with the back sensor, and can get it to work in 1Mpix mode, but not in 5Mpix mode. 1MPix mode works ok both in previewer mode and in capture mode. 5Mpix mode does 4 copies of the frame in previewer (thus unusable), and when I try it in capture mode, I get [ 222.952514] omap3isp 480bc000.isp: CCDC won't become idle! [ 224.515716] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP CCDC (script below can do it). Any ideas? Thanks, Pavel import subprocess import time import os # TODO: Camera gain does not work # LED indicator mode is not usable # LED torch mode only has one brightness setting # sudo /my/v4l-utils/utils/media-ctl/media-ctl -p # This seems to have good description: # https://www.compulab.co.il/workspace/mediawiki/index.php5/CM-T3730:_Linux:_Camera # aptitude install ufraw ? class Camera: mc="/my/v4l-utils/utils/media-ctl/media-ctl" ya="/my/tui/yavta/yavta" def __init__(m): if 1: # 4 copies in preview mode, "CCDC won't become idle!" in raw mode. m.win_x, m.win_y = 1200, 900 m.cap_x, m.cap_y = 2592, 1968 ... def media_ctl(m, s): if 0 != subprocess.call(['sudo', m.mc] + s): print("Call ", s, " failed?") def media_l(m, s): m.media_ctl(['-l', s]) def media_v(m, s): m.media_ctl(['-V', s]) def back_full(m): m.media_ctl(['-r']) m.media_l('"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]') m.media_l('"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]') m.media_l('"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]') m.media_l('"OMAP3 ISP CCDC":1 -> "OMAP3 ISP CCDC output":0 [1]') size = "%dx%d" % (m.cap_x, m.cap_y) m.media_v('"et8ek8 3-003e":0 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP CCP2":0 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP CCP2":1 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP CCDC":1 [SGRBG10 %s]' % size) ... def run_full(m): os.system(m.ya+" --capture=8 --pause --skip 0 --format SGRBG10 --size %dx%d /dev/video2\ --file=/tmp/delme#" % (m.cap_x, m.cap_y)) -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi! I tried to capture 1.2Mpix images, then scale them down to 800x600 using hardware... and results were kernel dying. [12552.400146] [] (isp_video_start_streaming) from [] (vb2_start_streaming+0x5c/0x154) [12552.400146] [] (vb2_start_streaming) from [] (vb2_core_streamon+0x104/0x160) [12552.400177] [] (vb2_core_streamon) from [] (isp_video_streamon+0x17c/0x27c) [12552.400207] [] (isp_video_streamon) from [] (v4l_streamon+0x18/0x1c) [12552.400238] [] (v4l_streamon) from [] (__video_do_ioctl+0x24c/0x2e8) [12552.400268] [] (__video_do_ioctl) from [] (video_usercopy+0x110/0x600) [12552.400299] [] (video_usercopy) from [] (v4l2_ioctl+0x98/0xb8) [12552.400329] [] (v4l2_ioctl) from [] (do_vfs_ioctl+0x80/0x948) [12552.400329] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x64/0x74) [12552.400360] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) [12552.400390] ---[ end trace b4627b34449829a7 ]--- [12552.400421] In-band Error seen by MPU at address 0 [12552.400421] [ cut here ] [12552.400451] WARNING: CPU: 0 PID: 3936 at drivers/bus/omap_l3_smx.c:166 omap3_l3_app_irq+0xcc/0x124 [12552.400482] Modules linked in: [12552.400482] CPU: 0 PID: 3936 Comm: mplayer Tainted: GW 4.6.0-177572-g501bb64-dirty #360 [12552.400512] Hardware name: Nokia RX-51 board I did more experiments before, and usually it does not end like this. Usually, when I set up capture with greater resolution than cca 800x600, I get 4 copies of image above each other. If you know how to get images with greater resolution, let me know. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi Pavel, On Tue, Jun 21, 2016 at 08:05:49PM +0200, Pavel Machek wrote: > Hi! > > > > > First, I re-did pipeline setup in python, it seems slightly less hacky > > > > then in shell. > > > > > > > > I tried to modify fcam-dev to work with the new interface, but was not > > > > successful so far. I can post patches if someone is interested > > > > (mplayer works for me, but that's not too suitable for taking photos). > > > > > > > > I tried to get gstreamer to work, with something like: > > > > > > While trying to debug gstreamer, I ran v4l2-compliance, and it seems > > > to suggest that QUERYCAP is required... but it is not present on > > > /dev/video2 or video6. > > > > It's not saying that it wouldn't be present, but the content appears wrong. > > It should have the real bus information there rather than just "media". > > > > See e.g. drivers/media/platform/vsp1/vsp1_drv.c . I suppose that should be > > right. > > > > Feel free to submit a patch. :-) > > For now I'd not know what to change, sorry :-(. Perhaps we can debug > it after the support is merged into mainline. A single line change to change the bus field contents to the actual bus address. grep -A1 platform: drivers/media/platform/vsp1/vsp1_drv.c > > Another weirdness: > > yavta, on v4l-subdev12 : > > control 0x00a40906 `Sensivity' min 0 max 0 step 1 default 0 current 65536. > > Min and max being the same, I don't think I can control the > sensitivity. I guess I'll have to provid more light for the tests for > now... That control should be removed. I think I concluded its value is the same for all the modes... -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- 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: Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi! > > > First, I re-did pipeline setup in python, it seems slightly less hacky > > > then in shell. > > > > > > I tried to modify fcam-dev to work with the new interface, but was not > > > successful so far. I can post patches if someone is interested > > > (mplayer works for me, but that's not too suitable for taking photos). > > > > > > I tried to get gstreamer to work, with something like: > > > > While trying to debug gstreamer, I ran v4l2-compliance, and it seems > > to suggest that QUERYCAP is required... but it is not present on > > /dev/video2 or video6. > > It's not saying that it wouldn't be present, but the content appears wrong. > It should have the real bus information there rather than just "media". > > See e.g. drivers/media/platform/vsp1/vsp1_drv.c . I suppose that should be > right. > > Feel free to submit a patch. :-) For now I'd not know what to change, sorry :-(. Perhaps we can debug it after the support is merged into mainline. Another weirdness: yavta, on v4l-subdev12 : control 0x00a40906 `Sensivity' min 0 max 0 step 1 default 0 current 65536. Min and max being the same, I don't think I can control the sensitivity. I guess I'll have to provid more light for the tests for now... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi Pavel, On Fri, Jun 17, 2016 at 07:12:14PM +0200, Pavel Machek wrote: > Hi! > > > First, I re-did pipeline setup in python, it seems slightly less hacky > > then in shell. > > > > I tried to modify fcam-dev to work with the new interface, but was not > > successful so far. I can post patches if someone is interested > > (mplayer works for me, but that's not too suitable for taking photos). > > > > I tried to get gstreamer to work, with something like: > > While trying to debug gstreamer, I ran v4l2-compliance, and it seems > to suggest that QUERYCAP is required... but it is not present on > /dev/video2 or video6. It's not saying that it wouldn't be present, but the content appears wrong. It should have the real bus information there rather than just "media". See e.g. drivers/media/platform/vsp1/vsp1_drv.c . I suppose that should be right. Feel free to submit a patch. :-) > > Any ideas? (Kernel is based on Ivaylo 's github tree, IIRC). > > Thanks, > Pavel > > pavel@n900:/my/v4l-utils/utils$ ./v4l2-compliance/v4l2-compliance -d > /dev/video6 > Driver Info: > Driver name : ispvideo > Card type : OMAP3 ISP resizer output > Bus info : media > Driver version: 4.6.0 > Capabilities : 0x8423 > Video Capture > Video Output > Streaming > Extended Pix Format > Device Capabilities > Device Caps : 0x0421 > Video Capture > Streaming > Extended Pix Format > > Compliance test for device /dev/video6 (not using libv4l2): > > Required ioctls: > fail: v4l2-compliance.cpp(537): missing bus_info prefix > ('media') > test VIDIOC_QUERYCAP: FAIL > > Allow for multiple opens: > test second video open: OK > fail: v4l2-compliance.cpp(537): missing bus_info prefix > ('media') > test VIDIOC_QUERYCAP: FAIL > test VIDIOC_G/S_PRIORITY: OK > > pavel@n900:/my/v4l-utils/utils$ sudo ./v4l2-compliance/v4l2-compliance -d > /dev/video2 > Driver Info: > Driver name : ispvideo > Card type : OMAP3 ISP CCDC output > ... > Compliance test for device /dev/video2 (not using libv4l2): > > Required ioctls: > fail: v4l2-compliance.cpp(537): missing bus_info prefix > ('media') > test VIDIOC_QUERYCAP: FAIL > -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- 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: Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
On Fri 2016-06-17 19:12:14, Pavel Machek wrote: > Hi! > > > First, I re-did pipeline setup in python, it seems slightly less hacky > > then in shell. > > > > I tried to modify fcam-dev to work with the new interface, but was not > > successful so far. I can post patches if someone is interested > > (mplayer works for me, but that's not too suitable for taking photos). > > > > I tried to get gstreamer to work, with something like: > > While trying to debug gstreamer, I ran v4l2-compliance, and it seems > to suggest that QUERYCAP is required... but it is not present on > /dev/video2 or video6. > > Any ideas? (Kernel is based on Ivaylo 's github tree, IIRC). I got fcam-dev to grab jpeg-s from the camera. Unfortunately, 800x600, no autogain, no autofocus. But lot of fun with memory management :-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi! > First, I re-did pipeline setup in python, it seems slightly less hacky > then in shell. > > I tried to modify fcam-dev to work with the new interface, but was not > successful so far. I can post patches if someone is interested > (mplayer works for me, but that's not too suitable for taking photos). > > I tried to get gstreamer to work, with something like: While trying to debug gstreamer, I ran v4l2-compliance, and it seems to suggest that QUERYCAP is required... but it is not present on /dev/video2 or video6. Any ideas? (Kernel is based on Ivaylo 's github tree, IIRC). Thanks, Pavel pavel@n900:/my/v4l-utils/utils$ ./v4l2-compliance/v4l2-compliance -d /dev/video6 Driver Info: Driver name : ispvideo Card type : OMAP3 ISP resizer output Bus info : media Driver version: 4.6.0 Capabilities : 0x8423 Video Capture Video Output Streaming Extended Pix Format Device Capabilities Device Caps : 0x0421 Video Capture Streaming Extended Pix Format Compliance test for device /dev/video6 (not using libv4l2): Required ioctls: fail: v4l2-compliance.cpp(537): missing bus_info prefix ('media') test VIDIOC_QUERYCAP: FAIL Allow for multiple opens: test second video open: OK fail: v4l2-compliance.cpp(537): missing bus_info prefix ('media') test VIDIOC_QUERYCAP: FAIL test VIDIOC_G/S_PRIORITY: OK pavel@n900:/my/v4l-utils/utils$ sudo ./v4l2-compliance/v4l2-compliance -d /dev/video2 Driver Info: Driver name : ispvideo Card type : OMAP3 ISP CCDC output ... Compliance test for device /dev/video2 (not using libv4l2): Required ioctls: fail: v4l2-compliance.cpp(537): missing bus_info prefix ('media') test VIDIOC_QUERYCAP: FAIL -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Nokia N900 cameras -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working)
Hi! First, I re-did pipeline setup in python, it seems slightly less hacky then in shell. I tried to modify fcam-dev to work with the new interface, but was not successful so far. I can post patches if someone is interested (mplayer works for me, but that's not too suitable for taking photos). I tried to get gstreamer to work, with something like: class Camera: gst="/usr/bin/gst-launch" def __init__(m): pass def run(m): if 0 != subprocess.call( [m.gst, "-v", "--gst-debug-level=2", # "v4l2src", "device=/dev/video2", "num-buffers=3", "!", # "video/x-raw-yuv,width=864,height=656", "!", "v4l2src", "device=/dev/video6", "num-buffers=3", "!", "video/x-raw-yuv,width=800,height=600,format=(fourcc)UYVY", "!", # ,format=(fourcc)YU12 "ffmpegcolorspace", "!", "jpegenc", "!", "filesink", "location=delme.jpg" ]): But could not get it to work so far. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html #!/usr/bin/python3 import subprocess import os class Camera: mc="/my/v4l-utils/utils/media-ctl/media-ctl" def __init__(m): m.win_x, m.win_y = 800, 600 m.cap_x, m.cap_y = 864, 656 #m.cap_x, m.cap_y = 2592, 1968 def media_ctl(m, s): if 0 != subprocess.call(['sudo', m.mc] + s): print("Call ", s, " failed?") def media_l(m, s): m.media_ctl(['-l', s]) def media_v(m, s): m.media_ctl(['-V', s]) def back(m): m.media_ctl(['-r']) m.media_l('"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]') m.media_l('"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]') m.media_l('"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]') m.media_l('"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]') m.media_l('"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]') m.media_l('"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]') size = "%dx%d" % (m.cap_x, m.cap_y) m.media_v('"et8ek8 3-003e":0 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP CCP2":0 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP CCP2":1 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP CCDC":2 [SGRBG10 %s]' % size) m.media_v('"OMAP3 ISP preview":1 [UYVY %s]' % size) m.media_v('"OMAP3 ISP resizer":1 [UYVY %dx%d]' % (m.win_x, m.win_y)) def perms(m): os.system("sudo chmod 666 /dev/video? /dev/v4l-subdev*") def run(m): os.system("mplayer -tv driver=v4l2:width=%d:height=%d:outfmt=uyvy:device=/dev/video6 -vo x11 -vf screenshot tv://" % (m.win_x, m.win_y)) c = Camera() c.back() c.perms() c.run()
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > On Wed, Apr 27, 2016 at 06:45:29PM +0200, Pavel Machek wrote: > > > I don't have pre-production N900s. The phone I use for development > > > is HW revision 2101 with Finish keyboard layout. Apart from that > > > I have my productive phone, which is rev 2204 with German layout. > > > > How do you check hw revision? > > 0x tells you the HW revision (e.g. when executed with -I, but > also during normal kernel loading operation). Apart from that there > is /proc/cpuinfo. /proc/cpuinfo says revision : . 0x says: Initializing NOLO... Device: RX-51 HW revision: 2101 NOLO version: 1.4.14 ... So I seem to have 2101. Ok, and the prepared initrd seems to work for me. (Thanks!) length: 640256 offset: 4501504 timestamp type: monotonic Buffer 7 mapped at address 0xb68fb000. Press enter to start capture 0 (0) [-] 0 640256 bytes 532.452761 532.452913 28.544 fps 1 (1) [-] 1 640256 bytes 532.518129 532.518221 15.298 fps /camera$ ./yavta --capture=8 --pause --skip 0 --format UYVY --size 656x488 /dev/video6 --file=/tmp/delme# /camera$ md5sum /tmp/delme* 541b8dfeab4f56824274aa7b61c88dcf /tmp/delme00 9b685af72dedd12ed519bdc68475e671 /tmp/delme01 67128a3af14be16c94f7e26c365f2b21 /tmp/delme02 0d411d0052710b15af05b6a7e51a43f1 /tmp/delme03 74a44a4a0f33354b86af6e419e624308 /tmp/delme04 38842dc2e7cdc1163012f4811f2c293c /tmp/delme05 78b88cfe381560fd6e3b8647ec553f10 /tmp/delme06 58d0fc91cc0d1d3cee1a900eb8ee5094 /tmp/delme07 So yes, it seems to work here. At least as a random generator :-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi Ivaylo, On Fri, Apr 29, 2016 at 09:44:25PM +0300, Ivaylo Dimitrov wrote: > Hi, > > On 29.04.2016 20:45, Sebastian Reichel wrote: > >Hi, > > > >On Fri, Apr 29, 2016 at 02:05:52AM +0200, Sebastian Reichel wrote: > >>On Wed, Apr 27, 2016 at 08:12:50PM +0300, Ивайло Димитров wrote: > The zImage + initrd works with the steps you described below. > >>> > >>>Great! > >> > >>I also got it working with the previously referenced branch with the > >>following built as modules: > >> > >>CONFIG_VIDEOBUF2_CORE=m > >>CONFIG_VIDEOBUF2_MEMOPS=m > >>CONFIG_VIDEOBUF2_DMA_CONTIG=m > >>CONFIG_VIDEO_OMAP3=m > >>CONFIG_VIDEO_BUS_SWITCH=m > >>CONFIG_VIDEO_SMIAPP_PLL=m > >>CONFIG_VIDEO_SMIAPP=m > >>CONFIG_VIDEO_SMIAREGS=m > >>CONFIG_VIDEO_ET8EK8=m > > > >Ok, I found the problem. CONFIG_VIDEO_OMAP3=y does not work, > >due to missing -EPROBE_DEFER handling for vdds_csib. I added > >it and just got a test image with builtin CONFIG_VIDEO_OMAP3. > >The below patch fixes the problem. > > > > Cool :) > > vdd-csiphy1/2 will need the same handling, but lets have what is done so far > rolling, those can be fixed later on. > > >commit 9d8333b29207de3a9b6ac99db2dfd91e2f8c0216 > >Author: Sebastian Reichel > >Date: Fri Apr 29 19:23:02 2016 +0200 > > > > omap3isp: handle -EPROBE_DEFER for vdds_csib > > > > omap3isp may be initialized before the regulator's driver has been > > loaded resulting in vdds_csib=NULL. Fix this by handling -EPROBE_DEFER > > for vdds_csib. > > > > Signed-Off-By: Sebastian Reichel > > > >diff --git a/drivers/media/platform/omap3isp/ispccp2.c > >b/drivers/media/platform/omap3isp/ispccp2.c > >index 833eed411886..2d1463a72d6a 100644 > >--- a/drivers/media/platform/omap3isp/ispccp2.c > >+++ b/drivers/media/platform/omap3isp/ispccp2.c > >@@ -1167,6 +1167,8 @@ int omap3isp_ccp2_init(struct isp_device *isp) > > if (isp->revision == ISP_REVISION_2_0) { > > ccp2->vdds_csib = devm_regulator_get(isp->dev, "vdds_csib"); > > if (IS_ERR(ccp2->vdds_csib)) { > >+if (PTR_ERR(ccp2->vdds_csib) == -EPROBE_DEFER) > >+return -EPROBE_DEFER; > > dev_dbg(isp->dev, > > "Could not get regulator vdds_csib\n"); > > ccp2->vdds_csib = NULL; > > > > Sakari, how we're going to proceed, it seems there are a couple of patches > in the series which can be directly upstreamed, how's that gonna happen? IOW > - I don't know how this RFC stuff works, are there any docs I can use to > educate myself? If there are just a few, then they could be picked up individually, but otherwise I'd propose to split up the set into two, those that can go to upstream now and those that are still understood to require some work. I'll try to spend some time in the near future for reviewing the entire set. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
On Fri 2016-04-29 19:45:59, Sebastian Reichel wrote: > Ok, I found the problem. CONFIG_VIDEO_OMAP3=y does not work, > due to missing -EPROBE_DEFER handling for vdds_csib. I added > it and just got a test image with builtin CONFIG_VIDEO_OMAP3. > The below patch fixes the problem. > > commit 9d8333b29207de3a9b6ac99db2dfd91e2f8c0216 > Author: Sebastian Reichel > Date: Fri Apr 29 19:23:02 2016 +0200 > > omap3isp: handle -EPROBE_DEFER for vdds_csib > > omap3isp may be initialized before the regulator's driver has been > loaded resulting in vdds_csib=NULL. Fix this by handling -EPROBE_DEFER > for vdds_csib. > > Signed-Off-By: Sebastian Reichel Tested-by: Pavel Machek Acked-by: Pavel Machek ...and... thanks :-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 29.04.2016 20:45, Sebastian Reichel wrote: Hi, On Fri, Apr 29, 2016 at 02:05:52AM +0200, Sebastian Reichel wrote: On Wed, Apr 27, 2016 at 08:12:50PM +0300, Ивайло Димитров wrote: The zImage + initrd works with the steps you described below. Great! I also got it working with the previously referenced branch with the following built as modules: CONFIG_VIDEOBUF2_CORE=m CONFIG_VIDEOBUF2_MEMOPS=m CONFIG_VIDEOBUF2_DMA_CONTIG=m CONFIG_VIDEO_OMAP3=m CONFIG_VIDEO_BUS_SWITCH=m CONFIG_VIDEO_SMIAPP_PLL=m CONFIG_VIDEO_SMIAPP=m CONFIG_VIDEO_SMIAREGS=m CONFIG_VIDEO_ET8EK8=m Ok, I found the problem. CONFIG_VIDEO_OMAP3=y does not work, due to missing -EPROBE_DEFER handling for vdds_csib. I added it and just got a test image with builtin CONFIG_VIDEO_OMAP3. The below patch fixes the problem. Cool :) vdd-csiphy1/2 will need the same handling, but lets have what is done so far rolling, those can be fixed later on. commit 9d8333b29207de3a9b6ac99db2dfd91e2f8c0216 Author: Sebastian Reichel Date: Fri Apr 29 19:23:02 2016 +0200 omap3isp: handle -EPROBE_DEFER for vdds_csib omap3isp may be initialized before the regulator's driver has been loaded resulting in vdds_csib=NULL. Fix this by handling -EPROBE_DEFER for vdds_csib. Signed-Off-By: Sebastian Reichel diff --git a/drivers/media/platform/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c index 833eed411886..2d1463a72d6a 100644 --- a/drivers/media/platform/omap3isp/ispccp2.c +++ b/drivers/media/platform/omap3isp/ispccp2.c @@ -1167,6 +1167,8 @@ int omap3isp_ccp2_init(struct isp_device *isp) if (isp->revision == ISP_REVISION_2_0) { ccp2->vdds_csib = devm_regulator_get(isp->dev, "vdds_csib"); if (IS_ERR(ccp2->vdds_csib)) { + if (PTR_ERR(ccp2->vdds_csib) == -EPROBE_DEFER) + return -EPROBE_DEFER; dev_dbg(isp->dev, "Could not get regulator vdds_csib\n"); ccp2->vdds_csib = NULL; Sakari, how we're going to proceed, it seems there are a couple of patches in the series which can be directly upstreamed, how's that gonna happen? IOW - I don't know how this RFC stuff works, are there any docs I can use to educate myself? Thanks, Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On Fri, Apr 29, 2016 at 02:05:52AM +0200, Sebastian Reichel wrote: > On Wed, Apr 27, 2016 at 08:12:50PM +0300, Ивайло Димитров wrote: > > > The zImage + initrd works with the steps you described below. > > > > Great! > > I also got it working with the previously referenced branch with the > following built as modules: > > CONFIG_VIDEOBUF2_CORE=m > CONFIG_VIDEOBUF2_MEMOPS=m > CONFIG_VIDEOBUF2_DMA_CONTIG=m > CONFIG_VIDEO_OMAP3=m > CONFIG_VIDEO_BUS_SWITCH=m > CONFIG_VIDEO_SMIAPP_PLL=m > CONFIG_VIDEO_SMIAPP=m > CONFIG_VIDEO_SMIAREGS=m > CONFIG_VIDEO_ET8EK8=m Ok, I found the problem. CONFIG_VIDEO_OMAP3=y does not work, due to missing -EPROBE_DEFER handling for vdds_csib. I added it and just got a test image with builtin CONFIG_VIDEO_OMAP3. The below patch fixes the problem. commit 9d8333b29207de3a9b6ac99db2dfd91e2f8c0216 Author: Sebastian Reichel Date: Fri Apr 29 19:23:02 2016 +0200 omap3isp: handle -EPROBE_DEFER for vdds_csib omap3isp may be initialized before the regulator's driver has been loaded resulting in vdds_csib=NULL. Fix this by handling -EPROBE_DEFER for vdds_csib. Signed-Off-By: Sebastian Reichel diff --git a/drivers/media/platform/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c index 833eed411886..2d1463a72d6a 100644 --- a/drivers/media/platform/omap3isp/ispccp2.c +++ b/drivers/media/platform/omap3isp/ispccp2.c @@ -1167,6 +1167,8 @@ int omap3isp_ccp2_init(struct isp_device *isp) if (isp->revision == ISP_REVISION_2_0) { ccp2->vdds_csib = devm_regulator_get(isp->dev, "vdds_csib"); if (IS_ERR(ccp2->vdds_csib)) { + if (PTR_ERR(ccp2->vdds_csib) == -EPROBE_DEFER) + return -EPROBE_DEFER; dev_dbg(isp->dev, "Could not get regulator vdds_csib\n"); ccp2->vdds_csib = NULL; -- Sebastian signature.asc Description: PGP signature
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi Ivo, On Wed, Apr 27, 2016 at 08:12:50PM +0300, Ивайло Димитров wrote: > > The zImage + initrd works with the steps you described below. > > Great! I also got it working with the previously referenced branch with the following built as modules: CONFIG_VIDEOBUF2_CORE=m CONFIG_VIDEOBUF2_MEMOPS=m CONFIG_VIDEOBUF2_DMA_CONTIG=m CONFIG_VIDEO_OMAP3=m CONFIG_VIDEO_BUS_SWITCH=m CONFIG_VIDEO_SMIAPP_PLL=m CONFIG_VIDEO_SMIAPP=m CONFIG_VIDEO_SMIAREGS=m CONFIG_VIDEO_ET8EK8=m > > I received a completly black image, but at least there are interrupts > > and yavta is happy (=> it does not hang). > > The black image is because by default exposure and gain are set to 0 :). > Use yavta to set the appropriate controls. You can > also enable test patterns from there. The test patterns look ok for me, so it's definitively a sensor configuration problem :) > > Can you try if your config still works if you configure > > CONFIG_VIDEO_OMAP3=y, but leaving the sensors configured > > as modules? I will try the reverse process (using my config > > and moving config options to =m). > > > > Will try to find time later today. > > > > ~$ modprobe smiapp > > > > modprobing smiapp resulted in a kernel message about a missing > > symbol btw. I currently don't remember which one and it's no > > longer in dmesg due to ISP debug messages. > > Never seen such missing symbols. It did not appear with my kernel built either. -- Sebastian signature.asc Description: PGP signature
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > It's part of the v4l-utils git repo: > > https://git.linuxtv.org/v4l-utils.git/ ... > > > Anyway, does anyone know where to get the media-ctl tool? > > > > Looks like it is part of v4l-utils package. At least in git: > > https://git.linuxtv.org/v4l-utils.git/tree/utils/media-ctl > > > > > It does not seem to be in debian 7 or debian 8... > > > > I do not see it in debian too, but there is some version in ubuntu: > > http://packages.ubuntu.com/trusty/media-ctl > > > > So you can compile ubuntu dsc package, should work on debian. > > Finally, it is also in debian, see: > > https://packages.debian.org/search?suite=sid&arch=any&mode=path&searchon=contents&keywords=media-ctl > https://packages.debian.org/sid/amd64/v4l-utils/filelist Thanks for the pointers. It seems that new debian contains media-ctl, but I'm using older one, so I compiled it from source. Could not find yavta, either, but that was very easy to pull from git and compile. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > >>Try with: > >> > >>media-ctl -r > >>media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' > >>media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > >>media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > >>media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > >>media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > >>media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > >> > >>media-ctl -V '"et8ek8 3-003e":0 [SGRBG10 864x656]' > >>media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 864x656]' > >>media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 864x656]' > >>media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 864x656]' > >>media-ctl -V '"OMAP3 ISP preview":1 [UYVY 864x656]' > >>media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 800x600]' > >> > >> > >>mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 > >>-vo xv -vf screenshot tv:// > > > >It fails with: > > > >pavel@n900:/my/tui/ofone/camera$ sudo ./back.sh > >Unable to parse link: Device or resource busy (16) > > That shouldn't happen, there is something else wrong. > > >MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer > >Team > > > >...but as I'm using the original dts, it is expected...? > > > >Would you have dts suitable for the 5MPx camera? > > Just change from strobe = <0>; to strobe = <1>; in isp node. Thanks, that got the trick. (With drivers being compiled as modules). Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > On Wed, Apr 27, 2016 at 09:57:51AM +0300, Ivaylo Dimitrov wrote: > > >>https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo > > > > > >Ok, going to diff with my tree to see what I have missed to send in the > > >patchset > > > > Now, that's getting weird. > > [...] > > > I you want to try it, zImage and initrd are on > > http://46.249.74.23/linux/camera-n900/ > > The zImage + initrd works with the steps you described below. I > received a completly black image, but at least there are interrupts > and yavta is happy (=> it does not hang). Ok, thanks for all the help. I switched from =y to =m, and it started to work. sudo insmod videobuf2-core.ko sudo insmod videobuf2-v4l2.ko sudo insmod videobuf2-memops.ko sudo insmod video-bus-switch.ko sudo insmod smiaregs.ko sudo insmod smiapp-pll.ko sudo insmod smiapp.ko sudo insmod /my/modules/videobuf2-dma-contig.ko sudo insmod /my/modules/omap3-isp.ko So far I tested front camera only, and used a rather bright light to get something... but that's a start :-). Ok, and these seem to get some image that is dark, but not completely dark: YA=/my/tui/yavta/yavta sudo $YA --set-control '0x009e0903 240' /dev/v4l-subdev8 sudo $YA --set-control '0x00980911 485' /dev/v4l-subdev8 Thanks! Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > > On Wed, Apr 27, 2016 at 09:57:51AM +0300, Ivaylo Dimitrov wrote: > > > > > https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo > > > > > > > > Ok, going to diff with my tree to see what I have missed to send in > > > > the patchset > > > > > > Now, that's getting weird. > > > > [...] > > The zImage + initrd works with the steps you described below. I > > Great! > > > received a completly black image, but at least there are interrupts > > and yavta is happy (=> it does not hang). > > > > The black image is because by default exposure and gain are set to 0 :). > Use yavta to set the appropriate controls. You can > also enable test patterns from there. Uff.. .there's a lot of controls to play with ;-). So I did this... while true; do ./yavta --capture=1 --skip 0 --format UYVY --size 656x488 /dev/video6 --file=/tmp/delme# && cat /tmp/delme01 > /dev/fb0; done ...and kernel certainly did not like that. After a while: [ 3468.118774] ---[ end trace 70aa4a6442fc6916 ]--- [ 3468.137084] Address Hole seen by CAM at address 0 [ 3468.137084] [ cut here ] [ 3468.137084] WARNING: CPU: 0 PID: 4974 at drivers/bus/omap_l3_smx.c:166 omap3_l3_app_irq+0xdc/0x124 [ 3468.137207] Modules linked in: smiapp smiapp_pll ipv6 isp1704_charger omap3_isp videobuf2_v4l2 videobuf2_dma_contig videobuf2_memops videobuf2_core et8ek8 smiaregs lis3lv02d_i2c lis3lv02d input_polldev ti_soc_thermal arc4 wl1251_spi wl1251 crc7 mac80211 cfg80211 omap_ssi hsi bq2415x_charger si4713 bq27xxx_battery_i2c bq27xxx_battery leds_lp5523 leds_lp55xx_common adp1653 v4l2_common tsl2563 smc91x mii rtc_twl twl4030_vibra ff_memless twl4030_wdt tsc2005 tsc200x_core omap_sham omap_wdt gpio_keys rx51_battery video_bus_switch videodev media [ 3468.137207] CPU: 0 PID: 4974 Comm: init Tainted: GW 4.6.0-rc4+ #1 [ 3468.137207] Hardware name: Nokia RX-51 board [ 3468.137237] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 3468.137237] [] (show_stack) from [] (__warn+0xcc/0xf8) [ 3468.137268] [] (__warn) from [] (warn_slowpath_null+0x1c/0x20) [ 3468.137298] [] (warn_slowpath_null) from [] (omap3_l3_app_irq+0xdc/0x124) [ 3468.137298] [] (omap3_l3_app_irq) from [] (handle_irq_event_percpu+0x34/0x138) [ 3468.137329] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x5c/0x88) [ 3468.137329] [] (handle_irq_event) from [] (handle_level_irq+0xcc/0x130) [ 3468.137359] [] (handle_level_irq) from [] (generic_handle_irq+0x18/0x28) [ 3468.137359] [] (generic_handle_irq) from [] (__handle_domain_irq+0x84/0xa8) [ 3468.137390] [] (__handle_domain_irq) from [] (__irq_svc+0x54/0x90) [ 3468.137390] [] (__irq_svc) from [] (__do_softirq+0x5c/0x208) [ 3468.137420] [] (__do_softirq) from [] (irq_exit+0x80/0xe4) [ 3468.137451] [] (irq_exit) from [] (__handle_domain_irq+0x88/0xa8) [ 3468.137451] [] (__handle_domain_irq) from [] (__irq_svc+0x54/0x90) [ 3468.137481] [] (__irq_svc) from [] (console_unlock+0x3f4/0x4fc) [ 3468.137481] [] (console_unlock) from [] (do_con_write.part.10+0x1d80/0x1dac) [ 3468.137512] [] (do_con_write.part.10) from [] (con_write+0x30/0x48) [ 3468.137512] [] (con_write) from [] (do_output_char+0x9c/0x1e4) [ 3468.137542] [] (do_output_char) from [] (n_tty_write+0x2ac/0x430) [ 3468.137573] [] (n_tty_write) from [] (tty_write+0x1b0/0x240) [ 3468.137573] [] (tty_write) from [] (__vfs_write+0x2c/0xd4) [ 3468.137603] [] (__vfs_write) from [] (vfs_write+0xa0/0x18c) [ 3468.137603] [] (vfs_write) from [] (SyS_write+0x3c/0x78) [ 3468.137603] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x3c) [ 3468.137634] ---[ end trace 70aa4a6442fc6917 ]--- [ 3468.144317] omap3isp 480bc000.isp: CCP2 err:8010817 [ 3468.144317] Address Hole seen by CAM at address b00 [ 3468.144317] [ cut here ] [ 3468.144348] WARNING: CPU: 0 PID: 4973 at drivers/bus/omap_l3_smx.c:166 omap3_l3_app_irq+0xdc/0x124 [ 3468.144439] Modules linked in: smiapp smiapp_pll ipv6 isp1704_charger omap3_isp videobuf2_v4l2 videobuf2_dma_contig videobuf2_memops videobuf2_core et8ek8 smiaregs lis3lv02d_i2c lis3lv02d input_polldev ti_soc_thermal arc4 wl1251_spi wl1251 crc7 mac80211 cfg80211 omap_ssi hsi bq2415x_charger si4713 bq27xxx_battery_i2c bq27xxx_battery leds_lp5523 leds_lp55xx_common adp1653 v4l2_common tsl2563 smc91x mii rtc_twl twl4030_vibra ff_memless twl4030_wdt tsc2005 tsc200x_core omap_sham omap_wdt gpio_keys rx51_battery video_bus_switch videodev media [ 3468.144439] CPU: 0 PID: 4973 Comm: yavta Tainted: GW 4.6.0-rc4+ #1 [ 3468.144470] Hardware name: Nokia RX-51 board [ 3468.144470] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 3468.144500] [] (show_stack) from [] (__warn+0xcc/0xf8) [ 3468.144500] [] (__warn) from [] (warn_slowpath_null+0x1c/0x20) [ 3468.144531] [] (warn_slowpath_null) from [] (omap3_l3_app_irq+0xdc/0x124) [ 3468.144561] [] (omap3_l3_app_irq) from [] (handle_irq_event_percpu+0x34/0x138) [ 3468.144561] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x5c
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On Wed Apr 27 19:42:56 2016 Sebastian Reichel wrote: > Hi, > > On Wed, Apr 27, 2016 at 09:57:51AM +0300, Ivaylo Dimitrov wrote: > > > > https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo > > > > > > Ok, going to diff with my tree to see what I have missed to send in > > > the patchset > > > > Now, that's getting weird. > > [...] > The zImage + initrd works with the steps you described below. I Great! > received a completly black image, but at least there are interrupts > and yavta is happy (=> it does not hang). > The black image is because by default exposure and gain are set to 0 :). Use yavta to set the appropriate controls. You can also enable test patterns from there. > > Can you try if your config still works if you configure > CONFIG_VIDEO_OMAP3=y, but leaving the sensors configured > as modules? I will try the reverse process (using my config > and moving config options to =m). > Will try to find time later today. > > ~$ modprobe smiapp > > modprobing smiapp resulted in a kernel message about a missing > symbol btw. I currently don't remember which one and it's no > longer in dmesg due to ISP debug messages. > Never seen such missing symbols. > > Please, Sebastian and Pavel, make sure you're not using some > > development devices, old board versions need VAUX3 enabled as well, > > and this is not supported in the $subject patchset. I guess you may > > try to make VAUX3 always-on in board DTS if that's the case, but I've > > never tested that, my device is a production one. > > I don't have pre-production N900s. The phone I use for development > is HW revision 2101 with Finish keyboard layout. Apart from that > I have my productive phone, which is rev 2204 with German layout. > The one I use for testing is 2204, but I guess it is irrelevant now you have it finally working. Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On Wed, Apr 27, 2016 at 06:45:29PM +0200, Pavel Machek wrote: > > I don't have pre-production N900s. The phone I use for development > > is HW revision 2101 with Finish keyboard layout. Apart from that > > I have my productive phone, which is rev 2204 with German layout. > > How do you check hw revision? 0x tells you the HW revision (e.g. when executed with -I, but also during normal kernel loading operation). Apart from that there is /proc/cpuinfo. -- Sebastian signature.asc Description: PGP signature
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > I don't have pre-production N900s. The phone I use for development > is HW revision 2101 with Finish keyboard layout. Apart from that > I have my productive phone, which is rev 2204 with German layout. How do you check hw revision? Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On Wed, Apr 27, 2016 at 09:57:51AM +0300, Ivaylo Dimitrov wrote: > >>https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo > > > >Ok, going to diff with my tree to see what I have missed to send in the > >patchset > > Now, that's getting weird. [...] > I you want to try it, zImage and initrd are on > http://46.249.74.23/linux/camera-n900/ The zImage + initrd works with the steps you described below. I received a completly black image, but at least there are interrupts and yavta is happy (=> it does not hang). For reference I configured the pipeline using media-ctl and used this to acquire the image: ./yavta --capture=1 --format UYVY --file="/tmp/frame.uyvy" --size 656x488 /dev/video6 Then I copied the file to my notebook using the FTP server coming with your initrd and displayed it using "display" from imagemagick: display -size 656x488 -colorspace rgb frame.uyvy Before analysing why there is only a black image let's start with the no image at all problem, though. > I cloned n900-camera-ivo, copied rx51_defconfig from my tree, added: > > CONFIG_VIDEO_SMIAREGS=m > CONFIG_VIDEO_ET8EK8=m > CONFIG_VIDEO_BUS_SWITCH=m > > to it, make mrproper, built the kernel using rx51_defconfig and made initrd > for rescueos, so to be sure that maemo5 did not influence cameras somehow. Ok, so there is probably a problem when some things are not built as modules. > I cloned n900-camera-ivo, copied rx51_defconfig from my tree, added: > > CONFIG_VIDEO_SMIAREGS=m > CONFIG_VIDEO_ET8EK8=m > CONFIG_VIDEO_BUS_SWITCH=m > > to it, make mrproper, built the kernel using rx51_defconfig and made initrd > for rescueos, so to be sure that maemo5 did not influence cameras somehow. I will test your kernel + your modules with my userspace, so that I know for sure, that my userland behaves correctly. Can you try if your config still works if you configure CONFIG_VIDEO_OMAP3=y, but leaving the sensors configured as modules? I will try the reverse process (using my config and moving config options to =m). > ~$ modprobe smiapp modprobing smiapp resulted in a kernel message about a missing symbol btw. I currently don't remember which one and it's no longer in dmesg due to ISP debug messages. > Please, Sebastian and Pavel, make sure you're not using some development > devices, old board versions need VAUX3 enabled as well, and this is not > supported in the $subject patchset. I guess you may try to make VAUX3 > always-on in board DTS if that's the case, but I've never tested that, my > device is a production one. I don't have pre-production N900s. The phone I use for development is HW revision 2101 with Finish keyboard layout. Apart from that I have my productive phone, which is rev 2204 with German layout. -- Sebastian signature.asc Description: PGP signature
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > After taking a nap, a question came to my mind - what is that device you're > using? As some early board versions use VAUX3 for cameras as well. I got used N900 from a friend. It had czech keyboard, originally, so I believe it should be regular version, not early one... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 27.04.2016 08:05, Ivaylo Dimitrov wrote: Hi, On 27.04.2016 06:08, Sebastian Reichel wrote: Hi, On Mon, Apr 25, 2016 at 12:08:00AM +0300, Ivaylo Dimitrov wrote: Those patch series make cameras on Nokia N900 partially working. Some more patches are needed, but I've already sent them for upstreaming so they are not part of the series: https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 As omap3isp driver supports only one endpoint on ccp2 interface, but cameras on N900 require different strobe settings, so far it is not possible to have both cameras correctly working with the same board DTS. DTS patch in the series has the correct settings for the front camera. This is a problem still to be solved. The needed pipeline could be made with: media-ctl -r media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' and tested with: mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv:// 4.6-rc4 + twl regulator patch + the patches mentioned above + this patchset (I put everything together here [0]) do _not_ work for me. The error matches what I have seen when I was working on it: No image data seems to be received by the ISP. For example there are no related IRQs: root@n900:~# cat /proc/interrupts | grep ISP 40: 0 INTC 24 Edge 480bd400.mmu, OMAP3 ISP I tested with mpv and yavta (yavta --capture=8 --pause --skip 0 --format UYVY --size 656x488 /dev/video6) [0] https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo Ok, going to diff with my tree to see what I have missed to send in the patchset Now, that's getting weird. I cloned n900-camera-ivo, copied rx51_defconfig from my tree, added: CONFIG_VIDEO_SMIAREGS=m CONFIG_VIDEO_ET8EK8=m CONFIG_VIDEO_BUS_SWITCH=m to it, make mrproper, built the kernel using rx51_defconfig and made initrd for rescueos, so to be sure that maemo5 did not influence cameras somehow. Booted the device with flasher3.5: sudo flasher-3.5 -k zImage -n ramfs -l -b"rootdelay root=/dev/ram0 mtdoops.mtddev=log log_buf_len=1M" ivo@ivo-H81M-S2PV:~/maemo/rescueos$ sudo ifconfig usb0 192.168.2.14 ivo@ivo-H81M-S2PV:~/maemo/rescueos$ telnet 192.168.2.15 Trying 192.168.2.15... Connected to 192.168.2.15. Escape character is '^]'. rescueos login: root Password: ~$ modprobe smiapp ~$ cd /camera/ /camera$ export LD_LIBRARY_PATH=./ /camera$ ./media-ctl -r /camera$ ./media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' /camera$ ./media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' /camera$ ./media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' /camera$ ./media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' /camera$ ./media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' /camera$ ./media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' /camera$ ./media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' /camera$ ./media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' /camera$ ./media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' /camera$ ./media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' /camera$ ./media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' /camera$ ./media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' /camera$ ./media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' /camera$ ./yavta --capture=8 --pause --skip 0 --format UYVY --size 656x488 /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: UYVY (59565955) 656x488 (stride 1312) buffer size 640256 Video format: UYVY (59565955) 656x488 (stride 1312) buffer size 640256 8 buffers requested. length: 640256 offset: 0 timestamp type: monotonic Buffer 0 mapped at address 0xb6de5000. length: 640256 offset: 643072 timestamp type: monotonic Buffer 1 mapped at address 0xb6d48000. length: 640256 offset: 1286144 timestamp type: monotonic Buffer 2 mapped at address 0xb6cab000. length: 640256 offset: 1929216 timestamp type: monotonic Buffer 3 mapped at address 0xb6c0e000. length: 640256 offset: 2572288 timestamp type: monotonic Buffer 4 ma
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 27.04.2016 06:08, Sebastian Reichel wrote: Hi, On Mon, Apr 25, 2016 at 12:08:00AM +0300, Ivaylo Dimitrov wrote: Those patch series make cameras on Nokia N900 partially working. Some more patches are needed, but I've already sent them for upstreaming so they are not part of the series: https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 As omap3isp driver supports only one endpoint on ccp2 interface, but cameras on N900 require different strobe settings, so far it is not possible to have both cameras correctly working with the same board DTS. DTS patch in the series has the correct settings for the front camera. This is a problem still to be solved. The needed pipeline could be made with: media-ctl -r media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' and tested with: mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv:// 4.6-rc4 + twl regulator patch + the patches mentioned above + this patchset (I put everything together here [0]) do _not_ work for me. The error matches what I have seen when I was working on it: No image data seems to be received by the ISP. For example there are no related IRQs: root@n900:~# cat /proc/interrupts | grep ISP 40: 0 INTC 24 Edge 480bd400.mmu, OMAP3 ISP I tested with mpv and yavta (yavta --capture=8 --pause --skip 0 --format UYVY --size 656x488 /dev/video6) [0] https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo Ok, going to diff with my tree to see what I have missed to send in the patchset Thanks -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On Mon, Apr 25, 2016 at 12:08:00AM +0300, Ivaylo Dimitrov wrote: > Those patch series make cameras on Nokia N900 partially working. > Some more patches are needed, but I've already sent them for > upstreaming so they are not part of the series: > > https://lkml.org/lkml/2016/4/16/14 > https://lkml.org/lkml/2016/4/16/33 > > As omap3isp driver supports only one endpoint on ccp2 interface, > but cameras on N900 require different strobe settings, so far > it is not possible to have both cameras correctly working with > the same board DTS. DTS patch in the series has the correct > settings for the front camera. This is a problem still to be > solved. > > The needed pipeline could be made with: > > media-ctl -r > media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' > media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' > media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' > > and tested with: > > mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// 4.6-rc4 + twl regulator patch + the patches mentioned above + this patchset (I put everything together here [0]) do _not_ work for me. The error matches what I have seen when I was working on it: No image data seems to be received by the ISP. For example there are no related IRQs: root@n900:~# cat /proc/interrupts | grep ISP 40: 0 INTC 24 Edge 480bd400.mmu, OMAP3 ISP I tested with mpv and yavta (yavta --capture=8 --pause --skip 0 --format UYVY --size 656x488 /dev/video6) [0] https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo -- Sebastian signature.asc Description: PGP signature
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 26.04.2016 01:07, Pavel Machek wrote: Hi! Hi! All my testing so far was performed using modules, though it shouldn't make difference. https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 More stuff is needed, all those twl4030 regulator patches (already in linux-next) + DTS initial-mode patch (https://lkml.org/lkml/2016/4/17/78). Aha, that explains a lot. Dealing with -next would be tricky, I guess; can I just pull from your camera branch? https://github.com/freemangordon/linux-n900/tree/camera I guess yes, though I am not sure all the patches there are compatible with userland different from maemo, so be careful. Also, the correct branch is v4.6-rc4-n900-camera. I tried v4.6-rc4-n900-camera, but got the same results: green mplayer window, if I try to use front or back camera. Assuming v4.6-rc4-n900-camera works for you, could I get your .config and list of modules loaded during the test? .config is 'make rx51_defconfig' from v4.6-rc4-n900-camera branch, with added: CONFIG_VIDEO_BUS_SWITCH=m CONFIG_VIDEO_SMIAREGS=m CONFIG_VIDEO_ET8EK8=m For some reason I have to do 'modprobe smiapp' after every reboot, before using cameras. After taking a nap, a question came to my mind - what is that device you're using? As some early board versions use VAUX3 for cameras as well. awk '{ printf "%s ",$1 }' /proc/modules results in: smiapp smiapp_pll sha256_generic hmac drbg ansi_cprng ctr ccm vfat fat rfcomm sd_mod scsi_mod bnep bluetooth omaplfb pvrsrvkm ipv6 bq2415x_charger uinput radio_platform_si4713 joydev cmt_speech hsi_char video_bus_switch arc4 wl1251_spi isp1704_charger wl1251 gpio_keys mac80211 smc91x mii cfg80211 omap3_isp videobuf2_v4l2 omap_wdt videobuf2_dma_contig omap_sham crc7 videobuf2_memops videobuf2_core tsc2005 tsc200x_core leds_lp5523 bq27xxx_battery_i2c si4713 adp1653 tsl2563 bq27xxx_battery leds_lp55xx_common twl4030_wdt rtc_twl et8ek8 v4l2_common smiaregs videodev twl4030_vibra ff_memless lis3lv02d_i2c lis3lv02d media input_polldev omap_ssi_port ti_soc_thermal nokia_modem ssi_protocol omap_ssi hsi rx51_battery Regards, Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > >Hi! > > > >>All my testing so far was performed using modules, though it shouldn't make > >>difference. > >> > >>>https://lkml.org/lkml/2016/4/16/14 > >>>https://lkml.org/lkml/2016/4/16/33 > >>> > >> > >>More stuff is needed, all those twl4030 regulator patches (already in > >>linux-next) + DTS initial-mode patch > >>(https://lkml.org/lkml/2016/4/17/78). > > > >Aha, that explains a lot. Dealing with -next would be tricky, I guess; > >can I just pull from your camera branch? > > > >https://github.com/freemangordon/linux-n900/tree/camera > > I guess yes, though I am not sure all the patches there are compatible with > userland different from maemo, so be careful. Also, the correct branch is > v4.6-rc4-n900-camera. I tried v4.6-rc4-n900-camera, but got the same results: green mplayer window, if I try to use front or back camera. Assuming v4.6-rc4-n900-camera works for you, could I get your .config and list of modules loaded during the test? Thanks a lot, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 25.04.2016 23:41, Pavel Machek wrote: Hi! All my testing so far was performed using modules, though it shouldn't make difference. https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 More stuff is needed, all those twl4030 regulator patches (already in linux-next) + DTS initial-mode patch (https://lkml.org/lkml/2016/4/17/78). Aha, that explains a lot. Dealing with -next would be tricky, I guess; can I just pull from your camera branch? https://github.com/freemangordon/linux-n900/tree/camera I guess yes, though I am not sure all the patches there are compatible with userland different from maemo, so be careful. Also, the correct branch is v4.6-rc4-n900-camera. Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > All my testing so far was performed using modules, though it shouldn't make > difference. > > >https://lkml.org/lkml/2016/4/16/14 > >https://lkml.org/lkml/2016/4/16/33 > > > > More stuff is needed, all those twl4030 regulator patches (already in > linux-next) + DTS initial-mode patch > (https://lkml.org/lkml/2016/4/17/78). Aha, that explains a lot. Dealing with -next would be tricky, I guess; can I just pull from your camera branch? https://github.com/freemangordon/linux-n900/tree/camera Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 25.04.2016 21:40, Pavel Machek wrote: Hi! I can't do -vo xv ... fails for me, probably due to X configuration. Does it work with -vo x11 for you? yes, -vo x11 works under maemo. Ok, good. In linux-n900 branch we have a patch that reserves memory for omapfb - see https://github.com/freemangordon/linux-n900/commit/60f85dcb6a663efe687f58208861545d65210b55 also, because of a change in 4.6, https://github.com/freemangordon/linux-n900/commit/60f85dcb6a663efe687f58208861545d65210b55#diff-072444ea67d2aca6b402458f50d20edeR125 needs a change to DMA_MEMORY_IO and the if bellow needs the relevant change as well. This is needed for -vo xv (and any omapfb video playback) to reliably work under maemo. I don't have that kind of acceleration working. For me it shows window with green interior. And complains about v4l2: select timeouts. (I enabled these in .config): +CONFIG_VIDEO_BUS_SWITCH=y +CONFIG_VIDEO_SMIAREGS=y +CONFIG_VIDEO_ET8EK8=y +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y +CONFIG_VIDEO_OMAP3=y +CONFIG_VIDEO_SMIAPP_PLL=y +CONFIG_VIDEO_SMIAPP=y Any ideas? Pavel Try to build those as modules. Also, do you have all the needed patches besides those in the patchset? See https://github.com/freemangordon/linux-n900/commits/v4.6-rc4-n900-camera Also, is there anything related in dmesg log? Modules are tricky. I hate modules. I did patch with All my testing so far was performed using modules, though it shouldn't make difference. https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 More stuff is needed, all those twl4030 regulator patches (already in linux-next) + DTS initial-mode patch (https://lkml.org/lkml/2016/4/17/78). + the series. And yes, there seems to be explanation in the dmesg: [ 6134.261993] DISPC: channel 0 xres 800 yres 480 [ 6134.262023] DISPC: pck 2400 [ 6134.262023] DISPC: hsw 4 hfp 28 hbp 24 vsw 3 vfp 3 vbp 4 [ 6134.262023] DISPC: vsync_level 0 hsync_level 0 data_pclk_edge 1 de_level 1 sync_pclk_edge 1 [ 6134.262023] DISPC: hsync 28037Hz, vsync 57Hz [ 6134.262054] DISPC: lck = 7200 (1) [ 6134.262054] DISPC: pck = 2400 (3) [ 6190.075103] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP resizer [ 6192.075347] omap3isp 480bc000.isp: CCDC stop timeout! [ 6192.075408] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP CCDC [ 6292.293670] DISPC: dispc_runtime_put [ 6292.293701] DISPC: dispc_save_context [ 6292.293762] DISPC: context saved [ 6292.294342] DSS: dss_save_context [ 6292.294372] DSS: context saved [ 6297.056976] DISPC: dispc_runtime_get [ 6297.057067] DSS: dss_restore_context [ 6297.057067] DSS: context restored [ 6297.057159] DSS: set fck to 7200 [ 6297.057159] DISPC: lck = 7200 (1) [ 6297.057159] DISPC: pck = 2400 (3) That usually happens when strobe is incorrect or there is no signal from the camera. Let me check the github... I really hope I didn't miss something when I sent the series. May I have your boot log? Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > >I can't do -vo xv ... fails for me, probably due to X > >configuration. Does it work with -vo x11 for you? > > > yes, -vo x11 works under maemo. Ok, good. > In linux-n900 branch we have a patch that reserves memory for omapfb - see > https://github.com/freemangordon/linux-n900/commit/60f85dcb6a663efe687f58208861545d65210b55 > > also, because of a change in 4.6, > https://github.com/freemangordon/linux-n900/commit/60f85dcb6a663efe687f58208861545d65210b55#diff-072444ea67d2aca6b402458f50d20edeR125 > needs a change to DMA_MEMORY_IO and the if bellow needs the relevant change > as well. > This is needed for -vo xv (and any omapfb video playback) to reliably work > under maemo. I don't have that kind of acceleration working. > >For me it shows window with green interior. And complains about v4l2: > >select timeouts. (I enabled these in .config): > > > >+CONFIG_VIDEO_BUS_SWITCH=y > >+CONFIG_VIDEO_SMIAREGS=y > >+CONFIG_VIDEO_ET8EK8=y > >+CONFIG_VIDEOBUF2_CORE=y > >+CONFIG_VIDEOBUF2_MEMOPS=y > >+CONFIG_VIDEOBUF2_DMA_CONTIG=y > >+CONFIG_VIDEO_OMAP3=y > >+CONFIG_VIDEO_SMIAPP_PLL=y > >+CONFIG_VIDEO_SMIAPP=y > > > >Any ideas? > > Pavel > > > > Try to build those as modules. Also, do you have all the needed patches > besides those in the patchset? > > See https://github.com/freemangordon/linux-n900/commits/v4.6-rc4-n900-camera > > Also, is there anything related in dmesg log? Modules are tricky. I hate modules. I did patch with https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 + the series. And yes, there seems to be explanation in the dmesg: [ 6134.261993] DISPC: channel 0 xres 800 yres 480 [ 6134.262023] DISPC: pck 2400 [ 6134.262023] DISPC: hsw 4 hfp 28 hbp 24 vsw 3 vfp 3 vbp 4 [ 6134.262023] DISPC: vsync_level 0 hsync_level 0 data_pclk_edge 1 de_level 1 sync_pclk_edge 1 [ 6134.262023] DISPC: hsync 28037Hz, vsync 57Hz [ 6134.262054] DISPC: lck = 7200 (1) [ 6134.262054] DISPC: pck = 2400 (3) [ 6190.075103] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP resizer [ 6192.075347] omap3isp 480bc000.isp: CCDC stop timeout! [ 6192.075408] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP CCDC [ 6292.293670] DISPC: dispc_runtime_put [ 6292.293701] DISPC: dispc_save_context [ 6292.293762] DISPC: context saved [ 6292.294342] DSS: dss_save_context [ 6292.294372] DSS: context saved [ 6297.056976] DISPC: dispc_runtime_get [ 6297.057067] DSS: dss_restore_context [ 6297.057067] DSS: context restored [ 6297.057159] DSS: set fck to 7200 [ 6297.057159] DISPC: lck = 7200 (1) [ 6297.057159] DISPC: pck = 2400 (3) Let me check the github... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
On 25.04.2016 20:09, Pavel Machek wrote: Hi! The needed pipeline could be made with: Would you have similar pipeline for the back camera? Autofocus and 5MPx makes it more interesting. I understand that different dts will be needed. Try with: media-ctl -r media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' media-ctl -V '"et8ek8 3-003e":0 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP preview":1 [UYVY 864x656]' media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 800x600]' mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv:// It fails with: pavel@n900:/my/tui/ofone/camera$ sudo ./back.sh Unable to parse link: Device or resource busy (16) That shouldn't happen, there is something else wrong. MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team ...but as I'm using the original dts, it is expected...? Would you have dts suitable for the 5MPx camera? Just change from strobe = <0>; to strobe = <1>; in isp node. Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi, On 25.04.2016 19:58, Pavel Machek wrote: Hi! Ok, let me try: The needed pipeline could be made with: media-ctl -r media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' pavel@n900:/my/tui/ofone/camera$ sudo ./front.sh MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team Linux n900 4.6.0-rc5-176733-g8b658a3-dirty media-ctl from today's git. and tested with: mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv:// I can't do -vo xv ... fails for me, probably due to X configuration. Does it work with -vo x11 for you? yes, -vo x11 works under maemo. In linux-n900 branch we have a patch that reserves memory for omapfb - see https://github.com/freemangordon/linux-n900/commit/60f85dcb6a663efe687f58208861545d65210b55 also, because of a change in 4.6, https://github.com/freemangordon/linux-n900/commit/60f85dcb6a663efe687f58208861545d65210b55#diff-072444ea67d2aca6b402458f50d20edeR125 needs a change to DMA_MEMORY_IO and the if bellow needs the relevant change as well. This is needed for -vo xv (and any omapfb video playback) to reliably work under maemo. For me it shows window with green interior. And complains about v4l2: select timeouts. (I enabled these in .config): +CONFIG_VIDEO_BUS_SWITCH=y +CONFIG_VIDEO_SMIAREGS=y +CONFIG_VIDEO_ET8EK8=y +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y +CONFIG_VIDEO_OMAP3=y +CONFIG_VIDEO_SMIAPP_PLL=y +CONFIG_VIDEO_SMIAPP=y Any ideas? Pavel Try to build those as modules. Also, do you have all the needed patches besides those in the patchset? See https://github.com/freemangordon/linux-n900/commits/v4.6-rc4-n900-camera Also, is there anything related in dmesg log? Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
On Monday 25 April 2016 16:14:41 Pali Rohár wrote: > > Anyway, does anyone know where to get the media-ctl tool? > > Looks like it is part of v4l-utils package. At least in git: > https://git.linuxtv.org/v4l-utils.git/tree/utils/media-ctl > > > It does not seem to be in debian 7 or debian 8... > > I do not see it in debian too, but there is some version in ubuntu: > http://packages.ubuntu.com/trusty/media-ctl > > So you can compile ubuntu dsc package, should work on debian. Finally, it is also in debian, see: https://packages.debian.org/search?suite=sid&arch=any&mode=path&searchon=contents&keywords=media-ctl https://packages.debian.org/sid/amd64/v4l-utils/filelist -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part.
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > >>The needed pipeline could be made with: > > > >Would you have similar pipeline for the back camera? Autofocus and > >5MPx makes it more interesting. I understand that different dts will > >be needed. > > > > Try with: > > media-ctl -r > media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' > media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > > media-ctl -V '"et8ek8 3-003e":0 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP preview":1 [UYVY 864x656]' > media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 800x600]' > > > mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// It fails with: pavel@n900:/my/tui/ofone/camera$ sudo ./back.sh Unable to parse link: Device or resource busy (16) MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team ...but as I'm using the original dts, it is expected...? Would you have dts suitable for the 5MPx camera? Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! Ok, let me try: > The needed pipeline could be made with: > > media-ctl -r > media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' > media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' > media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' pavel@n900:/my/tui/ofone/camera$ sudo ./front.sh MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team Linux n900 4.6.0-rc5-176733-g8b658a3-dirty media-ctl from today's git. > and tested with: > > mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// > I can't do -vo xv ... fails for me, probably due to X configuration. Does it work with -vo x11 for you? For me it shows window with green interior. And complains about v4l2: select timeouts. (I enabled these in .config): +CONFIG_VIDEO_BUS_SWITCH=y +CONFIG_VIDEO_SMIAREGS=y +CONFIG_VIDEO_ET8EK8=y +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y +CONFIG_VIDEO_OMAP3=y +CONFIG_VIDEO_SMIAPP_PLL=y +CONFIG_VIDEO_SMIAPP=y Any ideas? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
On Monday 25 April 2016 16:06:12 Pavel Machek wrote: > Hi! > > > On Monday 25 April 2016 00:08:00 Ivaylo Dimitrov wrote: > > > The needed pipeline could be made with: > > > > > > media-ctl -r > > > media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 > ... > > On Monday 25 April 2016 09:33:18 Ivaylo Dimitrov wrote: > > > Try with: > > > > > > media-ctl -r > > > media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' > ... > > > mplayer -tv > > > driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 -vo xv > > > -vf screenshot tv:// > > > > Hey!!! That is crazy! Who created such retard API?? In both cases you > > are going to show video from /dev/video6 device. But in real I have two > > independent camera devices: front and back. > > Because Nokia, and because the hardware is complex, I'm afraid. In Nokia kernel, there are just /dev/video0 and /dev/video1. When I open first I see back camera, second front camera. No media-ctl nor any other reconfiguration is needed. So not Nokia nor hw complexity is reason... > First we need to get it to work, than we can improve v4l... Ok, I agree. But I really would like to see just two video devices and all those route configuration in kernel... > Anyway, does anyone know where to get the media-ctl tool? Looks like it is part of v4l-utils package. At least in git: https://git.linuxtv.org/v4l-utils.git/tree/utils/media-ctl > It does not seem to be in debian 7 or debian 8... I do not see it in debian too, but there is some version in ubuntu: http://packages.ubuntu.com/trusty/media-ctl So you can compile ubuntu dsc package, should work on debian. -- Pali Rohár pali.ro...@gmail.com -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
On 04/25/2016 04:06 PM, Pavel Machek wrote: > Hi! > >> On Monday 25 April 2016 00:08:00 Ivaylo Dimitrov wrote: >>> The needed pipeline could be made with: >>> >>> media-ctl -r >>> media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 > ... >> On Monday 25 April 2016 09:33:18 Ivaylo Dimitrov wrote: >>> Try with: >>> >>> media-ctl -r >>> media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' > ... >>> mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 >>> -vo xv -vf screenshot tv:// >> >> Hey!!! That is crazy! Who created such retard API?? In both cases you >> are going to show video from /dev/video6 device. But in real I have two >> independent camera devices: front and back. > > Because Nokia, and because the hardware is complex, I'm afraid. First > we need to get it to work, than we can improve v4l... > > Anyway, does anyone know where to get the media-ctl tool? It does not > seem to be in debian 7 or debian 8... It's part of the v4l-utils git repo: https://git.linuxtv.org/v4l-utils.git/ Regards, Hans -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > On Monday 25 April 2016 00:08:00 Ivaylo Dimitrov wrote: > > The needed pipeline could be made with: > > > > media-ctl -r > > media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 ... > On Monday 25 April 2016 09:33:18 Ivaylo Dimitrov wrote: > > Try with: > > > > media-ctl -r > > media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' ... > > mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 > > -vo xv -vf screenshot tv:// > > Hey!!! That is crazy! Who created such retard API?? In both cases you > are going to show video from /dev/video6 device. But in real I have two > independent camera devices: front and back. Because Nokia, and because the hardware is complex, I'm afraid. First we need to get it to work, than we can improve v4l... Anyway, does anyone know where to get the media-ctl tool? It does not seem to be in debian 7 or debian 8... pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
Re: [RFC PATCH 00/24] Make Nokia N900 cameras working
front camera: On Monday 25 April 2016 00:08:00 Ivaylo Dimitrov wrote: > The needed pipeline could be made with: > > media-ctl -r > media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' > media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 > (0,0)/648x488]' > media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' > media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' > media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' > > and tested with: > > mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// back camera: On Monday 25 April 2016 09:33:18 Ivaylo Dimitrov wrote: > Try with: > > media-ctl -r > media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' > media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' > media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' > media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' > media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' > media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' > > media-ctl -V '"et8ek8 3-003e":0 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 864x656]' > media-ctl -V '"OMAP3 ISP preview":1 [UYVY 864x656]' > media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 800x600]' > > > mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 > -vo xv -vf screenshot tv:// Hey!!! That is crazy! Who created such retard API?? In both cases you are going to show video from /dev/video6 device. But in real I have two independent camera devices: front and back. Why on the earth I cannot have /dev/video0 for back camera and /dev/video1 for front camera? And need to call such huge commands which re-route pictures from correct camera to /dev/video6 device? I'm really not interested in some hw details how are cameras connected, I just want to show pictures in userspace... And what are those others /dev/video[0-5] devices? -- Pali Rohár pali.ro...@gmail.com -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
On 25.04.2016 00:55, Pavel Machek wrote: Hi! Those patch series make cameras on Nokia N900 partially working. Some more patches are needed, but I've already sent them for upstreaming so they are not part of the series: https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 As omap3isp driver supports only one endpoint on ccp2 interface, but cameras on N900 require different strobe settings, so far it is not possible to have both cameras correctly working with the same board DTS. DTS patch in the series has the correct settings for the front camera. This is a problem still to be solved. The needed pipeline could be made with: Would you have similar pipeline for the back camera? Autofocus and 5MPx makes it more interesting. I understand that different dts will be needed. Try with: media-ctl -r media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]' media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' media-ctl -V '"et8ek8 3-003e":0 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 864x656]' media-ctl -V '"OMAP3 ISP preview":1 [UYVY 864x656]' media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 800x600]' mplayer -tv driver=v4l2:width=800:height=600:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv:// Regards, Ivo -- 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: [RFC PATCH 00/24] Make Nokia N900 cameras working
Hi! > Those patch series make cameras on Nokia N900 partially working. > Some more patches are needed, but I've already sent them for > upstreaming so they are not part of the series: > > https://lkml.org/lkml/2016/4/16/14 > https://lkml.org/lkml/2016/4/16/33 > > As omap3isp driver supports only one endpoint on ccp2 interface, > but cameras on N900 require different strobe settings, so far > it is not possible to have both cameras correctly working with > the same board DTS. DTS patch in the series has the correct > settings for the front camera. This is a problem still to be > solved. > > The needed pipeline could be made with: Would you have similar pipeline for the back camera? Autofocus and 5MPx makes it more interesting. I understand that different dts will be needed. Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.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
[RFC PATCH 00/24] Make Nokia N900 cameras working
Those patch series make cameras on Nokia N900 partially working. Some more patches are needed, but I've already sent them for upstreaming so they are not part of the series: https://lkml.org/lkml/2016/4/16/14 https://lkml.org/lkml/2016/4/16/33 As omap3isp driver supports only one endpoint on ccp2 interface, but cameras on N900 require different strobe settings, so far it is not possible to have both cameras correctly working with the same board DTS. DTS patch in the series has the correct settings for the front camera. This is a problem still to be solved. The needed pipeline could be made with: media-ctl -r media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]' media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]' media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]' media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]' media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]' media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]' media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488 (0,0)/648x488]' media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]' media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]' media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]' and tested with: mplayer -tv driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 -vo xv -vf screenshot tv:// Ivaylo Dimitrov (8): smiaregs: Generic i2c register writing et8ek8: Toshiba 5MP sensor driver v4l: of: Support CSI-1 and CCP2 busses media: video-bus-switch: new driver ARM: dts: omap3-n900: enable cameras [media] omap3isp: Correctly set IO_OUT_SEL and VP_CLK_POL for CCP2 mode [media] omap3isp: Make sure CSI1 interface is enabled in CPP2 mode ARM: dts: omap3-n900: enable cameras - remove invalid entry Sakari Ailus (10): smiapp-pll: Take existing divisor into account in minimum divisor check smiapp: Add smiapp_has_quirk() to tell whether a quirk is implemented smiapp: Add quirk control support v4l: of: Call CSI2 bus csi2, not csi v4l: of: Obtain data bus type from bus-type property v4l: Add CSI1 and CCP2 bus type to enum v4l2_mbus_type v4l: of: Separate lane parsing from CSI-2 bus parameter parsing dt: bindings: v4l: Add bus-type video interface property dt: bindings: Add CSI1/CCP2 related properties to video-interfaces.txt omap3isp: dt: Add support for CSI1/CCP2 busses Sebastian Reichel (5): media: et8ek8: add device tree binding document media: add subdev type for bus switch smiapp: add CCP2 support v4l2-async: per notifier locking v4l2_device_register_subdev_nodes: allow calling multiple times Tuukka.O Toivonen (1): V4L fixes .../bindings/media/i2c/toshiba,et8ek8.txt | 56 + .../devicetree/bindings/media/video-interfaces.txt | 11 +- arch/arm/boot/dts/omap3-n900.dts | 139 ++ drivers/media/i2c/Kconfig |1 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/smia/Kconfig | 17 + drivers/media/i2c/smia/Makefile|2 + drivers/media/i2c/smia/et8ek8.c| 1788 drivers/media/i2c/smia/smiaregs.c | 724 drivers/media/i2c/smiapp-pll.c |3 +- drivers/media/i2c/smiapp/smiapp-core.c | 18 +- drivers/media/i2c/smiapp/smiapp-quirk.h| 10 +- drivers/media/platform/Kconfig | 10 + drivers/media/platform/Makefile|2 + drivers/media/platform/omap3isp/isp.c | 112 +- drivers/media/platform/omap3isp/ispccp2.c | 34 +- drivers/media/platform/omap3isp/ispreg.h |4 + drivers/media/platform/omap3isp/omap3isp.h |1 + drivers/media/platform/video-bus-switch.c | 366 drivers/media/v4l2-core/v4l2-async.c | 50 +- drivers/media/v4l2-core/v4l2-device.c |3 + drivers/media/v4l2-core/v4l2-of.c | 137 +- include/media/smiaregs.h | 143 ++ include/media/v4l2-async.h |2 + include/media/v4l2-mediabus.h |4 + include/media/v4l2-of.h| 17 + include/uapi/linux/media.h |1 + include/uapi/linux/v4l2-controls.h | 17 + 28 files changed, 3579 insertions(+), 94 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt create mode 100644 drivers/media/i2c/smia/Kconfig create mode 100644 drivers/media/i2c/smia/Makefile create mode 100644 drivers/media/i2c/smia/et8ek8.c create mode 100644 drivers/media/i2c/smia/smiaregs.c create mode 100644