Hi all,
I am testing with imx6q custom board, android 4.4.2,kernel 3.0.35 with a usb camera of 500M.
when I switch picture resolution to 500M pixels in the android camera option, if I take a picture, then the preview
screen will freeze and no response, why?
below is the logcat log:
----------------------------------------------
05-18 10:43:00.020: W/audio_hw_primary(2373): do_out_standby... 1091253648
05-18 10:43:00.620: W/AudioTrack(2802): AUDIO_OUTPUT_FLAG_FAST denied by client due to mismatching sample rate (48000 vs 44100)
05-18 10:43:00.630: W/audio_hw_primary(2373): card 0, port 0 device 0x2
05-18 10:43:00.630: W/audio_hw_primary(2373): rate 44100, channel 2 period_size 0xc0
05-18 10:43:00.630: I/ActivityManager(2802): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera2/com.android.camera.CameraLauncher} from pid 2991
05-18 10:43:00.660: D/dalvikvm(2802): GC_FOR_ALLOC freed 211K, 11% free 5477K/6092K, paused 28ms, total 28ms
05-18 10:43:00.780: D/dalvikvm(3283): GC_FOR_ALLOC freed 200K, 4% free 7057K/7340K, paused 18ms, total 18ms
05-18 10:43:00.820: D/(2802): AccelSensor enable 1 , handle 0 ,mEnabled 4
05-18 10:43:00.820: E/SensorService(2802): Error activating sensor 0 (Operation not permitted)
05-18 10:43:00.820: V/CAM_PhotoModule(3283): On resume.
05-18 10:43:00.820: V/CAM_PhotoModule(3283): Executing onResumeTasks.
05-18 10:43:00.820: V/CAM_PhotoModule(3283): Open camera device.
05-18 10:43:00.820: V/CameraHolder(3283): open camera 1
05-18 10:43:00.820: I/AwesomePlayer(2373): setDataSource_l(URL suppressed)
05-18 10:43:00.850: I/AwesomePlayer(2373): setDataSource_l(URL suppressed)
05-18 10:43:00.870: I/Camera2ClientBase(2373): Camera 1: Opened
05-18 10:43:00.870: I/FslCameraHAL(2373): camera_device open: 1
05-18 10:43:00.870: I/FslCameraHAL(2373): DeviceAdapter: Create uvc device
05-18 10:43:00.950: E/FslCameraHAL(2373): Error: format 0x47504a4d not supported!
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 640 x 480
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 320 x 240
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 160 x 120
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 800 x 600
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 1024 x 768
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 2592 x 1944
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPictureSizes: 640 x 480
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPreviewSizes: 800 x 600
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPreviewSizes: 320 x 240
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPreviewSizes: 160 x 120
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPreviewSizes: 640 x 480
05-18 10:43:00.950: I/FslCameraHAL(2373): SupportedPreviewSizes: 640 x 480
05-18 10:43:00.950: I/FslCameraHAL(2373): FrameDuration is 33331760, 30000000000
05-18 10:43:00.950: I/FslCameraHAL(2373): mMaxWidth:2592, mMaxHeight:1944
05-18 10:43:00.950: E/FslCameraHAL(2373): cpu num 4
05-18 10:43:00.950: W/Camera2-Parameters(2373): buildFastInfo: Camera 1: activeArraySize is missing xmin/ymin!
05-18 10:43:00.950: I/Camera2-Parameters(2373): Camera 1: Disabling ZSL mode
05-18 10:43:00.950: V/CAM_PhotoModule(3283): Preview size is 800x600
05-18 10:43:00.950: W/CAM_PhotoModule(3283): startPreview: surfaceTexture is not ready.
05-18 10:43:00.960: D/(2802): AccelSensor enable 1 , handle 0 ,mEnabled 5
05-18 10:43:00.960: E/SensorService(2802): Error activating sensor 0 (Operation not permitted)
05-18 10:43:00.960: D/(2802): AccelSensor enable 1 , handle 1 ,mEnabled 5
05-18 10:43:00.960: D/(2802): MagSensor mEnabled 2, OrientaionSensor mEnabled 0
05-18 10:43:00.960: E/SensorService(2802): Error activating sensor 1 (Operation not permitted)
05-18 10:43:00.960: I/FslCameraHAL(2373): DEBUG(CreateDefaultRequest): making template (1)
05-18 10:43:00.960: I/FslCameraHAL(2373): DEBUG(CreateDefaultRequest): making template (3)
05-18 10:43:00.990: D/dalvikvm(3283): GC_FOR_ALLOC freed 486K, 8% free 6936K/7508K, paused 19ms, total 19ms
05-18 10:43:00.990: I/dalvikvm-heap(3283): Grow heap (frag case) to 8.012MB for 1228816-byte allocation
05-18 10:43:01.010: D/dalvikvm(3283): GC_FOR_ALLOC freed 6K, 7% free 8129K/8712K, paused 17ms, total 17ms
05-18 10:43:01.050: D/LocationManager(3283): provider does not exist provider doesn't exist: network
05-18 10:43:01.050: D/LocationManager(3283): startReceivingLocationUpdates
05-18 10:43:01.050: D/athr_gps(2802): gps_state_start
05-18 10:43:01.050: D/athr_gps(2802): gps status callback: 0x1
05-18 10:43:01.060: D/CameraStorage(3283): External storage state=mounted
05-18 10:43:01.080: E/BufferQueue(2370): [com.android.camera2/com.android.camera.CameraLauncher] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
05-18 10:43:01.120: V/CAM_UI(3283): SurfaceTexture ready.
05-18 10:43:01.120: V/CAM_PhotoModule(3283): Preview size is 800x600
05-18 10:43:01.120: V/CAM_PhotoModule(3283): startPreview
05-18 10:43:01.120: I/FslCameraHAL(2373): RequestManager allocateStream...
05-18 10:43:01.120: I/FslCameraHAL(2373): allocateStream preview stream, w:800, h:600, fmt:0x22
05-18 10:43:01.120: I/FslCameraHAL(2373): actual format 0x103
05-18 10:43:01.120: I/FslCameraHAL(2373): RequestManager allocateStream end...
05-18 10:43:01.130: I/FslCameraHAL(2373): RequestManager registerStreamBuffers stream id:0
05-18 10:43:01.130: I/FslCameraHAL(2373): registerBuffers total 5 buffer
05-18 10:43:01.130: I/FslCameraHAL(2373): RequestManager registerStreamBuffers end...
05-18 10:43:01.140: I/FslCameraHAL(2373): RequestManager allocateStream...
05-18 10:43:01.140: I/FslCameraHAL(2373): allocateStream jpeg stream, w:2592, h:1944, fmt:0x21
05-18 10:43:01.140: I/FslCameraHAL(2373): actual format 0x103
05-18 10:43:01.140: I/FslCameraHAL(2373): RequestManager allocateStream end...
05-18 10:43:01.160: I/ActivityManager(2802): Displayed com.android.camera2/com.android.camera.CameraLauncher: +464ms
05-18 10:43:01.170: I/FslCameraHAL(2373): RequestManager registerStreamBuffers stream id:3
05-18 10:43:01.170: I/FslCameraHAL(2373): RequestManager registerStreamBuffers end...
05-18 10:43:01.170: I/FslCameraHAL(2373): notify_request_queue_not_empty running
05-18 10:43:01.170: I/FslCameraHAL(2373): dispatchRequest running
05-18 10:43:01.170: I/FslCameraHAL(2373): handleRequest running
05-18 10:43:01.170: I/FslCameraHAL(2373): PreviewStream configure running
05-18 10:43:01.170: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:01.170: I/FslCameraHAL(2373): Width * Height 800 x 600 format 0x56595559, fps: 30
05-18 10:43:01.190: I/FslCameraHAL(2373): PreviewStream start running
05-18 10:43:01.190: I/FslCameraHAL(2373): StreamAdapter start running
05-18 10:43:01.190: I/FslCameraHAL(2373): stream thread received STREAM_START command
05-18 10:43:01.200: I/FslCameraHAL(2373): Created device thread
05-18 10:43:03.720: W/audio_hw_primary(2373): do_out_standby... 1091253648
05-18 10:43:19.670: V/CAM_PhotoModule(3283): Preview size is 800x600
05-18 10:43:19.690: V/CAM_PhotoModule(3283): onShutterButtonClick: mCameraState=1
05-18 10:43:19.690: D/LocationManager(3283): No location received yet.
05-18 10:43:19.710: I/FslCameraHAL(2373): DEBUG(CreateDefaultRequest): making template (2)
05-18 10:43:19.710: E/Camera2-Device(2373): triggerPrecaptureMetering: Error triggering precapture metering (id 1)
05-18 10:43:19.780: I/FslCameraHAL(2373): tryRestartStreams stop unused stream 0
05-18 10:43:19.780: I/FslCameraHAL(2373): PreviewStream stop running
05-18 10:43:19.790: V/CAM_PhotoModule(3283): mShutterLag = 104ms
05-18 10:43:19.800: E/AudioSink(2373): received unknown event type: 1 inside CallbackWrapper !
05-18 10:43:19.800: W/audio_hw_primary(2373): card 0, port 0 device 0x2
05-18 10:43:19.800: W/audio_hw_primary(2373): rate 44100, channel 2 period_size 0xc0
05-18 10:43:19.800: V/CAM_PhotoModule(3283): mShutterToRawCallbackTime = 4ms
05-18 10:43:19.910: I/FslCameraHAL(2373): device thread exit...
05-18 10:43:20.080: I/FslCameraHAL(2373): StreamAdapter stop running
05-18 10:43:20.080: I/FslCameraHAL(2373): stream thread received STREAM_STOP command
05-18 10:43:20.080: I/FslCameraHAL(2373): StreamAdapter stop end
05-18 10:43:20.080: I/FslCameraHAL(2373): PreviewStream release running
05-18 10:43:20.080: I/FslCameraHAL(2373): StreamAdapter release running
05-18 10:43:20.080: I/FslCameraHAL(2373): stream thread exiting...
05-18 10:43:20.080: E/BufferQueue(3283): [unnamed-3283-1] cancelBuffer: slot 1 is not owned by the client (state=0)
05-18 10:43:20.080: E/BufferQueue(3283): [unnamed-3283-1] cancelBuffer: slot 2 is not owned by the client (state=3)
05-18 10:43:20.080: I/FslCameraHAL(2373): CaptureStream::configure
05-18 10:43:20.080: E/FslCameraHAL(2373): getGpsCoordinates: error reading jpeg Coordinates tag
05-18 10:43:20.080: E/FslCameraHAL(2373): getGpsTimeStamp: error reading jpeg TimeStamp tag
05-18 10:43:20.080: E/FslCameraHAL(2373): getGpsProcessingMethod: error reading jpeg ProcessingMethod tag
05-18 10:43:20.080: I/FslCameraHAL(2373): pixel format: 0x56595559
05-18 10:43:20.080: I/FslCameraHAL(2373): Width * Height 2592 x 1944 format 0x56595559, fps: 15
05-18 10:43:20.080: I/FslCameraHAL(2373): allocateBufferFromIon buffer num:2
05-18 10:43:20.150: I/FslCameraHAL(2373): CaptureStream::start
05-18 10:43:20.150: I/FslCameraHAL(2373): StreamAdapter start running
05-18 10:43:20.150: I/FslCameraHAL(2373): stream thread received STREAM_START command
05-18 10:43:20.190: I/FslCameraHAL(2373): Created device thread
05-18 10:43:20.240: W/AudioFlinger(2373): write blocked for 343 msecs, 5 delayed writes, thread 0x4103f008
05-18 10:43:23.840: W/audio_hw_primary(2373): do_out_standby... 1091253648
05-18 10:43:25.150: I/FslCameraHAL(2373): handleStream: get invalid message
05-18 10:43:25.150: E/FslCameraHAL(2373): handleRequest:No more requests available
05-18 10:43:25.150: I/FslCameraHAL(2373): handleRequest exiting
05-18 10:43:25.150: I/FslCameraHAL(2373): stopAllStreams running
05-18 10:43:25.150: I/FslCameraHAL(2373): CaptureStream::stop
05-18 10:43:25.150: I/FslCameraHAL(2373): StreamAdapter stop running
05-18 10:43:25.150: I/FslCameraHAL(2373): stream thread received STREAM_STOP command
05-18 10:43:25.150: I/FslCameraHAL(2373): StreamAdapter stop end
05-18 10:43:25.200: I/FslCameraHAL(2373): Warning!Time out wait for V4L2 capture reading operation!
05-18 10:43:25.200: E/FslCameraHAL(2373): device thread exit with frame = null, 2 buffers still in v4l
05-18 10:43:25.200: E/FslCameraHAL(2373): handleError handle error:2
05-18 10:43:25.200: E/Camera2ClientBase(2373): Error condition 2 reported by HAL, arguments 0, 0
05-18 10:43:25.360: I/FslCameraHAL(2373): CaptureStream::release
05-18 10:43:25.360: I/FslCameraHAL(2373): StreamAdapter release running
05-18 10:43:25.360: I/FslCameraHAL(2373): stream thread exiting...
05-18 10:43:25.360: I/FslCameraHAL(2373): freeBufferToIon buffer num:2
05-18 10:43:25.360: I/FslCameraHAL(2373): stopAllStreams end
05-18 10:43:25.360: I/FslCameraHAL(2373): handleRequest end...
05-18 10:43:29.800: W/Camera2-CaptureSequencer(2373): Timed out waiting for capture to complete
Any one met the same problem? Any suggestions are appreciated.
Hi Xiyuan
from logs:
Width * Height 2592 x 1944 format 0x56595559, fps: 15..
Time out wait for V4L2 capture reading operation!
this looks as performance issue as 2592 x 1944@15fps require
triple typical (~25MB) perfomance which could be achieved as described in
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igorpadykov,
Thanks for your reply, I think your analysis is correct, but I didn't find solution in USB Host Performance on i.MX6 ,
except trying other kernel version, Could you give me some advice?
Best wishes