Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back camera issue with SW_binaries_for_Xperia_Android_13_5.4_v4b_zambezi and Android 13 #845

Open
PaoloP79 opened this issue Sep 9, 2024 · 3 comments
Labels

Comments

@PaoloP79
Copy link

PaoloP79 commented Sep 9, 2024

Platform: Zambezi
Device: pdx235
Kernel version: 5.4.210
Android version: 13
Software binaries version: SW_binaries_for_Xperia_Android_13_5.4_v4b_zambezi

Previously working on

  • The same issue is present with SW_binaries_for_Xperia_Android_13_5.4_v4a_zambezi
  • The camera was working fine with SW_binaries_for_Xperia_Android_13_5.4_v2b_zambezi.

Description
When I open the AOSP stock camera app the screen remains white, and after some time appear a popup that say "Can't connect to the camera".
If, instead, I switch to the front camera I can see my face (so i guess the problem is related with the back camera)

How to reproduce
Just open the stock camera app provided with android AOSP.

Additional context
I noticed that when I give the command dumpsys media.camera the output is different

output with SW_binaries_for_Xperia_Android_13_5.4_v4b_zambezi

Number of camera devices: 4
Number of normal camera devices: 4
Number of public camera devices visible to API1: 4
    Device 0 maps to "0"
    Device 1 maps to "1"
    Device 2 maps to "2"
    Device 3 maps to "3"

output with SW_binaries_for_Xperia_Android_13_5.4_v2b_zambezi

== Service global info: ==

Number of camera devices: 2
Number of normal camera devices: 2
Number of public camera devices visible to API1: 2
    Device 0 maps to "0"
    Device 1 maps to "1"

In the case of SW_binaries_for_Xperia_Android_13_5.4_v4b_zambezi I can see, with adb logcat, lot of errors like

09-09 16:49:23.754     0     0 I CAM_ERR : CAM-OIS: cam_ois_subdev_ioctl: 55 Failed with driver cmd: -22
09-09 16:49:23.755     0     0 I CAM_ERR : CAM-OIS: cam_ois_driver_cmd: 963 Failed in ois pkt Parsing
09-09 16:49:23.755     0     0 I CAM_ERR : CAM-OIS: cam_ois_subdev_ioctl: 55 Failed with driver cmd: -22
.....
.....
09-09 16:49:25.928     0     0 I CAM_ERR : CAM-CCI: cam_cci_read: 1389 ERROR with Slave 0xa8:
09-09 16:49:25.928     0     0 I CAM_ERR : CAM-CCI: cam_cci_read_bytes_v_1_2: 1640 failed to read rc:-22
09-09 16:49:25.928     0     0 I CAM_ERR : CAM-EEPROM: cam_eeprom_read_memory: 133 read failed rc -22
09-09 16:49:25.928     0     0 I CAM_ERR : CAM-EEPROM: cam_eeprom_pkt_parse: 1325 read_eeprom_memory failed
09-09 16:49:25.934     0     0 I CAM_ERR : CAM-EEPROM: cam_eeprom_driver_cmd: 1536 Failed in eeprom pkt Parsing
09-09 16:49:25.934     0     0 I CAM_ERR : CAM-EEPROM: cam_eeprom_subdev_ioctl: 55 Failed in Driver cmd: -22

and

09-09 16:49:19.535  6288  6833 E CamX    : [ERROR][CSL    ] camxcslhwinternal.cpp:3295 CSLHwInternalDefaultIoctl() Ioctl failed for device /dev/v4l-subdev16 (Type:CSLHwOIS, FD:28, Index:11) with error reason Invalid argument
09-09 16:49:19.536  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1429 ReadLensPositionData() OIS[0]: failed to submit packet =1
09-09 16:49:19.536  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1155 LensPositionThread() Failed to read lens position data
09-09 16:49:19.536  6288  6833 E CamX    : [ERROR][CSL    ] camxcslhwinternal.cpp:3295 CSLHwInternalDefaultIoctl() Ioctl failed for device /dev/v4l-subdev16 (Type:CSLHwOIS, FD:28, Index:11) with error reason Invalid argument
.....................
.....................
09-09 16:49:19.538  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1155 LensPositionThread() Failed to read lens position data
09-09 16:49:19.538  6288  6833 E CamX    : [ERROR][CSL    ] camxcslhwinternal.cpp:3295 CSLHwInternalDefaultIoctl() Ioctl failed for device /dev/v4l-subdev16 (Type:CSLHwOIS, FD:28, Index:11) with error reason Invalid argument
09-09 16:49:19.538  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1429 ReadLensPositionData() OIS[0]: failed to submit packet =1
09-09 16:49:19.538  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1155 LensPositionThread() Failed to read lens position data
09-09 16:49:19.539  6288  6833 E CamX    : [ERROR][CSL    ] camxcslhwinternal.cpp:3295 CSLHwInternalDefaultIoctl() Ioctl failed for device /dev/v4l-subdev16 (Type:CSLHwOIS, FD:28, Index:11) with error reason Invalid argument
09-09 16:49:19.539  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1429 ReadLensPositionData() OIS[0]: failed to submit packet =1
09-09 16:49:19.539  6288  6833 E CamX    : [ERROR][SENSOR ] camxois.cpp:1155 LensPositionThread() Failed to read lens position data

Due to the different output reported by dumpsys media.camera my guess was that the problem could be related with a different device mapping seen by the kernel, so I update my repo with the commands

repo sync
./repo_update.sh

rebuilt the kernel by myself with

kernel/sony/msm-5.4/common-kernel/build-kernels-clang.sh

and then rebuilt the whole AOSP. Nothing change.
My guess is still the the problem could be related with the device tree, or something like this.
Any help is appreciated.
Thank you in Advance for your attention.

@PaoloP79 PaoloP79 added the bug label Sep 9, 2024
@bartcubbins
Copy link
Contributor

I will investigate this issue as soon as I have a free minute

@bartcubbins
Copy link
Contributor

please provide a full logcat so that we can see the entire CamX framework log

@PaoloP79
Copy link
Author

Hi burtcubbins, in attachment a full logcat.

log.txt

Thankyou for your attention, have a good day.
Paolo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants