can't connect to the camera

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

can't connect to the camera

4,444 Views
sumitsinha
Contributor I

Hi,

I am working on MCIMX6DL-SDP board which has android 4.0.4 running on it. The Android O.S. came pre - installed along with the board in the NOR flash and I am using NAND boot. The OS build number is R13.4-beta. When I connect a logitech usb camera to the board, I can see the following messages getting displayed on my minicom console:

uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)                  

input: UVC Camera (046d:0825) as /devices/platform/fsl-ehci.0/usb1/1-1/1-1:1.0/8

3:3:1: cannot get freq at ep 0x86

Also, I do see a video node appearing in the 'dev' directory, every time I connect the camera to the board, displayed as "video2". Hence, I assume that the external camera is getting detected. However, When I try to launch the built in Camera app, it says "Can't connect to camera". Also, I can see the following error on my minicom console:

ERROR: v4l2 capture: slave not found!

The logcat -v time messages which I receive at the time of launching the camera app are as follows:

01-01 00:00:03.300 I/imx6.gralloc( 2203): disp_mode is D:1024x768p-60

01-01 00:00:03.300 I/AudioFlinger( 2206): Loaded primary audio interface from LEGACY Audio HW HAL (audio)

01-01 00:00:03.300 I/AudioFlinger( 2206): Using 'LEGACY Audio HW HAL' (audio.primary) as the primary audio interface

01-01 00:00:03.300 I/CameraService( 2206): CameraService started (pid=2206)

01-01 00:00:03.310 I/FslCameraHAL( 2206): Face Back Camera is ov5640_mipi, orient is 0

01-01 00:00:03.310 I/FslCameraHAL( 2206): Face Front Camera is ov5642, orient is 0

01-01 00:00:03.320 W/audio_hw_primary( 2206): open output stream devices 2, format 0, channels 0, sample_rate 0

01-01 00:00:03.320 I/AudioFlinger( 2206): AudioFlinger's thread 0xc9488 ready to run

01-01 00:00:03.320 W/AudioFlinger( 2206): Thread AudioOut_1 cannot connect to the power manager service

01-01 00:00:03.320 W/AudioFlinger( 2206): Thread AudioOut_1 cannot connect to the power manager service

01-01 00:00:03.320 W/audio_hw_primary( 2206): out_set_parameters routing=2, ret 1

01-01 00:00:03.320 I/AudioPolicyService( 2206): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)

01-01 00:00:03.330 W/imx6.gralloc( 2203): 32bpp setting of Framebuffer catched!

01-01 00:00:03.380 W/imx6.gralloc( 2203): using (fd=12)

01-01 00:00:03.380 W/imx6.gralloc( 2203): id           = DISP3 BG - DI1

01-01 00:00:03.380 W/imx6.gralloc( 2203): xres         = 1024 px

01-01 00:00:03.380 W/imx6.gralloc( 2203): yres         = 768 px

01-01 00:00:03.380 W/imx6.gralloc( 2203): xres_virtual = 1024 px

01-01 00:00:03.380 W/imx6.gralloc( 2203): yres_virtual = 2304 px

01-01 00:00:03.380 W/imx6.gralloc( 2203): bpp          = 32

01-01 00:00:03.380 W/imx6.gralloc( 2203): r            = 16:8

01-01 00:00:03.380 W/imx6.gralloc( 2203): g            =  8:8

01-01 00:00:03.380 W/imx6.gralloc( 2203): b            =  0:8

01-01 00:00:03.380 W/imx6.gralloc( 2203): width        = 163 mm (159.568100 dpi)

01-01 00:00:03.380 W/imx6.gralloc( 2203): height       = 122 mm (159.895081 dpi)

01-01 00:00:03.380 W/imx6.gralloc( 2203): refresh rate = 60.00 Hz

01-01 00:00:03.440 D/libEGL  ( 2203): loaded /system/lib/egl/libGLES_android.so

01-01 00:00:03.450 D/libEGL  ( 2203): loaded /system/lib/egl/libEGL_VIVANTE.so

01-01 00:00:03.480 D/libEGL  ( 2203): loaded /system/lib/egl/libGLESv1_CM_VIVANTE.so

01-01 00:00:03.510 D/libEGL  ( 2203): loaded /system/lib/egl/libGLESv2_VIVANTE.so

01-01 00:00:03.520 W/SurfaceFlinger( 2203): ro.sf.lcd_density not defined, using 160 dpi by default.

01-01 00:00:03.530 I/SurfaceFlinger( 2203): EGL informations:

01-01 00:00:03.530 I/SurfaceFlinger( 2203): # of configs : 45

01-01 00:00:03.530 I/SurfaceFlinger( 2203): vendor    : Vivante Corporation

01-01 00:00:03.530 I/SurfaceFlinger( 2203): version   : 1.4

01-01 00:00:03.530 I/SurfaceFlinger( 2203): extensions: EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_image EGL_KHR_gl_textue

01-01 00:00:03.530 I/SurfaceFlinger( 2203): Client API: OpenGL_ES OpenVG

01-01 00:00:03.530 I/SurfaceFlinger( 2203): EGLSurface: 8-8-8-8, config=0xd

01-01 00:00:03.530 I/SurfaceFlinger( 2203): OpenGL informations:

01-01 00:00:03.530 I/SurfaceFlinger( 2203): vendor    : Vivante Corporation

01-01 00:00:03.530 I/SurfaceFlinger( 2203): renderer  : GC880 Graphics Engine

01-01 00:00:03.530 I/SurfaceFlinger( 2203): version   : OpenGL ES-CM 1.1

01-01 00:00:03.530 I/SurfaceFlinger( 2203): extensions: GL_OES_blend_equation_separate GL_OES_blend_func_separate GL_OES_blend_subtract GL_OES_byte_coordinates GL_OES_!

GL_OES_packed_depth_stencil GL_EERROR: v4l2 capture: slave not found!

XT_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_user_clip_plane GL_APPLE_texture_2D_limited_npot GL_EXT_texture_lod_bias GL_EXT_blend_minmax GL_EXT_read_format_bg8

01-01 00:00:03.530 I/SurfaceFlinger( 2203): GL_MAX_TEXTURE_SIZE = 8192

01-01 00:00:03.530 I/SurfaceFlinger( 2203): GL_MAX_VIEWPORT_DIMS = 2048 x 2048

01-01 00:00:03.530 I/SurfaceFlinger( 2203): flags = 00090000

01-01 00:00:03.560 I/v_hwc   ( 2203): Vivante HWComposer v2.2

01-01 00:00:03.560 I/v_hwc   ( 2203): Device:               0x1b4fb90

01-01 00:00:03.560 I/v_hwc   ( 2203): Separated 2D:         YES

01-01 00:00:03.560 I/v_hwc   ( 2203): 2D PE20:              YES

01-01 00:00:03.560 I/v_hwc   ( 2203): Filter-stretch blit:  YES

01-01 00:00:03.560 I/v_hwc   ( 2203): 2D dither enabled :   YES

01-01 00:00:03.560 I/v_hwc   ( 2203): Multi-source blit:    NO

01-01 00:00:03.560 I/v_hwc   ( 2203): Multi-source blit Ex: NO

01-01 00:00:03.560 I/v_hwc   ( 2203): OPF/YUV blit/Tiling : NO

01-01 00:00:03.650 D/libEGL  ( 2286): loaded /system/lib/egl/libGLES_android.so

Do I need to apply some patch and rebuild the android kernel in order to get the external camera working..?

Can anybody help me getting this issue resolved. I am working on an android video calling application and hence, need the usb camera to work on the development platform.

Best regards,

Sumit

0 Kudos
Reply
4 Replies

1,782 Views
saurabh206
Senior Contributor III

Hi,

Sumit

open  device\fsl\"you device folder"\init.c.

For imx6q this path will be device\fsl\sabresd_6dq\init.c

replace  ov5640_mipi by uvc.

setprop back_camera_name uvc

setprop back_camera_orient 0

Thanks

Saurabh

1,782 Views
sumitsinha
Contributor I

Hi Saurabh,

Thanks for the reply.

Yes, you are correct. I did go through the Android Advanced User Guide which came with the android release package and found that it has a separate section for USB Camera support which talks about the modifications you suggested and plus few others as well.

I will update the status once I have tried it out.

Best regards,

Sumit

0 Kudos
Reply

1,782 Views
saurabh206
Senior Contributor III

Hi,

Sumit

You need to modified the init.rc file to add a support for the UVC camera. After that you can able to used USB camera.

Thanks

Saurabh

0 Kudos
Reply

1,782 Views
sumitsinha
Contributor I

Hi Saurabh,

Thanks for the reply.

Could you please elaborate a bit on your answer.

I do see the init.rc file. However, I am not sure what modifications need to be done in order to get the uvc camera working.

Best regards,

Sumit

0 Kudos
Reply