AnsweredAssumed Answered

Couldn't start preview for DeviceAdapter adv7280 android jb imx6

Question asked by Alejandro Gonzalez on Aug 24, 2015
Latest reply on Mar 24, 2017 by Ma Juani

I managed to make adv7280 work on imx6Solo using android jb(4.3) with kernel  3.0.35.

I test the device with mxc_v4l2_tvin for interlaced and mxc_v4l2_overlay for progressive video and i can watch the video clearly but when i tried with the camera.apk it doesn´t work (neither in interlaced or progressive) it doesn´t show anything@.

 

When i use the camera apk the adv7180 device but fails on getting the frames i think.

It is strange because it recognizes the device, initialize it, detect the NTSC source and the 720 x 480 resolution but then fails with  "VIDIOC_STREAMON failed: Invalid argument" and says that "Couldn't start preview for DeviceAdapter", . Am i missing something that i have to modify on android HAL ??

 

This is the log from logcat:

 

I/FslCameraHAL( 2259): camera_device open: 0

I/FslCameraHAL( 2259): DeviceAdapter: Create uvc device

E/FslCameraHAL( 2259): can not open camera devpath:

E/FslCameraHAL( 2259): CameraHal: DeviceAdapter initialize failed

E/FslCameraHAL( 2259): CameraHal: DeviceAdapter initialize failed

I/FslCameraHAL( 2259): RequestManager release...

I/FslCameraHAL( 2259): RequestManager release end...

I/FslCameraHAL( 2259): RequestManager release...

I/FslCameraHAL( 2259): RequestManager release end...

I/FslCameraHAL( 4381): Face Back Camera is adv7180_decoder, orient is 90

I/FslCameraHAL( 4381): Face Front Camera is uvc,ov2656_camera, orient is 0

I/FslCameraHAL( 4381): Checking the camera adv7180_decoder

I/FslCameraHAL( 4381): Get sensor adv7180_decoder's dev path /dev/video0

I/FslCameraHAL( 4381): Camera ID 0: name adv7180_decoder, Facing 0, orientation 90, dev path /dev/video0

I/FslCameraHAL( 4381): Checking the camera uvc

I/FslCameraHAL( 4381): Checking the camera ov2656_camera

I/FslCameraHAL( 4381): camera_device open: 0

I/FslCameraHAL( 4381): DeviceAdapter: Create adv7180 device

I/FslCameraHAL( 4381): Get current mode: NTSC

I/FslCameraHAL( 4381): SupportedPictureSizes: 720 x 480

I/FslCameraHAL( 4381): SupportedPreviewSizes: 720 x 480

I/FslCameraHAL( 4381): FrameDuration is 33331760, 30000000000

I/FslCameraHAL( 4381): mMaxWidth:720, mMaxHeight:480

E/FslCameraHAL( 4381): cpu num 1

I/FslCameraHAL( 4381): DEBUG(CreateDefaultRequest): making template (1)

I/FslCameraHAL( 4381): DEBUG(CreateDefaultRequest): making template (3)

I/FslCameraHAL( 4381): RequestManager allocateStream...

I/FslCameraHAL( 4381): allocateStream preview stream, w:720, h:480, fmt:0x22

I/FslCameraHAL( 4381): actual format 0x103

I/FslCameraHAL( 4381): RequestManager allocateStream end...

I/FslCameraHAL( 4381): RequestManager registerStreamBuffers stream id:0

I/FslCameraHAL( 4381): registerBuffers total 5 buffer

I/FslCameraHAL( 4381): RequestManager registerStreamBuffers end...

I/FslCameraHAL( 4381): RequestManager allocateStream...

I/FslCameraHAL( 4381): allocateStream jpeg stream, w:720, h:480, fmt:0x21

I/FslCameraHAL( 4381): actual format 0x103

I/FslCameraHAL( 4381): RequestManager allocateStream end...

I/FslCameraHAL( 4381): RequestManager registerStreamBuffers stream id:3

I/FslCameraHAL( 4381): RequestManager registerStreamBuffers end...

I/FslCameraHAL( 4381): notify_request_queue_not_empty running

I/FslCameraHAL( 4381): dispatchRequest running

I/FslCameraHAL( 4381): handleRequest running

I/FslCameraHAL( 4381): PreviewStream configure running

I/FslCameraHAL( 4381): pixel format: 0x3231564e

I/FslCameraHAL( 4381): Width * Height 720 x 480 format 0x3231564e, fps: 30

E/FslCameraHAL( 4381): Unable to query buffer (Invalid argument)

I/FslCameraHAL( 4381): PreviewStream start running

I/FslCameraHAL( 4381): StreamAdapter start running

I/FslCameraHAL( 4381): stream thread received STREAM_START command

E/FslCameraHAL( 4381): VIDIOC_STREAMON failed: Invalid argument

E/FslCameraHAL( 4381): Couldn't start preview for DeviceAdapter

E/FslCameraHAL( 4381): error start stream -1

E/FslCameraHAL( 4381): handleRequest: tryRestartStreams failed

I/FslCameraHAL( 4381): handleStream: get invalid message

I/FslCameraHAL( 4381): handleStream: get invalid message

I/FslCameraHAL( 4381): handleStream: get invalid message

I/FslCameraHAL( 4381): handleStream: get invalid message

I/FslCameraHAL( 4381): handleStream: get invalid message

I/FslCameraHAL( 4381): handleStream: get invalid message

I/FslCameraHAL( 4381): handleStream: get invalid message

 

btw my init.rc goes like this :

 

setprop back_camera_name adv7180_decoder

setprop back_camera_orient 0

setprop front_camera_name uvc

setprop front_camera_orient 90

Outcomes