Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

HDR extension doesn't work on Samsung Galaxy A52s 5G

80 views
Skip to first unread message

thijsonline

unread,
Aug 30, 2024, 4:57:47 AM8/30/24
to Android CameraX Discussion Group
When the HDR extension on the CameraX library is used (while using the back camera), while the preview is running logcat displays these lines continuously:

2024-08-30 09:58:54.550 21414-21461 cx/CaptureCallback      com.mypackage             V  onCaptureProcessStarted, seq = 1
2024-08-30 09:58:54.555 21414-21461 cx/CaptureCallback      com.mypackage             V  onCaptureCompleted, seq = 1, timestamp = 66168716018710
2024-08-30 09:58:54.592 21414-21460 cx/CaptureCallback      com.mypackage             V  onCaptureStarted, seq = 1, timestamp = 66168776051314
2024-08-30 09:58:54.610 21414-21453 cx/CaptureCallback      com.mypackage             V  onCaptureProcessStarted, seq = 1
2024-08-30 09:58:54.616 21414-21453 cx/CaptureCallback      com.mypackage             V  onCaptureCompleted, seq = 1, timestamp = 66168776051314
2024-08-30 09:58:54.652 21414-21459 cx/CaptureCallback      com.mypackage             V  onCaptureStarted, seq = 1, timestamp = 66168836083971
2024-08-30 09:58:54.672 21414-21460 cx/CaptureCallback      com.mypackage             V  onCaptureProcessStarted, seq = 1
2024-08-30 09:58:54.679 21414-21460 cx/CaptureCallback      com.mypackage             V  onCaptureCompleted, seq = 1, timestamp = 66168836083971
2024-08-30 09:58:54.713 21414-21453 cx/CaptureCallback      com.mypackage             V  onCaptureStarted, seq = 1, timestamp = 66168896116575
2024-08-30 09:58:54.733 21414-21461 cx/CaptureCallback      com.mypackage             V  onCaptureProcessStarted, seq = 1
2024-08-30 09:58:54.739 21414-21461 cx/CaptureCallback      com.mypackage             V  onCaptureCompleted, seq = 1, timestamp = 66168896116575
2024-08-30 09:58:54.773 21414-21460 cx/CaptureCallback      com.mypackage             V  onCaptureStarted, seq = 1, timestamp = 66168956149179
2024-08-30 09:58:54.795 21414-21459 cx/CaptureCallback      com.mypackage             V  onCaptureProcessStarted, seq = 1
2024-08-30 09:58:54.800 21414-21459 cx/CaptureCallback      com.mypackage             V  onCaptureCompleted, seq = 1, timestamp = 661689561491


This goes on and on. When capturing a photo, the capture callback is never called. In logcat I can see the following errors:

Surface no longer in use[total_surfaces=6, used_surfaces=4](androidx.camera.core.impl.SessionProcessorSurface@1258a6c}
--
CameraDevice.onError(): 0 failed with ERROR_CAMERA_DEVICE while in OPENED state. Will attempt recovering from error.
--
Attempt to reopen camera[0] after error[ERROR_CAMERA_DEVICE]
--
Session 0: Exception while stopping repeating: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2513)

See the attached logcat file log1.txt.

When using the front camera, the preview issues the same logs while the preview is running. Capturing a photo sometimes work (looks like it works when there is not a lot of difference in light intensity). When it does not work, the following error is logged:

Tag name 'dynamicShotCaptureDuration' does not exist.

See the attached logcat file log2.txt.

I followed the API documentation. The sample library (https://github.com/android/camera-samples) has the same behaviour. I also tried a third party CameraX app from the Play Store, taking a photo in HDR causes the same issue. Using code or an app that implements Camera2 directly does not cause any problems with HDR enabled.

Occurs with CameraX version: 1.3.4 and 1.4.0-rc01
I tried both PreviewView.ImplementationMode.PERFORMANCE and PreviewView.ImplementationMode.COMPATIBLE
Extensions Bokeh and Face Retouch do work.

Device: Samsung Galaxy A52s 5G
Model: SM-A528B/DS
Android version: 14 (build number UP1A.231005.007.A528BXXS9GXG5)
log2.txt
log1.txt

Charcoal Chen

unread,
Sep 3, 2024, 1:58:20 AM9/3/24
to Android CameraX Discussion Group, thijsonline
Hi,

Thanks for reporting the issue. I have created  https://issuetracker.google.com/issues/364152642 to track this issue and also looped you there. I will update the investigation results on the buganizer issue after doing some tests on our lab devices.

thijsonline

unread,
Sep 9, 2024, 2:01:52 AM9/9/24
to Android CameraX Discussion Group, charco...@google.com, thijsonline
Thanks a lot for the investigation and quick fix!

Op dinsdag 3 september 2024 om 07:58:20 UTC+2 schreef charco...@google.com:
Reply all
Reply to author
Forward
0 new messages