[Android Q&A, Help & Troubleshooting] anders3408:
Hello XDA.

I am trying, together with Lexmazter and Zasuk to compile codefireX, android 4.2.2 for Runnymede also known as Htc sensation xl.

Now i am so close on having everything working but for the last week i have used so much time to fix one error i keep having, when starting up the camera.

So now i am going to ask everyone here on xda for hopefully finding a way to fix that error.

The repo i am using is this :

codefireX source

Runnymede device tree

Runnymede vendor files

Runnymede msm7x30-common files

Booting up looks fine in logcat, and it does load the camera.default.so from stock runnymede ICS rom and if i install a Tourch app or flashlight app, i can use the Flashlight from camera without errors.

But if i starts the camera app, it camera stops working in same sec as i start it. No picture or anything.

The same kernel/boot.img is used in evervolv for runnymede, and it has working camera So the error should be somewhere in the rom.

Here is a part of a logcat with the camera error :

3718: E/memalloc( 107): /dev/pmem: Failed to map buffer size:4300800 offset:3072000 fd:53 Error: Invalid argument
3719: E/gralloc ( 107): Could not mmap handle 0x2a0c1d30, fd=53 (Invalid argument)
3720: E/gralloc ( 107): gralloc_register_buffer: gralloc_map failed
3721: W/GraphicBufferMapper( 107): registerBuffer(0x2a0c1d30) failed -22 (Invalid argument)
3722: E/GraphicBuffer( 107): unflatten: registerBuffer failed: Invalid argument (-22)
3723: E/libgenlock( 107): perform_lock_unlock_operation: GENLOCK_IOC_LOCK failed (lockType0x1, err=Invalid argument fd=53)
3724: E/QualcommCameraHardware( 107): getBuffersAndStartPreview: genlock_lock_buffer(WRITE) failed
3725: E/MemoryHeapBase( 107): mmap(fd=51, size=462848) failed (Invalid argument)
3726: I/QualcommCameraHardware( 107): getBuffersAndStartPreview: Mapped Preview buffer 0
3727: I/QualcommCameraHardware( 107): getBuffersAndStartPreview: Got the following from get_mem data: 0xffffffff, handle :705435080, release : 0x40664ec5, size: 460800
3728: E/QualcommCameraHardware( 107): getBuffersAndStartPreview: Couldnt map preview buffers
3729: I/mm-camera( 107): int android::set_preview_window(camera_device*, preview_stream_ops*): X
3730: I/mm-camera( 107): int android::start_preview(camera_device*): E
3731: D/QualcommCameraHardware( 107): startPreview E
3732: I/QualcommCameraHardware( 107): getBuffersAndStartPreview : E
3733: D/QualcommCameraHardware( 107): getBuffersAndStartPreview: NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS(0)
3734: E/BufferQueue( 1512): [unnamed-1512-0] setBufferCount: client owns some buffers
3735: E/SurfaceTextureClient( 107): ISurfaceTexture::setBufferCount(5) returned Invalid argument
3736: D/QualcommCameraHardware( 107): getBuffersAndStartPreview: setPreviewWindow(640 x 480), mTotalPreviewBufferCount 5

My main problem with camera as i reads the log is this 3 lines :

3737: E/memalloc( 107): /dev/pmem: Failed to map buffer size:4300800 offset:3072000 fd:55 Error: Invalid argument
3738: E/gralloc ( 107): Could not mmap handle 0x2a0c02e0, fd=55 (Invalid argument)
3739: E/gralloc ( 107): gralloc_register_buffer: gralloc_map failed

3740: W/GraphicBufferMapper( 107): registerBuffer(0x2a0c02e0) failed -22 (Invalid argument)
3741: E/GraphicBuffer( 107): unflatten: registerBuffer failed: Invalid argument (-22)
3742: E/libgenlock( 107): perform_lock_unlock_operation: GENLOCK_IOC_LOCK failed (lockType0x1, err=Bad file number fd=55)
3743: E/QualcommCameraHardware( 107): getBuffersAndStartPreview: genlock_lock_buffer(WRITE) failed
3744: E/MemoryHeapBase( 107): mmap(fd=51, size=462848) failed (Invalid argument)
3745: I/QualcommCameraHardware( 107): getBuffersAndStartPreview: Mapped Preview buffer 0
3746: I/QualcommCameraHardware( 107): getBuffersAndStartPreview: Got the following from get_mem data: 0xffffffff, handle :705444912, release : 0x40664ec5, size: 460800
3747: E/QualcommCameraHardware( 107): getBuffersAndStartPreview: Couldnt map preview buffers
3748: I/mm-camera( 107): int android::start_preview(camera_device*): X
3749: I/mm-camera( 107): void android::stop_preview(camera_device*): E
3750: D/QualcommCameraHardware( 107): stopPreview: E

The full log can be found here : Full logcat

i have also made a last_kmsg but it looks fine to me :last_kmsg

I will be very happy if someone will come with idears or anything about that issue.