All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home
@ 2017-05-04 22:21 Thomas Hollstegge
  2017-05-05  0:06 ` Markus Rechberger
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Hollstegge @ 2017-05-04 22:21 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

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

Signed-off-by: Thomas Hollstegge <thomas.hollstegge@gmail.com>
---
 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(+)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 5f90d08..4effbda 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -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);
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 82edd37..e7fa25d 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -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,
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index e9f3799..72f1468 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home
  2017-05-04 22:21 [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home Thomas Hollstegge
@ 2017-05-05  0:06 ` Markus Rechberger
  2017-05-05 15:44   ` Thomas Hollstegge
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Rechberger @ 2017-05-05  0:06 UTC (permalink / raw)
  To: Thomas Hollstegge; +Cc: Mauro Carvalho Chehab, Linux Media Mailing List

On Fri, May 5, 2017 at 6:21 AM, Thomas Hollstegge
<thomas.hollstegge@gmail.com> wrote:
> 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

> Signed-off-by: Thomas Hollstegge <thomas.hollstegge@gmail.com>
> ---
>  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(+)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index 5f90d08..4effbda 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -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);
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index 82edd37..e7fa25d 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -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,
> diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
> index e9f3799..72f1468 100644
> --- a/drivers/media/usb/em28xx/em28xx.h
> +++ b/drivers/media/usb/em28xx/em28xx.h
> @@ -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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home
  2017-05-05  0:06 ` Markus Rechberger
@ 2017-05-05 15:44   ` Thomas Hollstegge
  2017-05-05 16:33     ` Markus Rechberger
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Hollstegge @ 2017-05-05 15:44 UTC (permalink / raw)
  To: Markus Rechberger; +Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Hi Markus,

Markus Rechberger <mrechberger@gmail.com> schrieb am Fri, 05. May 08:06:
> On Fri, May 5, 2017 at 6:21 AM, Thomas Hollstegge
> <thomas.hollstegge@gmail.com> wrote:
> > 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.

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?

> 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.

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home
  2017-05-05 15:44   ` Thomas Hollstegge
@ 2017-05-05 16:33     ` Markus Rechberger
  2017-05-05 19:50       ` Thomas Hollstegge
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Rechberger @ 2017-05-05 16:33 UTC (permalink / raw)
  To: Markus Rechberger, Mauro Carvalho Chehab, Linux Media Mailing List

On Fri, May 5, 2017 at 11:44 PM, Thomas Hollstegge
<thomas.hollstegge@gmail.com> wrote:
> Hi Markus,
>
> Markus Rechberger <mrechberger@gmail.com> schrieb am Fri, 05. May 08:06:
>> On Fri, May 5, 2017 at 6:21 AM, Thomas Hollstegge
>> <thomas.hollstegge@gmail.com> wrote:
>> > 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.
>
> 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).

>> 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.
>
>> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home
  2017-05-05 16:33     ` Markus Rechberger
@ 2017-05-05 19:50       ` Thomas Hollstegge
  2017-05-06  6:53         ` Markus Rechberger
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Hollstegge @ 2017-05-05 19:50 UTC (permalink / raw)
  To: Markus Rechberger; +Cc: Mauro Carvalho Chehab, Linux Media Mailing List

Hi Markus,

Markus Rechberger <mrechberger@gmail.com> schrieb am Sat, 06. May 00:33:
> 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?

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home
  2017-05-05 19:50       ` Thomas Hollstegge
@ 2017-05-06  6:53         ` Markus Rechberger
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Rechberger @ 2017-05-06  6:53 UTC (permalink / raw)
  To: Markus Rechberger, Mauro Carvalho Chehab, Linux Media Mailing List

On Sat, May 6, 2017 at 3:50 AM, Thomas Hollstegge
<thomas.hollstegge@gmail.com> wrote:
> Hi Markus,
>
> Markus Rechberger <mrechberger@gmail.com> schrieb am Sat, 06. May 00:33:
>> 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.


>> 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).

> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-06  6:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 22:21 [PATCH] [media] em28xx: support for Sundtek MediaTV Digital Home Thomas Hollstegge
2017-05-05  0:06 ` Markus Rechberger
2017-05-05 15:44   ` Thomas Hollstegge
2017-05-05 16:33     ` Markus Rechberger
2017-05-05 19:50       ` Thomas Hollstegge
2017-05-06  6:53         ` Markus Rechberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.