Samsung S10 - No supported surface combination is found for camera device - Id : 1.

1,202 views
Skip to first unread message

Kashyap Das

unread,
Jul 14, 2021, 6:34:39 AM7/14/21
to Android CameraX Discussion Group
W/System.err: java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 1. May be attempting to bind too many use cases. Existing surfaces: [] New configs: [androidx.camera.core.impl.ImageCaptureConfig@ed6cb56, androidx.camera.core.impl.PreviewConfig@903d171, androidx.camera.core.impl.ImageAnalysisConfig@decf7d7]
W/System.err: at androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:278)
W/System.err: at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:428)

I am calling unbindAll() before bindToLifecycleCamera , still getting No supported surface combination is found for camera device - Id : 1.

Can anyone here help me fix this? Thank you in advance! Appreciated!

Charcoal Chen

unread,
Jul 14, 2021, 6:47:24 AM7/14/21
to Android CameraX Discussion Group, kash...@servify.in
Thanks for reporting the issue.

Do you enable any extension mode? If yes, which extension mode is enabled?

Could you modify the code to only bind Preview and ImageCapture and use the following command to get the information about what format of streams are used for the use cases?
"adb shell dumpsys media.camera | grep Dims"

Could you also help to check what is the hardware level of the camera 1? Please see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL.

Kashyap Das

unread,
Jul 14, 2021, 7:21:52 AM7/14/21
to Android CameraX Discussion Group, charco...@google.com
Super quick reply, Thanks a ton @charco...@google.com!

1. I have only enabled HDR (HdrImageCaptureExtender) extension
2. I removed the TfAnalyser and now bindToLifecycle works flawlessly but I need the TfAnalyser for my custom phone detection. 
3. I am checking the hardware level will update here asap. 

Kashyap Das

unread,
Jul 14, 2021, 9:39:59 AM7/14/21
to Android CameraX Discussion Group, Kashyap Das, charco...@google.com
We are getting INFO_SUPPORTED_HARDWARE_LEVEL_FULL 

Charcoal Chen

unread,
Jul 15, 2021, 2:30:47 AM7/15/21
to Android CameraX Discussion Group, kash...@servify.in, Charcoal Chen
Hi,

I checked a Samsung S20 device on my hand, Samsung's HDR mode should need a YUV_420_888 stream for ImageCapture. When the application binds Preview + ImageCapture + ImageAnalysis, the camera device needs to be FULL-level above. It will support the following configuration. Please see the Full-level additional guaranteed configurations table in CameraDevice#regular-capture.

       Target 1                Target 2                Target 3
Type/Max size      Type/Max size      Type/Max size
YUV/640x480       PRIV/PREVIEW      YUV/MAXIMUM.    Standard video recording plus maximum-resolution in-app processing.

I also tried to find a S10 (SM-G973F, Android 10) device in our test lab to check its hardware level remotely. I found the hardware level of rear camera is FULL-level but the hardware level of front camera is LIMITED-level. If the front camera is LIMITED-level, it can explain why it can't support Preview + ImageCapture + ImageAnalysis and enable HDR extension mode at the same time. Could you double check again whether the hardware level of your S10's front camera is FULL-level?

If it is LIMITED-level device, it will be a camera capability limitation of Samsung S10's front camera to support Preview + ImageCapture + ImageAnalysis and enable HDR extension mode at the same time. The HDR extension mode might need to be removed so that you application can bind all the three needed use cases.

Kashyap Das

unread,
Jul 15, 2021, 7:52:26 AM7/15/21
to Android CameraX Discussion Group, charco...@google.com, Kashyap Das
Hey,

Removed the HDR extension for `LIMITED-level` devices and it's working fine! 

You were super helpful. Thank you!! 

Kashyap Das

unread,
Jul 15, 2021, 7:54:36 AM7/15/21
to Android CameraX Discussion Group, Kashyap Das, charco...@google.com
I mean LIMITED-level as well as Legacy devices
Reply all
Reply to author
Forward
0 new messages