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

RFC: Linux CEC framework adapter #380

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

Kwiboo
Copy link
Contributor

@Kwiboo Kwiboo commented Sep 10, 2017

This is a request-for-comment for a linux cec framework adapter, any feedback would be grateful.

Tested on a ROCK64 device running LibreELEC+Kodi using the dw-hdmi-cec kernel device.

@opdenkamp
Copy link
Contributor

Just letting you know that I did see this PR, but I haven't had time yet to look into it because of other priorities. I'll look into it (and other PRs) asap. Thanks

@nkichukov
Copy link

Hello,
I have successfully applied the patch from the pull request to raspberry pi 3B running the kernel HDMI CEC framework on raspberry-pi sources version 4.15.0-rc7. It is a 32bit arm Gentoo Linux installation and the remote control for my Samsung TV is now able to control kodi! Initialization works, some errors are reported, but do not prevent any signalling:

22:33:18.511 T:1859122160  NOTICE: Register - new cec device registered on cec->Linux: CEC Adapter (0000:0000)
22:33:18.514 T:1824650224   ERROR: CecLogMessage - CLinuxCECAdapterCommunication::Write - ioctl CEC_TRANSMIT failed - tx_status=00 errno=1
22:33:18.702 T:1945591824   ERROR: Previous line repeats 3 times.

I have prepared custom ebuild with the patch and two changes to configuration:
-DHAVE_LINUX_API=1 and -DHAVE_RPI_API=0.

This is based on libcec-4.0.2.
Thanks a lot for implementing this functionality! This is greatly appreciated. Hope this makes it into mainline libcec any time soon!

Cheers,
-Nik

@Kwiboo
Copy link
Contributor Author

Kwiboo commented Jan 24, 2018

@nkichukov thanks, I have seen similar errors happening during first initialization, but since it works after that I have just ignored it.
Great to have confirmation that this adapter also works with other cec framework drivers beside the dw-hdmi-cec driver.

Also note that this adapter has some limitations like only supporting /dev/cec0, but is complete enough for use with Kodi+LibreELEC.

@Hedda
Copy link
Contributor

Hedda commented Jan 7, 2019

@opdenkamp any chance that this Linux kernel CEC framework adapter is still on your roadmap for libcec?

@TheNetStriker
Copy link

I've just tested this on a Rock Pi 4 and it works. When will this be merged into the main branch?

@Hedda
Copy link
Contributor

Hedda commented Mar 30, 2020

@opdenkamp any more feedback on blockers and/or showstoppers for this PR?

@opdenkamp
Copy link
Contributor

I just wanted to pull this one in, but it looks like one last thing is missing before I can do this. @Kwiboo could you take a look at https://www.pulse-eight.com/contributors please. I'll merge it in once this has been signed. Sorry for the (massive) delay.

@MilhouseVH
Copy link

FYI this PR and latest libcec master results in this build failure: cb3cc57

@opdenkamp
Copy link
Contributor

see cb3cc57#commitcomment-38206215

@Kwiboo
Copy link
Contributor Author

Kwiboo commented Apr 1, 2020

@opdenkamp thanks for the tip, I will update the PR and send in a signed CLA (as soon as I have access to a printer/scanner)

@malard
Copy link
Member

malard commented Apr 1, 2020 via email

@Kwiboo
Copy link
Contributor Author

Kwiboo commented Apr 1, 2020

@malard thanks, I used Adobe Fill & Sign to sign the CLA.

@MilhouseVH
Copy link

Confirming that this PR now builds with the GetStats() commit - thanks!

@Hedda
Copy link
Contributor

Hedda commented Apr 2, 2020

@malard @opdenkamp Does adding Linux CEC framework warrant a major version release for libcec?

Maybe just semantics but will Linux CEC framework support mean libCEC 5.0/v5.0.0 version release, or?

@opdenkamp
Copy link
Contributor

@Hedda not this specific PR, but another one that got merged does

@Kwiboo could you email the signed CLA directly to martin.ellis[at]pulse-eight.com please. thanks

@Kwiboo
Copy link
Contributor Author

Kwiboo commented Apr 2, 2020

@opdenkamp I have now sent the signed CLA directly to @malard email, the initial email to contributor-agreement[at]pulse-eight.com bounced.

@malard
Copy link
Member

malard commented Apr 2, 2020 via email

@opdenkamp opdenkamp merged commit 8b0393a into Pulse-Eight:master Apr 2, 2020
@tomillr
Copy link

tomillr commented Nov 29, 2020

Could someone clarify what the benefit of the Linux CEC framework is compared to the old way of doing things?

Does it mean, that any Linux system running a later kernel version automatically supports the Pulse-Eight CEC devices without the need to manually install drivers or libCEC packages?

I'm curious because I'm to get some of the linux-based Retro-Gaming distros like Lakka, Recalbox or Batocera to work with my Pulse Eight CEC adapter on a x64 system. Is there an easy way to implement basic CEC features like turning on a tv and switching the HDMI input?

@mlindner
Copy link

Could someone clarify what the benefit of the Linux CEC framework is compared to the old way of doing things?

Does it mean, that any Linux system running a later kernel version automatically supports the Pulse-Eight CEC devices without the need to manually install drivers or libCEC packages?

I'm curious because I'm to get some of the linux-based Retro-Gaming distros like Lakka, Recalbox or Batocera to work with my Pulse Eight CEC adapter on a x64 system. Is there an easy way to implement basic CEC features like turning on a tv and switching the HDMI input?

My rough understanding is that this is a completely separate CEC effort as part of the Linux kernel. There's numerous CEC devices in various hardware that are supported now by recent Linux kernels. This adds support to libcec to control these linux kernel CEC devices. For example I believe you can even turn GPIO pins directly into CEC output and input pins with the kernel driver, if your computer/device has such pins.

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

Successfully merging this pull request may close these issues.

9 participants