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

lirc: redesign, fix #13761

Merged
merged 5 commits into from
Apr 15, 2018
Merged

lirc: redesign, fix #13761

merged 5 commits into from
Apr 15, 2018

Conversation

FernetMenta
Copy link
Contributor

Register will land in OptionalsReg

This drops sending command from Kodi to Lirc. I don't think this makes much sense.

#ifdef HAVE_INOTIFY
#include <sys/inotify.h>
#endif
#include "lirc_client.h"

This comment was marked as spam.

@lrusak
Copy link
Contributor

lrusak commented Apr 11, 2018

Can we register lirc in linux optionals now?

@MilhouseVH
Copy link
Contributor

LIRC is working on LibreELEC x86_64 (by which I mean that IR input is being received and processed by Kodi), but it looks like the LIRC system is being reloaded/initialised several times a second: http://ix.io/17xt

On LibreELEC RPi2, LIRC is not working - no inputs are received by Kodi: http://ix.io/17xs

@FernetMenta
Copy link
Contributor Author

@MilhouseVH this version has lirc only registered for X11. Testing until OptionslReg for Linux is merged (other PR). So no surprise that it's not working for PI.
But this log for X11 looks very strange. Looks like something creates one CLirc object after another.

@FernetMenta
Copy link
Contributor Author

Can we register lirc in linux optionals now?

@lrusak the other PR need to go in first.

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Apr 11, 2018
@jenkins4kodi
Copy link
Contributor

@FernetMenta this needs a rebase

@@ -45,6 +45,7 @@ class CProfilesManager;
class CTouchTranslator;
class IKeymapEnvironment;
class IWindowKeymap;
class CLirc;

This comment was marked as spam.

This comment was marked as spam.

@FernetMenta FernetMenta removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Apr 11, 2018
@FernetMenta
Copy link
Contributor Author

jenkins build this please

#include "threads/Thread.h"
#include "threads/Event.h"
#include "input/InputManager.h"

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

#ifdef HAVE_INOTIFY
#include <sys/inotify.h>
#endif
#include "Application.h"

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

if (!m_bInitialized || !m_used )
return;
int fd = -1;
struct lirc_config *config;

This comment was marked as spam.

{
fd = lirc_init("kodi", 0);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@@ -353,6 +361,7 @@ class CInputManager : public ISettingCallback,

std::vector<KODI::KEYBOARD::IKeyboardDriverHandler*> m_keyboardHandlers;
std::vector<KODI::MOUSE::IMouseDriverHandler*> m_mouseHandlers;
std::vector<std::unique_ptr<IInput>> m_inputs;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@Rechi
Copy link
Member

Rechi commented Apr 12, 2018

liblirc-dev build dependency should be added to the docs.

@garbear
Copy link
Member

garbear commented Apr 13, 2018

Copy link
Member

@garbear garbear left a comment

Choose a reason for hiding this comment

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

Good to go after squashing my squashme's into your commit.

@FernetMenta
Copy link
Contributor Author

now lirc is completely independent from InputManager

@FernetMenta
Copy link
Contributor Author

@popcornmix @MilhouseVH could you test this on pi please?
@pkerling not sure where you would like to register lirc on Wayland

@FernetMenta FernetMenta added the Type: Improvement non-breaking change which improves existing functionality label Apr 14, 2018
@lrusak
Copy link
Contributor

lrusak commented Apr 14, 2018

@FernetMenta thanks for doing the gbm lirc registration 👍

{
class CLircContainer;
CLircContainer* LircRegister();
void LircUnregister();

This comment was marked as spam.

This comment was marked as spam.

@yol
Copy link
Member

yol commented Apr 14, 2018

@FernetMenta Do you see a reason for not doing it like the other windowing systems?

I personally don't get why windowing has to deal with lirc at all, for me it's more of a platform thing.

@FernetMenta
Copy link
Contributor Author

Do you see a reason for not doing it like the other windowing systems?

nope but Wayland has a lot more members. should I add it to the end?

I personally don't get why windowing has to deal with lirc at all, for me it's more of a platform thing.

a headless system does not need a remote control like lirc.

@yol
Copy link
Member

yol commented Apr 14, 2018

nope but Wayland has a lot more members. should I add it to the end?

Don't think there's any similar members at the moment, so yes that would be alright.

a headless system does not need a remote control like lirc.

Of course, but that does not make lirc the responsibility of the win system :-) Win systems in Kodi already deal with way too much stuff.

@MilhouseVH
Copy link
Contributor

RPi is working now, thanks, but messages are split over two lines: http://ix.io/17Jq

For example:

09:19:47.849 T:1864364928   DEBUG: LIRC: - NEW 6c 0 KEY_DOWN devinput
                                             (KEY_DOWN)
09:19:47.854 T:1941860368   DEBUG: HandleKey: 167 (0xa7, obc88) pressed, action is Down

Is this intentional?

Not sure what the errors at the end are about, probably something to do with #13754 - will report it there.

X86_64 still has the LIRC restart issue: http://ix.io/17Ju

@MilhouseVH
Copy link
Contributor

I restarted kodi (systemctl stop kodi, waited 5-10 seconds, systemctl start kodi) on x86_64 and it's stuck on the Kodi splash: http://ix.io/17Jx

eventlircd is stuck at 100% CPU:

image

Rebooting will allow Kodi to start successfully. This seems to be reproducible.

@FernetMenta
Copy link
Contributor Author

jenkins build this please

@@ -98,10 +98,6 @@ void CAppParamParser::DisplayHelp()
printf("\t\t\tenables network settings.\n");
printf(" -p or --portable\t%s will look for configurations in install folder instead of ~/.%s\n", CSysInfo::GetAppName().c_str(), lcAppName.c_str());
printf(" --legacy-res\t\tEnables screen resolutions such as PAL, NTSC, etc.\n");
#ifdef HAS_LIRC
printf(" -l or --lircdev\tLircDevice to use default is " LIRC_DEVICE " .\n");

This comment was marked as spam.

@FernetMenta
Copy link
Contributor Author

jenkins build this please

@FernetMenta
Copy link
Contributor Author

build error (test suite) not related

@FernetMenta FernetMenta merged commit 50f98ab into xbmc:master Apr 15, 2018
@Rechi Rechi added this to the Leia 18.0-alpha2 milestone Apr 15, 2018
@gelotus
Copy link
Contributor

gelotus commented Apr 20, 2018

No love for aml?

@fritsch
Copy link
Member

fritsch commented Apr 21, 2018

@gelotus why not PR this minimal piece of code needed? Like: https://pastebin.com/dMikf9z1

gelotus added a commit to gelotus/xbmc that referenced this pull request Apr 21, 2018
gelotus added a commit to gelotus/xbmc that referenced this pull request Apr 21, 2018
FernetMenta added a commit that referenced this pull request Apr 21, 2018
gelotus added a commit to gelotus/xbmc that referenced this pull request Apr 21, 2018
gelotus added a commit to gelotus/xbmc that referenced this pull request May 1, 2018
FernetMenta added a commit that referenced this pull request May 1, 2018
DaVukovic pushed a commit to DaVukovic/xbmc that referenced this pull request Jun 5, 2018
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Oct 11, 2018
app-misc/inputlircd is no longer necessary,
  see xbmc/xbmc#13761
app-pda/libplist does not require the "python" use flag

Signed-off-by: Craig Andrews <candrews@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants