public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "André Weidemann" <Andre.Weidemann@web.de>
To: linux-dvb@linuxtv.org
Subject: [linux-dvb] [PATCH] reworked patch to support TT connect S-2400
Date: Mon, 11 Feb 2008 20:44:17 +0100	[thread overview]
Message-ID: <47B0A591.9030408@web.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

Hi all,
thanks to Patrick Boettcher I finally managed to get both, the Pinnacle 
400e and the TT connect S-2400 working on the same machine.

I attached a patch which should apply cleanly against current HG.
Please test the attached patch.
I extracted the necessary firmware file from the TT driver and put it 
here: http://ilpss8.dyndns.org/dvb-usb-tt-s2400-01.fw

Any comments on the patch are welcome.

Thank you.
  André

[-- Attachment #2: patch-TT_connect_S-2400.diff --]
[-- Type: text/x-patch, Size: 3440 bytes --]

diff -Nru v4l-dvb/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h v4l-dvb-patched-for-TT-connect-S2400/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
--- v4l-dvb/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	2008-02-11 20:30:06.370186430 +0100
+++ v4l-dvb-patched-for-TT-connect-S2400/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	2008-02-11 20:30:57.605106142 +0100
@@ -40,6 +40,7 @@
 #define USB_VID_MSI				0x0db0
 #define USB_VID_OPERA1				0x695c
 #define USB_VID_PINNACLE			0x2304
+#define USB_VID_TECHNOTREND			0x0b48
 #define USB_VID_TERRATEC			0x0ccd
 #define USB_VID_VISIONPLUS			0x13d3
 #define USB_VID_TWINHAN				0x1822
@@ -134,6 +135,7 @@
 #define USB_PID_AVERMEDIA_EXPRESS			0xb568
 #define USB_PID_AVERMEDIA_VOLAR				0xa807
 #define USB_PID_AVERMEDIA_VOLAR_2			0xb808
+#define USB_PID_TECHNOTREND_CONNECT_S2400               0x3006
 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY	0x005a
 #define USB_PID_PINNACLE_PCTV2000E			0x022c
 #define USB_PID_PINNACLE_PCTV_DVB_T_FLASH		0x0228
diff -Nru v4l-dvb/linux/drivers/media/dvb/dvb-usb/ttusb2.c v4l-dvb-patched-for-TT-connect-S2400/linux/drivers/media/dvb/dvb-usb/ttusb2.c
--- v4l-dvb/linux/drivers/media/dvb/dvb-usb/ttusb2.c	2008-02-11 20:30:06.382187114 +0100
+++ v4l-dvb-patched-for-TT-connect-S2400/linux/drivers/media/dvb/dvb-usb/ttusb2.c	2008-02-11 20:30:57.609106370 +0100
@@ -182,16 +182,26 @@
 
 /* DVB USB Driver stuff */
 static struct dvb_usb_device_properties ttusb2_properties;
+static struct dvb_usb_device_properties ttusb2_properties_s2400;
 
 static int ttusb2_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&ttusb2_properties,THIS_MODULE,NULL);
+        int ret=-ENOMEM;
+        if ((ret = dvb_usb_device_init(intf,&ttusb2_properties,THIS_MODULE,NULL)) == 0) {
+                return ret;
+        }
+        if ((ret = dvb_usb_device_init(intf,&ttusb2_properties_s2400,THIS_MODULE,NULL)) == 0) {
+                return ret;
+        }
+        return ret;
+
 }
 
 static struct usb_device_id ttusb2_table [] = {
 		{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_400E) },
 		{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PCTV_450E) },
+		{ USB_DEVICE(USB_VID_TECHNOTREND, USB_PID_TECHNOTREND_CONNECT_S2400) },
 		{}		/* Terminating entry */
 };
 MODULE_DEVICE_TABLE (usb, ttusb2_table);
@@ -248,6 +258,54 @@
 	}
 };
 
+static struct dvb_usb_device_properties ttusb2_properties_s2400 = {
+	.caps = DVB_USB_IS_AN_I2C_ADAPTER,
+
+	.usb_ctrl = CYPRESS_FX2,
+	.firmware = "dvb-usb-tt-s2400-01.fw",
+
+	.size_of_priv = sizeof(struct ttusb2_state),
+
+	.num_adapters = 1,
+	.adapter = {
+		{
+			.streaming_ctrl   = NULL, // ttusb2_streaming_ctrl,
+
+			.frontend_attach  = ttusb2_frontend_attach,
+			.tuner_attach     = ttusb2_tuner_attach,
+
+			/* parameter for the MPEG2-data transfer */
+			.stream = {
+				.type = USB_ISOC,
+				.count = 5,
+				.endpoint = 0x02,
+				.u = {
+					.isoc = {
+						.framesperurb = 4,
+						.framesize = 940,
+						.interval = 1,
+					}
+				}
+			}
+		}
+	},
+
+	.power_ctrl       = ttusb2_power_ctrl,
+	.identify_state   = ttusb2_identify_state,
+
+	.i2c_algo         = &ttusb2_i2c_algo,
+
+	.generic_bulk_ctrl_endpoint = 0x01,
+
+	.num_device_descs = 1,
+	.devices = {
+		{   "Technotrend TT-connect S-2400",
+			{ &ttusb2_table[2], NULL },
+			{ NULL },
+		},
+	}
+};
+
 static struct usb_driver ttusb2_driver = {
 	.name		= "dvb_usb_ttusb2",
 	.probe		= ttusb2_probe,

[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

             reply	other threads:[~2008-02-11 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 19:44 André Weidemann [this message]
2008-03-22 22:32 ` [linux-dvb] [PATCH] reworked patch to support TT connect S-2400 Patrick Boettcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B0A591.9030408@web.de \
    --to=andre.weidemann@web.de \
    --cc=linux-dvb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox