#9813 NORM 1.5-sof: Camera does not work correctly in Etoys

Zarro Boogs per Child bugtracker at laptop.org
Thu Feb 25 19:16:33 EST 2010


#9813: Camera does not work correctly in Etoys
--------------------------------------+-------------------------------------
           Reporter:  bert            |       Owner:  bert                             
               Type:  defect          |      Status:  new                              
           Priority:  normal          |   Milestone:  1.5-software-later               
          Component:  etoys-activity  |     Version:  Development build as of this date
         Resolution:                  |    Keywords:  os54 os56                        
        Next_action:  diagnose        |    Verified:  0                                
Deployment_affected:                  |   Blockedby:                                   
           Blocking:                  |  
--------------------------------------+-------------------------------------

Comment(by dmoco):

 Took a very quick look at this today on my 1.5 XO (not updated since
 arriving in December). I agree with Bert that there may be a driver/
 firmware problem. The "record" activity at least manages to produce a full
 image with correct colours so that mostly rules out format/conversion
 problems. I say "mostly" because in debug output from Etoys (below) I see
 "Allocing 768 bytes". 320x240 = 76,800 pixels so 768 bytes seems wrong
 even taking into account pixel format/s. In videolib.c at line # 238 in
 setupMMap() there is...

 {{{
    mmapsSize = device->memoryBuffer.frames * 32 * 4 /* sizeof(struct
 video_mmap)*/;
 }}}

 ...so this seems hard coded for RGBA/ARGB to me. That would only make
 sense if libV4L is being used and AFAICT that's not the case. This may
 explain why the "record" get more of the frame than Etoys does and why
 Squeaks V4L driver fails at mmap'ing (falls back to "read()" but is it
 supported or by that point screwed by the failed mmap?).

 As to the corruption seen in the "record" activity, if someone has a
 webcam that uses the OV7670 and can try it with the latest Scratch-on-
 Linux then we might be able to narrow down the source of the problem or at
 least get some useful data for comparison. I plan to try this myself when
 I'm back from holiday in mid-March (assuming I can locate a suitable
 webcam).

 {{{
 - Seting up device 0x95541c0
     - Extent=320 at 240
     - Brightness=24415, Contrast=17544, Saturation=32768, Hue=32768
     - Changing the palette from 8 (YUYV) to 5 (RGB32 - 32bit RGB) and
 depth from
     - Depth=32 Palette=5 (RGB32 - 32bit RGB)
     - Seting up MMAP for device 0x95541c0
         - The device has 6 buffers
         - Allocing 768 bytes
         - Creating the mmap #0
         - Creating the mmap #1
         - Creating the mmap #2
         - Creating the mmap #3
         - Creating the mmap #4
         - Creating the mmap #5
     - Capturing using mmap()
 - Capturing buffer #0 (1st pass)
 VIDIOCMCAPTURE1: Invalid argument
     * Falling back to read()

 The device didn't answered the correct bytes.

 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/9813#comment:6>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list