This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am3359 use usb camera

Other Parts Discussed in Thread: AM3359

hi,

I use am3359 with usb camera with ICS4.0.3 ,but I can't saw the picture ,below is my logcat:

I/ActivityManager(  111): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=co1
D/PermissionCache(   61): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (457 us)
W/WindowManager(  111): Failure taking screenshot for (250x150) to layer 21005
I/ActivityManager(  111): Start proc com.android.camera for activity com.android.camera/.Camera: pid=509 uid=10033 gids={100}
W/NetworkManagementSocketTagger(  111): setKernelCountSet(10033, 1) failed with errno -2
I/ARMAssembler(   61): generated scanline__00000077:03515102_00001001_00000000 [ 71 ipp] (91 ins) at [0x413eb7c8:0x413eb934]s
I/InputReader(  111): Reconfiguring input devices.  changes=0x00000004
W/SurfaceFlinger(   61): createScreenshotSurface failed (Function not implemented)
I/ActivityManager(  111): Config changed: {1.0 0mcc0mnc en_US layoutdir=0 sw480dp w480dp h775dp lrg long port -touch -keyb/v}
D/dalvikvm(  241): GREF has increased to 201
D/****CameraHAL(   64): cameraHal BACK 0
D/****CameraHAL(   64): cameraHal 0
V/CameraHolder(  509): open camera 0
D/****CameraHAL(   64): cameraHal BACK 0
D/****CameraHAL(   64): cameraHal 0
I/CameraService(   64): Opening camera 0
I/****CameraHAL(   64): camera_device open
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:320,height:240
D/CameraHardware(   64): picture width:320,height:240
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 320 x 240
D/CameraHardware(   64): Preview Resolution by CamHAL 320 x 240
D/CameraHardware(   64): enableMsgType:1037
I/AwesomePlayer(   64): setDataSource_l('/system/media/audio/ui/camera_click.ogg')
I/AwesomePlayer(   64): setDataSource_l('/system/media/audio/ui/VideoRecord.ogg')
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:320,height:240
D/CameraHardware(   64): picture width:320,height:240
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 320 x 240
D/CameraHardware(   64): Preview Resolution by CamHAL 320 x 240
D/dalvikvm(  509): GC_CONCURRENT freed 215K, 5% free 6698K/7047K, paused 4ms+11ms
I/ARMAssembler(   61): generated scanline__00000077:03010102_00008001_00000000 [ 88 ipp] (109 ins) at [0x413eb938:0x413ebaecs
I/ARMAssembler(   61): generated scanline__00000077:03515102_00008001_00000000 [114 ipp] (135 ins) at [0x413ebaf0:0x413ebd0cs
I/ARMAssembler(   61): generated scanline__00000077:03545402_00000000_00000000 [ 30 ipp] (44 ins) at [0x413ebd10:0x413ebdc0]s
D/dalvikvm(  509): GC_FOR_ALLOC freed 26K, 4% free 6962K/7239K, paused 28ms
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:320,height:240
D/CameraHardware(   64): picture width:320,height:240
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 320 x 240
D/CameraHardware(   64): Preview Resolution by CamHAL 320 x 240
D/Camera  (  509): app passed NULL surface
D/****CameraHAL(   64): cameraHal BACK 0
D/****CameraHAL(   64): cameraHal 0
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:320,height:240
D/CameraHardware(   64): picture width:320,height:240
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 320 x 240
D/CameraHardware(   64): Preview Resolution by CamHAL 320 x 240
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:640,height:480
D/CameraHardware(   64): picture width:640,height:480
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 640 x 480
D/CameraHardware(   64): Preview Resolution by CamHAL 640 x 480
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:640,height:480
D/CameraHardware(   64): picture width:640,height:480
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 640 x 480
D/CameraHardware(   64): Preview Resolution by CamHAL 640 x 480
V/camera  (  509): Preview size is 640x480
D/CameraHardware(   64): Set Parameter...!!
D/CameraHardware(   64): PreviewFormat yuv422sp
D/CameraHardware(   64): PictureFormat jpeg
D/CameraHardware(   64): preview width:640,height:480
D/CameraHardware(   64): picture width:640,height:480
D/CameraHardware(   64): FRAMERATE 15
D/CameraHardware(   64): Picture Size by CamHAL 640 x 480
D/CameraHardware(   64): Preview Resolution by CamHAL 640 x 480
V/camera  (  509): startPreview
W/****CameraHAL(   64): ----Preview not Enabled----
W/****CameraHAL(   64): window is NULL
W/CameraHardware(   64): Window is Null
D/CameraHardware(   64): startPreview width:640,height:480
D/V4L2Camera(   64): CameraConfigure PreviewFormat: w=640 h=480
V/camera  (  509): surfaceChanged. w=401. h=534
W/****CameraHAL(   64): ----Preview Enabled----
D/****CameraHAL(   64): Exiting the function
I/ActivityManager(  111): Displayed com.android.camera/.Camera: +3s671ms
W/InputManagerService(  111): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@4)
W/IInputConnectionWrapper(  241): showStatusIcon on inactive InputConnection
W/OrientationEventListener(  509): Cannot detect sensors. Not enabled
D/CameraStorage(  509): External storage state=mounted
I/Thumbnail(  509): Fail to load bitmap. java.io.FileNotFoundException: /data/data/com.android.camera/files/last_thumb: open)
D/dalvikvm(  111): GC_EXPLICIT freed 320K, 7% free 8714K/9351K, paused 5ms+39ms
D/dalvikvm(  509): GC_CONCURRENT freed 231K, 5% free 7165K/7495K, paused 3ms+45ms
W/ActivityManager(  111): Launch timeout has expired, giving up wake lock!
W/ActivityManager(  111): Activity idle timeout for ActivityRecord{411a2da8 com.android.camera/.Camera}
W/NetworkManagementSocketTagger(  111): setKernelCountSet(10030, 0) failed with errno -2
I/InputDispatcher(  111): Application is not responding: Window{412736b0 com.android.camera/com.android.camera.Camera pausedd
I/WindowManager(  111): Input event dispatching timed out sending to com.android.camera/com.android.camera.Camera
I/Process (  111): Sending signal. PID: 509 SIG: 3
I/dalvikvm(  509): threadid=3: reacting to signal 3
I/dalvikvm(  509): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  111): Sending signal. PID: 111 SIG: 3
I/dalvikvm(  111): threadid=3: reacting to signal 3
I/dalvikvm(  111): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  111): Sending signal. PID: 183 SIG: 3
I/dalvikvm(  183): threadid=3: reacting to signal 3
I/dalvikvm(  183): Wrote stack traces to '/data/anr/traces.txt'
I/Process (  111): Sending signal. PID: 230 SIG: 3
I/dalvikvm(  230): threadid=3: reacting to signal 3
I/dalvikvm(  230): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm(  111): GC_CONCURRENT freed 864K, 11% free 8469K/9415K, paused 4ms+57ms
D/dalvikvm(  111): GC_EXPLICIT freed 15K, 11% free 8454K/9415K, paused 4ms+14ms
E/ActivityManager(  111): ANR in com.android.camera (com.android.camera/.Camera)
E/ActivityManager(  111): Reason: keyDispatchingTimedOut
E/ActivityManager(  111): Load: 0.83 / 0.44 / 0.18
E/ActivityManager(  111): CPU usage from 5608ms to 0ms ago with 99% awake:
E/ActivityManager(  111):   28% 61/surfaceflinger: 28% user + 0.1% kernel
E/ActivityManager(  111):   2.8% 111/system_server: 0.7% user + 2.1% kernel / faults: 3 minor
E/ActivityManager(  111):   1% 38/kworker/u:1: 0% user + 1% kernel
E/ActivityManager(  111): 88% TOTAL: 84% user + 3.6% kernel + 0.1% iowait
E/ActivityManager(  111): CPU usage from 1181ms to 1740ms later:
E/ActivityManager(  111):   90% 61/surfaceflinger: 90% user + 0% kernel
E/ActivityManager(  111):     90% 97/SurfaceFlinger: 90% user + 0% kernel
E/ActivityManager(  111):   7.4% 111/system_server: 5.5% user + 1.8% kernel / faults: 2 minor
E/ActivityManager(  111):     5.5% 142/InputDispatcher: 3.7% user + 1.8% kernel
E/ActivityManager(  111):     3.7% 115/GC: 3.7% user + 0% kernel
E/ActivityManager(  111):     1.8% 143/InputReader: 1.8% user + 0% kernel
E/ActivityManager(  111): 98% TOTAL: 96% user + 1.7% kernel
D/dalvikvm(  111): GC_FOR_ALLOC freed 227K, 10% free 8527K/9415K, paused 111ms
I/ARMAssembler(   61): generated scanline__00000077:03515102_00000000_00000000 [ 34 ipp] (48 ins) at [0x413ebdc8:0x413ebe88]s

after this trace screen display "camera is not responing" 

Can somebody help me!

  • why I get "W/OrientationEventListener(  509): Cannot detect sensors. Not enabled" in my logcat .  the device (/dev/video0) had be opened.

    and my usb camera only support YUV422 ,not support YUV422SP,

    is it usb camera yuv data promble?

    can anybody help me!

  • zhans zhans said:

    why I get "W/OrientationEventListener(  509): Cannot detect sensors. Not enabled" in my logcat .  the device (/dev/video0) had be opened.

    I don't think that error relates to camera.

    I do not know how stable is the USB camera support in am335x Android DevKit. Somebody working on it may be able to give solutions to the issues you see.

  • hi

    try this

    check your /dev/video*

    may be will get 7-9 video[1-9] .....saying this as videoX

    for every X

    cat /sys/class/video4linux/videoX/name

    while doing so you wil get your camera name.

    now in  camera hal file

     hardware/ti/omap3<or your platform>/camera/CameraHardware.cpp

    add


    #define VIDEO_DEVICE_0      "/dev/videoX"
    or

    #define VIDEO_DEVICE     "/dev/videoX"

    replace the videoX with appropriate video[1-9] .

    Regards

    Setu Gupta

  • Hello,

    I'm working with Android ICS 4.0.3 in a BeagleBoard-xm, I need to use an USB camera for an augmented reality app, I already modify the source code and the kernel, I did what you suggested and the camera is found on /dev/video9, I changed the file CameraHardware.cpp the result when I do cat/sys/class/video4linux/video9/name is:

    Webcam C170

    Doing this, just one specific app is working, Simplewebcam.apk. But the others don't work, how can I set the USB Webcam as default for all the apps.

    I attache an image of the app on the BeagleBoard-xm with Android.