All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add support for KWorld UB435-Q V2
@ 2013-09-30  0:45 Jean-Francois Thibert
  2013-09-30  0:45 ` Jean-Francois Thibert
  2013-10-08 16:24 ` Frank Schäfer
  0 siblings, 2 replies; 5+ messages in thread
From: Jean-Francois Thibert @ 2013-09-30  0:45 UTC (permalink / raw)
  Cc: Jean-Francois Thibert, Linux Media Mailing List

This adds support for the UB435-Q V2. It seems that you might need to
use the device once with the official driver to reprogram the device
descriptors. Thanks to Jarod Wilson for the initial attempt at adding
support for this device.

Jean-Francois Thibert (1):
  Add support for KWorld UB435-Q V2

 drivers/media/usb/em28xx/em28xx-cards.c |   14 +++++++++++++-
 drivers/media/usb/em28xx/em28xx-dvb.c   |   27 +++++++++++++++++++++++++++
 drivers/media/usb/em28xx/em28xx.h       |    1 +
 3 files changed, 41 insertions(+), 1 deletions(-)

-- 
1.7.5.4


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

* [PATCH] Add support for KWorld UB435-Q V2
  2013-09-30  0:45 [PATCH] Add support for KWorld UB435-Q V2 Jean-Francois Thibert
@ 2013-09-30  0:45 ` Jean-Francois Thibert
  2013-10-08 16:24 ` Frank Schäfer
  1 sibling, 0 replies; 5+ messages in thread
From: Jean-Francois Thibert @ 2013-09-30  0:45 UTC (permalink / raw)
  Cc: Jean-Francois Thibert, Linux Media Mailing List

Signed-off-by: Jean-Francois Thibert <jfthibert@google.com>
---
 drivers/media/usb/em28xx/em28xx-cards.c |   14 +++++++++++++-
 drivers/media/usb/em28xx/em28xx-dvb.c   |   27 +++++++++++++++++++++++++++
 drivers/media/usb/em28xx/em28xx.h       |    1 +
 3 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index dc65742..a512909 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -174,7 +174,7 @@ static struct em28xx_reg_seq evga_indtube_digital[] = {
 };
 
 /*
- * KWorld PlusTV 340U and UB435-Q (ATSC) GPIOs map:
+ * KWorld PlusTV 340U, UB435-Q and UB435-Q V2 (ATSC) GPIOs map:
  * EM_GPIO_0 - currently unknown
  * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
  * EM_GPIO_2 - currently unknown
@@ -2030,6 +2030,16 @@ struct em28xx_board em28xx_boards[] = {
 		.i2c_speed     = EM28XX_I2C_CLK_WAIT_ENABLE |
 				EM28XX_I2C_FREQ_400_KHZ,
 	},
+	/* 1b80:e346 KWorld USB ATSC TV Stick UB435-Q V2
+	 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2 */
+	[EM2874_BOARD_KWORLD_UB435Q_V2] = {
+		.name       = "KWorld USB ATSC TV Stick UB435-Q V2",
+		.tuner_type = TUNER_ABSENT,
+		.has_dvb    = 1,
+		.dvb_gpio   = kworld_a340_digital,
+		.tuner_gpio = default_tuner_gpio,
+		.def_i2c_bus  = 1,
+	},
 };
 const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
 
@@ -2173,6 +2183,8 @@ struct usb_device_id em28xx_id_table[] = {
 			.driver_info = EM2860_BOARD_GADMEI_UTV330 },
 	{ USB_DEVICE(0x1b80, 0xa340),
 			.driver_info = EM2870_BOARD_KWORLD_A340 },
+	{ USB_DEVICE(0x1b80, 0xe346),
+			.driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 },
 	{ USB_DEVICE(0x2013, 0x024f),
 			.driver_info = EM28174_BOARD_PCTV_290E },
 	{ USB_DEVICE(0x2013, 0x024c),
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index bb1e8dc..547eea6 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -298,6 +298,18 @@ static struct lgdt3305_config em2870_lgdt3304_dev = {
 	.qam_if_khz         = 4000,
 };
 
+static struct lgdt3305_config em2874_lgdt3305_dev = {
+	.i2c_addr           = 0x0e,
+	.demod_chip         = LGDT3305,
+	.spectral_inversion = 1,
+	.deny_i2c_rptr      = 0,
+	.mpeg_mode          = LGDT3305_MPEG_SERIAL,
+	.tpclk_edge         = LGDT3305_TPCLK_FALLING_EDGE,
+	.tpvalid_polarity   = LGDT3305_TP_VALID_HIGH,
+	.vsb_if_khz         = 3250,
+	.qam_if_khz         = 4000,
+};
+
 static struct s921_config sharp_isdbt = {
 	.demod_address = 0x30 >> 1
 };
@@ -329,6 +341,12 @@ static struct tda18271_config kworld_a340_config = {
 	.std_map           = &kworld_a340_std_map,
 };
 
+static struct tda18271_config kworld_ub435q_v2_config = {
+	.std_map           = &kworld_a340_std_map,
+	.gate              = TDA18271_GATE_DIGITAL,
+};
+
+
 static struct zl10353_config em28xx_zl10353_xc3028_no_i2c_gate = {
 	.demod_address = (0x1e >> 1),
 	.no_tuner = 1,
@@ -1297,6 +1315,15 @@ static int em28xx_dvb_init(struct em28xx *dev)
 			goto out_free;
 		}
 		break;
+	case EM2874_BOARD_KWORLD_UB435Q_V2:
+		dvb->fe[0] = dvb_attach(lgdt3305_attach,
+					   &em2874_lgdt3305_dev,
+					   &dev->i2c_adap[dev->def_i2c_bus]);
+		if (dvb->fe[0] != NULL)
+			dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
+				   &dev->i2c_adap[dev->def_i2c_bus], &kworld_ub435q_v2_config);
+
+		break;
 	default:
 		em28xx_errdev("/2: The frontend of your DVB/ATSC card"
 				" isn't supported yet\n");
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index 205e903..6d988ad 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -131,6 +131,7 @@
 #define EM2884_BOARD_TERRATEC_HTC_USB_XS	  87
 #define EM2884_BOARD_C3TECH_DIGITAL_DUO		  88
 #define EM2874_BOARD_DELOCK_61959		  89
+#define EM2874_BOARD_KWORLD_UB435Q_V2		  90
 
 /* Limits minimum and default number of buffers */
 #define EM28XX_MIN_BUF 4
-- 
1.7.5.4


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

* Re: [PATCH] Add support for KWorld UB435-Q V2
  2013-09-30  0:45 [PATCH] Add support for KWorld UB435-Q V2 Jean-Francois Thibert
  2013-09-30  0:45 ` Jean-Francois Thibert
@ 2013-10-08 16:24 ` Frank Schäfer
  2013-10-09 13:48   ` Jean-Francois Thibert
  1 sibling, 1 reply; 5+ messages in thread
From: Frank Schäfer @ 2013-10-08 16:24 UTC (permalink / raw)
  To: Jean-Francois Thibert; +Cc: Linux Media Mailing List

Am 30.09.2013 02:45, schrieb Jean-Francois Thibert:
> This adds support for the UB435-Q V2. It seems that you might need to
> use the device once with the official driver to reprogram the device
> descriptors. Thanks to Jarod Wilson for the initial attempt at adding
> support for this device.
Could you please elaborate on this ?
What's the "official" driver and what changes after using it ?
Are these changes permanent ?

The commit message should be included in the patch and not be sent as a
separate message.
Can you fix the patch and resend it ?

Regards,
Frank Schäfer

> Jean-Francois Thibert (1):
>   Add support for KWorld UB435-Q V2
>
>  drivers/media/usb/em28xx/em28xx-cards.c |   14 +++++++++++++-
>  drivers/media/usb/em28xx/em28xx-dvb.c   |   27 +++++++++++++++++++++++++++
>  drivers/media/usb/em28xx/em28xx.h       |    1 +
>  3 files changed, 41 insertions(+), 1 deletions(-)
>


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

* Re: [PATCH] Add support for KWorld UB435-Q V2
  2013-10-08 16:24 ` Frank Schäfer
