Skip to contentSkip to conversation

Key filter for BeholdTV cards.

PATCH New Dmitri Belimov 1 participant 1 message Sep 7, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Key filter for BeholdTV cards.

Hi All.

When fast push-pull button of remote control we can received incorrect key code 0x00. Key information from IR decoder has ID of remote control 2 bytes, byte of key code and byte of mirror key code.
Correct data
0x86 0x6B 0x00 0xFF

Wrong data
0x86 0x6B 0x00 0x00

This patch added additional test of mirror byte for filtering.

linux/drivers/media/video/saa7134/saa7134-input.c +4 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-input.c
@@ -286,6 +286,10 @@
 	 * So, skip not our, if disable full codes mode.
 	 */
 	if (data[10] != 0x6b && data[11] != 0x86 && disable_other_ir)
+		return 0;
+
+	/* Wrong data decode fix */
+	if (data[9] != (unsigned char)(~data[8]))
 		return 0;
 
 	*ir_key = data[9];

With my best regards, Dmitry.

linux/drivers/media/video/saa7134/saa7134-input.c +4 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-input.c
@@ -286,6 +286,10 @@
 	 * So, skip not our, if disable full codes mode.
 	 */
 	if (data[10] != 0x6b && data[11] != 0x86 && disable_other_ir)
+		return 0;
+
+	/* Wrong data decode fix */
+	if (data[9] != (unsigned char)(~data[8]))
 		return 0;
 
 	*ir_key = data[9];