AnsweredAssumed Answered

Problem with adv7180 decoder on IMX6 Android (black screen)

Question asked by Ma Juani on Mar 23, 2017
Latest reply on Jun 15, 2017 by Fan Al

Hi everyone 

I really hope for any help, ideas and tips.

Have i.MX 6Quad Freescale SabreSD with Android 4.3

Added ADV7180 module

Configurated

board-mx6q_sabresd.c

board-mx6q_sabresd.h

drivers/media/video/mxc/capture/adv7180.c

drivers/media/video/mxc/capture/mxc_v4l2_capture.c

 

Now i can see the camera on 21 channel

root@m0:// # i2cdetect -y 1
i2cdetect -y 1
...... 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- --
20: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

i change the back camera in  init.freescale.rc

setprop back_camera_name adv7180_decoder

In imx6_android_defconfig i enabled the 

CONFIG_MXC_TVIN_ADV7180=y

 

Now when i start camera.apk in Android, i see only black screen... 

Logcat

W/AudioPolicyManagerBase( 3480): getOutput() could not find output for stream 1,
samplingRate 0,format 0, channels 3, flags 0
W/AudioPolicyManagerBase( 3480): getOutput() could not find output for stream 1,
samplingRate 0,format 0, channels 3, flags 0
W/AudioPolicyManagerBase( 3480): getOutput() could not find output for stream 1,
samplingRate 48000,format 1, channels 1, flags 4
E/AudioTrack( 2698): Could not get audio output for stream type 1
E/SoundPool( 2698): Error creating AudioTrack
I/ActivityManager( 2698): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.gallery3d/com.android.c
amera.CameraLauncher bnds=[73,133][179,207]} from pid 2876
E/OMXMaster( 3480): A component of name 'OMX.Freescale.std.parser.fsl.sw-based'
already exists, ignoring this one.
E/OMXMaster( 3480): A component of name 'OMX.Freescale.std.parser.streaming.sw-b
ased' already exists, ignoring this one.
E/OMXMaster( 3480): A component of name 'OMX.Freescale.std.parser.fsl.sw-based'
already exists, ignoring this one.
V/StateManager( 3301): startState class com.android.gallery3d.app.FilmstripPage
V/CameraHolder( 3301): open camera 0
I/AwesomePlayer( 3480): setDataSource_l(URL suppressed)
W/OrientationEventListener( 3301): Cannot detect sensors. Not enabled
I/AwesomePlayer( 3480): setDataSource_l(URL suppressed)
D/dalvikvm( 3301): GC_FOR_ALLOC freed 1140K, 28% free 4702K/6452K, paused 19ms,
total 19ms
I/Camera2ClientBase( 3480): Camera 0: Opened
I/Camera2 ( 3480): Camera 0: Opened
W/OrientationEventListener( 3301): Cannot detect sensors. Not enabled
I/FslCameraHAL( 3480): camera_device open: 0
I/FslCameraHAL( 3480): DeviceAdapter: Create adv7180 device
D/LocationManager( 3301): provider does not exist provider doesn't exisit: null
D/LocationManager( 3301): provider does not exist provider doesn't exisit: null
D/LocationManager( 3301): startReceivingLocationUpdates
D/CameraStorage( 3301): External storage state=mounted
I/FslCameraHAL( 3480): Get current mode: PAL
I/FslCameraHAL( 3480): SupportedPictureSizes: 720 x 480
I/FslCameraHAL( 3480): SupportedPreviewSizes: 720 x 480
I/FslCameraHAL( 3480): FrameDuration is 33331760, 30000000000
I/FslCameraHAL( 3480): mMaxWidth:720, mMaxHeight:480
E/FslCameraHAL( 3480): cpu num 4
E/Camera2-Parameters( 3480): Error finding static metadata entry 'android.contro
l.sceneModeOverrides' (1001d)
E/Camera2-Parameters( 3480): Error finding static metadata entry 'android.info.s
upportedHardwareLevel' (170000)
I/Camera2-Parameters( 3480): Camera 0: ZSL mode disabled for limited mode HALs
V/CAM_PhotoModule( 3301): Preview size is 720x480
I/FslCameraHAL( 3480): DEBUG(CreateDefaultRequest): making template (1)
I/FslCameraHAL( 3480): DEBUG(CreateDefaultRequest): making template (3)
V/CAM_PhotoModule( 3301): Preview size is 720x480
I/CAM_ScreenNail( 3301): aspect ratio clamping disabled
I/CAM_ScreenNail( 3301): aspect ratio clamping enabled, surfaceTexture scale: 1.
0, 1.0
E/BufferQueue( 2409): [com.android.gallery3d/com.android.camera.CameraLauncher]
dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
D/CAM_PhotoModule( 3301): Preview size changed.
I/CAM_ScreenNail( 3301): preview layout size: 598/240
I/CAM_ScreenNail( 3301): aspect ratio clamping enabled, surfaceTexture scale: 1.
0, 0.60301507
E/BufferQueue( 2409): [SurfaceView] dequeueBuffer: can't dequeue multiple buffer
s without setting the buffer count
I/CAM_ScreenNail( 3301): preview layout size: 598/240
I/CAM_ScreenNail( 3301): aspect ratio clamping enabled, surfaceTexture scale: 1.
0, 0.60301507
I/ActivityManager( 2698): Displayed com.android.gallery3d/com.android.camera.Cam
eraLauncher: +208ms
I/GLRootView( 3301): onSurfaceChanged: 598x240, gl10: com.google.android.gles_jn
i.GLImpl@42517778
I/GLRootView( 3301): layout content pane 598x240 (compensation 0)
D/PhotoView( 3301): compensation = 0, CameraRelativeFrame = Rect(0, 0 - 0, 0), m
CameraRect = Rect(0, 0 - 0, 0)
D/dalvikvm( 3301): GC_CONCURRENT freed 1646K, 44% free 3656K/6452K, paused 3ms+3
ms, total 23ms
D/dalvikvm( 3301): WAIT_FOR_CONCURRENT_GC blocked 20ms
D/dalvikvm( 3301): GC_FOR_ALLOC freed 9K, 39% free 3948K/6452K, paused 18ms, tot
al 18ms
D/dalvikvm( 3301): GC_FOR_ALLOC freed <1K, 35% free 4248K/6452K, paused 19ms, to
tal 19ms
D/dalvikvm( 3301): GC_FOR_ALLOC freed <1K, 30% free 4548K/6452K, paused 19ms, to
tal 19ms
D/dalvikvm( 3301): GC_FOR_ALLOC freed 5K, 26% free 4823K/6452K, paused 19ms, tot
al 19ms
V/CAM_PhotoModule( 3301): startPreview
I/FslCameraHAL( 3480): RequestManager allocateStream...
I/FslCameraHAL( 3480): allocateStream preview stream, w:720, h:480, fmt:0x22
I/FslCameraHAL( 3480): actual format 0x103
I/FslCameraHAL( 3480): RequestManager allocateStream end...
I/FslCameraHAL( 3480): RequestManager registerStreamBuffers stream id:0
I/FslCameraHAL( 3480): registerBuffers total 5 buffer
I/FslCameraHAL( 3480): RequestManager registerStreamBuffers end...
I/FslCameraHAL( 3480): RequestManager allocateStream...
I/FslCameraHAL( 3480): allocateStream jpeg stream, w:720, h:480, fmt:0x21
I/FslCameraHAL( 3480): actual format 0x103
I/FslCameraHAL( 3480): RequestManager allocateStream end...
I/FslCameraHAL( 3480): RequestManager registerStreamBuffers stream id:3
I/FslCameraHAL( 3480): RequestManager registerStreamBuffers end...
I/FslCameraHAL( 3480): notify_request_queue_not_empty running
I/FslCameraHAL( 3480): dispatchRequest running
I/FslCameraHAL( 3480): handleRequest running
I/FslCameraHAL( 3480): PreviewStream configure running
I/FslCameraHAL( 3480): pixel format: 0x3231564e
I/FslCameraHAL( 3480): Width * Height 720 x 480 format 0x3231564e, fps: 15
I/FslCameraHAL( 3480): PreviewStream start running
I/FslCameraHAL( 3480): StreamAdapter start running
I/FslCameraHAL( 3480): stream thread received STREAM_START command
D/dalvikvm( 3301): GC_FOR_ALLOC freed 2K, 17% free 5356K/6452K, paused 33ms, tot
al 33ms
E/FslCameraHAL( 3480): VIDIOC_STREAMON failed: Invalid argument
E/FslCameraHAL( 3480): Couldn't start preview for DeviceAdapter
E/FslCameraHAL( 3480): error start stream -1
E/FslCameraHAL( 3480): handleRequest: tryRestartStreams failed
I/FslCameraHAL( 3480): handleStream: get invalid message
I/FslCameraHAL( 3480): handleStream: get invalid message

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

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

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

 

what wrong?

Any ideas?

Outcomes