PDA

View Full Version : DFG/USB2pro API for porting to Linux



sky_123
June 5, 2013, 22:55:24
Hello,

The DFG/USB2pro is an excellent piece of equipment. I'm very happy with it.

I understand there is not Linux driver for it currently, and I was wondering, is there an API for the USB, that we (the community) could use, in order to create an unsupported Linux driver?

If there is no API, is there a particular chipset that is used for the PCI to USB conversion for which we could inspect the datasheet? Or is it all handled by FPGA? (I don't want to open my DFG/USB2pro to find out).

If it is by FPGA, could we obtain the end interface detail to the PC (I believe such interfaces need to be published anyway,
under the Software Directive in the EU, besides it is in The Imaging Source's best interest, since it will encourage more people to use the hardware - we're only interested in the end API, not the hardware implementation).

Please feel free to edit my query if you wish to publish it - I'd just really like to work with your Engineering team's API to get even more usage for this exciting product, which would result in more sales.

Many thanks for the excellent product.

Tim Cassens
June 6, 2013, 14:00:21
Hello,

the DFG/USB2pro uses a conexant CX23102, and it seems like linux already has support for that chip.

Maybe all you have to do is add a board declaration to the list in /drivers/media/usb/cx231xx/cx231xx-cards.c, and somehow convince the driver to load for our converter.

Unfortunately, I don't know enough about linux kernel hacking to assist any further.

Tim

sky_123
June 7, 2013, 03:43:33
Hi Tim,

Thank you for the information! I will do my best to investigate if I can get this to work, and will post any findings here.

rreignier
July 20, 2017, 16:40:53
Hi Tim,

Thank you for the information! I will do my best to investigate if I can get this to work, and will post any findings here.

I don't know if @sky_123 managed to get the Linux driver running but I think I have it.

@Tim Cassens, could you review my patch to see if I miss some configuration fields. I have tested it on the composite input but not the SVIDEO because I don't own such hardware.



From 746fad2c01ea4de34dfbec5fb0be8db5261c2fdd Mon Sep 17 00:00:00 2001
From: rre <rre@robopec.com>
Date: Thu, 20 Jul 2017 16:06:22 +0200
Subject: [PATCH] Modify cx231xx driver to add The Imaging Source DFG/USB2pro

---
drivers/media/usb/cx231xx/cx231xx-cards.c | 28 ++++++++++++++++++++++++++++
drivers/media/usb/cx231xx/cx231xx.h | 1 +
2 files changed, 29 insertions(+)

diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 2c5f76d..0d520df 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -841,6 +841,32 @@ struct cx231xx_board cx231xx_boards[] = {
.gpio = NULL,
} },
},
+ [CX231XX_BOARD_THE_IMAGING_SOURCE_DFG_USB2_PRO] = {
+ .name = "The Imaging Source DFG/USB2pro",
+ .tuner_type = TUNER_ABSENT,
+ .decoder = CX231XX_AVDECODER,
+ .output_mode = OUT_MODE_VIP11,
+ .demod_xfer_mode = 0,
+ .ctl_pin_status_mask = 0xFFFFFFC4,
+ .agc_analog_digital_select_gpio = 0x0c,
+ .gpio_pin_status_mask = 0x4001000,
+ .norm = V4L2_STD_PAL,
+ .no_alt_vanc = 1,
+ .external_av = 1,
+ .input = {{
+ .type = CX231XX_VMUX_COMPOSITE1,
+ .vmux = CX231XX_VIN_1_1,
+ .amux = CX231XX_AMUX_LINE_IN,
+ .gpio = NULL,
+ }, {
+ .type = CX231XX_VMUX_SVIDEO,
+ .vmux = CX231XX_VIN_2_1 |
+ (CX231XX_VIN_2_2 << 8) |
+ CX25840_SVIDEO_ON,
+ .amux = CX231XX_AMUX_LINE_IN,
+ .gpio = NULL,
+ } },
+ },
};
const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards);

@@ -908,6 +934,8 @@ struct usb_device_id cx231xx_id_table[] = {
.driver_info = CX231XX_BOARD_OTG102},
{USB_DEVICE(USB_VID_TERRATEC, 0x00a6),
.driver_info = CX231XX_BOARD_TERRATEC_GRABBY},
+ {USB_DEVICE(0x199e, 0x8002),
+ .driver_info = CX231XX_BOARD_THE_IMAGING_SOURCE_DFG_USB2_PRO},
{},
};

diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h
index 54790fb..84ac57b 100644
--- a/drivers/media/usb/cx231xx/cx231xx.h
+++ b/drivers/media/usb/cx231xx/cx231xx.h
@@ -78,6 +78,7 @@
#define CX231XX_BOARD_HAUPPAUGE_930C_HD_1114xx 20
#define CX231XX_BOARD_HAUPPAUGE_955Q 21
#define CX231XX_BOARD_TERRATEC_GRABBY 22
+#define CX231XX_BOARD_THE_IMAGING_SOURCE_DFG_USB2_PRO 23

/* Limits minimum and default number of buffers */
#define CX231XX_MIN_BUF 4
--
2.7.4


Thanks