@ 2013-10-09 13:48   ` Jean-Francois Thibert
  2013-10-10 13:38     ` Frank Schäfer
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Francois Thibert @ 2013-10-09 13:48 UTC (permalink / raw)
  To: Frank Schäfer; +Cc: Linux Media Mailing List

On Tue, Oct 8, 2013 at 12:24 PM, Frank Schäfer
<fschaefer.oss@googlemail.com> wrote:
> > This adds support for the UB435-Q V2. It seems that you might need to
> > use the device once with the official driver to reprogram the device
> > descriptors. Thanks to Jarod Wilson for the initial attempt at adding
> > support for this device.
> Could you please elaborate on this ?
> What's the "official" driver and what changes after using it ?
> Are these changes permanent ?

>From what I understand the Windows driver provided by KWorld will reprogram
the eeprom so that the device descriptors are properly describing an Isochronous
endpoint instead of Bulk. This only needs to be done once since it is permanent.
I don't know if this is required since I don't have a device in the other state.

> The commit message should be included in the patch and not be sent as a
> separate message.
> Can you fix the patch and resend it ?

Sure, I will resend the patch with the message included.

Regards
Jean-Francois

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

* Re: [PATCH] Add support for KWorld UB435-Q V2
  2013-10-09 13:48   ` Jean-Francois Thibert
@ 2013-10-10 13:38     ` Frank Schäfer
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Schäfer @ 2013-10-10 13:38 UTC (permalink / raw)
  To: Jean-Francois Thibert; +Cc: Linux Media Mailing List

Am 09.10.2013 15:48, schrieb Jean-Francois Thibert:
> On Tue, Oct 8, 2013 at 12:24 PM, Frank Schäfer
> <fschaefer.oss@googlemail.com> wrote:
>>> This adds support for the UB435-Q V2. It seems that you might need to
>>> use the device once with the official driver to reprogram the device
>>> descriptors. Thanks to Jarod Wilson for the initial attempt at adding
>>> support for this device.
>> Could you please elaborate on this ?
>> What's the "official" driver and what changes after using it ?
>> Are these changes permanent ?
> From what I understand the Windows driver provided by KWorld will reprogram
> the eeprom so that the device descriptors are properly describing an Isochronous
> endpoint instead of Bulk. This only needs to be done once since it is permanent.
> I don't know if this is required since I don't have a device in the other state.
What do you mean with "properly describing an Isoc endpoint" ?
Did the Windows driver reprogram the device to provide an isoc instead
of a bulk video endpoint ?
Or did the device have no video endpoint and the bulk endpoint was used
for something different (likely device programming) ?
Any chance to get lsusb outputs ?

If you don't have a device in the other state and didn't test the bulk
endpoint's, how did you notice this issue ?

Regards,
Frank

>
>> The commit message should be included in the patch and not be sent as a
>> separate message.
>> Can you fix the patch and resend it ?
> Sure, I will resend the patch with the message included.
>
> Regards
> Jean-Francois


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

end of thread, other threads:[~2013-10-10 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-30  0:45 [PATCH] Add support for KWorld UB435-Q V2 Jean-Francois Thibert
2013-09-30  0:45 ` Jean-Francois Thibert
2013-10-08 16:24 ` Frank Schäfer
2013-10-09 13:48   ` Jean-Francois Thibert
2013-10-10 13:38     ` Frank Schäfer

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.