[linuxtv-commits] [hg:v4l-dvb] Adds support for Genius TVGo A11MCE

Patch from Adrian Pardini hg-commit at linuxtv.org
Mon Feb 11 13:45:02 CET 2008


The patch number 7192 was added via Mauro Carvalho Chehab <mchehab at infradead.org>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches at this development tree might be modified to keep backward
compatibility with older kernels. Those compatibility stuff will be removed
during preparation to be included at kernel mainstream.

If anyone has any objections, please let us know by sending a message to:
	v4l-dvb-maintainer at linuxtv.org

------

From: Adrian Pardini  <pardo.bsso at gmail.com>
Adds support for Genius TVGo A11MCE




Signed-off-by: Adrian Pardini <pardo.bsso at gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab at infradead.org>


---

 linux/Documentation/video4linux/CARDLIST.saa7134  |    1 
 linux/drivers/media/common/ir-keymaps.c           |   46 ++++++++++++++
 linux/drivers/media/video/saa7134/saa7134-cards.c |   39 +++++++++++
 linux/drivers/media/video/saa7134/saa7134-input.c |    6 +
 linux/drivers/media/video/saa7134/saa7134.h       |    1 
 linux/include/media/ir-common.h                   |    1 
 6 files changed, 94 insertions(+)

diff -r 074d89c2ffa1 -r b6e3eee46ca2 linux/Documentation/video4linux/CARDLIST.saa7134
--- a/linux/Documentation/video4linux/CARDLIST.saa7134	Mon Feb 11 10:25:30 2008 -0200
+++ b/linux/Documentation/video4linux/CARDLIST.saa7134	Mon Feb 11 10:40:53 2008 -0200
@@ -130,3 +130,4 @@ 129 -> Beholder BeholdTV 607 / BeholdTV 
 129 -> Beholder BeholdTV 607 / BeholdTV 609     [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093]
 130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193]
 131 -> Twinhan Hybrid DTV-DVB 3056 PCI          [1822:0022]
+132 -> Genius TVGO AM11MCE
diff -r 074d89c2ffa1 -r b6e3eee46ca2 linux/drivers/media/common/ir-keymaps.c
--- a/linux/drivers/media/common/ir-keymaps.c	Mon Feb 11 10:25:30 2008 -0200
+++ b/linux/drivers/media/common/ir-keymaps.c	Mon Feb 11 10:40:53 2008 -0200
@@ -2037,3 +2037,49 @@ IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB
 };
 
 EXPORT_SYMBOL_GPL(ir_codes_behold);
+
+/*
+ * Remote control for the Genius TVGO A11MCE
+ * Adrian Pardini <pardo.bsso at gmail.com>
+ */
+IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE] = {
+	/* Keys 0 to 9 */
+	[0x48] = KEY_0,
+	[0x09] = KEY_1,
+	[0x1d] = KEY_2,
+	[0x1f] = KEY_3,
+	[0x19] = KEY_4,
+	[0x1b] = KEY_5,
+	[0x11] = KEY_6,
+	[0x17] = KEY_7,
+	[0x12] = KEY_8,
+	[0x16] = KEY_9,
+
+	[0x54] = KEY_RECORD,		/* recording */
+	[0x06] = KEY_MUTE,		/* mute */
+	[0x10] = KEY_POWER,
+	[0x40] = KEY_LAST,		/* recall */
+	[0x4c] = KEY_CHANNELUP,		/* channel / program + */
+	[0x00] = KEY_CHANNELDOWN,	/* channel / program - */
+	[0x0d] = KEY_VOLUMEUP,
+	[0x15] = KEY_VOLUMEDOWN,
+	[0x4d] = KEY_OK,		/* also labeled as Pause */
+	[0x1c] = KEY_ZOOM,		/* full screen and Stop*/
+	[0x02] = KEY_MODE,		/* AV Source or Rewind*/
+	[0x04] = KEY_LIST,		/* -/-- */
+	/* small arrows above numbers */
+	[0x1a] = KEY_NEXT,		/* also Fast Forward */
+	[0x0e] = KEY_PREVIOUS,	/* also Rewind */
+	/* these are in a rather non standard layout and have
+	an alternate name written */
+	[0x1e] = KEY_UP,		/* Video Setting */
+	[0x0a] = KEY_DOWN,		/* Video Default */
+	[0x05] = KEY_LEFT,		/* Snapshot */
+	[0x0c] = KEY_RIGHT,		/* Hide Panel */
+	/* Four buttons without label */
+	[0x49] = KEY_RED,
+	[0x0b] = KEY_GREEN,
+	[0x13] = KEY_YELLOW,
+	[0x50] = KEY_BLUE,
+};
+EXPORT_SYMBOL_GPL(ir_codes_genius_tvgo_a11mce);
diff -r 074d89c2ffa1 -r b6e3eee46ca2 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Mon Feb 11 10:25:30 2008 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Mon Feb 11 10:40:53 2008 -0200
@@ -3990,6 +3990,44 @@ struct saa7134_board saa7134_boards[] = 
 			.name   = name_radio,
 			.amux   = TV,
 			.gpio   = 0x0200000,
