summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorThierry MERLE <thierry.merle@free.fr>2007-04-17 02:28:32 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 15:45:43 -0300
commitec709bb801a98dcac0a95c060c431eda73e31587 (patch)
tree83aaa3623a248a884a4b54bf636998229a5eb3f6 /drivers/media
parent25f30389dd84dcaf54d7d76fdd84e85bec206db6 (diff)
downloadblackbird-op-linux-ec709bb801a98dcac0a95c060c431eda73e31587.tar.gz
blackbird-op-linux-ec709bb801a98dcac0a95c060c431eda73e31587.zip
V4L/DVB (5530): Usbvision: remove CustomDevice facility
usbvision has a module parameter that ables the user to add a new USB entry at driver load. This functionality is useless by experience (adding statically the entry is easy). Furthermore, the USB_DEVICE(0xfff0, 0xfff0) USB entry caused usbvision_probe to be called for all unclaimed devices. Signed-off-by: Thierry MERLE <thierry.merle@free.fr> Acked-by: Dwaine Garden <DwaineGarden@rogers.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/usbvision/usbvision-cards.c15
-rw-r--r--drivers/media/video/usbvision/usbvision-cards.h129
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c143
3 files changed, 64 insertions, 223 deletions
diff --git a/drivers/media/video/usbvision/usbvision-cards.c b/drivers/media/video/usbvision/usbvision-cards.c
index edee094cf15d..13f69fe6360d 100644
--- a/drivers/media/video/usbvision/usbvision-cards.c
+++ b/drivers/media/video/usbvision/usbvision-cards.c
@@ -32,20 +32,6 @@
/* Supported Devices: A table for usbvision.c*/
struct usbvision_device_data_st usbvision_device_data[] = {
- [DUMMY_DEVICE] = {
- .Interface = -1,
- .Codec = CODEC_SAA7111,
- .VideoChannels = 3,
- .VideoNorm = V4L2_STD_NTSC,
- .AudioChannels = 1,
- .Radio = 1,
- .vbi = 1,
- .Tuner = 1,
- .TunerType = TUNER_PHILIPS_NTSC_M,
- .X_Offset = -1,
- .Y_Offset = -1,
- .ModelString = "Custom Dummy USBVision Device",
- },
[XANBOO] = {
.Interface = -1,
.Codec = CODEC_SAA7113,
@@ -1032,7 +1018,6 @@ const int usbvision_device_data_size=ARRAY_SIZE(usbvision_device_data);
/* Supported Devices */
struct usb_device_id usbvision_table [] = {
- { USB_DEVICE(0xfff0, 0xfff0), .driver_info=DUMMY_DEVICE },
{ USB_DEVICE(0x0a6f, 0x0400), .driver_info=XANBOO },
{ USB_DEVICE(0x050d, 0x0106), .driver_info=BELKIN_VIDEOBUS_II },
{ USB_DEVICE(0x050d, 0x0207), .driver_info=BELKIN_VIDEOBUS },
diff --git a/drivers/media/video/usbvision/usbvision-cards.h b/drivers/media/video/usbvision/usbvision-cards.h
index 766accc927ef..512c5cee4145 100644
--- a/drivers/media/video/usbvision/usbvision-cards.h
+++ b/drivers/media/video/usbvision/usbvision-cards.h
@@ -1,67 +1,66 @@
-#define DUMMY_DEVICE 0
-#define XANBOO 1
-#define BELKIN_VIDEOBUS_II 2
-#define BELKIN_VIDEOBUS 3
-#define BELKIN_USB_VIDEOBUS_II 4
-#define ECHOFX_INTERVIEW_LITE 5
-#define USBGEAR_USBG_V1 6
-#define D_LINK_V100 7
-#define X10_USB_CAMERA 8
-#define HPG_WINTV_LIVE_PAL_BG 9
-#define HPG_WINTV_LIVE_PRO_NTSC_MN 10
-#define ZORAN_PMD_NOGATECH 11
-#define NOGATECH_USB_TV_NTSC_FM 12
-#define PNY_USB_TV_NTSC_FM 13
-#define PV_PLAYTV_USB_PRO_PAL_FM 14
-#define ZT_721 15
-#define HPG_WINTV_NTSC_MN 16
-#define HPG_WINTV_PAL_BG 17
-#define HPG_WINTV_PAL_I 18
-#define HPG_WINTV_PAL_SECAM_L 19
-#define HPG_WINTV_PAL_D_K 20
-#define HPG_WINTV_NTSC_FM 21
-#define HPG_WINTV_PAL_BG_FM 22
-#define HPG_WINTV_PAL_I_FM 23
-#define HPG_WINTV_PAL_D_K_FM 24
-#define HPG_WINTV_PRO_NTSC_MN 25
-#define HPG_WINTV_PRO_NTSC_MN_V2 26
-#define HPG_WINTV_PRO_PAL 27
-#define HPG_WINTV_PRO_NTSC_MN_V3 28
-#define HPG_WINTV_PRO_PAL_BG 29
-#define HPG_WINTV_PRO_PAL_I 30
-#define HPG_WINTV_PRO_PAL_SECAM_L 31
-#define HPG_WINTV_PRO_PAL_D_K 32
-#define HPG_WINTV_PRO_PAL_SECAM 33
-#define HPG_WINTV_PRO_PAL_SECAM_V2 34
-#define HPG_WINTV_PRO_PAL_BG_V2 35
-#define HPG_WINTV_PRO_PAL_BG_D_K 36
-#define HPG_WINTV_PRO_PAL_I_D_K 37
-#define HPG_WINTV_PRO_NTSC_MN_FM 38
-#define HPG_WINTV_PRO_PAL_BG_FM 39
-#define HPG_WINTV_PRO_PAL_I_FM 40
-#define HPG_WINTV_PRO_PAL_D_K_FM 41
-#define HPG_WINTV_PRO_TEMIC_PAL_FM 42
-#define HPG_WINTV_PRO_TEMIC_PAL_BG_FM 43
-#define HPG_WINTV_PRO_PAL_FM 44
-#define HPG_WINTV_PRO_NTSC_MN_FM_V2 45
-#define CAMTEL_TVB330 46
-#define DIGITAL_VIDEO_CREATOR_I 47
-#define GLOBAL_VILLAGE_GV_007_NTSC 48
-#define DAZZLE_DVC_50_REV_1_NTSC 49
-#define DAZZLE_DVC_80_REV_1_PAL 50
-#define DAZZLE_DVC_90_REV_1_SECAM 51
-#define ESKAPE_LABS_MYTV2GO 52
-#define PINNA_PCTV_USB_PAL 53
-#define PINNA_PCTV_USB_SECAM 54
-#define PINNA_PCTV_USB_PAL_FM 55
-#define MIRO_PCTV_USB 56
-#define PINNA_PCTV_USB_NTSC_FM 57
-#define PINNA_PCTV_USB_PAL_FM_V2 58
-#define PINNA_PCTV_USB_NTSC_FM_V2 59
-#define PINNA_PCTV_USB_PAL_FM_V3 60
-#define PINNA_LINX_VD_IN_CAB_NTSC 61
-#define PINNA_LINX_VD_IN_CAB_PAL 62
-#define PINNA_PCTV_BUNGEE_PAL_FM 63
-#define HPG_WINTV 64
+#define XANBOO 0
+#define BELKIN_VIDEOBUS_II 1
+#define BELKIN_VIDEOBUS 2
+#define BELKIN_USB_VIDEOBUS_II 3
+#define ECHOFX_INTERVIEW_LITE 4
+#define USBGEAR_USBG_V1 5
+#define D_LINK_V100 6
+#define X10_USB_CAMERA 7
+#define HPG_WINTV_LIVE_PAL_BG 8
+#define HPG_WINTV_LIVE_PRO_NTSC_MN 9
+#define ZORAN_PMD_NOGATECH 10
+#define NOGATECH_USB_TV_NTSC_FM 11
+#define PNY_USB_TV_NTSC_FM 12
+#define PV_PLAYTV_USB_PRO_PAL_FM 13
+#define ZT_721 14
+#define HPG_WINTV_NTSC_MN 15
+#define HPG_WINTV_PAL_BG 16
+#define HPG_WINTV_PAL_I 17
+#define HPG_WINTV_PAL_SECAM_L 18
+#define HPG_WINTV_PAL_D_K 19
+#define HPG_WINTV_NTSC_FM 20
+#define HPG_WINTV_PAL_BG_FM 21
+#define HPG_WINTV_PAL_I_FM 22
+#define HPG_WINTV_PAL_D_K_FM 23
+#define HPG_WINTV_PRO_NTSC_MN 24
+#define HPG_WINTV_PRO_NTSC_MN_V2 25
+#define HPG_WINTV_PRO_PAL 26
+#define HPG_WINTV_PRO_NTSC_MN_V3 27
+#define HPG_WINTV_PRO_PAL_BG 28
+#define HPG_WINTV_PRO_PAL_I 29
+#define HPG_WINTV_PRO_PAL_SECAM_L 30
+#define HPG_WINTV_PRO_PAL_D_K 31
+#define HPG_WINTV_PRO_PAL_SECAM 32
+#define HPG_WINTV_PRO_PAL_SECAM_V2 33
+#define HPG_WINTV_PRO_PAL_BG_V2 34
+#define HPG_WINTV_PRO_PAL_BG_D_K 35
+#define HPG_WINTV_PRO_PAL_I_D_K 36
+#define HPG_WINTV_PRO_NTSC_MN_FM 37
+#define HPG_WINTV_PRO_PAL_BG_FM 38
+#define HPG_WINTV_PRO_PAL_I_FM 39
+#define HPG_WINTV_PRO_PAL_D_K_FM 40
+#define HPG_WINTV_PRO_TEMIC_PAL_FM 41
+#define HPG_WINTV_PRO_TEMIC_PAL_BG_FM 42
+#define HPG_WINTV_PRO_PAL_FM 43
+#define HPG_WINTV_PRO_NTSC_MN_FM_V2 44
+#define CAMTEL_TVB330 45
+#define DIGITAL_VIDEO_CREATOR_I 46
+#define GLOBAL_VILLAGE_GV_007_NTSC 47
+#define DAZZLE_DVC_50_REV_1_NTSC 48
+#define DAZZLE_DVC_80_REV_1_PAL 49
+#define DAZZLE_DVC_90_REV_1_SECAM 50
+#define ESKAPE_LABS_MYTV2GO 51
+#define PINNA_PCTV_USB_PAL 52
+#define PINNA_PCTV_USB_SECAM 53
+#define PINNA_PCTV_USB_PAL_FM 54
+#define MIRO_PCTV_USB 55
+#define PINNA_PCTV_USB_NTSC_FM 56
+#define PINNA_PCTV_USB_PAL_FM_V2 57
+#define PINNA_PCTV_USB_NTSC_FM_V2 58
+#define PINNA_PCTV_USB_PAL_FM_V3 59
+#define PINNA_LINX_VD_IN_CAB_NTSC 60
+#define PINNA_LINX_VD_IN_CAB_PAL 61
+#define PINNA_PCTV_BUNGEE_PAL_FM 62
+#define HPG_WINTV 63
extern const int usbvision_device_data_size;
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index d9e517d497f7..216704170a4c 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -151,7 +151,6 @@ static int PowerOnAtOpen = 1; // Set the default device to power on at startu
static int video_nr = -1; // Sequential Number of Video Device
static int radio_nr = -1; // Sequential Number of Radio Device
static int vbi_nr = -1; // Sequential Number of VBI Device
-static char *CustomDevice=NULL; // Set as nothing....
// Grab parameters for the device driver
@@ -162,7 +161,6 @@ module_param(PowerOnAtOpen, int, 0444);
module_param(video_nr, int, 0444);
module_param(radio_nr, int, 0444);
module_param(vbi_nr, int, 0444);
-module_param(CustomDevice, charp, 0444);
#else // Old Style
MODULE_PARAM(isocMode, "i");
MODULE_PARM(video_debug, "i"); // Grab the Debug Mode of the device driver
@@ -172,7 +170,6 @@ MODULE_PARM(SwitchSVideoInput, "i"); // To help people with Black and White ou
MODULE_PARM(video_nr, "i"); // video_nr option allows to specify a certain /dev/videoX device (like /dev/video0 or /dev/video1 ...)
MODULE_PARM(radio_nr, "i"); // radio_nr option allows to specify a certain /dev/radioX device (like /dev/radio0 or /dev/radio1 ...)
MODULE_PARM(vbi_nr, "i"); // vbi_nr option allows to specify a certain /dev/vbiX device (like /dev/vbi0 or /dev/vbi1 ...)
-MODULE_PARM(CustomDevice, "s"); // .... CustomDevice
#endif
MODULE_PARM_DESC(isocMode, " Set the default format for ISOC endpoint. Default: 0x60 (Compression On)");
@@ -181,7 +178,6 @@ MODULE_PARM_DESC(PowerOnAtOpen, " Set the default device to power on when device
MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX). Default: -1 (autodetect)");
MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 (autodetect)");
MODULE_PARM_DESC(vbi_nr, "Set vbi device number (/dev/vbiX). Default: -1 (autodetect)");
-MODULE_PARM_DESC(CustomDevice, " Define the fine tuning parameters for the device. Default: null");
// Misc stuff
@@ -1944,143 +1940,6 @@ static struct usb_driver usbvision_driver = {
};
/*
- * customdevice_process()
- *
- * This procedure preprocesses CustomDevice parameter if any
- *
- */
-static void customdevice_process(void)
-{
- unsigned int id_vend,id_prod,radio,tuner;
-
- usbvision_device_data[0]=usbvision_device_data[1];
- usbvision_table[0]=usbvision_table[1];
-
- if(CustomDevice)
- {
- char *parse=CustomDevice;
- int tmp;
-
- PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice);
-
- /*format is CustomDevice="0x0573 0x4D31 0 7113 3 PAL 1 1 1 5 -1 -1 -1 -1 -1"
- usbvision_device_data[0].idVendor;
- usbvision_device_data[0].idProduct;
- usbvision_device_data[0].Interface;
- usbvision_device_data[0].Codec;
- usbvision_device_data[0].VideoChannels;
- usbvision_device_data[0].VideoNorm;
- usbvision_device_data[0].AudioChannels;
- usbvision_device_data[0].Radio;
- usbvision_device_data[0].Tuner;
- usbvision_device_data[0].TunerType;
- usbvision_device_data[0].Vin_Reg1;
- usbvision_device_data[0].Vin_Reg2;
- usbvision_device_data[0].X_Offset;
- usbvision_device_data[0].Y_Offset;
- usbvision_device_data[0].Dvi_yuv;
- usbvision_device_data[0].ModelString;
- */
-
- rmspace(parse);
- usbvision_device_data[0].ModelString="USBVISION Custom Device";
-
- parse+=2;
- sscanf(parse,"%u",&id_vend);
- usbvision_table[0].idVendor=id_vend;
-
- goto2next(parse);
- PDEBUG(DBG_PROBE, "idVendor=0x%.4X", usbvision_table[0].idVendor);
- parse+=2;
- sscanf(parse,"%u",&id_prod);
- usbvision_table[0].idProduct=id_prod;
- goto2next(parse);
- PDEBUG(DBG_PROBE, "idProduct=0x%.4X", usbvision_table[0].idProduct);
- sscanf(parse,"%d",&usbvision_device_data[0].Interface);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface);
- sscanf(parse,"%hd",&usbvision_device_data[0].Codec);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Codec=%d", usbvision_device_data[0].Codec);
- sscanf(parse,"%d",&tmp);
- usbvision_device_data[0].VideoChannels = tmp;
- goto2next(parse);
- PDEBUG(DBG_PROBE, "VideoChannels=%d", usbvision_device_data[0].VideoChannels);
-
- switch(*parse)
- {
- case 'P':
- PDEBUG(DBG_PROBE, "VideoNorm=PAL");
- usbvision_device_data[0].VideoNorm=V4L2_STD_PAL;
- break;
-
- case 'S':
- PDEBUG(DBG_PROBE, "VideoNorm=SECAM");
- usbvision_device_data[0].VideoNorm=V4L2_STD_SECAM;
- break;
-
- case 'N':
- PDEBUG(DBG_PROBE, "VideoNorm=NTSC");
- usbvision_device_data[0].VideoNorm=V4L2_STD_NTSC;
- break;
-
- default:
- PDEBUG(DBG_PROBE, "VideoNorm=PAL (by default)");
- usbvision_device_data[0].VideoNorm=V4L2_STD_PAL;
- break;
- }
- goto2next(parse);
-
- sscanf(parse,"%d",&tmp);
- usbvision_device_data[0].AudioChannels = tmp;
- goto2next(parse);
- PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels);
- sscanf(parse,"%d",&radio);
- usbvision_device_data[0].Radio=(radio?1:0);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Radio=%d", usbvision_device_data[0].Radio);
- sscanf(parse,"%d",&tuner);
- usbvision_device_data[0].Tuner=(tuner?1:0);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner);
- sscanf(parse,"%hhu",&usbvision_device_data[0].TunerType);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "TunerType=%d", usbvision_device_data[0].TunerType);
- sscanf(parse,"%d",&tmp);
- if(tmp>0) {
- usbvision_device_data[0].Vin_Reg1_override = 1;
- usbvision_device_data[0].Vin_Reg1 = tmp&0xff;
- }
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Vin_Reg1=%d", usbvision_device_data[0].Vin_Reg1);
- sscanf(parse,"%d",&tmp);
- if(tmp>0) {
- usbvision_device_data[0].Vin_Reg2_override = 1;
- usbvision_device_data[0].Vin_Reg2 = tmp&0xff;
- }
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Vin_Reg2=%d", usbvision_device_data[0].Vin_Reg2);
- sscanf(parse,"%hd",&usbvision_device_data[0].X_Offset);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "X_Offset=%d", usbvision_device_data[0].X_Offset);
- sscanf(parse,"%hd",&usbvision_device_data[0].Y_Offset);
- goto2next(parse);
- PDEBUG(DBG_PROBE, "Y_Offset=%d", usbvision_device_data[0].Y_Offset);
- sscanf(parse,"%d",&tmp);
- if(tmp>0) {
- usbvision_device_data[0].Dvi_yuv_override = 1;
- usbvision_device_data[0].Dvi_yuv = tmp&0xff;
- }
- PDEBUG(DBG_PROBE, "Dvi_yuv=%d", usbvision_device_data[0].Dvi_yuv);
-
- //add to usbvision_table also
- usbvision_table[0].match_flags=USB_DEVICE_ID_MATCH_DEVICE;
- }
-}
-
-
-
-/*
* usbvision_init()
*
* This code is run to initialize the driver.
@@ -2104,8 +1963,6 @@ static int __init usbvision_init(void)
usbvision_v4l2_format[7].supported = 0; // V4L2_PIX_FMT_YUV422P
}
- customdevice_process();
-
errCode = usb_register(&usbvision_driver);
if (errCode == 0) {
OpenPOWER on IntegriCloud