Opened 6 years ago

Closed 6 years ago

#7294 closed defect (fixed)

camera not working in olpc3

Reported by: dsd Owned by: erikb
Priority: normal Milestone: 8.2.0 (was Update.2)
Component: camera-activity Version: olpc-3
Keywords: olpc3-19:- blocks:8.2.0 joyride-2207:+ Cc: erikg, dsaxena, olpc-dev@…
Blocked By: Blocking: #7383
Deployments affected: Action Needed: package
Verified: no

Description

from the wiki:

gst-launch-0.10 v4l2src ! ffmpegcolorspace ! pngenc ! filesink location=foo.png

The above works in update1 build 708, but not in OLPC3-19.

Firstly, you can only run it as root. Secondly, this error appears (when root):

ERROR: from element /pipeline0/v4l2src0: Device '/dev/video0' cannot capture at 32768x32768
Additional debug info:
v4l2src_calls.c(1227): gst_v4l2src_set_capture (): /pipeline0/v4l2src0:
Call to S_FMT failed for YUYV @ 32768x32768: Invalid argument

We also tried to set the resolution as 160x120, and got a similar error message.

Attachments (2)

gstreamer-log.txt (25.1 KB) - added by dsd 6 years ago.
gstreamer log
v4l2-nointerlace.patch (999 bytes) - added by dsd 6 years ago.
we need to apply this patch (equivalent of what we did for f7)

Download all attachments as: .zip

Change History (20)

comment:1 Changed 6 years ago by dsd

camera works under olpc3 using v4l2 directly, tested using http://www.video4linux.org/browser/v4l2-apps/test/pixfmt-test.c modified to use V4L2_FIELD_NONE (progressive)

Changed 6 years ago by dsd

gstreamer log

Changed 6 years ago by dsd

we need to apply this patch (equivalent of what we did for f7)

comment:2 Changed 6 years ago by dsd

and /dev/video0 permissions need to be fixed ala #7302

then it sort-of-works (one frame can be captured)

comment:3 Changed 6 years ago by dgilmore

Is this patch appropriate for all users? If so then we need to get the patch included upstream. if not then we need to get the patch included upstream with a special configure flag for the use cases where it is appropriate.

So step one is get it upstream.
step two is grab from upstream.
step three is profit

comment:4 Changed 6 years ago by dsd

I'm working on this. I think it may be a kernel bug so I sent a patch to the v4l list, we'll see what happens...

comment:5 Changed 6 years ago by dsaxena

  • Action Needed set to never set
  • Cc dsaxena added

comment:6 Changed 6 years ago by dsd

  • Blocking 7383 added

comment:7 Changed 6 years ago by dsd

resent the kernel patch, http://marc.info/?l=linux-video&m=121485948506869&w=2

The record activity is broken with the new gstreamer. A gstreamer developer suggested that the pipelines being used were invalid so I'm working on clearing things up. I'm almost done...

comment:8 Changed 6 years ago by erikb

  • Cc olpc-dev@… added

Record worked well on fc7.

What is the nature of the pipeline problem? Specifically, which pipeline is broken? Can you post it?

comment:9 Changed 6 years ago by dsd

  • Milestone changed from Never Assigned to 8.2.0 (was Update.2)

It worked well on F7 on an old gstreamer, but I think it breaks even if you update to F7's latest gstreamer. Let's use #6850 for the record issues, and this ticket for the kernel/gstreamer issue.

comment:10 Changed 6 years ago by mstone

  • Keywords blocks:8.2.0 added

comment:11 Changed 6 years ago by dsd

As discussed on IRC, due to time constraints we should include the fix (the kernel patch) right now even though we aren't 100% sure it is correct. If we get further insight before the release timeframe is up, we can hopefully fix this properly in time for the release.

Deepak, please include http://marc.info/?l=linux-video&m=121485948506869&w=2 in our kernel.
Jon Corbet acked it, but the v4l maintainer (Mauro) has not replied to either of my mails on the topic.

comment:12 follow-up: Changed 6 years ago by dsd

I put the patch in the master and testing branches of my olpc-2.6 git repo:
git://dev.laptop.org/users/dsd/olpc-2.6.git

Please pull when convenient!

comment:13 in reply to: ↑ 12 Changed 6 years ago by dsaxena

Replying to dsd:

I put the patch in the master and testing branches of my olpc-2.6 git repo:
git://dev.laptop.org/users/dsd/olpc-2.6.git

Please pull when convenient!

Pulled into olpc-2.6.

comment:14 Changed 6 years ago by dsd

I caught Mauro on IRC, who says that the existing ov7670 behaviour is correct, but my patch is correct as well (i.e. drivers can legally work either way). This means that gstreamer should be fixed to be tolerant of this. I'll work on that...

comment:15 Changed 6 years ago by dsd

comment:16 Changed 6 years ago by dsd

gstreamer patch accepted upstream, now for fedora inclusion: https://bugzilla.redhat.com/show_bug.cgi?id=454534

comment:17 Changed 6 years ago by mstone

  • Action Needed changed from never set to package

comment:18 Changed 6 years ago by dsd

  • Keywords joyride-2207:+ added
  • Resolution set to fixed
  • Status changed from new to closed

gstreamer-plugins-good.i386 0:0.10.8-8.fc9 includes the userspace fix, so we're all done here.

Note: See TracTickets for help on using tickets.