linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Eckhardt <uli-lirc@uli-eckhardt.de>
To: m.chehab@samsung.com
Cc: jarod@wilsonet.com, linux-media@vger.kernel.org
Subject: [PATCH][media] imon: infrared control stopped working in kernel 3.17
Date: Fri, 10 Oct 2014 18:27:32 +0200	[thread overview]
Message-ID: <543808F4.1010500@uli-eckhardt.de> (raw)

Hi,

with kernel 3.17 the imon remote control for device 15c2:0034 (built into the
Thermaltake DH102) does not work anymore, only the front panel buttons.

I digged through the changes made for imon.c and found the problem in
the following part of the commit 120703f9eb32033f0e39bdc552c0273c8ab45f33:

@@ -1579,7 +1579,10 @@ static void imon_incoming_packet(struct 
imon_context *ictx,
  		if (press_type == 0)
  			rc_keyup(ictx->rdev);
  		else {
-			rc_keydown(ictx->rdev, ictx->rc_scancode, ictx->rc_toggle);
+			if (ictx->rc_type == RC_BIT_RC6_MCE)
+				rc_keydown(ictx->rdev,
+					   ictx->rc_type == RC_BIT_RC6_MCE ? RC_TYPE_RC6_MCE : RC_TYPE_OTHER,
+					   ictx->rc_scancode, ictx->rc_toggle);
  			spin_lock_irqsave(&ictx->kc_lock, flags);
  			ictx->last_keycode = ictx->kc;
  			spin_unlock_irqrestore(&ictx->kc_lock, flags);

The if statement around rc_keydown handles only the RC6 protocol,
but the remote control is send via the RC_TYPE_OTHER protocol.

The following patch fixes this problem:

-----------------------------------------------------------------

With kernel 3.17 the imon remote control for device 15c2:0034 does not work anymore,
which uses the OTHER protocol. Only the front panel buttons which uses the RC6
protocol are working. This patch adds the missing comparison for the RC_BIT_OTHER.

Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de>

diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1579,7 +1579,8 @@
                if (press_type == 0)
                        rc_keyup(ictx->rdev);
                else {
-                       if (ictx->rc_type == RC_BIT_RC6_MCE)
+                       if (ictx->rc_type == RC_BIT_RC6_MCE ||
+                           ictx->rc_type == RC_BIT_OTHER)
                                rc_keydown(ictx->rdev,
                                           ictx->rc_type == RC_BIT_RC6_MCE ? RC_TYPE_RC6_MCE : RC_TYPE_OTHER,
                                           ictx->rc_scancode, ictx->rc_toggle);




------------------------------------------------------------------

Best Regards
Uli
-- 
Ulrich Eckhardt                  http://www.uli-eckhardt.de

Ein Blitzableiter auf dem Kirchturm ist das denkbar stärkste 
Misstrauensvotum gegen den lieben Gott. (Karl Krauss)

                 reply	other threads:[~2014-10-10 16:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543808F4.1010500@uli-eckhardt.de \
    --to=uli-lirc@uli-eckhardt.de \
    --cc=jarod@wilsonet.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).