<http://i50.tinypic.com/wjvz0h.png> I've been trying to get a hold of a few people about my quesiton. I'm on the main developers for the Dell Streak 7, and our devices are extremely similiar and I've been working on camera for some time now. DerArtem's code has gotten me the furthest but I am still a bit stuck.
camera.tegra.so compiles fine, but when I fire up camera app I get this > D/Camera_Factory( 107): CameraFactory::get_camera_info > D/Camera_Factory( 107): CameraFactory::getCameraInfo: id = 0,info = > 0x41f3ad18 > D/Camera_Factory( 107): CameraFactory::getCameraNum > D/Camera_Factory( 107): CameraFactory::getCameraInfo: about to fetch info > D/CameraHardware( 107): CameraHardware::getCameraInfo > D/Camera_Factory( 107): CameraFactory::get_camera_info > D/Camera_Factory( 107): CameraFactory::getCameraInfo: id = 1,info = > 0x4139cd18 > D/Camera_Factory( 107): CameraFactory::getCameraNum > D/Camera_Factory( 107): CameraFactory::getCameraInfo: about to fetch info > D/CameraHardware( 107): CameraHardware::getCameraInfo > V/CameraHolder( 804): open camera 0 > D/Camera_Factory( 107): CameraFactory::get_camera_info > D/Camera_Factory( 107): CameraFactory::getCameraInfo: id = 0,info = > 0x41d59c74 > D/Camera_Factory( 107): CameraFactory::getCameraNum > D/Camera_Factory( 107): CameraFactory::getCameraInfo: about to fetch info > D/CameraHardware( 107): CameraHardware::getCameraInfo > I/CameraService( 107): Opening camera 0 > D/Camera_Factory( 107): CameraFactory::device_open: name = 0 > D/Camera_Factory( 107): CameraFactory::cameraDeviceOpen: id = 0 > D/Camera_Factory( 107): CameraFactory::getCameraNum > D/CameraHardware( 107): CameraHardware::destruct > D/CameraHardware( 107): CameraHardware::PowerOff: Power OFF camera. > E/CameraHardware( 107): Could not open > /sys/devices/platform/shuttle-pm-camera/power_on for writing. > I/Camera_Factory( 107): Using 1 camera! > I/Camera_Factory( 107): Returning /dev/video0 > I/CameraHardware( 107): Using camera /dev/video0 > D/CameraHardware( 107): CameraHardware::PowerOn: Power ON camera. > E/CameraHardware( 107): Could not open > /sys/devices/platform/shuttle-pm-camera/power_on for writing. > D/CameraHardware( 107): CameraHardware::initDefaultParameters > E/V4L2Camera( 107): ERROR opening V4L interface: No such file or directory > E/CameraHardware( 107): cannot open device. > I/CameraHardware( 107): Default preview size: (320 x 240), fps:30 > I/CameraHardware( 107): All available formats: > I/CameraHardware( 107): All available fps: > I/CameraHardware( 107): Default picture size: (320 x 240) > D/CameraHardware( 107): CameraHardware::setParameters > D/CameraHardware( 107): CameraHardware::setParameters: PREVIEW: Size > 320x240, 30 fps, format: yuv422sp > D/CameraHardware( 107): CameraHardware::setParameters: PICTURE: Size > 320x240, format: jpeg > D/CameraHardware( 107): CameraHardware::setParameters: VIDEO: Size > 320x240, format: yuv420p > D/CameraHardware( 107): CameraHardware::initHeapLocked > E/CameraHardware( 107): No memory allocator available > D/CameraHardware( 107): CameraHardware::setParameters: OK > D/CameraHardware( 107): CameraHardware::connectCamera > D/CameraHardware( 107): CameraHardware::setCallbacks > D/CameraHardware( 107): CameraHardware::enableMsgType: 1037 > I/AwesomePlayer( 107): > setDataSource_l('/system/media/audio/ui/camera_click.ogg') > I/OMXCodec( 107): Attempting to allocate OMX node > 'OMX.google.vorbis.decoder' > I/OMXCodec( 107): Successfully allocated OMX node > 'OMX.google.vorbis.decoder' > I/AwesomePlayer( 107): > setDataSource_l('/system/media/audio/ui/VideoRecord.ogg') > I/OMXCodec( 107): Attempting to allocate OMX node > 'OMX.google.vorbis.decoder' > I/OMXCodec( 107): Successfully allocated OMX node > 'OMX.google.vorbis.decoder' > D/CameraHardware( 107): CameraHardware::getParameters > D/CameraHardware( 107): CameraHardware::putParameters > D/CameraHardware( 107): CameraHardware::getParameters > D/CameraHardware( 107): CameraHardware::putParameters > D/Camera ( 804): app passed NULL surface > D/Camera_Factory( 107): CameraFactory::get_camera_info > D/Camera_Factory( 107): CameraFactory::getCameraInfo: id = 0,info = > 0x41d59d18 > D/Camera_Factory( 107): CameraFactory::getCameraNum > D/Camera_Factory( 107): CameraFactory::getCameraInfo: about to fetch info > D/CameraHardware( 107): CameraHardware::getCameraInfo > D/CameraHardware( 107): CameraHardware::getParameters > D/CameraHardware( 107): CameraHardware::putParameters > W/dalvikvm( 804): threadid=11: thread exiting with uncaught exception > (group=0x40a4f1f8) > E/AndroidRuntime( 804): FATAL EXCEPTION: Thread-88 > E/AndroidRuntime( 804): java.lang.NullPointerException > E/AndroidRuntime( 804): at > com.android.camera.Camera.updateCameraParametersPreference(Camera.java:2227) > E/AndroidRuntime( 804): at > com.android.camera.Camera.setCameraParameters(Camera.java:2363) > E/AndroidRuntime( 804): at > com.android.camera.Camera.startPreview(Camera.java:2108) > E/AndroidRuntime( 804): at > com.android.camera.Camera.access$3700(Camera.java:86) > E/AndroidRuntime( 804): at > com.android.camera.Camera$5.run(Camera.java:1263) > E/AndroidRuntime( 804): at java.lang.Thread.run(Thread.java:856) > W/ActivityManager( 178): Force finishing activity > com.android.camera/.Camera > W/ActivityManager( 178): Activity pause timeout for > ActivityRecord{40f74730 com.android.camera/.Camera} > I am assuming it has to do with the power code // File to control camera power > #define CAMERA_POWER "/sys/devices/platform/shuttle-pm-camera/power_on" > > > namespace android { > > char videodevice[64]; > > bool CameraHardware::PowerOn() > { > LOGD("CameraHardware::PowerOn: Power ON camera."); > > // power on camera > int handle = ::open(CAMERA_POWER,O_RDWR); > if (handle >= 0) { > ::write(handle,"1\n",2); > ::close(handle); > } else { > LOGE("Could not open %s for writing.", CAMERA_POWER); > return false; > } > > // Wait until the camera is recognized or timed out > int timeOut = 500; > do { > // Try to open the video capture device > handle = ::open(videodevice,O_RDWR); > if (handle >= 0) > break; > // Wait a bit > ::usleep(10000); > } while (--timeOut > 0); > > if (handle >= 0) { > LOGD("Camera powered on"); > ::close(handle); > return true; > } else { > LOGE("Unable to power camera"); > } > > return false; > } > > bool CameraHardware::PowerOff() > { > LOGD("CameraHardware::PowerOff: Power OFF camera."); > > // power on camera > int handle = ::open(CAMERA_POWER,O_RDWR); > if (handle >= 0) { > ::write(handle,"0\n",2); > ::close(handle); > } else { > LOGE("Could not open %s for writing.", CAMERA_POWER); > return false; > } > return true; > } > As I don't have this "/sys/devices/platform/shuttle-pm-camera/power_on", any ideas? I have /sys/devices/platform/tegra_camera, and I'm running a ov5642 camera module. -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting