[Xiaomi Redmi 3s ROMs, Kernels, Recoveries, & Other] shtirlits3500:
Hi !

I have the following problem

- No stereo sound during video recording for all applications

- Сamera2api does not enabled

After adding a parameter "persist.camera.HAL3.enabled = 1" to build.prop, stopped working all recording applications (crashing at startup)

Only SnapCamera works with AMR audio codec, it not AAC

firmware January 6 2017

what can be done ?

logcat crash GCAM:

D/audio_hw_primary: adev_open_input_stream: enter: sample_rate(48000) channel_mask(0xc) devices(0x80000080) stream_handle(0xed0f8780)
io_handle(190) source(5) format 1
I/AudioFlinger: AudioFlinger's thread 0xeb083740 ready to run
D/audio_hw_primary: in_standby: enter: stream (0xed0f8780) usecase(16: audio-record)
D/audio_hw_primary: in_standby: enter: stream (0xed0f8780) usecase(16: audio-record)
I/MediaPlayerService: MediaPlayerService::getOMX
I/OMXClient: MuxOMX ctor
I/OMXMaster: makeComponentInstance(OMX.qcom.audio.encoder.aac) in mediaserver process
E/QC_AACENC: component init: role = OMX.qcom.audio.encoder.aac
E/QC_AACENC: Component_init Open Failed[-1] errno[13]
W/codec_looper: type=1400 audit(0.0:2239): avc: denied { read write } for name="msm_aac_in" dev="tmpfs" ino=816 scontext=u:r:mediaserver:s0 t
context=u:object_r:audio_device:s0 tclass=chr_file permissive=0
E/QC_AACENC: De-init: AUDIO_STOP FAILED
E/QC_AACENC: AAC device already closed
E/QC_AACENC: OMX AAC component destroyed
E/OMX : FAILED to allocate omx component 'OMX.qcom.audio.encoder.aac' err=InsufficientResources(0x80001000)
W/ACodec : Allocating component 'OMX.qcom.audio.encoder.aac' failed, try next one.
E/ACodec : Unable to instantiate codec 'OMX.qcom.audio.encoder.aac' with err 0xfffffff4.
E/ACodec : signalError(omxError 0xfffffff4, internalError -12)
E/MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 1
E/ResourceManagerService: getLowestPriorityBiggestClient_l: lowest priority 0 vs caller priority 0
E/StagefrightRecorder: Failed to create audio encoder
D/MPEG4Writer: Video track stopping
E/MPEG4Writer: Stop() called but track is not started
E/MediaRecorder: prepare failed: -2147483648
E/CAM_MediaRecPreparer: immediateFailedFuture: MediaRecorder.prepare() exception: com.android.camera.camcorder.media.MediaRecorderException:
java.io.IOException: prepare failed.
E/CAM_Video2ModuleBase: openCamcorderDevice onFailure:
E/CAM_Video2ModuleBase: com.android.camera.camcorder.media.MediaRecorderException: java.io.IOException: prepare failed.
E/CAM_Video2ModuleBase: at com.android.camera.camcorder.media.MediaRecorderProxy.prepare(MediaRecorderProxy.java)
E/CAM_Video2ModuleBase: at com.android.camera.camcorder.media.MediaRecorderPreparerImpl$1.apply(MediaRecorderPreparerImpl.java)
E/CAM_Video2ModuleBase: at com.android.camera.camcorder.media.MediaRecorderPreparerImpl$1.apply(MediaRecorderPreparerImpl.java)
E/CAM_Video2ModuleBase: at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java)
E/CAM_Video2ModuleBase: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
E/CAM_Video2ModuleBase: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
E/CAM_Video2ModuleBase: at java.lang.Thread.run(Thread.java:761)
E/CAM_Video2ModuleBase: at com.android.camera.async.AndroidPriorityThread.run(AndroidPriorityThread.java)
E/CAM_Video2ModuleBase: Caused by: java.io.IOException: prepare failed.
E/CAM_Video2ModuleBase: at android.media.MediaRecorder._prepare(Native Method)
E/CAM_Video2ModuleBase: at android.media.MediaRecorder.prepare(MediaRecorder.java:863)
E/CAM_Video2ModuleBase: ... 8 more
E/CAM_FatalErrorHandler: Handling Camera Open Failure:
E/CAM_FatalErrorHandler: java.lang.Exception: com.android.camera.camcorder.media.MediaRecorderException: java.io.IOException: prepare failed.