+		},
+	},
+	[SAA7134_BOARD_GENIUS_TVGO_A11MCE] = {
+		/* Adrian Pardini <pardo.bsso at gmail.com> */
+		.name		= "Genius TVGO AM11MCE",
+		.audio_clock	= 0x00200000,
+		.tuner_type	= TUNER_TNF_5335MF,
+		.radio_type     = UNSET,
+		.tuner_addr	= ADDR_UNSET,
+		.radio_addr	= ADDR_UNSET,
+		.gpiomask       = 0xf000,
+		.inputs         = {{
+			.name = name_tv_mono,
+			.vmux = 1,
+			.amux = LINE2,
+			.gpio = 0x0000,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 3,
+			.amux = LINE1,
+			.gpio = 0x2000,
+			.tv = 1
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+			.gpio = 0x2000,
+	} },
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+			.gpio = 0x1000,
+		},
+		.mute = {
+			.name = name_mute,
+			.amux = LINE2,
+			.gpio = 0x6000,
 		},
 	},
 };
@@ -5130,6 +5168,7 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_BEHOLD_409:
 	case SAA7134_BOARD_BEHOLD_505FM:
 	case SAA7134_BOARD_BEHOLD_507_9FM:
+	case SAA7134_BOARD_GENIUS_TVGO_A11MCE:
 		dev->has_remote = SAA7134_REMOTE_GPIO;
 		break;
 	case SAA7134_BOARD_FLYDVBS_LR300:
diff -r 074d89c2ffa1 -r b6e3eee46ca2 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Feb 11 10:25:30 2008 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Feb 11 10:40:53 2008 -0200
@@ -406,6 +406,12 @@ int saa7134_input_init1(struct saa7134_d
 		mask_keyup   = 0x8000000;
 		polling      = 50; //ms
 		break;
+	case SAA7134_BOARD_GENIUS_TVGO_A11MCE:
+		ir_codes     = ir_codes_genius_tvgo_a11mce;
+		mask_keycode = 0xff;
+		mask_keydown = 0xf00000;
+		polling = 50; /* ms */
+		break;
 	}
 	if (NULL == ir_codes) {
 		printk("%s: Oops: IR config error [card=%d]\n",
diff -r 074d89c2ffa1 -r b6e3eee46ca2 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Mon Feb 11 10:25:30 2008 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Mon Feb 11 10:40:53 2008 -0200
@@ -260,6 +260,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_BEHOLD_607_9FM	129
 #define SAA7134_BOARD_BEHOLD_M6		130
 #define SAA7134_BOARD_TWINHAN_DTV_DVB_3056 131
+#define SAA7134_BOARD_GENIUS_TVGO_A11MCE 132
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
diff -r 074d89c2ffa1 -r b6e3eee46ca2 linux/include/media/ir-common.h
--- a/linux/include/media/ir-common.h	Mon Feb 11 10:25:30 2008 -0200
+++ b/linux/include/media/ir-common.h	Mon Feb 11 10:40:53 2008 -0200
@@ -142,6 +142,7 @@ extern IR_KEYTAB_TYPE ir_codes_fusionhdt
 extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE];
 
 #endif
 



More information about the linuxtv-commits mailing list