CEC...

Discussion in 'UDOO X86' started by shifting_tech, Nov 14, 2017.

  1. shifting_tech

    shifting_tech New Member

    Joined:
    Nov 14, 2017
    Messages:
    1
    Likes Received:
    0
    So, there's a page up now ( here ) claiming that CEC is at least somewhat up and running. In practice, I ran into some serious problems getting it going, so I wanted to post this half as a bug report, and half to see if anyone has gotten farther with it than I have.

    1)The current git master doesn't even compile. I worked around this by reverting ( this ) patch. This at least let me compile.

    2)The notes say you need to blacklist i2c-i802. This appears to be false, at least on my debian install ( kernel 4.13.0-1-amd64) there isn't an i2c-i802. Removing / blacklisting i2c-i801 seems useful though.

    Once I figured out both of those things, I was able to turn my TV on and off using the cec-ctl commands. Unfortunately, I didn't see any commands from my remote control (remote control passthru to Kodi was my real goal) showing up using cec-ctl --monitor. Am I correct in thinking that keypresses should show up using --monitor? If not, how should I see if they're coming through?

    also, unloadingthat i2c module seems to make acpi pretty unhappy? Is there a way to get both co-existing? Or if not, will there be in the future?
     
  2. ektor5

    ektor5 Administrator Staff Member

    Joined:
    Jul 1, 2013
    Messages:
    97
    Likes Received:
    48
    Hi there @shifting_tech,

    Like discussed in #1 you should use the latest kernel version (at least 4.14), where CEC_CAP_DEFAULTS is defined.
    If you want to use it in older kernels, it's ok to revert that patch.

    Yes, there may be a typo there, the correct module to be blacklisted is i2c-i801. That will be fixed easily.

    That depends to your TV actually, you have to tell it to send the RC passthrough to the playback device. For LG monitors you can try the procedure in the docs.

    Yes, because the driver uses the SMBus directly, so i2c-i801 conflicts with the normal usage. For now is impossible to use i2c-i801 as high-level i2c bus as it inhibits communication when ACPI calls are issued on the bus. That happens also when unloading the module, so is important to blacklist it. For the future if this behavior is fixed it could be good to use it.

    Thanks for feedback,
    Ek5
     
  3. Sjonno

    Sjonno New Member

    Joined:
    Apr 24, 2017
    Messages:
    21
    Likes Received:
    6
    Any news on getting HDMI CEC to work on the UDOO X86? Would like to use it with Kodi on Windows 10.
     
    drc85 likes this.
  4. drc85

    drc85 Member

    Joined:
    Dec 30, 2017
    Messages:
    45
    Likes Received:
    2
    same here... this is funny it has ir sensor and cec support but its not working... on windows 10... thining about getting the pulse eight cec adapter ... i dont want to wait so long...
     
  5. Sjonno

    Sjonno New Member

    Joined:
    Apr 24, 2017
    Messages:
    21
    Likes Received:
    6
    Someone from UDOO team please explain to your backers the current status and forseen timeline regarding CEC. Both for the Linux and Windows 10 userbase.
    UDOO still states on the X86 documentation page that this device has CEC, but so far we have seen nothing. I bought this device partly because of the promise of working CEC. Please at least get your users involved and informed!
     
  6. andy-burns

    andy-burns New Member

    Joined:
    Mar 10, 2018
    Messages:
    9
    Likes Received:
    9
    As I mentioned on the other CEC thread, I have built a test libreelec image with CEC support, at first I thought it was only the linux side of CEC working and not the kodi side, but actually it is working ... just that CEC is working differently on the UDOO compared to CEC on a Pi3 :)

    I am using a Samsung UE22F5400 TV, with a chromecast in HDMI1 and kodi on HDMI2

    With kodo on the Pi, I just plug to the HDMI2 port of the TV and it works straight away from the TV remote.

    With the kodi on the UDOO, I have to make sure I run
    cec-ctl --phys-addr=2.0.0.0 --playback

    then press "tools" on the remote, then from the menu press "Anynet+ (HDMI-CEC)", then "refresh", after that I can select between ViewTV/Chromecast/Playback where playback represents the UDOO, perhaps by setting the OSD name with cec-ctl the name Kodi can appear instead of playback (the chromecast seems to manage this trick but I haven't yet)

    After that the remote works inside kodi

    If anyone wants I will upload my image, but you will have to bear in mind this is a nightly of libreelec9, with a nightly of kodi18, so if it breaks, it breaks.

    Sorry, I'm not planning on doing anything with Win10 on UDOO.
     
  7. Laura

    Laura UDOOer

    Joined:
    Apr 22, 2016
    Messages:
    374
    Likes Received:
    155
    That would be awesome! Thank you for creating an image.
     
  8. andy-burns

    andy-burns New Member

    Joined:
    Mar 10, 2018
    Messages:
    9
    Likes Received:
    9
    I tried a reboot before uploading my image, and it seems I don't remember the correct sequence of cec-ctl/lircd/whatever commands I used last time to make it work.

    Edit: OK, so I figured out the important step, even though I don't understand why it's important, so I need to re-build an image including /usr/bin/cec-follower
     
    Last edited: Mar 15, 2018
  9. andy-burns

    andy-burns New Member

    Joined:
    Mar 10, 2018
    Messages:
    9
    Likes Received:
    9
    Finally I have a build ready, but first ...

    *>*>*> SOME WARNINGS *<*<*<

    You probably shouldn't upgrade your daily-driver Kodi, at this stage it's intended for people who can afford to trash their test system, I have no idea of the implications of upgrading and then downgrading again if it doesn't work for you, you should assume you'd have to restore from a backup.

    I have bolted this together from a pre-release version of LibreELEC 9.0, a pre-release version of Kodi 18.0 and the UDOO CEC driver, and I've had to dig about and pick a few brains to get it working, do not expect it to be polished, do not bother the real developers with any problems you find with my build.

    You need to have SSH enabled on your libreELEC, because you have to run a couple of commands by hand to get it up and running.

    +>+>+> INSTALLATION INSTRUCTIONS +<+<+<


    Download the image file from
    http://andyburns.uk/udoo-libreelec-kodi/LibreELEC-udoox86-9.0-20180315091528.img.gz

    Install it either by writing it to USB or SD-CARD using
    https://wiki.libreelec.tv/libreelec_usb-sd_creator
    and then boot from that UDB/SD and install onto your UDOO x86's eMMC, M.2 SSD or SATA drive.
    Or if you already have a working libreELEC installation, copy the image file into the /storage/.update folder using scp, winSCP or SMB, and then reboot for it to take effect.

    You don't need to worry about blacklisting the i2c-i801 SMBus driver as I have totally disabled it in this build.

    After it boots, logon as root via SSH, you can check the driver has loaded by looking at the kernel log

    # dmesg | grep -i cec
    [ 7.086175] seco_cec: loading out-of-tree module taints kernel.
    [ 7.150121] Registered IR keymap rc-cec
    [ 7.150219] rc rc0: RC for CEC00001:00 as /devices/platform/CEC00001:00/rc/rc0
    [ 7.150306] input: RC for CEC00001:00 as /devices/platform/CEC00001:00/rc/rc0/input6

    You then need to set the logical and physical addresses for CEC, in my case it is 2.0.0.0 as it is plugged into input HDMI2 of my TV, your exact command may vary.


    # cec-ctl --phys-addr=2.0.0.0 --playback --osd-name=Kodi

    I do not understand why the next step is necessary (it is for my TV, it might not be for yours, let me know) because as far as I know cec-follower is meant to be for debugging and developing CEC applications, it shouldn't be required as an end user.


    # cec-follower

    And now you might have CEC working, or like me, you might have to force a re-scan from the TV. On my Samsung this is from the "tools" button, then "Anynet+" then "Refresh", yours may vary, now once I select the Kodi HDMI input, I have the TV remote working to navigate Kodi menus :)


    I would be grateful if you report any success or failures you have here, so others can see them, and I can improve it over time, include details of what TV make/model you have and what other HDMI components (AV amp, chromecast, bluray etc) are connected, what works, what doesn't ...
     
    Last edited: Mar 15, 2018
    waltervl, ccs_hello and Laura like this.
  10. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,260
    Likes Received:
    564
  11. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,260
    Likes Received:
    564
  12. jabautista

    jabautista New Member

    Joined:
    Jan 15, 2019
    Messages:
    5
    Likes Received:
    0
    Hello.
    There is an image of LibreELEC with CEC support on the udoo x86 website. Does anyone know the parameters or files that must be modified to compile LibreELEC with CEC support?
    Thanks for your help.
    Best regards.
     

Share This Page