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

[backport][widevine] add support for linux arm64 #1130

Merged
merged 2 commits into from
Feb 25, 2023

Conversation

tmm1
Copy link
Contributor

@tmm1 tmm1 commented Feb 10, 2023

without these changes, the following error is observed:

    Initialize: Failed to load library: libwidevinecdm.so: undefined symbol: __aarch64_ldadd4_acq_rel
    Unable to load widevine shared library (libwidevinecdm.so)
@tmm1 tmm1 changed the title [widevine] add support for arm64 [widevine] add support for linux arm64 Feb 10, 2023
@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Feb 10, 2023

you can avoid ping peak3d it on threads is not on kodi team from many years
currently the only maintainers are @CastagnaIT and @glennguy

i think you have better knowledge of what is involved in loading the library where linux its not my area
so i do not have much to say

but i am a bit concerned about asm implementation for dynamic symbols
so how, or what we should do if something changes in the future? (maybe possible cases of different library versions?)
may this cause unhandled crashes on InputStreamAdaptive?
is this the only possible way?

i think its better ping also @phunkyfish

@tmm1
Copy link
Contributor Author

tmm1 commented Feb 10, 2023

I updated the code to remove the ASM. Technically the ASM version will have increased performance because it can use the LSE extensions, but I don't think that's a big deal here. I left that implementation in the git history for reference in case it becomes an issue in the future.

@CastagnaIT
Copy link
Collaborator

There is an additional problem to be taken in account
this implementation may be good for Nexus but for Omega we have plan to merge ssdwv project to the master project
there will no longer be an additional library builded, then LoadDll will be removed
I think you need to find an alternative

@tmm1
Copy link
Contributor Author

tmm1 commented Feb 13, 2023

Options would be:

  1. build separate .so with just the atomic functions which can be dlopen
  2. add atomic functions to kodi itself so they are always present in the main binary and available to use

@CastagnaIT
Copy link
Collaborator

@tmm1 can you create same PR for Omega branch?

@tmm1 tmm1 mentioned this pull request Feb 24, 2023
11 tasks
@CastagnaIT CastagnaIT changed the title [widevine] add support for linux arm64 [backport][widevine] add support for linux arm64 Feb 24, 2023
@CastagnaIT CastagnaIT added v20 Nexus Type: Improvement non-breaking change which improves existing functionality DRM: Widevine Type: Backport labels Feb 24, 2023
@matthuisman
Copy link
Contributor

So for arm64 Kodi devices, they will need minimum whatever version IA that is released after this is merged? If so, I'll add a IA version check in my addons to give error if IA version too old for 64bit

Copy link
Contributor

@glennguy glennguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tmm1 for finding the arm64 libraries and kicking this off

@theofficialgman
Copy link

theofficialgman commented Feb 27, 2023

Thanks @tmm1 for finding the arm64 libraries and kicking this off

where is my thanks 😆 , I am the one who noticed the widevine commit in chromium last fall, and that all the arm64 chromeOS CI was in place in January and asked in the google groups. But we really have Doug Anderson to thank.

@glennguy
Copy link
Contributor

glennguy commented Mar 2, 2023

I guess I was trying to thank tmm1 for bringing it into the space here. Thanks to you for the digging in the first place. In the future though if there's new CDM platform/archs that become available and you find them please share the info with us so we know about it, we would be very grateful.
If a tree falls in a forest...

@Schlumpf7
Copy link

so how i get widevine support to work on arm64? the inputstream adaptive helper still claims arm64 is not supported.
How can i import it manually?

@glennguy
Copy link
Contributor

@Schlumpf7 Have a read through this: emilsvennesson/script.module.inputstreamhelper#530

@amazingfate
Copy link

Hello, there seems to be a gcc fix from fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1830472
https://src.fedoraproject.org/rpms/gcc/c/95507e8b681b5013b87bbbcb0514dd27941e648a
Can I make use of this libwidevine library system wide?

@tmm1 tmm1 mentioned this pull request Apr 24, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRM: Widevine Type: Backport Type: Improvement non-breaking change which improves existing functionality v20 Nexus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants