UVC(USB) camera not work in Freescale Android R10.3.2 release

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UVC(USB) camera not work in Freescale Android R10.3.2 release

Jump to solution
7,051 Views
chenguoyin
NXP Employee
NXP Employee

You may counter issues when enable the uvc camera in Android R10.3.2 release package.

If so, you can apply the attach patch into myandroid/hardware/mx5x

Original Attachment has been moved to: 0001-ENGR00217321-USEPTR-feature-break-the-UVC-camera-sup.patch.zip

1 Solution
3,244 Views
visakh
Contributor III

Hi Chen,

Now when I connect an usb webcam and try to open the default camera app it says "Camera error. Cannot connect to camera " .

The logcat -v time of those events are as follows

usb 2-1.3: new full speed USB device using fsl-ehci and address 6

01-02 00:02:28.700 I/ActivityManager( 2122): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.cam

era/.Camera } from pid 2212

01-02 00:02:28.710 I/SurfaceFlinger( 2122): mHw->getFormat() 4

01-02 00:02:28.760 I/ActivityManager( 2122): Start proc com.android.camera for activity com.android.camera/.Camera: pid=2471 uid=10025 gids={1006, 1015}

01-02 00:02:29.040 V/CameraHolder( 2471): open camera 0

01-02 00:02:29.040 I/FslCameraHAL( 2074): Face Back Camera is ov, orient is 90

01-02 00:02:29.040 I/FslCameraHAL( 2074): Face Front Camera is #, orient is 0

01-02 00:02:29.040 I/FslCameraHAL( 2074): It is the CSI device

01-02 00:02:29.040 I/FslCameraHAL( 2074): Create the software encoder

01-02 00:02:29.040 E/FslCameraHAL( 2074): The device name is not correct or the device is error

01-02 00:02:29.040 E/CameraService( 2074): Fail to open camera hardware (id=0)

01-02 00:02:29.050 E/CameraHolder( 2471): fail to connect Camera

01-02 00:02:29.050 E/CameraHolder( 2471): java.lang.RuntimeException: Fail to connect to camera service

01-02 00:02:29.050 E/CameraHolder( 2471):       at android.hardware.Camera.native_setup(Native Method)

01-02 00:02:29.050 E/CameraHolder( 2471):       at android.hardware.Camera.<init>(Camera.java:258)

01-02 00:02:29.050 E/CameraHolder( 2471):       at android.hardware.Camera.open(Camera.java:220)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.CameraHolder.open(CameraHolder.java:124)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera.ensureCameraDevice(Camera.java:1608)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera.startPreview(Camera.java:1660)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera.access$5500(Camera.java:95)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera$3.run(Camera.java:908)

01-02 00:02:29.050 E/CameraHolder( 2471):       at java.lang.Thread.run(Thread.java:1019)

01-02 00:02:29.220 D/dalvikvm( 2471): GC_EXTERNAL_ALLOC freed 109K, 48% free 2820K/5379K, external 919K/1038K, paused 119ms

01-02 00:02:29.500 I/ActivityManager( 2122): Displayed com.android.camera/.Camera: +751ms

01-02 00:02:31.190 D/dalvikvm( 2122): GC_CONCURRENT freed 1953K, 50% free 4535K/8967K, external 9365K/11413K, paused 5ms+7ms

01-02 00:02:32.730 W/InputManagerService( 2122): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@407a00c0


Thank You

View solution in original post

0 Kudos
8 Replies
1,292 Views
napster_k
Contributor II

can anybody share the orginal patch again the link is expired.

thank you

 

0 Kudos
1,320 Views
napster_k
Contributor II

The link to the patch is expired , is it possible to share the file again ? 

Thank you 

0 Kudos
3,244 Views
chenguoyin
NXP Employee
NXP Employee

please paste the output from "logcat -v time" in console.

0 Kudos
3,244 Views
visakh
Contributor III

Dear Chen,

Now I am able to connect and work one of my logitech quick cam in USB port and via android camera apk.

What did is

1. Applied the patches as you specified .

2. changed setprop backcamera as UVC and orientation to 0

Now what happening is when changing to video the apk gets force close. What should be the next step to solve this issue. Reply immediate.

0 Kudos
3,244 Views
chenguoyin
NXP Employee
NXP Employee

01-02 00:02:29.040 I/FslCameraHAL( 2074): Face Back Camera is ov, orient is 90

01-02 00:02:29.040 I/FslCameraHAL( 2074): Face Front Camera is #, orient is 0

from the log, you still not set the backcamera to be UVC.

Be sure you set the property in init.freescale.rc

3,244 Views
visakh
Contributor III

Hi Chen,

With the application of your patches and setting back-camera as UVC with 0 orientation things worked well. I found an interesting behavior when went through the testing.. They are,

1. camera app outputs "cannot connect to camera" when the output display is HDMI and has no problem when the display is VGA

2. Camera app force closes when going to video mode(When display is VGA also).

3,245 Views
visakh
Contributor III

Hi Chen,

Now when I connect an usb webcam and try to open the default camera app it says "Camera error. Cannot connect to camera " .

The logcat -v time of those events are as follows

usb 2-1.3: new full speed USB device using fsl-ehci and address 6

01-02 00:02:28.700 I/ActivityManager( 2122): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.cam

era/.Camera } from pid 2212

01-02 00:02:28.710 I/SurfaceFlinger( 2122): mHw->getFormat() 4

01-02 00:02:28.760 I/ActivityManager( 2122): Start proc com.android.camera for activity com.android.camera/.Camera: pid=2471 uid=10025 gids={1006, 1015}

01-02 00:02:29.040 V/CameraHolder( 2471): open camera 0

01-02 00:02:29.040 I/FslCameraHAL( 2074): Face Back Camera is ov, orient is 90

01-02 00:02:29.040 I/FslCameraHAL( 2074): Face Front Camera is #, orient is 0

01-02 00:02:29.040 I/FslCameraHAL( 2074): It is the CSI device

01-02 00:02:29.040 I/FslCameraHAL( 2074): Create the software encoder

01-02 00:02:29.040 E/FslCameraHAL( 2074): The device name is not correct or the device is error

01-02 00:02:29.040 E/CameraService( 2074): Fail to open camera hardware (id=0)

01-02 00:02:29.050 E/CameraHolder( 2471): fail to connect Camera

01-02 00:02:29.050 E/CameraHolder( 2471): java.lang.RuntimeException: Fail to connect to camera service

01-02 00:02:29.050 E/CameraHolder( 2471):       at android.hardware.Camera.native_setup(Native Method)

01-02 00:02:29.050 E/CameraHolder( 2471):       at android.hardware.Camera.<init>(Camera.java:258)

01-02 00:02:29.050 E/CameraHolder( 2471):       at android.hardware.Camera.open(Camera.java:220)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.CameraHolder.open(CameraHolder.java:124)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera.ensureCameraDevice(Camera.java:1608)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera.startPreview(Camera.java:1660)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera.access$5500(Camera.java:95)

01-02 00:02:29.050 E/CameraHolder( 2471):       at com.android.camera.Camera$3.run(Camera.java:908)

01-02 00:02:29.050 E/CameraHolder( 2471):       at java.lang.Thread.run(Thread.java:1019)

01-02 00:02:29.220 D/dalvikvm( 2471): GC_EXTERNAL_ALLOC freed 109K, 48% free 2820K/5379K, external 919K/1038K, paused 119ms

01-02 00:02:29.500 I/ActivityManager( 2122): Displayed com.android.camera/.Camera: +751ms

01-02 00:02:31.190 D/dalvikvm( 2122): GC_CONCURRENT freed 1953K, 50% free 4535K/8967K, external 9365K/11413K, paused 5ms+7ms

01-02 00:02:32.730 W/InputManagerService( 2122): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@407a00c0


Thank You

0 Kudos
3,244 Views
visakh
Contributor III

Hello Guoyin Chen,

Does 10.4 need to apply this patch, or this things are applied by default in this build?. 

I Have connected a web cam to our hardware( imx535,ref. ARD) and tried to open the camera app. which ends in a force close.

here is the Log,

usb 2-1.4: new high speed USB device using fsl-ehci and address 5 
uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0100) 
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround. 
input: USB2.0 Camera as /devices/platform/fsl-ehci.1/usb2/2-1/2-1.4/2-1.4:1.0/input/input2

Any clue, i am also working around the same now