This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Make USB camera default in Android

Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X

Hello experts.

I have a AM572x Evaluation Module TMDSEVM572X with me and I have successfully compiled Android SDK 5.03 on it.

As per this thread, (posted by me), TI experts have made it clear that camera support is not provided with Android OS on this EVM. However, the USB camera works completely fine when attached to the EVM and is verified using a simple usb cam application. While, on the other hands, the system camera is not being detected at all.

Therefore, I would like to customize Android at a source level and add code to automatically switch the default (built-in/system) camera to the one connected by USB when it is available. Or if switching dynamically is not possible then disable the system camera and make USB (external) camera as the default one.

This way all applications should detect the external (USB) camera as the primary camera. For example, if I open camera application then the device should take the picture from the one which is connected via USB.

I have the Android SDK source code available with me, but I am not sure how to proceed.

Really appreciate your help.
Thanks!

  • Hello,

    I am wondering if you could please confirm that you are using Android PSDK5.03. In the meantime, I will check with our Android experts and get back to you.

    Regards,
    Krunal

  • Hello,

    Yes. I am using Android PSDK5.03.

    Regards,

    Devashish

  • Hello,

    I am wondering if there is any progress with this issue? Kindly revert back at your earliest convenience.

    Thanks,

    Devashish

  • Hello Devashish,

    As an example, refer to the following guide and please keep in mind that TI did not test this and support will be limited. Also, I am wondering if you could please share which app you used for testing USB camera and did you make any changes to enable USB camera?

    Regards,
    Krunal 

  • Hello,

    The link (that you shared in last reply) is too generic for this issue. No doubt, it surely helped me to connect/detect/use USB camera on the EVM during the initial testing phase. It seemed like USB HAL was already available in this case, as contrary to system camera HAL. I used Simple USB Camera app from the play-store to test it.

    Therefore, now I want this USB camera to work as default camera for all applications requiring camera.I know that enabling this requires changes at android source level, which is still a grey area to me.

    Please see if you can guide me on this.

    Regards,

    Devashish

  • Hi Devashish,

    Few pointers.

    1. USB/Input subsystem HAL is as-is from android public baseline . We did not touch this HAL for enabling our SOCs in 5.3SDK.

    2. As mentioned above Camera HAL thru HW Acceleration encode/decode path is not part of PSDK 5.3 release. 

    3. Playstore apps / GMS certification is between vendor and google . Ref process: https://www.android.com/gms/  . TI is involved only when there is issue with a supported SOC feature.

    4. The referred guide is what google publishes as a developer reference doc to enable usb camera. It was intended as a tip and most likely will work with experimentation based on what google mentioned there.   Enable the needed kernel and device project changes and if still usb camera is not working .. check for logcat and dmesg for further debugging.