E/CAM_FatalErrorHandler: at com.android.camera.error.FatalErrorHandlerImpl.onCameraOpenFailure(FatalErrorHandlerImpl.java)
E/CAM_FatalErrorHandler: at com.android.camera.module.video2.Video2Module$3.onFailure(Video2Module.java)
E/CAM_FatalErrorHandler: at com.google.common.util.concurrent.Futures$6.run(Futures.java)
E/CAM_FatalErrorHandler: at android.os.Handler.handleCallback(Handler.java:751)
E/CAM_FatalErrorHandler: at android.os.Handler.dispatchMessage(Handler.java:95)
E/CAM_FatalErrorHandler: at android.os.Looper.loop(Looper.java:154)
E/CAM_FatalErrorHandler: at android.app.ActivityThread.main(ActivityThread.java:6243)
E/CAM_FatalErrorHandler: at java.lang.reflect.Method.invoke(Native Method)
E/CAM_FatalErrorHandler: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
E/CAM_FatalErrorHandler: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
E/CAM_FatalErrorHandler: Caused by: com.android.camera.camcorder.media.MediaRecorderException: java.io.IOException: prepare failed.
E/CAM_FatalErrorHandler: at com.android.camera.camcorder.media.MediaRecorderProxy.prepare(MediaRecorderProxy.java)
E/CAM_FatalErrorHandler: at com.android.camera.camcorder.media.MediaRecorderPreparerImpl$1.apply(MediaRecorderPreparerImpl.java)
E/CAM_FatalErrorHandler: at com.android.camera.camcorder.media.MediaRecorderPreparerImpl$1.apply(MediaRecorderPreparerImpl.java)
E/CAM_FatalErrorHandler: at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java)
E/CAM_FatalErrorHandler: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
E/CAM_FatalErrorHandler: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
E/CAM_FatalErrorHandler: at java.lang.Thread.run(Thread.java:761)
E/CAM_FatalErrorHandler: at com.android.camera.async.AndroidPriorityThread.run(AndroidPriorityThread.java)
E/CAM_FatalErrorHandler: Caused by: java.io.IOException: prepare failed.
E/CAM_FatalErrorHandler: at android.media.MediaRecorder._prepare(Native Method)
E/CAM_FatalErrorHandler: at android.media.MediaRecorder.prepare(MediaRecorder.java:863)
E/CAM_FatalErrorHandler: ... 8 more
E/CAM_FatalErrorHandler: Show fatal error dialog
E/BufferQueueProducer: [SurfaceView - com.google.android.GoogleCamera/com.android.camera.CameraLauncher] queueBuffer: BufferQueue has been ab
andoned
E/Surface : queueBuffer: error queuing buffer to SurfaceTexture, -19
E/Camera3-OutputStream: returnBufferCheckedLocked: Stream 1: Error queueing buffer to native window: No such device (-19)
E/Camera3-Device: Can't return buffer to its stream: No such device (-19)
I/QTI PowerHAL: Got process_video_encode_hint
E/QCOM PowerHAL: Invalid hint ID.
E/QCamera : <HAL><ERROR> int32_t qcamera::QCameraPerfLock::lock_acq(): 348: failed to acquire lock
I/QCamera : <HAL><INFO> int qcamera::QCamera3HardwareInterface::configureStreamsPerfLocked(camera3_stream_configuration_t*): 1406: stream[0]
type = 0, format = 34, width = 320, height = 240, rotation = 0, usage = 0x800
I/qomx_image_core: OMX_Deinit:125] Complete
E/QCamera : <HAL><ERROR> int32_t qcamera::QCameraPerfLock::lock_rel(): 422: mPerfLockHandle < 0,check if lock is acquired
W/Camera3-Device: Can't set realtime priority for request processing thread: Operation not permitted (-1)