Pulse-Eight / libcec

USB CEC Adapter communication Library http://libcec.pulse-eight.com/
Other
704 stars 282 forks source link

[REQUEST] LibCEC support for new inexpensive Nvidia Jetson Nano single board computers? #533

Open Hedda opened 3 years ago

Hedda commented 3 years ago

Can we please get upstream libcec support for the new Nvidia Jetson Nano 2GB and Nvidia Jetson Nano 4GB budget SBC?

Nvidia Jetson Nano is based on a compute module with an SoC type similar to the Nvidia Tegra inside an Nvidia Shield TV box.

Not sure if you heard but Nvidia has released a budget series of Nvidia Jetson development kits called "Nvidia Jetson Nano".

Nvidia Jetson Nano 2GB was just launched and only cost $54 (US) without Wi-Fi or $59 (US) with a WiFi USB dongle.

https://developer.nvidia.com/embedded/jetson-nano-2gb-developer-kit

Nvidia Jetson Nano 4GB has a slightly more powerful CPU and GPU plus extra expansion ports and still only cost $99 US

https://developer.nvidia.com/embedded/jetson-nano-developer-kit

There should make for more attractive HTPC hardware if media player applications like Kodi had HDMI-CEC support for it.

Some work has been done for the much more expensive Nvidia Jetson TK1 DevKit as well as Tegra X1/X2 SoCs for mobiles:

https://github.com/BuzzBumbleBee/libcec

https://forums.developer.nvidia.com/t/wip-hdmi-cec-on-tegra-jetson/35265/

There is also a CEC driver available for Nvidia Tegra that uses the Linux Kernel's generic CEC framework interface:

https://github.com/torvalds/linux/blob/master/drivers/media/cec/platform/tegra/tegra_cec.c

https://lwn.net/Articles/728147/

http://lkml.iu.edu/hypermail/linux/kernel/1711.1/06245.html

https://www.mail-archive.com/linux-media@vger.kernel.org/msg118714.html

Anyway, all Nvidia Jetson SBC and SOM do support HDMCI-CEC so it is software support that is lacking

https://forums.developer.nvidia.com/t/cec-line-for-hdmi/68970

anishsane commented 2 years ago

+1. The lack of CEC support on Jetson Nano is preventing me to use it as a media player. (Lack of CEC and LIRC support)

malard commented 2 years ago

It's not magic, we need access to the CEC pin on the hdmi port

If it's not connected then it will be impossible

Sent from my Huawei phone

-------- Original message -------- From: anishsane @.> Date: Fri, 24 Sep 2021, 07:15 To: Pulse-Eight/libcec @.> Cc: Subscribed @.***> Subject: Re: [Pulse-Eight/libcec] [REQUEST] LibCEC support for new inexpensive Nvidia Jetson Nano single board computers? (#533)

+1. The lack of CEC support on Jetson Nano is preventing me to use it as a media player. (Lack of CEC and LIRC support)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Pulse-Eight/libcec/issues/533#issuecomment-926374386, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEFI53G3PADG2KR3TLR4QDUDQJOXANCNFSM4SHBPWTQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

anishsane commented 2 years ago

I read in a forum that the hardware is all fine - the CEC pin on the HDMI port is indeed connected. Only the software (kernel) does not support it.

EDIT: kernel supports it too. The userspace library does not.

DeanIsMe commented 2 years ago

The HDMI-CEC pin is connected according to Nvidia's documentation. I downloaded the Jetson Nano Carrier Board hardware design files (which are available from Nvidia, part # P3449-B01, document 600-13449-0000-400) and can confirm that HDMI-CEC, pin 13 on the HDMI port is connected to some IO circuitry which then connects to pin 94 on the SODIMM connector, to the Jetson Nano Module. The datasheet of the Jetson Nano Module (which is also available from Nvidia, document DA-09366-001_v1.0) then describes pin 94 as HDMI_CEC on p94. The description of this pin is:

Consumer Electronics Control (CEC) one-wire serial bus. NVIDIA provides low level CEC APIs (read/write). These are not supported in earlier Android releases. For additional CEC support, 3rd party libraries need to be made available.

anishsane commented 1 year ago

Android (LineageOS) is available on Jetson Nano. I have verified that CEC works in that build. So, from the hardware POV, things are OK.

I have also verified that the (old) code from https://github.com/BuzzBumbleBee/libcec is able to send/receive over CEC. It needs to be rebased from the TOT libcec code though. Also, it needs sudo access to run cec-client.

anishsane commented 1 year ago

I have created https://github.com/Pulse-Eight/libcec/pull/636