Skip to contentSkip to conversation

em28xx: support for Sundtek MediaTV Digital Home

PATCH Superseded Thomas Hollstegge 2 participants 6 messages May 4, 2017 – May 6, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 em28xx: support for Sundtek MediaTV Digital Home

Sundtek MediaTV Digital Home is a rebranded MaxMedia UB425-TC with the following components:

USB bridge: Empia EM2874B
Demodulator: Micronas DRX 3913KA2
Tuner: NXP TDA18271HDC2

---
 drivers/media/usb/em28xx/em28xx-cards.c | 15 +++++++++++++++
 drivers/media/usb/em28xx/em28xx-dvb.c   |  1 +
 drivers/media/usb/em28xx/em28xx.h       |  1 +
 3 files changed, 17 insertions(+)
drivers/media/usb/em28xx/em28xx-cards.c +15 -0
index 5f90d08..4effbda 100644
@@ -415,6 +415,7 @@ static struct em28xx_reg_seq hauppauge_930c_digital[] = {
 
 /* 1b80:e425 MaxMedia UB425-TC
  * 1b80:e1cc Delock 61959
+ * eb1a:51b2 Sundtek MediaTV Digital Home
  * GPIO_6 - demod reset, 0=active
  * GPIO_7 - LED, 0=active
  */
@@ -2405,6 +2406,18 @@ struct em28xx_board em28xx_boards[] = {
 		.ir_codes      = RC_MAP_HAUPPAUGE,
 		.leds          = hauppauge_dualhd_leds,
 	},
+	/* eb1a:51b2 Sundtek MediaTV Digital Home
+	 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */
+	[EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME] = {
+		.name          = "Sundtek MediaTV Digital Home",
+		.tuner_type    = TUNER_ABSENT,
+		.tuner_gpio    = maxmedia_ub425_tc,
+		.has_dvb       = 1,
+		.ir_codes      = RC_MAP_REDDO,
+		.def_i2c_bus   = 1,
+		.i2c_speed     = EM28XX_I2C_CLK_WAIT_ENABLE |
+				EM28XX_I2C_FREQ_400_KHZ,
+	},
 };
 EXPORT_SYMBOL_GPL(em28xx_boards);
 
@@ -2600,6 +2613,8 @@ struct usb_device_id em28xx_id_table[] = {
 			.driver_info = EM28178_BOARD_TERRATEC_T2_STICK_HD },
 	{ USB_DEVICE(0x3275, 0x0085),
 			.driver_info = EM28178_BOARD_PLEX_PX_BCUD },
+	{ USB_DEVICE(0xeb1a, 0x51b2),
+			.driver_info = EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME },
 	{ },
 };
 MODULE_DEVICE_TABLE(usb, em28xx_id_table);
drivers/media/usb/em28xx/em28xx-dvb.c +1 -0
index 82edd37..e7fa25d 100644
@@ -1482,6 +1482,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
 		break;
 	}
 	case EM2874_BOARD_DELOCK_61959:
+	case EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME:
 	case EM2874_BOARD_MAXMEDIA_UB425_TC:
 		/* attach demodulator */
 		dvb->fe[0] = dvb_attach(drxk_attach, &maxmedia_ub425_tc_drxk,
drivers/media/usb/em28xx/em28xx.h +1 -0
index e9f3799..72f1468 100644
@@ -148,6 +148,7 @@
 #define EM28178_BOARD_PLEX_PX_BCUD                98
 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB  99
 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100
+#define EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME 101
 
 /* Limits minimum and default number of buffers */
 #define EM28XX_MIN_BUF 4
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · Thomas Hollstegge

Sundtek MediaTV Digital Home is a rebranded MaxMedia UB425-TC with the following components:

USB bridge: Empia EM2874B
Demodulator: Micronas DRX 3913KA2
Tuner: NXP TDA18271HDC2

Not that it matters a lot anymore for those units however the USB ID is allocated for multiple different units, this patch will break some of them.
If you want to use that use the unit with this driver you're on your own and have to assign it via sysfs and usb/bind.

It was a joint project many years ago before we also started to design and manufacture our own units.

Best Regards,
Markus Rechberger

Quoted 74 lines
---
 drivers/media/usb/em28xx/em28xx-cards.c | 15 +++++++++++++++
 drivers/media/usb/em28xx/em28xx-dvb.c   |  1 +
 drivers/media/usb/em28xx/em28xx.h       |  1 +
 3 files changed, 17 insertions(+)
drivers/media/usb/em28xx/em28xx-cards.c +15 -0
index 5f90d08..4effbda 100644
@@ -415,6 +415,7 @@ static struct em28xx_reg_seq hauppauge_930c_digital[] = {
 
 /* 1b80:e425 MaxMedia UB425-TC
  * 1b80:e1cc Delock 61959
+ * eb1a:51b2 Sundtek MediaTV Digital Home
  * GPIO_6 - demod reset, 0=active
  * GPIO_7 - LED, 0=active
  */
@@ -2405,6 +2406,18 @@ struct em28xx_board em28xx_boards[] = {
                .ir_codes      = RC_MAP_HAUPPAUGE,
                .leds          = hauppauge_dualhd_leds,
        },
+       /* eb1a:51b2 Sundtek MediaTV Digital Home
+        * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */
+       [EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME] = {
+               .name          = "Sundtek MediaTV Digital Home",
+               .tuner_type    = TUNER_ABSENT,
+               .tuner_gpio    = maxmedia_ub425_tc,
+               .has_dvb       = 1,
+               .ir_codes      = RC_MAP_REDDO,
+               .def_i2c_bus   = 1,
+               .i2c_speed     = EM28XX_I2C_CLK_WAIT_ENABLE |
+                               EM28XX_I2C_FREQ_400_KHZ,
+       },
 };
 EXPORT_SYMBOL_GPL(em28xx_boards);
 
@@ -2600,6 +2613,8 @@ struct usb_device_id em28xx_id_table[] = {
                        .driver_info = EM28178_BOARD_TERRATEC_T2_STICK_HD },
        { USB_DEVICE(0x3275, 0x0085),
                        .driver_info = EM28178_BOARD_PLEX_PX_BCUD },
+       { USB_DEVICE(0xeb1a, 0x51b2),
+                       .driver_info = EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME },
        { },
 };
 MODULE_DEVICE_TABLE(usb, em28xx_id_table);
drivers/media/usb/em28xx/em28xx-dvb.c +1 -0
index 82edd37..e7fa25d 100644
@@ -1482,6 +1482,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
                break;
        }
        case EM2874_BOARD_DELOCK_61959:
+       case EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME:
        case EM2874_BOARD_MAXMEDIA_UB425_TC:
                /* attach demodulator */
                dvb->fe[0] = dvb_attach(drxk_attach, &maxmedia_ub425_tc_drxk,
drivers/media/usb/em28xx/em28xx.h +1 -1
index e9f3799..72f1468 100644
@@ -148,6 +148,7 @@
 #define EM28178_BOARD_PLEX_PX_BCUD                98
 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB  99
 #define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100
+#define EM2874_BOARD_SUNDTEK_MEDIATV_DIGITAL_HOME 101
 
 /* Limits minimum and default number of buffers */
 #define EM28XX_MIN_BUF 4
--

2.7.4

#2 lore raw

Hi Markus,

Markus Rechberger <[email protected]> schrieb am Fri, 05. May 08:06:

Quoted 5 lines
Quoted 3 lines · Thomas Hollstegge

Sundtek MediaTV Digital Home is a rebranded MaxMedia UB425-TC with the following components:

Quoted 8 lines
Quoted 4 lines

USB bridge: Empia EM2874B
Demodulator: Micronas DRX 3913KA2
Tuner: NXP TDA18271HDC2

Not that it matters a lot anymore for those units however the USB ID is allocated for multiple different units, this patch will break some of them.

I searched the kernel sources for USB IDs but didn't find any mention. So what exactly will break with this commit? Is there a better way to detect different devices besides USB IDs?

Quoted 2 lines

If you want to use that use the unit with this driver you're on your own and have to assign it via sysfs and usb/bind.

I did, and it works fine. However, it would be nice if the driver supported the devices directly.

Quoted 2 lines

It was a joint project many years ago before we also started to design and manufacture our own units.

Interesting, thanks for sharing this insight!

Cheers
Thomas

#3 lore raw
Quoted 13 lines · Thomas Hollstegge

Hi Markus,

Markus Rechberger <[email protected]> schrieb am Fri, 05. May 08:06:

Quoted 10 lines
Quoted 7 lines · Thomas Hollstegge

Sundtek MediaTV Digital Home is a rebranded MaxMedia UB425-TC with the following components:

USB bridge: Empia EM2874B
Demodulator: Micronas DRX 3913KA2
Tuner: NXP TDA18271HDC2

Quoted 8 lines
Quoted 3 lines

Not that it matters a lot anymore for those units however the USB ID is allocated for multiple different units, this patch will break some of them.

I searched the kernel sources for USB IDs but didn't find any mention. So what exactly will break with this commit? Is there a better way to detect different devices besides USB IDs?

We had different HW designs based on Empia until 2012 using this USB ID it will not work with many units out there, also with different standby behaviours, chipsets etc.

If you want to get a device with kernel support I recommend buying a different one and let that one go back to our community (since our tuners and support are still quite popular).

Quoted 13 lines
Quoted 2 lines

If you want to use that use the unit with this driver you're on your own and have to assign it via sysfs and usb/bind.

I did, and it works fine. However, it would be nice if the driver supported the devices directly.

Quoted 2 lines

It was a joint project many years ago before we also started to design and manufacture our own units.

Interesting, thanks for sharing this insight!

Cheers
Thomas

#4 lore raw

Hi Markus,

Markus Rechberger <[email protected]> schrieb am Sat, 06. May 00:33:

Quoted 3 lines

We had different HW designs based on Empia until 2012 using this USB ID it will not work with many units out there, also with different standby behaviours, chipsets etc.

Well, after this patch there's one more device that works with an open-source driver, which I consider a good thing. What about open-sourcing support for the other devices you're talking about?

Quoted 3 lines

If you want to get a device with kernel support I recommend buying a different one and let that one go back to our community (since our tuners and support are still quite popular).

Thanks, but I'd rather stick with the device I have than spending more money to have a device that only works with a closed-source driver.

Anyway, I just saw that the patch doesn't apply cleanly against linux-media master. I'll submit a new version of the patch in a minute.

Cheers
Thomas

#5 lore raw
Quoted 11 lines · Thomas Hollstegge

Hi Markus,

Markus Rechberger <[email protected]> schrieb am Sat, 06. May 00:33:

Quoted 3 lines

We had different HW designs based on Empia until 2012 using this USB ID it will not work with many units out there, also with different standby behaviours, chipsets etc.

Well, after this patch there's one more device that works with an open-source driver, which I consider a good thing. What about open-sourcing support for the other devices you're talking about?

As mentioned you can use the sysfs approach for you.
Don't buy a device which you intend to use with unintended software afterwards. Your device is from 2010 as far as I see, you can ship the unit back for changing the USB ID for it so you can mess around with it and break it completely.
The USB ID in question is used for all kind of devices, even analog or radio only units which are very far from being supported by this crappy opensource driver which is able to crash the entire kernel. Our work is pretty much isolated.

You might match your unit also based on your serialnumber if you want to apply such a patch to the crappy opensource driver.

Quoted 7 lines
Quoted 3 lines

If you want to get a device with kernel support I recommend buying a different one and let that one go back to our community (since our tuners and support are still quite popular).

Thanks, but I'd rather stick with the device I have than spending more money to have a device that only works with a closed-source driver.

then sell it get a good price and buy another unit or ship it back for getting another USB ID (the EEPROM needs to be removed for rewriting it).

Quoted 6 lines

Anyway, I just saw that the patch doesn't apply cleanly against linux-media master. I'll submit a new version of the patch in a minute.

Cheers
Thomas