Skip to contentSkip to conversation

Add Beholder TV H6 support - hybrid card

PATCH Igor Kuznetsov 2 participants 3 messages Apr 25, 2008 – Apr 26, 2008 3 messages not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 9060000000132672546

#2 lore raw
linux/Documentation/video4linux/CARDLIST.saa7134 +13 -0
diff -r bba8d9fd6196 linux/Documentation/video4linux/CARDLIST.saa7134
@@ -116,3 +116,16 @@ 115 -> Sabrent PCMCIA TV-PCB05          
 115 -> Sabrent PCMCIA TV-PCB05                  [0919:2003]
 116 -> 10MOONS TM300 TV Card                    [1131:2304]
 117 -> Avermedia Super 007                      [1461:f01d]
+121 -> Beholder BeholdTV 401                    [1131:0000,0000:4016]
+122 -> Beholder BeholdTV 403                    [0000:4036]
+123 -> Beholder BeholdTV 403 FM                 [1131:0000,0000:4037]
+125 -> Beholder BeholdTV 405                    [0000:4050]
+126 -> Beholder BeholdTV 405 FM                 [0000:4051]
+127 ->                                          [0000:4070]
+128 -> Beholder BeholdTV 407 FM                 [0000:4071]
+129 -> Beholder BeholdTV 409                    [0000:4090]
+130 -> Beholder BeholdTV 505 FM/RDS             [0000:5051,0000:505B,5ace:5050]
+131 -> Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM [0000:5071,0000:507B,5ace:5070,5ace:5090]
+132 -> Beholder BeholdTV Columbus TVFM          [0000:5201]
+133 -> Beholder BeholdTV 607 / BeholdTV 609     [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093]
+134 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193]
linux/drivers/media/common/ir-keymaps.c +101 -0

104 lines not on this page · raw message

linux/drivers/media/video/ir-kbd-i2c.c +2 -1
diff -r bba8d9fd6196 linux/drivers/media/video/ir-kbd-i2c.c
@@ -415,6 +415,7 @@ static int ir_attach(struct i2c_adapter 
 	case 0x7a:
 	case 0x47:
 	case 0x71:
+	case 0x2d:
 		if (adap->id == I2C_HW_B_CX2388x) {
 			/* Handled by cx88-input */
 			name        = "CX2388x remote";
@@ -525,7 +526,7 @@ static int ir_probe(struct i2c_adapter *
 	*/
 
 	static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
-	static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 };
+	static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, 0x2d, -1 };
 	static const int probe_em28XX[] = { 0x30, 0x47, -1 };
 	static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
 	static const int probe_cx23885[] = { 0x6b, -1 };
linux/drivers/media/video/saa7134/saa7134-cards.c +507 -0

537 lines not on this page · raw message

linux/drivers/media/video/saa7134/saa7134-i2c.c +2 -0
diff -r bba8d9fd6196 linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -350,6 +350,7 @@ static int attach_inform(struct i2c_clie
 		case 0x7a:
 		case 0x47:
 		case 0x71:
+		case 0x2d:
 		{
 			struct IR_i2c *ir = i2c_get_clientdata(client);
 			d1printk("%s i2c IR detected (%s).\n",
@@ -456,6 +457,7 @@ static char *i2c_devs[128] = {
 	[ 0xa0 >> 1 ] = "eeprom",
 	[ 0xc0 >> 1 ] = "tuner (analog)",
 	[ 0x86 >> 1 ] = "tda9887",
+	[ 0x5a >> 1 ] = "remote control",
 };
 
 static void do_i2c_scan(char *name, struct i2c_client *c)
linux/drivers/media/video/saa7134/saa7134-input.c +59 -0

83 lines not on this page · raw message

linux/drivers/media/video/saa7134/saa7134.h +13 -0
diff -r bba8d9fd6196 linux/drivers/media/video/saa7134/saa7134.h
@@ -247,6 +247,19 @@ struct saa7134_format {
 #define SAA7134_BOARD_SABRENT_TV_PCB05     115
 #define SAA7134_BOARD_10MOONSTVMASTER3     116
 #define SAA7134_BOARD_AVERMEDIA_SUPER_007  117
+#define SAA7134_BOARD_BEHOLD_401  121
+#define SAA7134_BOARD_BEHOLD_403  122
+#define SAA7134_BOARD_BEHOLD_403FM  123
+#define SAA7134_BOARD_BEHOLD_405  125
+#define SAA7134_BOARD_BEHOLD_405FM  126
+#define SAA7134_BOARD_BEHOLD_407  127
+#define SAA7134_BOARD_BEHOLD_407FM  128
+#define SAA7134_BOARD_BEHOLD_409  129
+#define SAA7134_BOARD_BEHOLD_505FM  130
+#define SAA7134_BOARD_BEHOLD_507_9FM  131
+#define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 132
+#define SAA7134_BOARD_BEHOLD_607_9FM  133
+#define SAA7134_BOARD_BEHOLD_M6 134
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
linux/include/media/ir-common.h +1 -0
diff -r bba8d9fd6196 linux/include/media/ir-common.h
@@ -141,6 +141,7 @@ extern IR_KEYTAB_TYPE ir_codes_encore_en
 extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
 extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE];
 
 #endif
linux/drivers/media/video/saa7134/saa7134-i2c.c +2 -0
diff -r 59987f33c150 linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -140,6 +140,8 @@ static inline int i2c_is_busy(enum i2c_s
 {
 	switch (status) {
 	case BUSY:
+	case TO_SCL:
+	case TO_ARB:
 		return true;
 	default:
 		return false;
linux/drivers/media/video/saa7134/saa7134-cards.c +24 -4
diff -r 59987f33c150 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1049,7 +1049,7 @@ struct saa7134_board saa7134_boards[] = 
 	},
 	[SAA7134_BOARD_MANLI_MTV002] = {
 		/* Ognjen Nastic <[email protected]> */
-		.name           = "Manli MuchTV M-TV002/Behold TV 403 FM",
+		.name           = "Manli MuchTV M-TV002",
 		.audio_clock    = 0x00200000,
 		.tuner_type     = TUNER_PHILIPS_PAL,
 		.radio_type     = UNSET,
@@ -1076,7 +1076,7 @@ struct saa7134_board saa7134_boards[] = 
 	},
 	[SAA7134_BOARD_MANLI_MTV001] = {
 		/* Ognjen Nastic <[email protected]> UNTESTED */
-		.name           = "Manli MuchTV M-TV001/Behold TV 401",
+		.name           = "Manli MuchTV M-TV001",
 		.audio_clock    = 0x00200000,
 		.tuner_type     = TUNER_PHILIPS_PAL,
 		.radio_type     = UNSET,
@@ -2198,6 +2198,7 @@ struct saa7134_board saa7134_boards[] = 
 	},
 	[SAA7134_BOARD_BEHOLD_409FM] = {
 		/* <http://tuner.beholder.ru>, Sergey <[email protected]> */
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 409 FM",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -2205,6 +2206,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			  .name = name_tv,
 			  .vmux = 3,
@@ -3615,12 +3617,14 @@ struct saa7134_board saa7134_boards[] = 
 		}},
 	},
 	[SAA7134_BOARD_BEHOLD_401] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 401",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FQ1216ME,
 		.radio_type     = UNSET,
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3641,12 +3645,14 @@ struct saa7134_board saa7134_boards[] = 
 		},
 	},
 	[SAA7134_BOARD_BEHOLD_403] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 403",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FQ1216ME,
 		.radio_type     = UNSET,
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3663,12 +3669,14 @@ struct saa7134_board saa7134_boards[] = 
 		}},
 	},
 	[SAA7134_BOARD_BEHOLD_403FM] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 403 FM",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FQ1216ME,
 		.radio_type     = UNSET,
 		.tuner_addr	= ADDR_UNSET,
 		.radio_addr	= ADDR_UNSET,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3689,6 +3697,7 @@ struct saa7134_board saa7134_boards[] = 
 		},
 	},
 	[SAA7134_BOARD_BEHOLD_405] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 405",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -3696,6 +3705,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3713,6 +3723,7 @@ struct saa7134_board saa7134_boards[] = 
 	},
 	[SAA7134_BOARD_BEHOLD_405FM] = {
 		/* Sergey <[email protected]> */
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 405 FM",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -3720,6 +3731,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3740,6 +3752,7 @@ struct saa7134_board saa7134_boards[] = 
 		},
 	},
 	[SAA7134_BOARD_BEHOLD_407] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name 		= "Beholder BeholdTV 407",
 		.audio_clock 	= 0x00187de7,
 		.tuner_type 	= TUNER_PHILIPS_FM1216ME_MK3,
@@ -3747,7 +3760,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr 	= ADDR_UNSET,
 		.radio_addr 	= ADDR_UNSET,
 		.tda9887_conf 	= TDA9887_PRESENT,
-		.gpiomask = 0xc0c000,
+		.gpiomask       = 0x00008000,
 		.inputs = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3767,6 +3780,7 @@ struct saa7134_board saa7134_boards[] = 
 		}},
 	},
 	[SAA7134_BOARD_BEHOLD_407FM] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name 		= "Beholder BeholdTV 407 FM",
 		.audio_clock 	= 0x00187de7,
 		.tuner_type 	= TUNER_PHILIPS_FM1216ME_MK3,
@@ -3774,7 +3788,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr 	= ADDR_UNSET,
 		.radio_addr 	= ADDR_UNSET,
 		.tda9887_conf 	= TDA9887_PRESENT,
-		.gpiomask = 0xc0c000,
+		.gpiomask       = 0x00008000,
 		.inputs = {{
 			.name = name_svideo,
 			.vmux = 8,
@@ -3799,6 +3813,7 @@ struct saa7134_board saa7134_boards[] = 
 		},
 	},
 	[SAA7134_BOARD_BEHOLD_409] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 409",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -3806,6 +3821,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 3,
@@ -3822,6 +3838,7 @@ struct saa7134_board saa7134_boards[] = 
 		}},
 	},
 	[SAA7134_BOARD_BEHOLD_505FM] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 505 FM/RDS",
 		.audio_clock    = 0x00200000,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -3829,6 +3846,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 3,
@@ -3853,6 +3871,7 @@ struct saa7134_board saa7134_boards[] = 
 		},
 	},
 	[SAA7134_BOARD_BEHOLD_507_9FM] = {
+		/* Beholder Intl. Ltd. 2008 Dmitry Belimov <[email protected]> */
 		.name           = "Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -3860,6 +3879,7 @@ struct saa7134_board saa7134_boards[] = 
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
+		.gpiomask       = 0x00008000,
 		.inputs         = {{
 			.name = name_tv,
 			.vmux = 3,

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

#3 lore raw

Hi Igor,

Quoted 10 lines · On Fri, 25 Apr 2008 12:39:40 +0400 Igor Kuznetsov <[email protected]> wrote:

Beholder TV H6 - hybrid card

Add support - analog tv, radio, remote control

--
Igor Kuznetsov "IgK"
Web: www.igk.ru
Email: [email protected], [email protected]
ICQ: 6651879

Thanks for the patch.

Sorry, but your patch failed to apply against the devel tree:

$ patch -p1 -i /tmp/v4l2-beholder-2.6.24-hg.patch
patching file linux/Documentation/video4linux/CARDLIST.saa7134
Hunk #1 FAILED at 116.
1 out of 1 hunk FAILED -- saving rejects to file linux/Documentation/video4linux/CARDLIST.saa7134.rej
patching file linux/drivers/media/common/ir-keymaps.c
Hunk #1 FAILED at 1893.
1 out of 1 hunk FAILED -- saving rejects to file linux/drivers/media/common/ir-keymaps.c.rej
patching file linux/drivers/media/video/ir-kbd-i2c.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file linux/drivers/media/video/ir-kbd-i2c.c.rej
patching file linux/drivers/media/video/saa7134/saa7134-cards.c
Hunk #1 succeeded at 4290 with fuzz 2 (offset 701 lines).
Hunk #2 succeeded at 5410 with fuzz 2 (offset 767 lines).
Hunk #3 FAILED at 5728.
Hunk #4 FAILED at 5777.
Hunk #5 FAILED at 5799.
3 out of 5 hunks FAILED -- saving rejects to file linux/drivers/media/video/saa7134/saa7134-cards.c.rej
patching file linux/drivers/media/video/saa7134/saa7134-i2c.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file linux/drivers/media/video/saa7134/saa7134-i2c.c.rej
patching file linux/drivers/media/video/saa7134/saa7134-input.c
Hunk #1 succeeded at 57 with fuzz 2 (offset 13 lines).
Hunk #2 succeeded at 160 (offset 20 lines).
Hunk #3 FAILED at 335.
Hunk #4 succeeded at 591 with fuzz 2 (offset 91 lines).
1 out of 4 hunks FAILED -- saving rejects to file linux/drivers/media/video/saa7134/saa7134-input.c.rej
patching file linux/drivers/media/video/saa7134/saa7134.h
Hunk #1 FAILED at 247.
1 out of 1 hunk FAILED -- saving rejects to file linux/drivers/media/video/saa7134/saa7134.h.rej
patching file linux/include/media/ir-common.h
patch: **** malformed patch at line 836: diff -r 59987f33c150 linux/drivers/media/video/saa7134/saa7134-i2c.c

Could you please re-generate it?

Ah, there were some recent Beholder driver additions, with the support of the manufacturer. Maybe you could try first if your board is already supported on the latest version.

Cheers,
Mauro

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: Add Beholder TV H6 support - hybrid card - correct and tested patch

Quoted 8 lines · On Sat, 26 Apr 2008 02:02:30 +0400 Igor Kuznetsov <[email protected]> wrote:

Hi, Mauro

Sorry for the mistake with the previous patch. I sent you a file is not correct - the old file with all the changes. :-))

Now send the correct and tested with the patch file for Beholder H6 (hybrid) - v4l2-beholder-h6-analog-1.patch

Secondly, send a patch file to add a new release Beholder M6 (3) - v4l2-beholder-m6-rev3.patch

Hi Igor,

Thanks for the patches.

Please, before sending a patch, check it with checkpatch.pl. The easiest way for doing this with V4L/DVB tree is just to run "make checkpatch".

Since the issues were very trivial on your patch, I've fixed and applied.

Also, instead of sending a email with two patches inside, plus one comment, you should send one patch by email. Something like:

email 1:
Subject: [PATCH 0/2] Add Beholder TV H6 support

email 2:

Subject: [PATCH 1/2] <some patch quick description>

email 3:
Subject: [PATCH 1/2] <another patch quick description>

the patch quick descriptions should be something like:

saa7134: add another PCI ID for Beholder M6

Inside the body of the email, if needed, you'll add a longer description of the patch, plus your signed-off-by. The patch should be the latest thing at the email.

If you use a different procedure, you risk of me asking you to re-do ;)

There's an interesting reference about a perfect patch, submitted via email, at:
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt

Also: please, don't forget to copy V4L ML for patches on saa7134. This allows more people to review.

Cheers,
Mauro

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