Skip to contentSkip to conversation

TV Anywhere remote

PATCH New Brian Rogers 1 participant 1 message Jul 14, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 TV Anywhere remote

This is an update to the older patch by Henry Wong and Mark Schultz to make the remote work on the TV@nywhere Plus.

Aside from getting this working on a modern kernel, I also moved the special-case probing code for this card outside the probing loop in ir_probe to the end of the routine, since it seemed cleaner that way. The one possible remaining issue I see is the use of the global variable polling_interval, which gets set to a shorter value when this IR chip is detected. It should be harmless, but it seems a bit iffy, style-wise.

drivers/media/common/ir-keymaps.c +92 -1
index 8fa91f8..b15583f 100644
@@ -467,7 +467,8 @@ EXPORT_SYMBOL_GPL(ir_codes_adstech_dvb_t_pci);
 
 /* ---------------------------------------------------------------------- */
 
-/* MSI TV@nywhere remote */
+/* MSI TV@nywhere MASTER remote */
+
 IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE] = {
 	/* Keys 0 to 9 */
 	[ 0x00 ] = KEY_0,
@@ -501,6 +502,96 @@ EXPORT_SYMBOL_GPL(ir_codes_msi_tvanywhere);
 
 /* ---------------------------------------------------------------------- */
 
+/*
+  Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
+  is marked "KS003". The controller is I2C at address 0x30, but does not seem
+  to respond to probes until a read is performed from a valid device.
+  I don't know why...
+
+  Note: This remote may be of similar or identical design to the
+  Pixelview remote (?).  The raw codes and duplicate button codes
+  appear to be the same.
+
+  Henry Wong <[email protected]>
+  Some changes to formatting and keycodes by Mark Schultz <[email protected]>
+
+*/
+
+IR_KEYTAB_TYPE ir_codes_msi_tvanywhere_plus[IR_KEYTAB_SIZE] = {
+
+/*  ---- Remote Button Layout ----
+
+    POWER   SOURCE  SCAN    MUTE
+    TV/FM   1       2       3
+    |>      4       5       6
+    <|      7       8       9
+    ^^UP    0       +       RECALL
+    vvDN    RECORD  STOP    PLAY
+
+        MINIMIZE          ZOOM
+
+                  CH+
+      VOL-                   VOL+
+                  CH-
+
+        SNAPSHOT           MTS
+
+     <<      FUNC    >>     RESET
+*/
+
+	[ 0x01 ] = KEY_KP1,             /* 1 */
+	[ 0x0B ] = KEY_KP2,             /* 2 */
+	[ 0x1B ] = KEY_KP3,             /* 3 */
+	[ 0x05 ] = KEY_KP4,             /* 4 */
+	[ 0x09 ] = KEY_KP5,             /* 5 */
+	[ 0x15 ] = KEY_KP6,             /* 6 */
+	[ 0x06 ] = KEY_KP7,             /* 7 */
+	[ 0x0A ] = KEY_KP8,             /* 8 */
+	[ 0x12 ] = KEY_KP9,             /* 9 */
+	[ 0x02 ] = KEY_KP0,             /* 0 */
+	[ 0x10 ] = KEY_KPPLUS,          /* + */
+	[ 0x13 ] = KEY_AGAIN,           /* Recall */
+
+	[ 0x1E ] = KEY_POWER,           /* Power */
+	[ 0x07 ] = KEY_TUNER,           /* Source */
+	[ 0x1C ] = KEY_SEARCH,          /* Scan */
+	[ 0x18 ] = KEY_MUTE,            /* Mute */
+
+	[ 0x03 ] = KEY_RADIO,           /* TV/FM */
+	/* The next four keys are duplicates that appear to send the
+	   same IR code as Ch+, Ch-, >>, and << .  The raw code assigned
+	   to them is the actual code + 0x20 - they will never be
+	   detected as such unless some way is discovered to distinguish
+	   these buttons from those that have the same code. */
+	[ 0x3F ] = KEY_RIGHT,           /* |> and Ch+ */
+	[ 0x37 ] = KEY_LEFT,            /* <| and Ch- */
+	[ 0x2C ] = KEY_UP,              /* ^^Up and >> */
+	[ 0x24 ] = KEY_DOWN,            /* vvDn and << */
+
+	[ 0x00 ] = KEY_RECORD,          /* Record */
+	[ 0x08 ] = KEY_STOP,            /* Stop */
+	[ 0x11 ] = KEY_PLAY,            /* Play */
+
+	[ 0x0F ] = KEY_CLOSE,           /* Minimize */
+	[ 0x19 ] = KEY_ZOOM,            /* Zoom */
+	[ 0x1A ] = KEY_SHUFFLE,         /* Snapshot */
+	[ 0x0D ] = KEY_LANGUAGE,        /* MTS */
+
+	[ 0x14 ] = KEY_VOLUMEDOWN,      /* Vol- */
+	[ 0x16 ] = KEY_VOLUMEUP,        /* Vol+ */
+	[ 0x17 ] = KEY_CHANNELDOWN,     /* Ch- */
+	[ 0x1F ] = KEY_CHANNELUP,       /* Ch+ */
+
+	[ 0x04 ] = KEY_REWIND,          /* << */
+	[ 0x0E ] = KEY_MENU,            /* Function */
+	[ 0x0C ] = KEY_FASTFORWARD,     /* >> */
+	[ 0x1D ] = KEY_RESTART,         /* Reset */
+};
+
+EXPORT_SYMBOL_GPL(ir_codes_msi_tvanywhere_plus);
+
+/* ---------------------------------------------------------------------- */
+
 /* Cinergy 1400 DVB-T */
 IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE] = {
 	[ 0x01 ] = KEY_POWER,
drivers/media/video/ir-kbd-i2c.c +40 -2

74 lines not on this page · raw message

drivers/media/video/saa7134/saa7134-cards.c +1 -0
index 2618cfa..eb524b3 100644
@@ -5598,6 +5598,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
 	case SAA7134_BOARD_PINNACLE_PCTV_110i:
 	case SAA7134_BOARD_PINNACLE_PCTV_310i:
 	case SAA7134_BOARD_UPMOST_PURPLE_TV:
+	case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS:
 	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
drivers/media/video/saa7134/saa7134-i2c.c +1 -0
index d8af386..cd9c46f 100644
@@ -335,6 +335,7 @@ static int attach_inform(struct i2c_client *client)
 		case 0x47:
 		case 0x71:
 		case 0x2d:
+		case 0x30:
 		{
 			struct IR_i2c *ir = i2c_get_clientdata(client);
 			d1printk("%s i2c IR detected (%s).\n",
drivers/media/video/saa7134/saa7134-input.c +51 -0

63 lines not on this page · raw message

include/media/ir-common.h +1 -0
index b8e8aa9..e70362b 100644
@@ -147,6 +147,7 @@ extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere_plus[IR_KEYTAB_SIZE];
 
 #endif
 

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list