diff options
Diffstat (limited to 'drivers/media/video/usbvision/usbvision-video.c')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 143 |
1 files changed, 0 insertions, 143 deletions
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 | |||
151 | static int video_nr = -1; // Sequential Number of Video Device | 151 | static int video_nr = -1; // Sequential Number of Video Device |
152 | static int radio_nr = -1; // Sequential Number of Radio Device | 152 | static int radio_nr = -1; // Sequential Number of Radio Device |
153 | static int vbi_nr = -1; // Sequential Number of VBI Device | 153 | static int vbi_nr = -1; // Sequential Number of VBI Device |
154 | static char *CustomDevice=NULL; // Set as nothing.... | ||
155 | 154 | ||
156 | // Grab parameters for the device driver | 155 | // Grab parameters for the device driver |
157 | 156 | ||
@@ -162,7 +161,6 @@ module_param(PowerOnAtOpen, int, 0444); | |||
162 | module_param(video_nr, int, 0444); | 161 | module_param(video_nr, int, 0444); |
163 | module_param(radio_nr, int, 0444); | 162 | module_param(radio_nr, int, 0444); |
164 | module_param(vbi_nr, int, 0444); | 163 | module_param(vbi_nr, int, 0444); |
165 | module_param(CustomDevice, charp, 0444); | ||
166 | #else // Old Style | 164 | #else // Old Style |
167 | MODULE_PARAM(isocMode, "i"); | 165 | MODULE_PARAM(isocMode, "i"); |
168 | MODULE_PARM(video_debug, "i"); // Grab the Debug Mode of the device driver | 166 | 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 | |||
172 | MODULE_PARM(video_nr, "i"); // video_nr option allows to specify a certain /dev/videoX device (like /dev/video0 or /dev/video1 ...) | 170 | MODULE_PARM(video_nr, "i"); // video_nr option allows to specify a certain /dev/videoX device (like /dev/video0 or /dev/video1 ...) |
173 | MODULE_PARM(radio_nr, "i"); // radio_nr option allows to specify a certain /dev/radioX device (like /dev/radio0 or /dev/radio1 ...) | 171 | MODULE_PARM(radio_nr, "i"); // radio_nr option allows to specify a certain /dev/radioX device (like /dev/radio0 or /dev/radio1 ...) |
174 | MODULE_PARM(vbi_nr, "i"); // vbi_nr option allows to specify a certain /dev/vbiX device (like /dev/vbi0 or /dev/vbi1 ...) | 172 | MODULE_PARM(vbi_nr, "i"); // vbi_nr option allows to specify a certain /dev/vbiX device (like /dev/vbi0 or /dev/vbi1 ...) |
175 | MODULE_PARM(CustomDevice, "s"); // .... CustomDevice | ||
176 | #endif | 173 | #endif |
177 | 174 | ||
178 | MODULE_PARM_DESC(isocMode, " Set the default format for ISOC endpoint. Default: 0x60 (Compression On)"); | 175 | 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 | |||
181 | MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX). Default: -1 (autodetect)"); | 178 | MODULE_PARM_DESC(video_nr, "Set video device number (/dev/videoX). Default: -1 (autodetect)"); |
182 | MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 (autodetect)"); | 179 | MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 (autodetect)"); |
183 | MODULE_PARM_DESC(vbi_nr, "Set vbi device number (/dev/vbiX). Default: -1 (autodetect)"); | 180 | MODULE_PARM_DESC(vbi_nr, "Set vbi device number (/dev/vbiX). Default: -1 (autodetect)"); |
184 | MODULE_PARM_DESC(CustomDevice, " Define the fine tuning parameters for the device. Default: null"); | ||
185 | 181 | ||
186 | 182 | ||
187 | // Misc stuff | 183 | // Misc stuff |
@@ -1944,143 +1940,6 @@ static struct usb_driver usbvision_driver = { | |||
1944 | }; | 1940 | }; |
1945 | 1941 | ||
1946 | /* | 1942 | /* |
1947 | * customdevice_process() | ||
1948 | * | ||
1949 | * This procedure preprocesses CustomDevice parameter if any | ||
1950 | * | ||
1951 | */ | ||
1952 | static void customdevice_process(void) | ||
1953 | { | ||
1954 | unsigned int id_vend,id_prod,radio,tuner; | ||
1955 | |||
1956 | usbvision_device_data[0]=usbvision_device_data[1]; | ||
1957 | usbvision_table[0]=usbvision_table[1]; | ||
1958 | |||
1959 | if(CustomDevice) | ||
1960 | { | ||
1961 | char *parse=CustomDevice; | ||
1962 | int tmp; | ||
1963 | |||
1964 | PDEBUG(DBG_PROBE, "CustomDevice=%s", CustomDevice); | ||
1965 | |||
1966 | /*format is CustomDevice="0x0573 0x4D31 0 7113 3 PAL 1 1 1 5 -1 -1 -1 -1 -1" | ||
1967 | usbvision_device_data[0].idVendor; | ||
1968 | usbvision_device_data[0].idProduct; | ||
1969 | usbvision_device_data[0].Interface; | ||
1970 | usbvision_device_data[0].Codec; | ||
1971 | usbvision_device_data[0].VideoChannels; | ||
1972 | usbvision_device_data[0].VideoNorm; | ||
1973 | usbvision_device_data[0].AudioChannels; | ||
1974 | usbvision_device_data[0].Radio; | ||
1975 | usbvision_device_data[0].Tuner; | ||
1976 | usbvision_device_data[0].TunerType; | ||
1977 | usbvision_device_data[0].Vin_Reg1; | ||
1978 | usbvision_device_data[0].Vin_Reg2; | ||
1979 | usbvision_device_data[0].X_Offset; | ||
1980 | usbvision_device_data[0].Y_Offset; | ||
1981 | usbvision_device_data[0].Dvi_yuv; | ||
1982 | usbvision_device_data[0].ModelString; | ||
1983 | */ | ||
1984 | |||
1985 | rmspace(parse); | ||
1986 | usbvision_device_data[0].ModelString="USBVISION Custom Device"; | ||
1987 | |||
1988 | parse+=2; | ||
1989 | sscanf(parse,"%u",&id_vend); | ||
1990 | usbvision_table[0].idVendor=id_vend; | ||
1991 | |||
1992 | goto2next(parse); | ||
1993 | PDEBUG(DBG_PROBE, "idVendor=0x%.4X", usbvision_table[0].idVendor); | ||
1994 | parse+=2; | ||
1995 | sscanf(parse,"%u",&id_prod); | ||
1996 | usbvision_table[0].idProduct=id_prod; | ||
1997 | goto2next(parse); | ||
1998 | PDEBUG(DBG_PROBE, "idProduct=0x%.4X", usbvision_table[0].idProduct); | ||
1999 | sscanf(parse,"%d",&usbvision_device_data[0].Interface); | ||
2000 | goto2next(parse); | ||
2001 | PDEBUG(DBG_PROBE, "Interface=%d", usbvision_device_data[0].Interface); | ||
2002 | sscanf(parse,"%hd",&usbvision_device_data[0].Codec); | ||
2003 | goto2next(parse); | ||
2004 | PDEBUG(DBG_PROBE, "Codec=%d", usbvision_device_data[0].Codec); | ||
2005 | sscanf(parse,"%d",&tmp); | ||
2006 | usbvision_device_data[0].VideoChannels = tmp; | ||
2007 | goto2next(parse); | ||
2008 | PDEBUG(DBG_PROBE, "VideoChannels=%d", usbvision_device_data[0].VideoChannels); | ||
2009 | |||
2010 | switch(*parse) | ||
2011 | { | ||
2012 | case 'P': | ||
2013 | PDEBUG(DBG_PROBE, "VideoNorm=PAL"); | ||
2014 | usbvision_device_data[0].VideoNorm=V4L2_STD_PAL; | ||
2015 | break; | ||
2016 | |||
2017 | case 'S': | ||
2018 | PDEBUG(DBG_PROBE, "VideoNorm=SECAM"); | ||
2019 | usbvision_device_data[0].VideoNorm=V4L2_STD_SECAM; | ||
2020 | break; | ||
2021 | |||
2022 | case 'N': | ||
2023 | PDEBUG(DBG_PROBE, "VideoNorm=NTSC"); | ||
2024 | usbvision_device_data[0].VideoNorm=V4L2_STD_NTSC; | ||
2025 | break; | ||
2026 | |||
2027 | default: | ||
2028 | PDEBUG(DBG_PROBE, "VideoNorm=PAL (by default)"); | ||
2029 | usbvision_device_data[0].VideoNorm=V4L2_STD_PAL; | ||
2030 | break; | ||
2031 | } | ||
2032 | goto2next(parse); | ||
2033 | |||
2034 | sscanf(parse,"%d",&tmp); | ||
2035 | usbvision_device_data[0].AudioChannels = tmp; | ||
2036 | goto2next(parse); | ||
2037 | PDEBUG(DBG_PROBE, "AudioChannels=%d", usbvision_device_data[0].AudioChannels); | ||
2038 | sscanf(parse,"%d",&radio); | ||
2039 | usbvision_device_data[0].Radio=(radio?1:0); | ||
2040 | goto2next(parse); | ||
2041 | PDEBUG(DBG_PROBE, "Radio=%d", usbvision_device_data[0].Radio); | ||
2042 | sscanf(parse,"%d",&tuner); | ||
2043 | usbvision_device_data[0].Tuner=(tuner?1:0); | ||
2044 | goto2next(parse); | ||
2045 | PDEBUG(DBG_PROBE, "Tuner=%d", usbvision_device_data[0].Tuner); | ||
2046 | sscanf(parse,"%hhu",&usbvision_device_data[0].TunerType); | ||
2047 | goto2next(parse); | ||
2048 | PDEBUG(DBG_PROBE, "TunerType=%d", usbvision_device_data[0].TunerType); | ||
2049 | sscanf(parse,"%d",&tmp); | ||
2050 | if(tmp>0) { | ||
2051 | usbvision_device_data[0].Vin_Reg1_override = 1; | ||
2052 | usbvision_device_data[0].Vin_Reg1 = tmp&0xff; | ||
2053 | } | ||
2054 | goto2next(parse); | ||
2055 | PDEBUG(DBG_PROBE, "Vin_Reg1=%d", usbvision_device_data[0].Vin_Reg1); | ||
2056 | sscanf(parse,"%d",&tmp); | ||
2057 | if(tmp>0) { | ||
2058 | usbvision_device_data[0].Vin_Reg2_override = 1; | ||
2059 | usbvision_device_data[0].Vin_Reg2 = tmp&0xff; | ||
2060 | } | ||
2061 | goto2next(parse); | ||
2062 | PDEBUG(DBG_PROBE, "Vin_Reg2=%d", usbvision_device_data[0].Vin_Reg2); | ||
2063 | sscanf(parse,"%hd",&usbvision_device_data[0].X_Offset); | ||
2064 | goto2next(parse); | ||
2065 | PDEBUG(DBG_PROBE, "X_Offset=%d", usbvision_device_data[0].X_Offset); | ||
2066 | sscanf(parse,"%hd",&usbvision_device_data[0].Y_Offset); | ||
2067 | goto2next(parse); | ||
2068 | PDEBUG(DBG_PROBE, "Y_Offset=%d", usbvision_device_data[0].Y_Offset); | ||
2069 | sscanf(parse,"%d",&tmp); | ||
2070 | if(tmp>0) { | ||
2071 | usbvision_device_data[0].Dvi_yuv_override = 1; | ||
2072 | usbvision_device_data[0].Dvi_yuv = tmp&0xff; | ||
2073 | } | ||
2074 | PDEBUG(DBG_PROBE, "Dvi_yuv=%d", usbvision_device_data[0].Dvi_yuv); | ||
2075 | |||
2076 | //add to usbvision_table also | ||
2077 | usbvision_table[0].match_flags=USB_DEVICE_ID_MATCH_DEVICE; | ||
2078 | } | ||
2079 | } | ||
2080 | |||
2081 | |||
2082 | |||
2083 | /* | ||
2084 | * usbvision_init() | 1943 | * usbvision_init() |
2085 | * | 1944 | * |
2086 | * This code is run to initialize the driver. | 1945 | * This code is run to initialize the driver. |
@@ -2104,8 +1963,6 @@ static int __init usbvision_init(void) | |||
2104 | usbvision_v4l2_format[7].supported = 0; // V4L2_PIX_FMT_YUV422P | 1963 | usbvision_v4l2_format[7].supported = 0; // V4L2_PIX_FMT_YUV422P |
2105 | } | 1964 | } |
2106 | 1965 | ||
2107 | customdevice_process(); | ||
2108 | |||
2109 | errCode = usb_register(&usbvision_driver); | 1966 | errCode = usb_register(&usbvision_driver); |
2110 | 1967 | ||
2111 | if (errCode == 0) { | 1968 | if (errCode == 0) { |