Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (49 commits)
V4L/DVB (3667b): cpia2: fix function prototype
V4L/DVB (3702): Make msp3400 routing defines more consistent
V4L/DVB (3700): Remove obsolete commands from tvp5150.c
V4L/DVB (3697): More msp3400 and bttv fixes
V4L/DVB (3696): Previous change for cx2341X boards broke the remote support
V4L/DVB (3693): Fix msp3400c and bttv stereo/mono/bilingual detection/handling
V4L/DVB (3692): Keep experimental SLICED_VBI defines under an #if 0
V4L/DVB (3689): Kconfig: fix VP-3054 Secondary I2C Bus build configuration menu dependencies
V4L/DVB (3673): Fix budget-av CAM reset
V4L/DVB (3672): Fix memory leak in dvr open
V4L/DVB (3671): New module parameter 'tv_standard' (dvb-ttpci driver)
V4L/DVB (3670): Fix typo in comment
V4L/DVB (3669): Configurable dma buffer size for saa7146-based budget dvb cards
V4L/DVB (3653h): Move usb v4l docs into Documentation/video4linux
V4L/DVB (3667a): Fix SAP + stereo mode at msp3400
V4L/DVB (3666): Remove trailing newlines
V4L/DVB (3665): Add new NEC uPD64031A and uPD64083 i2c drivers
V4L/DVB (3663): Fix msp3400c wait time and better audio mode fallbacks
V4L/DVB (3662): Don't set msp3400c-non-existent register
V4L/DVB (3661): Add wm8739 stereo audio ADC i2c driver
...

+2102 -866
Documentation/usb/et61x251.txt Documentation/video4linux/et61x251.txt
+1 -1
Documentation/usb/ibmcam.txt Documentation/video4linux/ibmcam.txt
··· 122 - A Linux box with USB support (2.3/2.4; 2.2 w/backport may work) 123 124 - A Video4Linux compatible frame grabber program such as xawtv. 125 - 126 HOW TO COMPILE THE DRIVER: 127 128 You need to compile the driver only if you are a developer
··· 122 - A Linux box with USB support (2.3/2.4; 2.2 w/backport may work) 123 124 - A Video4Linux compatible frame grabber program such as xawtv. 125 + 126 HOW TO COMPILE THE DRIVER: 127 128 You need to compile the driver only if you are a developer
+5 -6
Documentation/usb/ov511.txt Documentation/video4linux/ov511.txt
··· 9 10 This is a driver for the OV511, a USB-only chip used in many "webcam" devices. 11 Any camera using the OV511/OV511+ and the OV6620/OV7610/20/20AE should work. 12 - Video capture devices that use the Philips SAA7111A decoder also work. It 13 supports streaming and capture of color or monochrome video via the Video4Linux 14 API. Most V4L apps are compatible with it. Most resolutions with a width and 15 height that are a multiple of 8 are supported. ··· 52 53 chmod 666 /dev/video 54 chmod 666 /dev/video0 (if necessary) 55 - 56 Now you are ready to run a video app! Both vidcat and xawtv work well for me 57 at 640x480. 58 - 59 [Using vidcat:] 60 61 vidcat -s 640x480 -p c > test.jpg 62 xview test.jpg 63 - 64 [Using xawtv:] 65 66 From the main xawtv directory: ··· 70 make 71 make install 72 73 - Now you should be able to run xawtv. Right click for the options dialog. 74 75 MODULE PARAMETERS: 76 ··· 286 and the USB stack. Thanks to Bret Wallach for getting camera reg IO, ISOC, and 287 image capture working. Thanks to Orion Sky Lawlor, Kevin Moore, and Claudio 288 Matsuoka for their work as well. 289 -
··· 9 10 This is a driver for the OV511, a USB-only chip used in many "webcam" devices. 11 Any camera using the OV511/OV511+ and the OV6620/OV7610/20/20AE should work. 12 + Video capture devices that use the Philips SAA7111A decoder also work. It 13 supports streaming and capture of color or monochrome video via the Video4Linux 14 API. Most V4L apps are compatible with it. Most resolutions with a width and 15 height that are a multiple of 8 are supported. ··· 52 53 chmod 666 /dev/video 54 chmod 666 /dev/video0 (if necessary) 55 + 56 Now you are ready to run a video app! Both vidcat and xawtv work well for me 57 at 640x480. 58 + 59 [Using vidcat:] 60 61 vidcat -s 640x480 -p c > test.jpg 62 xview test.jpg 63 + 64 [Using xawtv:] 65 66 From the main xawtv directory: ··· 70 make 71 make install 72 73 + Now you should be able to run xawtv. Right click for the options dialog. 74 75 MODULE PARAMETERS: 76 ··· 286 and the USB stack. Thanks to Bret Wallach for getting camera reg IO, ISOC, and 287 image capture working. Thanks to Orion Sky Lawlor, Kevin Moore, and Claudio 288 Matsuoka for their work as well.
Documentation/usb/se401.txt Documentation/video4linux/se401.txt
+8 -8
Documentation/usb/sn9c102.txt Documentation/video4linux/sn9c102.txt
··· 174 ------------------------------------------------------------------------------- 175 Name: video_nr 176 Type: short array (min = 0, max = 64) 177 - Syntax: <-1|n[,...]> 178 Description: Specify V4L2 minor mode number: 179 -1 = use next available 180 n = use minor number n ··· 187 ------------------------------------------------------------------------------- 188 Name: force_munmap 189 Type: bool array (min = 0, max = 64) 190 - Syntax: <0|1[,...]> 191 Description: Force the application to unmap previously mapped buffer memory 192 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not 193 all the applications support this feature. This parameter is ··· 206 ------------------------------------------------------------------------------- 207 Name: debug 208 Type: ushort 209 - Syntax: <n> 210 Description: Debugging information level, from 0 to 3: 211 0 = none (use carefully) 212 1 = critical errors ··· 267 frame header of the most recent requested and captured video frame. The header 268 is always 18-bytes long and is appended to every video frame by the SN9C10x 269 controllers. As an example, this additional information can be used by the user 270 - application for implementing auto-exposure features via software. 271 272 The following table describes the frame header: 273 ··· 441 value and is disposed in memory according to the pattern shown below: 442 443 B[0] G[1] B[2] G[3] ... B[m-2] G[m-1] 444 - G[m] R[m+1] G[m+2] R[m+2] ... G[2m-2] R[2m-1] 445 ... 446 ... B[(n-1)(m-2)] G[(n-1)(m-1)] 447 ... G[n(m-2)] R[n(m-1)] ··· 472 The algorithm purely describes the conversion from compressed Bayer code used 473 in the SN9C10x chips to uncompressed Bayer. Additional steps are required to 474 convert this to a color image (i.e. a color interpolation algorithm). 475 - 476 The following Huffman codes have been found: 477 - 0: +0 (relative to reference pixel value) 478 100: +4 479 101: -4? 480 - 1110xxxx: set absolute value to xxxx.0000 481 1101: +11 482 1111: -11 483 11001: +20
··· 174 ------------------------------------------------------------------------------- 175 Name: video_nr 176 Type: short array (min = 0, max = 64) 177 + Syntax: <-1|n[,...]> 178 Description: Specify V4L2 minor mode number: 179 -1 = use next available 180 n = use minor number n ··· 187 ------------------------------------------------------------------------------- 188 Name: force_munmap 189 Type: bool array (min = 0, max = 64) 190 + Syntax: <0|1[,...]> 191 Description: Force the application to unmap previously mapped buffer memory 192 before calling any VIDIOC_S_CROP or VIDIOC_S_FMT ioctl's. Not 193 all the applications support this feature. This parameter is ··· 206 ------------------------------------------------------------------------------- 207 Name: debug 208 Type: ushort 209 + Syntax: <n> 210 Description: Debugging information level, from 0 to 3: 211 0 = none (use carefully) 212 1 = critical errors ··· 267 frame header of the most recent requested and captured video frame. The header 268 is always 18-bytes long and is appended to every video frame by the SN9C10x 269 controllers. As an example, this additional information can be used by the user 270 + application for implementing auto-exposure features via software. 271 272 The following table describes the frame header: 273 ··· 441 value and is disposed in memory according to the pattern shown below: 442 443 B[0] G[1] B[2] G[3] ... B[m-2] G[m-1] 444 + G[m] R[m+1] G[m+2] R[m+2] ... G[2m-2] R[2m-1] 445 ... 446 ... B[(n-1)(m-2)] G[(n-1)(m-1)] 447 ... G[n(m-2)] R[n(m-1)] ··· 472 The algorithm purely describes the conversion from compressed Bayer code used 473 in the SN9C10x chips to uncompressed Bayer. Additional steps are required to 474 convert this to a color image (i.e. a color interpolation algorithm). 475 + 476 The following Huffman codes have been found: 477 + 0: +0 (relative to reference pixel value) 478 100: +4 479 101: -4? 480 + 1110xxxx: set absolute value to xxxx.0000 481 1101: +11 482 1111: -11 483 11001: +20
+11 -13
Documentation/usb/stv680.txt Documentation/video4linux/stv680.txt
··· 5 6 INTRODUCTION: 7 8 - STMicroelectronics produces the STV0680B chip, which comes in two 9 - types, -001 and -003. The -003 version allows the recording and downloading 10 - of sound clips from the camera, and allows a flash attachment. Otherwise, 11 - it uses the same commands as the -001 version. Both versions support a 12 - variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20 13 - CIF pictures. The STV0680 supports either a serial or a usb interface, and 14 video is possible through the usb interface. 15 16 - The following cameras are known to work with this driver, although any 17 camera with Vendor/Product codes of 0553/0202 should work: 18 19 Aiptek Pencam (various models) ··· 34 MODULE OPTIONS: 35 36 When the driver is compiled as a module, you can set a "swapRGB=1" 37 - option, if necessary, for those applications that require it 38 - (such as xawtv). However, the driver should detect and set this 39 automatically, so this option should not normally be used. 40 41 42 KNOWN PROBLEMS: 43 44 - The driver seems to work better with the usb-ohci than the usb-uhci host 45 - controller driver. 46 47 HELP: 48 ··· 51 http://stv0680-usb.sourceforge.net 52 53 Any questions to me can be send to: kjsisson@bellsouth.net 54 - 55 -
··· 5 6 INTRODUCTION: 7 8 + STMicroelectronics produces the STV0680B chip, which comes in two 9 + types, -001 and -003. The -003 version allows the recording and downloading 10 + of sound clips from the camera, and allows a flash attachment. Otherwise, 11 + it uses the same commands as the -001 version. Both versions support a 12 + variety of SDRAM sizes and sensors, allowing for a maximum of 26 VGA or 20 13 + CIF pictures. The STV0680 supports either a serial or a usb interface, and 14 video is possible through the usb interface. 15 16 + The following cameras are known to work with this driver, although any 17 camera with Vendor/Product codes of 0553/0202 should work: 18 19 Aiptek Pencam (various models) ··· 34 MODULE OPTIONS: 35 36 When the driver is compiled as a module, you can set a "swapRGB=1" 37 + option, if necessary, for those applications that require it 38 + (such as xawtv). However, the driver should detect and set this 39 automatically, so this option should not normally be used. 40 41 42 KNOWN PROBLEMS: 43 44 + The driver seems to work better with the usb-ohci than the usb-uhci host 45 + controller driver. 46 47 HELP: 48 ··· 51 http://stv0680-usb.sourceforge.net 52 53 Any questions to me can be send to: kjsisson@bellsouth.net
+18 -18
Documentation/usb/w9968cf.txt Documentation/video4linux/w9968cf.txt
··· 1 2 - W996[87]CF JPEG USB Dual Mode Camera Chip 3 Driver for Linux 2.6 (basic version) 4 ========================================= 5 ··· 115 ====================== 116 For it to work properly, the driver needs kernel support for Video4Linux, USB 117 and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not 118 - actually using any external "ovcamchip" module, given that the W996[87]CF 119 driver depends on the version of the module present in the official kernels. 120 121 The following options of the kernel configuration file must be enabled and ··· 197 enabled for the 'ovcamchip' module to be loaded and for 198 this parameter to be present. 199 ------------------------------------------------------------------------------- 200 - Name: simcams 201 - Type: int 202 - Syntax: <n> 203 Description: Number of cameras allowed to stream simultaneously. 204 n may vary from 0 to 32. 205 Default: 32 206 ------------------------------------------------------------------------------- 207 Name: video_nr 208 Type: int array (min = 0, max = 32) 209 - Syntax: <-1|n[,...]> 210 Description: Specify V4L minor mode number. 211 -1 = use next available 212 n = use minor number n ··· 219 ------------------------------------------------------------------------------- 220 Name: packet_size 221 Type: int array (min = 0, max = 32) 222 - Syntax: <n[,...]> 223 Description: Specify the maximum data payload size in bytes for alternate 224 settings, for each device. n is scaled between 63 and 1023. 225 Default: 1023 ··· 234 ------------------------------------------------------------------------------- 235 Name: double_buffer 236 Type: bool array (min = 0, max = 32) 237 - Syntax: <0|1[,...]> 238 Description: Hardware double buffering: 0 disabled, 1 enabled. 239 It should be enabled if you want smooth video output: if you 240 obtain out of sync. video, disable it, or try to ··· 243 ------------------------------------------------------------------------------- 244 Name: clamping 245 Type: bool array (min = 0, max = 32) 246 - Syntax: <0|1[,...]> 247 Description: Video data clamping: 0 disabled, 1 enabled. 248 Default: 0 for every device. 249 ------------------------------------------------------------------------------- 250 Name: filter_type 251 Type: int array (min = 0, max = 32) 252 - Syntax: <0|1|2[,...]> 253 Description: Video filter type. 254 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter. 255 The filter is used to reduce noise and aliasing artifacts ··· 258 ------------------------------------------------------------------------------- 259 Name: largeview 260 Type: bool array (min = 0, max = 32) 261 - Syntax: <0|1[,...]> 262 Description: Large view: 0 disabled, 1 enabled. 263 Default: 1 for every device. 264 ------------------------------------------------------------------------------- 265 Name: upscaling 266 Type: bool array (min = 0, max = 32) 267 - Syntax: <0|1[,...]> 268 Description: Software scaling (for non-compressed video only): 269 0 disabled, 1 enabled. 270 Disable it if you have a slow CPU or you don't have enough ··· 341 ------------------------------------------------------------------------------- 342 Name: bandingfilter 343 Type: bool array (min = 0, max = 32) 344 - Syntax: <0|1[,...]> 345 - Description: Banding filter to reduce effects of fluorescent 346 lighting: 347 0 disabled, 1 enabled. 348 This filter tries to reduce the pattern of horizontal ··· 374 ------------------------------------------------------------------------------- 375 Name: monochrome 376 Type: bool array (min = 0, max = 32) 377 - Syntax: <0|1[,...]> 378 Description: The image sensor is monochrome: 379 0 = no, 1 = yes 380 Default: 0 for every device. ··· 400 ------------------------------------------------------------------------------- 401 Name: contrast 402 Type: long array (min = 0, max = 32) 403 - Syntax: <n[,...]> 404 Description: Set picture contrast (0-65535). 405 Default: 50000 for every device. 406 ------------------------------------------------------------------------------- 407 Name: whiteness 408 Type: long array (min = 0, max = 32) 409 - Syntax: <n[,...]> 410 Description: Set picture whiteness (0-65535). 411 Default: 32768 for every device. 412 ------------------------------------------------------------------------------- 413 Name: debug 414 Type: int 415 - Syntax: <n> 416 Description: Debugging information level, from 0 to 6: 417 0 = none (use carefully) 418 1 = critical errors
··· 1 2 + W996[87]CF JPEG USB Dual Mode Camera Chip 3 Driver for Linux 2.6 (basic version) 4 ========================================= 5 ··· 115 ====================== 116 For it to work properly, the driver needs kernel support for Video4Linux, USB 117 and I2C, and the "ovcamchip" module for the image sensor. Make sure you are not 118 + actually using any external "ovcamchip" module, given that the W996[87]CF 119 driver depends on the version of the module present in the official kernels. 120 121 The following options of the kernel configuration file must be enabled and ··· 197 enabled for the 'ovcamchip' module to be loaded and for 198 this parameter to be present. 199 ------------------------------------------------------------------------------- 200 + Name: simcams 201 + Type: int 202 + Syntax: <n> 203 Description: Number of cameras allowed to stream simultaneously. 204 n may vary from 0 to 32. 205 Default: 32 206 ------------------------------------------------------------------------------- 207 Name: video_nr 208 Type: int array (min = 0, max = 32) 209 + Syntax: <-1|n[,...]> 210 Description: Specify V4L minor mode number. 211 -1 = use next available 212 n = use minor number n ··· 219 ------------------------------------------------------------------------------- 220 Name: packet_size 221 Type: int array (min = 0, max = 32) 222 + Syntax: <n[,...]> 223 Description: Specify the maximum data payload size in bytes for alternate 224 settings, for each device. n is scaled between 63 and 1023. 225 Default: 1023 ··· 234 ------------------------------------------------------------------------------- 235 Name: double_buffer 236 Type: bool array (min = 0, max = 32) 237 + Syntax: <0|1[,...]> 238 Description: Hardware double buffering: 0 disabled, 1 enabled. 239 It should be enabled if you want smooth video output: if you 240 obtain out of sync. video, disable it, or try to ··· 243 ------------------------------------------------------------------------------- 244 Name: clamping 245 Type: bool array (min = 0, max = 32) 246 + Syntax: <0|1[,...]> 247 Description: Video data clamping: 0 disabled, 1 enabled. 248 Default: 0 for every device. 249 ------------------------------------------------------------------------------- 250 Name: filter_type 251 Type: int array (min = 0, max = 32) 252 + Syntax: <0|1|2[,...]> 253 Description: Video filter type. 254 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter. 255 The filter is used to reduce noise and aliasing artifacts ··· 258 ------------------------------------------------------------------------------- 259 Name: largeview 260 Type: bool array (min = 0, max = 32) 261 + Syntax: <0|1[,...]> 262 Description: Large view: 0 disabled, 1 enabled. 263 Default: 1 for every device. 264 ------------------------------------------------------------------------------- 265 Name: upscaling 266 Type: bool array (min = 0, max = 32) 267 + Syntax: <0|1[,...]> 268 Description: Software scaling (for non-compressed video only): 269 0 disabled, 1 enabled. 270 Disable it if you have a slow CPU or you don't have enough ··· 341 ------------------------------------------------------------------------------- 342 Name: bandingfilter 343 Type: bool array (min = 0, max = 32) 344 + Syntax: <0|1[,...]> 345 + Description: Banding filter to reduce effects of fluorescent 346 lighting: 347 0 disabled, 1 enabled. 348 This filter tries to reduce the pattern of horizontal ··· 374 ------------------------------------------------------------------------------- 375 Name: monochrome 376 Type: bool array (min = 0, max = 32) 377 + Syntax: <0|1[,...]> 378 Description: The image sensor is monochrome: 379 0 = no, 1 = yes 380 Default: 0 for every device. ··· 400 ------------------------------------------------------------------------------- 401 Name: contrast 402 Type: long array (min = 0, max = 32) 403 + Syntax: <n[,...]> 404 Description: Set picture contrast (0-65535). 405 Default: 50000 for every device. 406 ------------------------------------------------------------------------------- 407 Name: whiteness 408 Type: long array (min = 0, max = 32) 409 + Syntax: <n[,...]> 410 Description: Set picture whiteness (0-65535). 411 Default: 32768 for every device. 412 ------------------------------------------------------------------------------- 413 Name: debug 414 Type: int 415 + Syntax: <n> 416 Description: Debugging information level, from 0 to 6: 417 0 = none (use carefully) 418 1 = critical errors
Documentation/usb/zc0301.txt Documentation/video4linux/zc0301.txt
+3 -2
Documentation/video4linux/CARDLIST.saa7134
··· 52 51 -> ProVideo PV952 [1540:9524] 53 52 -> AverMedia AverTV/305 [1461:2108] 54 53 -> ASUS TV-FM 7135 [1043:4845] 55 - 54 -> LifeView FlyTV Platinum FM [5168:0214,1489:0214] 56 55 -> LifeView FlyDVB-T DUO [5168:0306] 57 56 -> Avermedia AVerTV 307 [1461:a70a] 58 57 -> Avermedia AVerTV GO 007 FM [1461:f31f] ··· 84 83 -> Terratec Cinergy 250 PCI TV [153b:1160] 85 84 -> LifeView FlyDVB Trio [5168:0319] 86 85 -> AverTV DVB-T 777 [1461:2c05] 87 - 86 -> LifeView FlyDVB-T [5168:0301] 88 87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421] 89 88 -> Tevion/KWorld DVB-T 220RF [17de:7201] 90 89 -> ELSA EX-VISION 700TV [1048:226c] ··· 92 91 -> AVerMedia A169 B [1461:7360] 93 92 -> AVerMedia A169 B1 [1461:6360] 94 93 -> Medion 7134 Bridge #2 [16be:0005]
··· 52 51 -> ProVideo PV952 [1540:9524] 53 52 -> AverMedia AverTV/305 [1461:2108] 54 53 -> ASUS TV-FM 7135 [1043:4845] 55 + 54 -> LifeView FlyTV Platinum FM / Gold [5168:0214,1489:0214,5168:0304] 56 55 -> LifeView FlyDVB-T DUO [5168:0306] 57 56 -> Avermedia AVerTV 307 [1461:a70a] 58 57 -> Avermedia AVerTV GO 007 FM [1461:f31f] ··· 84 83 -> Terratec Cinergy 250 PCI TV [153b:1160] 85 84 -> LifeView FlyDVB Trio [5168:0319] 86 85 -> AverTV DVB-T 777 [1461:2c05] 87 + 86 -> LifeView FlyDVB-T / Genius VideoWonder DVB-T [5168:0301,1489:0301] 88 87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421] 89 88 -> Tevion/KWorld DVB-T 220RF [17de:7201] 90 89 -> ELSA EX-VISION 700TV [1048:226c] ··· 92 91 -> AVerMedia A169 B [1461:7360] 93 92 -> AVerMedia A169 B1 [1461:6360] 94 93 -> Medion 7134 Bridge #2 [16be:0005] 95 + 94 -> LifeView FlyDVB-T Hybrid Cardbus [5168:3306,5168:3502]
+11 -11
drivers/media/Kconfig
··· 51 tristate 52 53 config USB_DABUSB 54 - tristate "DABUSB driver" 55 - depends on USB 56 - ---help--- 57 - A Digital Audio Broadcasting (DAB) Receiver for USB and Linux 58 - brought to you by the DAB-Team 59 - <http://wwwbode.cs.tum.edu/Par/arch/dab/>. This driver can be taken 60 - as an example for URB-based bulk, control, and isochronous 61 - transactions. URB's are explained in 62 - <Documentation/usb/URB.txt>. 63 64 - To compile this driver as a module, choose M here: the 65 - module will be called dabusb. 66 67 endmenu 68
··· 51 tristate 52 53 config USB_DABUSB 54 + tristate "DABUSB driver" 55 + depends on USB 56 + ---help--- 57 + A Digital Audio Broadcasting (DAB) Receiver for USB and Linux 58 + brought to you by the DAB-Team 59 + <http://wwwbode.cs.tum.edu/Par/arch/dab/>. This driver can be taken 60 + as an example for URB-based bulk, control, and isochronous 61 + transactions. URB's are explained in 62 + <Documentation/usb/URB.txt>. 63 64 + To compile this driver as a module, choose M here: the 65 + module will be called dabusb. 66 67 endmenu 68
+1
drivers/media/dvb/bt8xx/Kconfig
··· 7 select DVB_CX24110 8 select DVB_OR51211 9 select DVB_LGDT330X 10 help 11 Support for PCI cards based on the Bt8xx PCI bridge. Examples are 12 the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards,
··· 7 select DVB_CX24110 8 select DVB_OR51211 9 select DVB_LGDT330X 10 + select FW_LOADER 11 help 12 Support for PCI cards based on the Bt8xx PCI bridge. Examples are 13 the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards,
+9 -3
drivers/media/dvb/dvb-core/dmxdev.c
··· 141 } 142 143 if ((file->f_flags & O_ACCMODE) == O_RDONLY) { 144 - void *mem = vmalloc(DVR_BUFFER_SIZE); 145 if (!mem) { 146 mutex_unlock(&dmxdev->mutex); 147 return -ENOMEM; 148 } 149 dvb_ringbuffer_init(&dmxdev->dvr_buffer, mem, DVR_BUFFER_SIZE); 150 } 151 152 if ((file->f_flags & O_ACCMODE) == O_WRONLY) { ··· 190 dmxdev->dvr_orig_fe); 191 } 192 if ((file->f_flags & O_ACCMODE) == O_RDONLY) { 193 if (dmxdev->dvr_buffer.data) { 194 void *mem = dmxdev->dvr_buffer.data; 195 mb(); ··· 1036 1037 static struct dvb_device dvbdev_dvr = { 1038 .priv = NULL, 1039 - .users = 1, 1040 - .writers = 1, 1041 .fops = &dvb_dvr_fops 1042 }; 1043
··· 141 } 142 143 if ((file->f_flags & O_ACCMODE) == O_RDONLY) { 144 + void *mem; 145 + if (!dvbdev->readers) { 146 + mutex_unlock(&dmxdev->mutex); 147 + return -EBUSY; 148 + } 149 + mem = vmalloc(DVR_BUFFER_SIZE); 150 if (!mem) { 151 mutex_unlock(&dmxdev->mutex); 152 return -ENOMEM; 153 } 154 dvb_ringbuffer_init(&dmxdev->dvr_buffer, mem, DVR_BUFFER_SIZE); 155 + dvbdev->readers--; 156 } 157 158 if ((file->f_flags & O_ACCMODE) == O_WRONLY) { ··· 184 dmxdev->dvr_orig_fe); 185 } 186 if ((file->f_flags & O_ACCMODE) == O_RDONLY) { 187 + dvbdev->readers++; 188 if (dmxdev->dvr_buffer.data) { 189 void *mem = dmxdev->dvr_buffer.data; 190 mb(); ··· 1029 1030 static struct dvb_device dvbdev_dvr = { 1031 .priv = NULL, 1032 + .readers = 1, 1033 .fops = &dvb_dvr_fops 1034 }; 1035
+17 -1
drivers/media/dvb/dvb-core/dvb_frontend.c
··· 105 fe_status_t status; 106 unsigned long tune_mode_flags; 107 unsigned int delay; 108 109 /* swzigzag values */ 110 unsigned int state; ··· 122 unsigned int check_wrapped; 123 }; 124 125 126 static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) 127 { ··· 214 if (fe->ops->init) 215 fe->ops->init(fe); 216 } 217 218 static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepriv, int locked) 219 { ··· 516 fepriv->quality = 0; 517 fepriv->delay = 3*HZ; 518 fepriv->status = 0; 519 - dvb_frontend_init(fe); 520 fepriv->wakeup = 0; 521 522 while (1) { 523 up(&fepriv->sem); /* is locked when we enter the thread... */ ··· 534 535 if (down_interruptible(&fepriv->sem)) 536 break; 537 538 /* do an iteration of the tuning loop */ 539 if (fe->ops->tune) {
··· 105 fe_status_t status; 106 unsigned long tune_mode_flags; 107 unsigned int delay; 108 + unsigned int reinitialise; 109 110 /* swzigzag values */ 111 unsigned int state; ··· 121 unsigned int check_wrapped; 122 }; 123 124 + static void dvb_frontend_wakeup(struct dvb_frontend *fe); 125 126 static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status) 127 { ··· 212 if (fe->ops->init) 213 fe->ops->init(fe); 214 } 215 + 216 + void dvb_frontend_reinitialise(struct dvb_frontend *fe) 217 + { 218 + struct dvb_frontend_private *fepriv = fe->frontend_priv; 219 + 220 + fepriv->reinitialise = 1; 221 + dvb_frontend_wakeup(fe); 222 + } 223 + EXPORT_SYMBOL(dvb_frontend_reinitialise); 224 225 static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepriv, int locked) 226 { ··· 505 fepriv->quality = 0; 506 fepriv->delay = 3*HZ; 507 fepriv->status = 0; 508 fepriv->wakeup = 0; 509 + fepriv->reinitialise = 1; 510 511 while (1) { 512 up(&fepriv->sem); /* is locked when we enter the thread... */ ··· 523 524 if (down_interruptible(&fepriv->sem)) 525 break; 526 + 527 + if (fepriv->reinitialise) { 528 + dvb_frontend_init(fe); 529 + fepriv->reinitialise = 0; 530 + } 531 532 /* do an iteration of the tuning loop */ 533 if (fe->ops->tune) {
+2
drivers/media/dvb/dvb-core/dvb_frontend.h
··· 112 113 extern int dvb_unregister_frontend(struct dvb_frontend* fe); 114 115 extern void dvb_frontend_sleep_until(struct timeval *waketime, u32 add_usec); 116 extern s32 timeval_usec_diff(struct timeval lasttime, struct timeval curtime); 117
··· 112 113 extern int dvb_unregister_frontend(struct dvb_frontend* fe); 114 115 + extern void dvb_frontend_reinitialise(struct dvb_frontend *fe); 116 + 117 extern void dvb_frontend_sleep_until(struct timeval *waketime, u32 add_usec); 118 extern s32 timeval_usec_diff(struct timeval lasttime, struct timeval curtime); 119
+54
drivers/media/dvb/dvb-usb/cxusb.c
··· 233 { 0xfe, 0x4e, KEY_POWER }, 234 }; 235 236 static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) 237 { 238 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 }; ··· 550 551 .i2c_algo = &cxusb_i2c_algo, 552 553 .generic_bulk_ctrl_endpoint = 0x01, 554 /* parameter for the MPEG2-data transfer */ 555 .urb = { ··· 644 645 .i2c_algo = &cxusb_i2c_algo, 646 647 .generic_bulk_ctrl_endpoint = 0x01, 648 /* parameter for the MPEG2-data transfer */ 649 .urb = { ··· 688 .tuner_attach = cxusb_dtt7579_tuner_attach, 689 690 .i2c_algo = &cxusb_i2c_algo, 691 692 .generic_bulk_ctrl_endpoint = 0x01, 693 /* parameter for the MPEG2-data transfer */
··· 233 { 0xfe, 0x4e, KEY_POWER }, 234 }; 235 236 + static struct dvb_usb_rc_key dvico_portable_rc_keys[] = { 237 + { 0xfc, 0x02, KEY_SETUP }, /* Profile */ 238 + { 0xfc, 0x43, KEY_POWER2 }, 239 + { 0xfc, 0x06, KEY_EPG }, 240 + { 0xfc, 0x5a, KEY_BACK }, 241 + { 0xfc, 0x05, KEY_MENU }, 242 + { 0xfc, 0x47, KEY_INFO }, 243 + { 0xfc, 0x01, KEY_TAB }, 244 + { 0xfc, 0x42, KEY_PREVIOUSSONG },/* Replay */ 245 + { 0xfc, 0x49, KEY_VOLUMEUP }, 246 + { 0xfc, 0x09, KEY_VOLUMEDOWN }, 247 + { 0xfc, 0x54, KEY_CHANNELUP }, 248 + { 0xfc, 0x0b, KEY_CHANNELDOWN }, 249 + { 0xfc, 0x16, KEY_CAMERA }, 250 + { 0xfc, 0x40, KEY_TUNER }, /* ATV/DTV */ 251 + { 0xfc, 0x45, KEY_OPEN }, 252 + { 0xfc, 0x19, KEY_1 }, 253 + { 0xfc, 0x18, KEY_2 }, 254 + { 0xfc, 0x1b, KEY_3 }, 255 + { 0xfc, 0x1a, KEY_4 }, 256 + { 0xfc, 0x58, KEY_5 }, 257 + { 0xfc, 0x59, KEY_6 }, 258 + { 0xfc, 0x15, KEY_7 }, 259 + { 0xfc, 0x14, KEY_8 }, 260 + { 0xfc, 0x17, KEY_9 }, 261 + { 0xfc, 0x44, KEY_ANGLE }, /* Aspect */ 262 + { 0xfc, 0x55, KEY_0 }, 263 + { 0xfc, 0x07, KEY_ZOOM }, 264 + { 0xfc, 0x0a, KEY_REWIND }, 265 + { 0xfc, 0x08, KEY_PLAYPAUSE }, 266 + { 0xfc, 0x4b, KEY_FASTFORWARD }, 267 + { 0xfc, 0x5b, KEY_MUTE }, 268 + { 0xfc, 0x04, KEY_STOP }, 269 + { 0xfc, 0x56, KEY_RECORD }, 270 + { 0xfc, 0x57, KEY_POWER }, 271 + { 0xfc, 0x41, KEY_UNKNOWN }, /* INPUT */ 272 + { 0xfc, 0x00, KEY_UNKNOWN }, /* HD */ 273 + }; 274 + 275 static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) 276 { 277 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 }; ··· 511 512 .i2c_algo = &cxusb_i2c_algo, 513 514 + .rc_interval = 100, 515 + .rc_key_map = dvico_portable_rc_keys, 516 + .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), 517 + .rc_query = cxusb_rc_query, 518 + 519 .generic_bulk_ctrl_endpoint = 0x01, 520 /* parameter for the MPEG2-data transfer */ 521 .urb = { ··· 600 601 .i2c_algo = &cxusb_i2c_algo, 602 603 + .rc_interval = 100, 604 + .rc_key_map = dvico_portable_rc_keys, 605 + .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), 606 + .rc_query = cxusb_rc_query, 607 + 608 .generic_bulk_ctrl_endpoint = 0x01, 609 /* parameter for the MPEG2-data transfer */ 610 .urb = { ··· 639 .tuner_attach = cxusb_dtt7579_tuner_attach, 640 641 .i2c_algo = &cxusb_i2c_algo, 642 + 643 + .rc_interval = 100, 644 + .rc_key_map = dvico_portable_rc_keys, 645 + .rc_key_map_size = ARRAY_SIZE(dvico_portable_rc_keys), 646 + .rc_query = cxusb_rc_query, 647 648 .generic_bulk_ctrl_endpoint = 0x01, 649 /* parameter for the MPEG2-data transfer */
+46 -1
drivers/media/dvb/dvb-usb/dtt200u.c
··· 94 95 static struct dvb_usb_properties dtt200u_properties; 96 static struct dvb_usb_properties wt220u_properties; 97 98 static int dtt200u_usb_probe(struct usb_interface *intf, 99 const struct usb_device_id *id) 100 { 101 if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 || 102 - dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0) 103 return 0; 104 105 return -ENODEV; ··· 112 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_WARM) }, 113 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_COLD) }, 114 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_WARM) }, 115 { 0 }, 116 }; 117 MODULE_DEVICE_TABLE(usb, dtt200u_usb_table); ··· 195 { .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)", 196 .cold_ids = { &dtt200u_usb_table[2], NULL }, 197 .warm_ids = { &dtt200u_usb_table[3], NULL }, 198 }, 199 { NULL }, 200 }
··· 94 95 static struct dvb_usb_properties dtt200u_properties; 96 static struct dvb_usb_properties wt220u_properties; 97 + static struct dvb_usb_properties wt220u_zl0353_properties; 98 99 static int dtt200u_usb_probe(struct usb_interface *intf, 100 const struct usb_device_id *id) 101 { 102 if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 || 103 + dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0 || 104 + dvb_usb_device_init(intf,&wt220u_zl0353_properties,THIS_MODULE,NULL) == 0) 105 return 0; 106 107 return -ENODEV; ··· 110 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_WARM) }, 111 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_COLD) }, 112 { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_WARM) }, 113 + { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_COLD) }, 114 + { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_WARM) }, 115 { 0 }, 116 }; 117 MODULE_DEVICE_TABLE(usb, dtt200u_usb_table); ··· 191 { .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)", 192 .cold_ids = { &dtt200u_usb_table[2], NULL }, 193 .warm_ids = { &dtt200u_usb_table[3], NULL }, 194 + }, 195 + { NULL }, 196 + } 197 + }; 198 + 199 + static struct dvb_usb_properties wt220u_zl0353_properties = { 200 + .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_NEED_PID_FILTERING, 201 + .pid_filter_count = 15, 202 + 203 + .usb_ctrl = CYPRESS_FX2, 204 + .firmware = "dvb-usb-wt220u-zl0353-01.fw", 205 + 206 + .power_ctrl = dtt200u_power_ctrl, 207 + .streaming_ctrl = dtt200u_streaming_ctrl, 208 + .pid_filter = dtt200u_pid_filter, 209 + .frontend_attach = dtt200u_frontend_attach, 210 + 211 + .rc_interval = 300, 212 + .rc_key_map = dtt200u_rc_keys, 213 + .rc_key_map_size = ARRAY_SIZE(dtt200u_rc_keys), 214 + .rc_query = dtt200u_rc_query, 215 + 216 + .generic_bulk_ctrl_endpoint = 0x01, 217 + 218 + /* parameter for the MPEG2-data transfer */ 219 + .urb = { 220 + .type = DVB_USB_BULK, 221 + .count = 7, 222 + .endpoint = 0x02, 223 + .u = { 224 + .bulk = { 225 + .buffersize = 4096, 226 + } 227 + } 228 + }, 229 + 230 + .num_device_descs = 1, 231 + .devices = { 232 + { .name = "WideView WT-220U PenType Receiver (based on ZL353)", 233 + .cold_ids = { &dtt200u_usb_table[4], NULL }, 234 + .warm_ids = { &dtt200u_usb_table[5], NULL }, 235 }, 236 { NULL }, 237 }
+2
drivers/media/dvb/dvb-usb/dvb-usb-ids.h
··· 83 #define USB_PID_DTT200U_WARM 0x0301 84 #define USB_PID_WT220U_COLD 0x0222 85 #define USB_PID_WT220U_WARM 0x0221 86 #define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300 87 #define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301 88 #define USB_PID_NEBULA_DIGITV 0x0201
··· 83 #define USB_PID_DTT200U_WARM 0x0301 84 #define USB_PID_WT220U_COLD 0x0222 85 #define USB_PID_WT220U_WARM 0x0221 86 + #define USB_PID_WT220U_ZL0353_COLD 0x022a 87 + #define USB_PID_WT220U_ZL0353_WARM 0x022b 88 #define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300 89 #define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301 90 #define USB_PID_NEBULA_DIGITV 0x0201
+3 -2
drivers/media/dvb/dvb-usb/vp702x-fe.c
··· 147 cmd[4] = (sr >> 4) & 0xff; 148 cmd[5] = (sr << 4) & 0xf0; 149 150 - deb_fe("setting frontend to: %u -> %u (%x) LNB-based GHz, symbolrate: %d -> %Lu (%Lx)\n", 151 - fep->frequency,freq,freq, fep->u.qpsk.symbol_rate, sr, sr); 152 153 /* if (fep->inversion == INVERSION_ON) 154 cmd[6] |= 0x80; */
··· 147 cmd[4] = (sr >> 4) & 0xff; 148 cmd[5] = (sr << 4) & 0xf0; 149 150 + deb_fe("setting frontend to: %u -> %u (%x) LNB-based GHz, symbolrate: %d -> %lu (%lx)\n", 151 + fep->frequency,freq,freq, fep->u.qpsk.symbol_rate, 152 + (unsigned long) sr, (unsigned long) sr); 153 154 /* if (fep->inversion == INVERSION_ON) 155 cmd[6] |= 0x80; */
+12
drivers/media/dvb/frontends/Kconfig
··· 181 help 182 An ATSC 8VSB tuner module. Say Y when you want to support this frontend. 183 184 config DVB_OR51132 185 tristate "Oren OR51132 based" 186 depends on DVB_CORE ··· 193 help 194 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want 195 to support this frontend. 196 197 config DVB_BCM3510 198 tristate "Broadcom BCM3510"
··· 181 help 182 An ATSC 8VSB tuner module. Say Y when you want to support this frontend. 183 184 + This driver needs external firmware. Please use the command 185 + "<kerneldir>/Documentation/dvb/get_dvb_firmware or51211" to 186 + download it, and then copy it to /usr/lib/hotplug/firmware 187 + or /lib/firmware (depending on configuration of firmware hotplug). 188 + 189 config DVB_OR51132 190 tristate "Oren OR51132 based" 191 depends on DVB_CORE ··· 188 help 189 An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want 190 to support this frontend. 191 + 192 + This driver needs external firmware. Please use the commands 193 + "<kerneldir>/Documentation/dvb/get_dvb_firmware or51132_vsb" and/or 194 + "<kerneldir>/Documentation/dvb/get_dvb_firmware or51132_qam" to 195 + download firmwares for 8VSB and QAM64/256, respectively. Copy them to 196 + /usr/lib/hotplug/firmware or /lib/firmware (depending on 197 + configuration of firmware hotplug). 198 199 config DVB_BCM3510 200 tristate "Broadcom BCM3510"
-12
drivers/media/dvb/frontends/tda1004x.c
··· 52 struct dvb_frontend frontend; 53 54 /* private demod data */ 55 - u8 initialised; 56 enum tda1004x_demod demod_type; 57 }; 58 ··· 593 594 dprintk("%s\n", __FUNCTION__); 595 596 - if (state->initialised) 597 - return 0; 598 - 599 if (tda10045_fwupload(fe)) { 600 printk("tda1004x: firmware upload failed\n"); 601 return -EIO; ··· 622 623 tda1004x_write_mask(state, 0x1f, 0x01, state->config->invert_oclk); 624 625 - state->initialised = 1; 626 return 0; 627 } 628 ··· 629 { 630 struct tda1004x_state* state = fe->demodulator_priv; 631 dprintk("%s\n", __FUNCTION__); 632 - 633 - if (state->initialised) 634 - return 0; 635 636 if (tda10046_fwupload(fe)) { 637 printk("tda1004x: firmware upload failed\n"); ··· 689 // tda1004x_write_mask(state, 0x50, 0x80, 0x80); // handle out of guard echoes 690 tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7); 691 692 - state->initialised = 1; 693 return 0; 694 } 695 ··· 1198 tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1); 1199 break; 1200 } 1201 - state->initialised = 0; 1202 1203 return 0; 1204 } ··· 1261 state->config = config; 1262 state->i2c = i2c; 1263 memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops)); 1264 - state->initialised = 0; 1265 state->demod_type = TDA1004X_DEMOD_TDA10045; 1266 1267 /* check if the demod is there */ ··· 1319 state->config = config; 1320 state->i2c = i2c; 1321 memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops)); 1322 - state->initialised = 0; 1323 state->demod_type = TDA1004X_DEMOD_TDA10046; 1324 1325 /* check if the demod is there */
··· 52 struct dvb_frontend frontend; 53 54 /* private demod data */ 55 enum tda1004x_demod demod_type; 56 }; 57 ··· 594 595 dprintk("%s\n", __FUNCTION__); 596 597 if (tda10045_fwupload(fe)) { 598 printk("tda1004x: firmware upload failed\n"); 599 return -EIO; ··· 626 627 tda1004x_write_mask(state, 0x1f, 0x01, state->config->invert_oclk); 628 629 return 0; 630 } 631 ··· 634 { 635 struct tda1004x_state* state = fe->demodulator_priv; 636 dprintk("%s\n", __FUNCTION__); 637 638 if (tda10046_fwupload(fe)) { 639 printk("tda1004x: firmware upload failed\n"); ··· 697 // tda1004x_write_mask(state, 0x50, 0x80, 0x80); // handle out of guard echoes 698 tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7); 699 700 return 0; 701 } 702 ··· 1207 tda1004x_write_mask(state, TDA1004X_CONFC4, 1, 1); 1208 break; 1209 } 1210 1211 return 0; 1212 } ··· 1271 state->config = config; 1272 state->i2c = i2c; 1273 memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops)); 1274 state->demod_type = TDA1004X_DEMOD_TDA10045; 1275 1276 /* check if the demod is there */ ··· 1330 state->config = config; 1331 state->i2c = i2c; 1332 memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops)); 1333 state->demod_type = TDA1004X_DEMOD_TDA10046; 1334 1335 /* check if the demod is there */
+7 -1
drivers/media/dvb/ttpci/av7110.c
··· 87 static int budgetpatch; 88 static int wss_cfg_4_3 = 0x4008; 89 static int wss_cfg_16_9 = 0x0007; 90 91 module_param_named(debug, av7110_debug, int, 0644); 92 MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)"); ··· 110 MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data"); 111 module_param(wss_cfg_16_9, int, 0444); 112 MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data"); 113 114 static void restart_feeds(struct av7110 *av7110); 115 ··· 2126 read_pwm(av7110)); 2127 break; 2128 case 0x0003: 2129 - /* Haupauge DVB-C 2.1 VES1820/ALPS TDBE2 */ 2130 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2131 read_pwm(av7110)); 2132 break; ··· 2545 /* default OSD window */ 2546 av7110->osdwin = 1; 2547 mutex_init(&av7110->osd_mutex); 2548 2549 /* ARM "watchdog" */ 2550 init_waitqueue_head(&av7110->arm_wait);
··· 87 static int budgetpatch; 88 static int wss_cfg_4_3 = 0x4008; 89 static int wss_cfg_16_9 = 0x0007; 90 + static int tv_standard; 91 92 module_param_named(debug, av7110_debug, int, 0644); 93 MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)"); ··· 109 MODULE_PARM_DESC(wss_cfg_4_3, "WSS 4:3 - default 0x4008 - bit 15: disable, 14: burst mode, 13..0: wss data"); 110 module_param(wss_cfg_16_9, int, 0444); 111 MODULE_PARM_DESC(wss_cfg_16_9, "WSS 16:9 - default 0x0007 - bit 15: disable, 14: burst mode, 13..0: wss data"); 112 + module_param(tv_standard, int, 0444); 113 + MODULE_PARM_DESC(tv_standard, "TV standard: 0 PAL (default), 1 NTSC"); 114 115 static void restart_feeds(struct av7110 *av7110); 116 ··· 2123 read_pwm(av7110)); 2124 break; 2125 case 0x0003: 2126 + /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ 2127 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2128 read_pwm(av7110)); 2129 break; ··· 2542 /* default OSD window */ 2543 av7110->osdwin = 1; 2544 mutex_init(&av7110->osd_mutex); 2545 + 2546 + /* TV standard */ 2547 + av7110->vidmode = tv_standard == 1 ? VIDEO_MODE_NTSC : VIDEO_MODE_PAL; 2548 2549 /* ARM "watchdog" */ 2550 init_waitqueue_head(&av7110->arm_wait);
-2
drivers/media/dvb/ttpci/av7110_av.c
··· 1479 void (*play[])(u8 *, int, void *) = { play_audio_cb, play_video_cb }; 1480 int i, ret; 1481 1482 - av7110->vidmode = VIDEO_MODE_PAL; 1483 - 1484 for (i = 0; i < 2; i++) { 1485 struct ipack *ipack = av7110->ipack + i; 1486
··· 1479 void (*play[])(u8 *, int, void *) = { play_audio_cb, play_video_cb }; 1480 int i, ret; 1481 1482 for (i = 0; i < 2; i++) { 1483 struct ipack *ipack = av7110->ipack + i; 1484
+8 -5
drivers/media/dvb/ttpci/budget-av.c
··· 60 struct dvb_ca_en50221 ca; 61 }; 62 63 - /* GPIO CI Connections: 64 - * 0 - Vcc/Reset (Reset is controlled by capacitor) 65 - * 1 - Attribute Memory 66 - * 2 - Card Enable (Active Low) 67 - * 3 - Card Detect 68 */ 69 70 /**************************************************************************** ··· 213 * but AFAICS it is not routed to the saa7146 */ 214 while (--timeout > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d) 215 msleep(100); 216 217 if (timeout <= 0) 218 {
··· 60 struct dvb_ca_en50221 ca; 61 }; 62 63 + /* GPIO Connections: 64 + * 0 - Vcc/Reset (Reset is controlled by capacitor). Resets the frontend *AS WELL*! 65 + * 1 - CI memory select 0=>IO memory, 1=>Attribute Memory 66 + * 2 - CI Card Enable (Active Low) 67 + * 3 - CI Card Detect 68 */ 69 70 /**************************************************************************** ··· 213 * but AFAICS it is not routed to the saa7146 */ 214 while (--timeout > 0 && ciintf_read_attribute_mem(ca, slot, 0) != 0x1d) 215 msleep(100); 216 + 217 + /* reinitialise the frontend */ 218 + dvb_frontend_reinitialise(budget_av->budget.dvb_frontend); 219 220 if (timeout <= 0) 221 {
+63 -15
drivers/media/dvb/ttpci/budget-core.c
··· 39 #include "budget.h" 40 #include "ttpci-eeprom.h" 41 42 int budget_debug; 43 module_param_named(debug, budget_debug, int, 0644); 44 MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off)."); 45 46 /**************************************************************************** 47 * TT budget / WinTV Nova ··· 82 83 saa7146_write(dev, MC1, MASK_20); // DMA3 off 84 85 - memset(budget->grabbing, 0x00, TS_HEIGHT * TS_WIDTH); 86 87 saa7146_write(dev, PCI_BT_V1, 0x001c0000 | (saa7146_read(dev, PCI_BT_V1) & ~0x001f0000)); 88 89 - budget->tsf = 0xff; 90 budget->ttbp = 0; 91 92 /* ··· 126 127 saa7146_write(dev, BASE_ODD3, 0); 128 saa7146_write(dev, BASE_EVEN3, 0); 129 - saa7146_write(dev, PROT_ADDR3, TS_WIDTH * TS_HEIGHT); 130 saa7146_write(dev, BASE_PAGE3, budget->pt.dma | ME1 | 0x90); 131 132 - if (budget->card->type == BUDGET_FS_ACTIVY) { 133 - saa7146_write(dev, PITCH3, TS_WIDTH / 2); 134 - saa7146_write(dev, NUM_LINE_BYTE3, ((TS_HEIGHT * 2) << 16) | (TS_WIDTH / 2)); 135 - } else { 136 - saa7146_write(dev, PITCH3, TS_WIDTH); 137 - saa7146_write(dev, NUM_LINE_BYTE3, (TS_HEIGHT << 16) | TS_WIDTH); 138 - } 139 140 saa7146_write(dev, MC2, (MASK_04 | MASK_20)); 141 ··· 148 u8 *mem = (u8 *) (budget->grabbing); 149 u32 olddma = budget->ttbp; 150 u32 newdma = saa7146_read(budget->dev, PCI_VDP3); 151 152 /* nearest lower position divisible by 188 */ 153 newdma -= newdma % 188; 154 155 - if (newdma >= TS_BUFLEN) 156 return; 157 158 budget->ttbp = newdma; ··· 162 return; 163 164 if (newdma > olddma) { /* no wraparound, dump olddma..newdma */ 165 - dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, (newdma - olddma) / 188); 166 } else { /* wraparound, dump olddma..buflen and 0..newdma */ 167 - dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, (TS_BUFLEN - olddma) / 188); 168 dvb_dmx_swfilter_packets(&budget->demux, mem, newdma / 188); 169 } 170 } 171 ··· 362 struct saa7146_pci_extension_data *info, 363 struct module *owner) 364 { 365 - int length = TS_WIDTH * TS_HEIGHT; 366 int ret = 0; 367 struct budget_info *bi = info->ext_priv; 368 369 memset(budget, 0, sizeof(struct budget)); 370 ··· 373 374 budget->card = bi; 375 budget->dev = (struct saa7146_dev *) dev; 376 377 dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner); 378 ··· 440 ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac); 441 442 if (NULL == 443 - (budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, length, &budget->pt))) { 444 ret = -ENOMEM; 445 goto err; 446 }
··· 39 #include "budget.h" 40 #include "ttpci-eeprom.h" 41 42 + #define TS_WIDTH (2 * TS_SIZE) 43 + #define TS_WIDTH_ACTIVY TS_SIZE 44 + #define TS_HEIGHT_MASK 0xf00 45 + #define TS_HEIGHT_MASK_ACTIVY 0xc00 46 + #define TS_MIN_BUFSIZE_K 188 47 + #define TS_MAX_BUFSIZE_K 1410 48 + #define TS_MAX_BUFSIZE_K_ACTIVY 564 49 + #define BUFFER_WARNING_WAIT (30*HZ) 50 + 51 int budget_debug; 52 + static int dma_buffer_size = TS_MIN_BUFSIZE_K; 53 module_param_named(debug, budget_debug, int, 0644); 54 + module_param_named(bufsize, dma_buffer_size, int, 0444); 55 MODULE_PARM_DESC(debug, "Turn on/off budget debugging (default:off)."); 56 + MODULE_PARM_DESC(bufsize, "DMA buffer size in KB, default: 188, min: 188, max: 1410 (Activy: 564)"); 57 58 /**************************************************************************** 59 * TT budget / WinTV Nova ··· 70 71 saa7146_write(dev, MC1, MASK_20); // DMA3 off 72 73 + memset(budget->grabbing, 0x00, budget->buffer_size); 74 75 saa7146_write(dev, PCI_BT_V1, 0x001c0000 | (saa7146_read(dev, PCI_BT_V1) & ~0x001f0000)); 76 77 budget->ttbp = 0; 78 79 /* ··· 115 116 saa7146_write(dev, BASE_ODD3, 0); 117 saa7146_write(dev, BASE_EVEN3, 0); 118 + saa7146_write(dev, PROT_ADDR3, budget->buffer_size); 119 saa7146_write(dev, BASE_PAGE3, budget->pt.dma | ME1 | 0x90); 120 121 + saa7146_write(dev, PITCH3, budget->buffer_width); 122 + saa7146_write(dev, NUM_LINE_BYTE3, 123 + (budget->buffer_height << 16) | budget->buffer_width); 124 125 saa7146_write(dev, MC2, (MASK_04 | MASK_20)); 126 ··· 141 u8 *mem = (u8 *) (budget->grabbing); 142 u32 olddma = budget->ttbp; 143 u32 newdma = saa7146_read(budget->dev, PCI_VDP3); 144 + u32 count; 145 146 /* nearest lower position divisible by 188 */ 147 newdma -= newdma % 188; 148 149 + if (newdma >= budget->buffer_size) 150 return; 151 152 budget->ttbp = newdma; ··· 154 return; 155 156 if (newdma > olddma) { /* no wraparound, dump olddma..newdma */ 157 + count = newdma - olddma; 158 + dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, count / 188); 159 } else { /* wraparound, dump olddma..buflen and 0..newdma */ 160 + count = budget->buffer_size - olddma; 161 + dvb_dmx_swfilter_packets(&budget->demux, mem + olddma, count / 188); 162 + count += newdma; 163 dvb_dmx_swfilter_packets(&budget->demux, mem, newdma / 188); 164 + } 165 + 166 + if (count > budget->buffer_warning_threshold) 167 + budget->buffer_warnings++; 168 + 169 + if (budget->buffer_warnings && time_after(jiffies, budget->buffer_warning_time)) { 170 + printk("%s %s: used %d times >80%% of buffer (%u bytes now)\n", 171 + budget->dev->name, __FUNCTION__, budget->buffer_warnings, count); 172 + budget->buffer_warning_time = jiffies + BUFFER_WARNING_WAIT; 173 + budget->buffer_warnings = 0; 174 } 175 } 176 ··· 341 struct saa7146_pci_extension_data *info, 342 struct module *owner) 343 { 344 int ret = 0; 345 struct budget_info *bi = info->ext_priv; 346 + int max_bufsize; 347 + int height_mask; 348 349 memset(budget, 0, sizeof(struct budget)); 350 ··· 351 352 budget->card = bi; 353 budget->dev = (struct saa7146_dev *) dev; 354 + 355 + if (budget->card->type == BUDGET_FS_ACTIVY) { 356 + budget->buffer_width = TS_WIDTH_ACTIVY; 357 + max_bufsize = TS_MAX_BUFSIZE_K_ACTIVY; 358 + height_mask = TS_HEIGHT_MASK_ACTIVY; 359 + } else { 360 + budget->buffer_width = TS_WIDTH; 361 + max_bufsize = TS_MAX_BUFSIZE_K; 362 + height_mask = TS_HEIGHT_MASK; 363 + } 364 + 365 + if (dma_buffer_size < TS_MIN_BUFSIZE_K) 366 + dma_buffer_size = TS_MIN_BUFSIZE_K; 367 + else if (dma_buffer_size > max_bufsize) 368 + dma_buffer_size = max_bufsize; 369 + 370 + budget->buffer_height = dma_buffer_size * 1024 / budget->buffer_width; 371 + budget->buffer_height &= height_mask; 372 + budget->buffer_size = budget->buffer_height * budget->buffer_width; 373 + budget->buffer_warning_threshold = budget->buffer_size * 80/100; 374 + budget->buffer_warnings = 0; 375 + budget->buffer_warning_time = jiffies; 376 + 377 + dprintk(2, "%s: width = %d, height = %d\n", 378 + budget->dev->name, budget->buffer_width, budget->buffer_height); 379 + printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size); 380 381 dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner); 382 ··· 392 ttpci_eeprom_parse_mac(&budget->i2c_adap, budget->dvb_adapter.proposed_mac); 393 394 if (NULL == 395 + (budget->grabbing = saa7146_vmalloc_build_pgtable(dev->pci, budget->buffer_size, &budget->pt))) { 396 ret = -ENOMEM; 397 goto err; 398 }
+14 -14
drivers/media/dvb/ttpci/budget-patch.c
··· 577 saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); 578 // Set RPS1 Address register to point to RPS code (r108 p42) 579 saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle); 580 - // Set Source Line Counter Threshold, using BRS (rCC p43) 581 - // It generates HS event every TS_HEIGHT lines 582 - // this is related to TS_WIDTH set in register 583 - // NUM_LINE_BYTE3 in budget-core.c. If NUM_LINE_BYTE 584 - // low 16 bits are set to TS_WIDTH bytes (TS_WIDTH=2*188 585 - //,then RPS_THRESH1 586 - // should be set to trigger every TS_HEIGHT (512) lines. 587 - // 588 - saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT*1) | MASK_12 ); 589 - 590 - // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 ); 591 - // Enable RPS1 (rFC p33) 592 - saa7146_write(dev, MC1, (MASK_13 | MASK_29)); 593 - 594 595 if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) 596 return -ENOMEM; ··· 587 kfree (budget); 588 return err; 589 } 590 591 592 dev->ext_priv = budget;
··· 577 saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); 578 // Set RPS1 Address register to point to RPS code (r108 p42) 579 saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle); 580 581 if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) 582 return -ENOMEM; ··· 601 kfree (budget); 602 return err; 603 } 604 + 605 + // Set Source Line Counter Threshold, using BRS (rCC p43) 606 + // It generates HS event every TS_HEIGHT lines 607 + // this is related to TS_WIDTH set in register 608 + // NUM_LINE_BYTE3 in budget-core.c. If NUM_LINE_BYTE 609 + // low 16 bits are set to TS_WIDTH bytes (TS_WIDTH=2*188 610 + //,then RPS_THRESH1 611 + // should be set to trigger every TS_HEIGHT (512) lines. 612 + // 613 + saa7146_write(dev, RPS_THRESH1, budget->buffer_height | MASK_12 ); 614 + 615 + // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 ); 616 + // Enable RPS1 (rFC p33) 617 + saa7146_write(dev, MC1, (MASK_13 | MASK_29)); 618 619 620 dev->ext_priv = budget;
+7 -6
drivers/media/dvb/ttpci/budget.h
··· 58 int ci_present; 59 int video_port; 60 61 - u8 tsf; 62 u32 ttbp; 63 int feeding; 64 ··· 84 static struct saa7146_pci_extension_data x_var = { \ 85 .ext_priv = &x_var ## _info, \ 86 .ext = &budget_extension }; 87 - 88 - #define TS_WIDTH (376) 89 - #define TS_HEIGHT (512) 90 - #define TS_BUFLEN (TS_WIDTH*TS_HEIGHT) 91 - #define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE) 92 93 #define BUDGET_TT 0 94 #define BUDGET_TT_HW_DISEQC 1
··· 58 int ci_present; 59 int video_port; 60 61 + u32 buffer_width; 62 + u32 buffer_height; 63 + u32 buffer_size; 64 + u32 buffer_warning_threshold; 65 + u32 buffer_warnings; 66 + unsigned long buffer_warning_time; 67 + 68 u32 ttbp; 69 int feeding; 70 ··· 78 static struct saa7146_pci_extension_data x_var = { \ 79 .ext_priv = &x_var ## _info, \ 80 .ext = &budget_extension }; 81 82 #define BUDGET_TT 0 83 #define BUDGET_TT_HW_DISEQC 1
+65 -168
drivers/media/video/Kconfig
··· 300 camera drivers. 301 302 To compile this driver as a module, choose M here: the 303 - module will be called ovcamchip 304 305 config VIDEO_M32R_AR 306 tristate "AR devices" ··· 316 Say Y here to use the Renesas M64278E-800 camera module, 317 which supports VGA(640x480 pixcels) size of images. 318 319 config VIDEO_MSP3400 320 tristate "Micronas MSP34xx audio decoders" 321 depends on VIDEO_DEV && I2C ··· 330 Support for the Micronas MSP34xx series of audio decoders. 331 332 To compile this driver as a module, choose M here: the 333 - module will be called msp3400 334 335 config VIDEO_CS53L32A 336 tristate "Cirrus Logic CS53L32A audio ADC" ··· 340 stereo A/D converter. 341 342 To compile this driver as a module, choose M here: the 343 - module will be called cs53l32a 344 345 config VIDEO_WM8775 346 - tristate "Wolfson Microelectronics WM8775 audio ADC" 347 depends on VIDEO_DEV && I2C && EXPERIMENTAL 348 ---help--- 349 - Support for the Wolfson Microelectronics WM8775 350 - high performance stereo A/D Converter. 351 352 To compile this driver as a module, choose M here: the 353 - module will be called wm8775 354 355 source "drivers/media/video/cx25840/Kconfig" 356 ··· 371 Support for the Philips SAA7113/4/5 video decoders. 372 373 To compile this driver as a module, choose M here: the 374 - module will be called saa7115 375 376 config VIDEO_SAA7127 377 tristate "Philips SAA7127/9 digital video encoders" ··· 380 Support for the Philips SAA7127/9 digital video encoders. 381 382 To compile this driver as a module, choose M here: the 383 - module will be called saa7127 384 385 # 386 # USB Multimedia device configuration ··· 416 417 source "drivers/media/video/em28xx/Kconfig" 418 419 - config USB_VICAM 420 - tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)" 421 - depends on USB && VIDEO_DEV && EXPERIMENTAL 422 - ---help--- 423 - Say Y here if you have 3com homeconnect camera (vicam). 424 - 425 - This driver uses the Video For Linux API. You must say Y or M to 426 - "Video For Linux" (under Multimedia Devices) to use this driver. 427 - Information on this API and pointers to "v4l" programs may be found 428 - at <file:Documentation/video4linux/API.html>. 429 - 430 - To compile this driver as a module, choose M here: the 431 - module will be called vicam. 432 - 433 config USB_DSBR 434 tristate "D-Link USB FM radio support (EXPERIMENTAL)" 435 depends on USB && VIDEO_DEV && EXPERIMENTAL ··· 425 you must connect the line out connector to a sound card or a 426 set of speakers. 427 428 - This driver uses the Video For Linux API. You must enable 429 - (Y or M in config) Video For Linux (under Character Devices) 430 - to use this driver. Information on this API and pointers to 431 - "v4l" programs may be found at 432 - <file:Documentation/video4linux/API.html>. 433 - 434 To compile this driver as a module, choose M here: the 435 module will be called dsbr100. 436 437 - config USB_ET61X251 438 - tristate "USB ET61X[12]51 PC Camera Controller support" 439 - depends on USB && VIDEO_DEV 440 - ---help--- 441 - Say Y here if you want support for cameras based on Etoms ET61X151 442 - or ET61X251 PC Camera Controllers. 443 444 - See <file:Documentation/usb/et61x251.txt> for more informations. 445 - 446 - This driver uses the Video For Linux API. You must say Y or M to 447 - "Video For Linux" to use this driver. 448 - 449 - To compile this driver as a module, choose M here: the 450 - module will be called et61x251. 451 - 452 - config USB_IBMCAM 453 - tristate "USB IBM (Xirlink) C-it Camera support" 454 - depends on USB && VIDEO_DEV 455 - ---help--- 456 - Say Y here if you want to connect a IBM "C-It" camera, also known as 457 - "Xirlink PC Camera" to your computer's USB port. For more 458 - information, read <file:Documentation/usb/ibmcam.txt>. 459 - 460 - This driver uses the Video For Linux API. You must enable 461 - (Y or M in config) Video For Linux (under Character Devices) 462 - to use this driver. Information on this API and pointers to 463 - "v4l" programs may be found at 464 - <file:Documentation/video4linux/API.html>. 465 - 466 - To compile this driver as a module, choose M here: the 467 - module will be called ibmcam. 468 - 469 - This camera has several configuration options which 470 - can be specified when you load the module. Read 471 - <file:Documentation/usb/ibmcam.txt> to learn more. 472 - 473 - config USB_KONICAWC 474 - tristate "USB Konica Webcam support" 475 - depends on USB && VIDEO_DEV 476 - ---help--- 477 - Say Y here if you want support for webcams based on a Konica 478 - chipset. This is known to work with the Intel YC76 webcam. 479 - 480 - This driver uses the Video For Linux API. You must enable 481 - (Y or M in config) Video For Linux (under Character Devices) 482 - to use this driver. Information on this API and pointers to 483 - "v4l" programs may be found at 484 - <file:Documentation/video4linux/API.html>. 485 - 486 - To compile this driver as a module, choose M here: the 487 - module will be called konicawc. 488 489 config USB_OV511 490 tristate "USB OV511 Camera support" 491 depends on USB && VIDEO_DEV 492 ---help--- 493 Say Y here if you want to connect this type of camera to your 494 - computer's USB port. See <file:Documentation/usb/ov511.txt> for more 495 - information and for a list of supported cameras. 496 - 497 - This driver uses the Video For Linux API. You must say Y or M to 498 - "Video For Linux" (under Character Devices) to use this driver. 499 - Information on this API and pointers to "v4l" programs may be found 500 - at <file:Documentation/video4linux/API.html>. 501 502 To compile this driver as a module, choose M here: the 503 module will be called ov511. ··· 448 depends on USB && VIDEO_DEV 449 ---help--- 450 Say Y here if you want to connect this type of camera to your 451 - computer's USB port. See <file:Documentation/usb/se401.txt> for more 452 - information and for a list of supported cameras. 453 - 454 - This driver uses the Video For Linux API. You must say Y or M to 455 - "Video For Linux" (under Multimedia Devices) to use this driver. 456 - Information on this API and pointers to "v4l" programs may be found 457 - at <file:Documentation/video4linux/API.html>. 458 459 To compile this driver as a module, choose M here: the 460 module will be called se401. 461 462 - config USB_SN9C102 463 - tristate "USB SN9C10x PC Camera Controller support" 464 - depends on USB && VIDEO_DEV 465 - ---help--- 466 - Say Y here if you want support for cameras based on SONiX SN9C101, 467 - SN9C102 or SN9C103 PC Camera Controllers. 468 - 469 - See <file:Documentation/usb/sn9c102.txt> for more informations. 470 - 471 - This driver uses the Video For Linux API. You must say Y or M to 472 - "Video For Linux" to use this driver. 473 - 474 - To compile this driver as a module, choose M here: the 475 - module will be called sn9c102. 476 477 config USB_STV680 478 tristate "USB STV680 (Pencam) Camera support" ··· 462 ---help--- 463 Say Y here if you want to connect this type of camera to your 464 computer's USB port. This includes the Pencam line of cameras. 465 - See <file:Documentation/usb/stv680.txt> for more information and for 466 - a list of supported cameras. 467 - 468 - This driver uses the Video For Linux API. You must say Y or M to 469 - "Video For Linux" (under Multimedia Devices) to use this driver. 470 - Information on this API and pointers to "v4l" programs may be found 471 - at <file:Documentation/video4linux/API.html>. 472 473 To compile this driver as a module, choose M here: the 474 module will be called stv680. 475 476 config USB_W9968CF 477 tristate "USB W996[87]CF JPEG Dual Mode Camera support" 478 - depends on USB && VIDEO_DEV && I2C && VIDEO_OVCAMCHIP 479 ---help--- 480 Say Y here if you want support for cameras based on OV681 or 481 Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips. ··· 481 resolutions and framerates, but cannot be included in the official 482 Linux kernel for performance purposes. 483 484 - See <file:Documentation/usb/w9968cf.txt> for more informations. 485 - 486 - This driver uses the Video For Linux and the I2C APIs. It needs the 487 - OmniVision Camera Chip support as well. You must say Y or M to 488 - "Video For Linux", "I2C Support" and "OmniVision Camera Chip 489 - support" to use this driver. 490 491 To compile this driver as a module, choose M here: the 492 module will be called w9968cf. 493 494 - config USB_ZC0301 495 - tristate "USB ZC0301 Image Processor and Control Chip support" 496 - depends on USB && VIDEO_DEV 497 - ---help--- 498 - Say Y here if you want support for cameras based on the ZC0301 499 - Image Processor and Control Chip. 500 501 - See <file:Documentation/usb/zc0301.txt> for more informations. 502 - 503 - This driver uses the Video For Linux API. You must say Y or M to 504 - "Video For Linux" to use this driver. 505 - 506 - To compile this driver as a module, choose M here: the 507 - module will be called zc0301. 508 - 509 - config USB_PWC 510 - tristate "USB Philips Cameras" 511 - depends on USB && VIDEO_DEV 512 - ---help--- 513 - Say Y or M here if you want to use one of these Philips & OEM 514 - webcams: 515 - * Philips PCA645, PCA646 516 - * Philips PCVC675, PCVC680, PCVC690 517 - * Philips PCVC720/40, PCVC730, PCVC740, PCVC750 518 - * Askey VC010 519 - * Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro' 520 - and 'Orbit'/'Sphere' 521 - * Samsung MPC-C10, MPC-C30 522 - * Creative Webcam 5, Pro Ex 523 - * SOTEC Afina Eye 524 - * Visionite VCS-UC300, VCS-UM100 525 - 526 - The PCA635, PCVC665 and PCVC720/20 are not supported by this driver 527 - and never will be, but the 665 and 720/20 are supported by other 528 - drivers. 529 - 530 - See <file:Documentation/usb/philips.txt> for more information and 531 - installation instructions. 532 - 533 - The built-in microphone is enabled by selecting USB Audio support. 534 - 535 - This driver uses the Video For Linux API. You must say Y or M to 536 - "Video For Linux" (under Character Devices) to use this driver. 537 - Information on this API and pointers to "v4l" programs may be found 538 - at <file:Documentation/video4linux/API.html>. 539 - 540 - To compile this driver as a module, choose M here: the 541 - module will be called pwc. 542 543 endmenu # V4L USB devices 544
··· 300 camera drivers. 301 302 To compile this driver as a module, choose M here: the 303 + module will be called ovcamchip. 304 305 config VIDEO_M32R_AR 306 tristate "AR devices" ··· 316 Say Y here to use the Renesas M64278E-800 camera module, 317 which supports VGA(640x480 pixcels) size of images. 318 319 + # 320 + # Encoder / Decoder module configuration 321 + # 322 + 323 + menu "Encoders and Decoders" 324 + depends on VIDEO_DEV 325 + 326 config VIDEO_MSP3400 327 tristate "Micronas MSP34xx audio decoders" 328 depends on VIDEO_DEV && I2C ··· 323 Support for the Micronas MSP34xx series of audio decoders. 324 325 To compile this driver as a module, choose M here: the 326 + module will be called msp3400. 327 328 config VIDEO_CS53L32A 329 tristate "Cirrus Logic CS53L32A audio ADC" ··· 333 stereo A/D converter. 334 335 To compile this driver as a module, choose M here: the 336 + module will be called cs53l32a. 337 338 config VIDEO_WM8775 339 + tristate "Wolfson Microelectronics WM8775 audio ADC with input mixer" 340 depends on VIDEO_DEV && I2C && EXPERIMENTAL 341 ---help--- 342 + Support for the Wolfson Microelectronics WM8775 high 343 + performance stereo A/D Converter with a 4 channel input mixer. 344 345 To compile this driver as a module, choose M here: the 346 + module will be called wm8775. 347 + 348 + config VIDEO_WM8739 349 + tristate "Wolfson Microelectronics WM8739 stereo audio ADC" 350 + depends on VIDEO_DEV && I2C && EXPERIMENTAL 351 + ---help--- 352 + Support for the Wolfson Microelectronics WM8739 353 + stereo A/D Converter. 354 + 355 + To compile this driver as a module, choose M here: the 356 + module will be called wm8739. 357 358 source "drivers/media/video/cx25840/Kconfig" 359 ··· 354 Support for the Philips SAA7113/4/5 video decoders. 355 356 To compile this driver as a module, choose M here: the 357 + module will be called saa7115. 358 359 config VIDEO_SAA7127 360 tristate "Philips SAA7127/9 digital video encoders" ··· 363 Support for the Philips SAA7127/9 digital video encoders. 364 365 To compile this driver as a module, choose M here: the 366 + module will be called saa7127. 367 + 368 + config VIDEO_UPD64031A 369 + tristate "NEC Electronics uPD64031A Ghost Reduction" 370 + depends on VIDEO_DEV && I2C && EXPERIMENTAL 371 + ---help--- 372 + Support for the NEC Electronics uPD64031A Ghost Reduction 373 + video chip. It is most often found in NTSC TV cards made for 374 + Japan and is used to reduce the 'ghosting' effect that can 375 + be present in analog TV broadcasts. 376 + 377 + To compile this driver as a module, choose M here: the 378 + module will be called upd64031a. 379 + 380 + config VIDEO_UPD64083 381 + tristate "NEC Electronics uPD64083 3-Dimensional Y/C separation" 382 + depends on VIDEO_DEV && I2C && EXPERIMENTAL 383 + ---help--- 384 + Support for the NEC Electronics uPD64083 3-Dimensional Y/C 385 + separation video chip. It is used to improve the quality of 386 + the colors of a composite signal. 387 + 388 + To compile this driver as a module, choose M here: the 389 + module will be called upd64083. 390 + 391 + endmenu # encoder / decoder chips 392 393 # 394 # USB Multimedia device configuration ··· 374 375 source "drivers/media/video/em28xx/Kconfig" 376 377 config USB_DSBR 378 tristate "D-Link USB FM radio support (EXPERIMENTAL)" 379 depends on USB && VIDEO_DEV && EXPERIMENTAL ··· 397 you must connect the line out connector to a sound card or a 398 set of speakers. 399 400 To compile this driver as a module, choose M here: the 401 module will be called dsbr100. 402 403 + source "drivers/media/video/usbvideo/Kconfig" 404 405 + source "drivers/media/video/et61x251/Kconfig" 406 407 config USB_OV511 408 tristate "USB OV511 Camera support" 409 depends on USB && VIDEO_DEV 410 ---help--- 411 Say Y here if you want to connect this type of camera to your 412 + computer's USB port. See <file:Documentation/video4linux/ov511.txt> 413 + for more information and for a list of supported cameras. 414 415 To compile this driver as a module, choose M here: the 416 module will be called ov511. ··· 479 depends on USB && VIDEO_DEV 480 ---help--- 481 Say Y here if you want to connect this type of camera to your 482 + computer's USB port. See <file:Documentation/video4linux/se401.txt> 483 + for more information and for a list of supported cameras. 484 485 To compile this driver as a module, choose M here: the 486 module will be called se401. 487 488 + source "drivers/media/video/sn9c102/Kconfig" 489 490 config USB_STV680 491 tristate "USB STV680 (Pencam) Camera support" ··· 511 ---help--- 512 Say Y here if you want to connect this type of camera to your 513 computer's USB port. This includes the Pencam line of cameras. 514 + See <file:Documentation/video4linux/stv680.txt> for more information 515 + and for a list of supported cameras. 516 517 To compile this driver as a module, choose M here: the 518 module will be called stv680. 519 520 config USB_W9968CF 521 tristate "USB W996[87]CF JPEG Dual Mode Camera support" 522 + depends on USB && VIDEO_DEV && I2C 523 + select VIDEO_OVCAMCHIP 524 ---help--- 525 Say Y here if you want support for cameras based on OV681 or 526 Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips. ··· 534 resolutions and framerates, but cannot be included in the official 535 Linux kernel for performance purposes. 536 537 + See <file:Documentation/video4linux/w9968cf.txt> for more info. 538 539 To compile this driver as a module, choose M here: the 540 module will be called w9968cf. 541 542 + source "drivers/media/video/zc0301/Kconfig" 543 544 + source "drivers/media/video/pwc/Kconfig" 545 546 endmenu # V4L USB devices 547
+3 -3
drivers/media/video/Makefile
··· 45 obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o 46 obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o 47 obj-$(CONFIG_VIDEO_WM8775) += wm8775.o 48 obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip/ 49 obj-$(CONFIG_VIDEO_CPIA2) += cpia2/ 50 obj-$(CONFIG_VIDEO_MXB) += saa7111.o tda9840.o tea6415c.o tea6420.o mxb.o ··· 65 obj-$(CONFIG_VIDEO_CX25840) += cx25840/ 66 obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o 67 obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o 68 - 69 - et61x251-objs := et61x251_core.o et61x251_tas5130d1b.o 70 - zc0301-objs := zc0301_core.o zc0301_pas202bcb.o 71 72 obj-$(CONFIG_USB_DABUSB) += dabusb.o 73 obj-$(CONFIG_USB_DSBR) += dsbr100.o
··· 45 obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o 46 obj-$(CONFIG_VIDEO_CS53L32A) += cs53l32a.o 47 obj-$(CONFIG_VIDEO_WM8775) += wm8775.o 48 + obj-$(CONFIG_VIDEO_WM8739) += wm8739.o 49 obj-$(CONFIG_VIDEO_OVCAMCHIP) += ovcamchip/ 50 obj-$(CONFIG_VIDEO_CPIA2) += cpia2/ 51 obj-$(CONFIG_VIDEO_MXB) += saa7111.o tda9840.o tea6415c.o tea6420.o mxb.o ··· 64 obj-$(CONFIG_VIDEO_CX25840) += cx25840/ 65 obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o 66 obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o 67 + obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o 68 + obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o 69 70 obj-$(CONFIG_USB_DABUSB) += dabusb.o 71 obj-$(CONFIG_USB_DSBR) += dsbr100.o
+88 -82
drivers/media/video/bt8xx/bttv-driver.c
··· 973 For now this is sufficient. */ 974 switch (input) { 975 case TVAUDIO_INPUT_RADIO: 976 - route.input = MSP_INPUT(MSP_IN_SCART_2, MSP_IN_TUNER_1, 977 - MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART); 978 break; 979 case TVAUDIO_INPUT_EXTERN: 980 - route.input = MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, 981 - MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART); 982 break; 983 case TVAUDIO_INPUT_INTERN: 984 /* Yes, this is the same input as for RADIO. I doubt ··· 986 input is the BTTV_BOARD_AVERMEDIA98. I wonder how 987 that was tested. My guess is that the whole INTERN 988 input does not work. */ 989 - route.input = MSP_INPUT(MSP_IN_SCART_2, MSP_IN_TUNER_1, 990 - MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART); 991 break; 992 case TVAUDIO_INPUT_TUNER: 993 default: ··· 1023 static void 1024 i2c_vidiocschan(struct bttv *btv) 1025 { 1026 - struct video_channel c; 1027 1028 - memset(&c,0,sizeof(c)); 1029 - c.norm = btv->tvnorm; 1030 - c.channel = btv->input; 1031 - bttv_call_i2c_clients(btv,VIDIOCSCHAN,&c); 1032 if (btv->c.type == BTTV_BOARD_VOODOOTV_FM) 1033 - bttv_tda9880_setnorm(btv,c.norm); 1034 } 1035 1036 static int ··· 1181 break; 1182 if (i == BTTV_CTLS) 1183 return -EINVAL; 1184 - if (i >= 4 && i <= 8) { 1185 memset(&va,0,sizeof(va)); 1186 - bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); 1187 - if (btv->audio_hook) 1188 - btv->audio_hook(btv,&va,0); 1189 } 1190 switch (c->id) { 1191 case V4L2_CID_BRIGHTNESS: ··· 1218 break; 1219 1220 case V4L2_CID_AUDIO_MUTE: 1221 - c->value = (VIDEO_AUDIO_MUTE & va.flags) ? 1 : 0; 1222 - break; 1223 case V4L2_CID_AUDIO_VOLUME: 1224 - c->value = va.volume; 1225 - break; 1226 case V4L2_CID_AUDIO_BALANCE: 1227 - c->value = va.balance; 1228 - break; 1229 case V4L2_CID_AUDIO_BASS: 1230 - c->value = va.bass; 1231 - break; 1232 case V4L2_CID_AUDIO_TREBLE: 1233 - c->value = va.treble; 1234 break; 1235 1236 case V4L2_CID_PRIVATE_CHROMA_AGC: ··· 1274 break; 1275 if (i == BTTV_CTLS) 1276 return -EINVAL; 1277 - if (i >= 4 && i <= 8) { 1278 memset(&va,0,sizeof(va)); 1279 - bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); 1280 - if (btv->audio_hook) 1281 - btv->audio_hook(btv,&va,0); 1282 } 1283 switch (c->id) { 1284 case V4L2_CID_BRIGHTNESS: ··· 1318 bt848_sat(btv,c->value); 1319 break; 1320 case V4L2_CID_AUDIO_MUTE: 1321 - if (c->value) { 1322 - va.flags |= VIDEO_AUDIO_MUTE; 1323 - audio_mute(btv, 1); 1324 - } else { 1325 - va.flags &= ~VIDEO_AUDIO_MUTE; 1326 - audio_mute(btv, 0); 1327 - } 1328 - break; 1329 - 1330 case V4L2_CID_AUDIO_VOLUME: 1331 - va.volume = c->value; 1332 - break; 1333 case V4L2_CID_AUDIO_BALANCE: 1334 - va.balance = c->value; 1335 - break; 1336 case V4L2_CID_AUDIO_BASS: 1337 - va.bass = c->value; 1338 - break; 1339 case V4L2_CID_AUDIO_TREBLE: 1340 - va.treble = c->value; 1341 break; 1342 1343 case V4L2_CID_PRIVATE_CHROMA_AGC: ··· 1379 break; 1380 default: 1381 return -EINVAL; 1382 - } 1383 - if (i >= 4 && i <= 8) { 1384 - bttv_call_i2c_clients(btv, VIDIOCSAUDIO, &va); 1385 - if (btv->audio_hook) 1386 - btv->audio_hook(btv,&va,1); 1387 } 1388 return 0; 1389 } ··· 1602 } 1603 case VIDIOCSFREQ: 1604 { 1605 - unsigned long *freq = arg; 1606 mutex_lock(&btv->lock); 1607 - btv->freq=*freq; 1608 - bttv_call_i2c_clients(btv,VIDIOCSFREQ,freq); 1609 if (btv->has_matchbox && btv->radio_user) 1610 - tea5757_set_freq(btv,*freq); 1611 mutex_unlock(&btv->lock); 1612 return 0; 1613 } ··· 1842 return -EINVAL; 1843 mutex_lock(&btv->lock); 1844 memset(t,0,sizeof(*t)); 1845 - strcpy(t->name, "Television"); 1846 - t->type = V4L2_TUNER_ANALOG_TV; 1847 - t->capability = V4L2_TUNER_CAP_NORM; 1848 t->rxsubchans = V4L2_TUNER_SUB_MONO; 1849 if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC) 1850 t->signal = 0xffff; 1851 - { 1852 - struct video_tuner tuner; 1853 1854 - memset(&tuner, 0, sizeof (tuner)); 1855 - tuner.rangehigh = 0xffffffffUL; 1856 - bttv_call_i2c_clients(btv, VIDIOCGTUNER, &tuner); 1857 - t->rangelow = tuner.rangelow; 1858 - t->rangehigh = tuner.rangehigh; 1859 - } 1860 - { 1861 /* Hmmm ... */ 1862 struct video_audio va; 1863 memset(&va, 0, sizeof(struct video_audio)); 1864 - bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); 1865 - if (btv->audio_hook) 1866 - btv->audio_hook(btv,&va,0); 1867 if(va.mode & VIDEO_SOUND_STEREO) { 1868 - t->audmode = V4L2_TUNER_MODE_STEREO; 1869 - t->rxsubchans |= V4L2_TUNER_SUB_STEREO; 1870 } 1871 - if(va.mode & VIDEO_SOUND_LANG1) { 1872 t->audmode = V4L2_TUNER_MODE_LANG1; 1873 t->rxsubchans = V4L2_TUNER_SUB_LANG1 1874 | V4L2_TUNER_SUB_LANG2; ··· 1880 if (0 != t->index) 1881 return -EINVAL; 1882 mutex_lock(&btv->lock); 1883 - { 1884 struct video_audio va; 1885 memset(&va, 0, sizeof(struct video_audio)); 1886 - bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); 1887 if (t->audmode == V4L2_TUNER_MODE_MONO) 1888 va.mode = VIDEO_SOUND_MONO; 1889 else if (t->audmode == V4L2_TUNER_MODE_STEREO || ··· 1893 va.mode = VIDEO_SOUND_LANG1; 1894 else if (t->audmode == V4L2_TUNER_MODE_LANG2) 1895 va.mode = VIDEO_SOUND_LANG2; 1896 - bttv_call_i2c_clients(btv, VIDIOCSAUDIO, &va); 1897 - if (btv->audio_hook) 1898 - btv->audio_hook(btv,&va,1); 1899 } 1900 mutex_unlock(&btv->lock); 1901 return 0; ··· 1918 return -EINVAL; 1919 mutex_lock(&btv->lock); 1920 btv->freq = f->frequency; 1921 - bttv_call_i2c_clients(btv,VIDIOCSFREQ,&btv->freq); 1922 if (btv->has_matchbox && btv->radio_user) 1923 tea5757_set_freq(btv,btv->freq); 1924 mutex_unlock(&btv->lock); ··· 1926 } 1927 case VIDIOC_LOG_STATUS: 1928 { 1929 bttv_call_i2c_clients(btv, VIDIOC_LOG_STATUS, NULL); 1930 return 0; 1931 } 1932 ··· 2878 return 0; 2879 } 2880 *c = bttv_ctls[i]; 2881 - if (i >= 4 && i <= 8) { 2882 struct video_audio va; 2883 memset(&va,0,sizeof(va)); 2884 - bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); 2885 - if (btv->audio_hook) 2886 - btv->audio_hook(btv,&va,0); 2887 switch (bttv_ctls[i].id) { 2888 case V4L2_CID_AUDIO_VOLUME: 2889 if (!(va.flags & VIDEO_AUDIO_VOLUME))
··· 973 For now this is sufficient. */ 974 switch (input) { 975 case TVAUDIO_INPUT_RADIO: 976 + route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, 977 + MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); 978 break; 979 case TVAUDIO_INPUT_EXTERN: 980 + route.input = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, 981 + MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); 982 break; 983 case TVAUDIO_INPUT_INTERN: 984 /* Yes, this is the same input as for RADIO. I doubt ··· 986 input is the BTTV_BOARD_AVERMEDIA98. I wonder how 987 that was tested. My guess is that the whole INTERN 988 input does not work. */ 989 + route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, 990 + MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); 991 break; 992 case TVAUDIO_INPUT_TUNER: 993 default: ··· 1023 static void 1024 i2c_vidiocschan(struct bttv *btv) 1025 { 1026 + v4l2_std_id std = bttv_tvnorms[btv->tvnorm].v4l2_id; 1027 1028 + bttv_call_i2c_clients(btv, VIDIOC_S_STD, &std); 1029 if (btv->c.type == BTTV_BOARD_VOODOOTV_FM) 1030 + bttv_tda9880_setnorm(btv,btv->tvnorm); 1031 } 1032 1033 static int ··· 1184 break; 1185 if (i == BTTV_CTLS) 1186 return -EINVAL; 1187 + if (btv->audio_hook && i >= 4 && i <= 8) { 1188 memset(&va,0,sizeof(va)); 1189 + btv->audio_hook(btv,&va,0); 1190 + switch (c->id) { 1191 + case V4L2_CID_AUDIO_MUTE: 1192 + c->value = (VIDEO_AUDIO_MUTE & va.flags) ? 1 : 0; 1193 + break; 1194 + case V4L2_CID_AUDIO_VOLUME: 1195 + c->value = va.volume; 1196 + break; 1197 + case V4L2_CID_AUDIO_BALANCE: 1198 + c->value = va.balance; 1199 + break; 1200 + case V4L2_CID_AUDIO_BASS: 1201 + c->value = va.bass; 1202 + break; 1203 + case V4L2_CID_AUDIO_TREBLE: 1204 + c->value = va.treble; 1205 + break; 1206 + } 1207 + return 0; 1208 } 1209 switch (c->id) { 1210 case V4L2_CID_BRIGHTNESS: ··· 1205 break; 1206 1207 case V4L2_CID_AUDIO_MUTE: 1208 case V4L2_CID_AUDIO_VOLUME: 1209 case V4L2_CID_AUDIO_BALANCE: 1210 case V4L2_CID_AUDIO_BASS: 1211 case V4L2_CID_AUDIO_TREBLE: 1212 + bttv_call_i2c_clients(btv,VIDIOC_G_CTRL,c); 1213 break; 1214 1215 case V4L2_CID_PRIVATE_CHROMA_AGC: ··· 1269 break; 1270 if (i == BTTV_CTLS) 1271 return -EINVAL; 1272 + if (btv->audio_hook && i >= 4 && i <= 8) { 1273 memset(&va,0,sizeof(va)); 1274 + btv->audio_hook(btv,&va,0); 1275 + switch (c->id) { 1276 + case V4L2_CID_AUDIO_MUTE: 1277 + if (c->value) { 1278 + va.flags |= VIDEO_AUDIO_MUTE; 1279 + audio_mute(btv, 1); 1280 + } else { 1281 + va.flags &= ~VIDEO_AUDIO_MUTE; 1282 + audio_mute(btv, 0); 1283 + } 1284 + break; 1285 + 1286 + case V4L2_CID_AUDIO_VOLUME: 1287 + va.volume = c->value; 1288 + break; 1289 + case V4L2_CID_AUDIO_BALANCE: 1290 + va.balance = c->value; 1291 + break; 1292 + case V4L2_CID_AUDIO_BASS: 1293 + va.bass = c->value; 1294 + break; 1295 + case V4L2_CID_AUDIO_TREBLE: 1296 + va.treble = c->value; 1297 + break; 1298 + } 1299 + btv->audio_hook(btv,&va,1); 1300 + return 0; 1301 } 1302 switch (c->id) { 1303 case V4L2_CID_BRIGHTNESS: ··· 1289 bt848_sat(btv,c->value); 1290 break; 1291 case V4L2_CID_AUDIO_MUTE: 1292 + audio_mute(btv, c->value); 1293 + /* fall through */ 1294 case V4L2_CID_AUDIO_VOLUME: 1295 case V4L2_CID_AUDIO_BALANCE: 1296 case V4L2_CID_AUDIO_BASS: 1297 case V4L2_CID_AUDIO_TREBLE: 1298 + bttv_call_i2c_clients(btv,VIDIOC_S_CTRL,c); 1299 break; 1300 1301 case V4L2_CID_PRIVATE_CHROMA_AGC: ··· 1363 break; 1364 default: 1365 return -EINVAL; 1366 } 1367 return 0; 1368 } ··· 1591 } 1592 case VIDIOCSFREQ: 1593 { 1594 + struct v4l2_frequency freq; 1595 + 1596 + memset(&freq, 0, sizeof(freq)); 1597 + freq.frequency = *(unsigned long *)arg; 1598 mutex_lock(&btv->lock); 1599 + freq.type = btv->radio_user ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV; 1600 + btv->freq = *(unsigned long *)arg; 1601 + bttv_call_i2c_clients(btv,VIDIOC_S_FREQUENCY,&freq); 1602 if (btv->has_matchbox && btv->radio_user) 1603 + tea5757_set_freq(btv,*(unsigned long *)arg); 1604 mutex_unlock(&btv->lock); 1605 return 0; 1606 } ··· 1827 return -EINVAL; 1828 mutex_lock(&btv->lock); 1829 memset(t,0,sizeof(*t)); 1830 t->rxsubchans = V4L2_TUNER_SUB_MONO; 1831 + bttv_call_i2c_clients(btv, VIDIOC_G_TUNER, t); 1832 + strcpy(t->name, "Television"); 1833 + t->capability = V4L2_TUNER_CAP_NORM; 1834 + t->type = V4L2_TUNER_ANALOG_TV; 1835 if (btread(BT848_DSTATUS)&BT848_DSTATUS_HLOC) 1836 t->signal = 0xffff; 1837 1838 + if (btv->audio_hook) { 1839 /* Hmmm ... */ 1840 struct video_audio va; 1841 memset(&va, 0, sizeof(struct video_audio)); 1842 + btv->audio_hook(btv,&va,0); 1843 + t->audmode = V4L2_TUNER_MODE_MONO; 1844 + t->rxsubchans = V4L2_TUNER_SUB_MONO; 1845 if(va.mode & VIDEO_SOUND_STEREO) { 1846 + t->audmode = V4L2_TUNER_MODE_STEREO; 1847 + t->rxsubchans = V4L2_TUNER_SUB_STEREO; 1848 } 1849 + if(va.mode & VIDEO_SOUND_LANG2) { 1850 t->audmode = V4L2_TUNER_MODE_LANG1; 1851 t->rxsubchans = V4L2_TUNER_SUB_LANG1 1852 | V4L2_TUNER_SUB_LANG2; ··· 1872 if (0 != t->index) 1873 return -EINVAL; 1874 mutex_lock(&btv->lock); 1875 + bttv_call_i2c_clients(btv, VIDIOC_S_TUNER, t); 1876 + if (btv->audio_hook) { 1877 struct video_audio va; 1878 memset(&va, 0, sizeof(struct video_audio)); 1879 if (t->audmode == V4L2_TUNER_MODE_MONO) 1880 va.mode = VIDEO_SOUND_MONO; 1881 else if (t->audmode == V4L2_TUNER_MODE_STEREO || ··· 1885 va.mode = VIDEO_SOUND_LANG1; 1886 else if (t->audmode == V4L2_TUNER_MODE_LANG2) 1887 va.mode = VIDEO_SOUND_LANG2; 1888 + btv->audio_hook(btv,&va,1); 1889 } 1890 mutex_unlock(&btv->lock); 1891 return 0; ··· 1912 return -EINVAL; 1913 mutex_lock(&btv->lock); 1914 btv->freq = f->frequency; 1915 + bttv_call_i2c_clients(btv,VIDIOC_S_FREQUENCY,f); 1916 if (btv->has_matchbox && btv->radio_user) 1917 tea5757_set_freq(btv,btv->freq); 1918 mutex_unlock(&btv->lock); ··· 1920 } 1921 case VIDIOC_LOG_STATUS: 1922 { 1923 + printk(KERN_INFO "bttv%d: ================= START STATUS CARD #%d =================\n", btv->c.nr, btv->c.nr); 1924 bttv_call_i2c_clients(btv, VIDIOC_LOG_STATUS, NULL); 1925 + printk(KERN_INFO "bttv%d: ================== END STATUS CARD #%d ==================\n", btv->c.nr, btv->c.nr); 1926 return 0; 1927 } 1928 ··· 2870 return 0; 2871 } 2872 *c = bttv_ctls[i]; 2873 + if (btv->audio_hook && i >= 4 && i <= 8) { 2874 struct video_audio va; 2875 memset(&va,0,sizeof(va)); 2876 + btv->audio_hook(btv,&va,0); 2877 switch (bttv_ctls[i].id) { 2878 case V4L2_CID_AUDIO_VOLUME: 2879 if (!(va.flags & VIDEO_AUDIO_VOLUME))
+1 -1
drivers/media/video/bt8xx/bttv-vbi.c
··· 184 - tvnorm->vbistart[0]; 185 count1 = (s64) f->fmt.vbi.start[1] + f->fmt.vbi.count[1] 186 - tvnorm->vbistart[1]; 187 - count = clamp (max (count0, count1), 1LL, (s64) VBI_MAXLINES); 188 189 f->fmt.vbi.start[0] = tvnorm->vbistart[0]; 190 f->fmt.vbi.start[1] = tvnorm->vbistart[1];
··· 184 - tvnorm->vbistart[0]; 185 count1 = (s64) f->fmt.vbi.start[1] + f->fmt.vbi.count[1] 186 - tvnorm->vbistart[1]; 187 + count = clamp (max (count0, count1), (s64) 1, (s64) VBI_MAXLINES); 188 189 f->fmt.vbi.start[0] = tvnorm->vbistart[0]; 190 f->fmt.vbi.start[1] = tvnorm->vbistart[1];
+6 -7
drivers/media/video/cpia.c
··· 64 MODULE_SUPPORTED_DEVICE("video"); 65 #endif 66 67 - static unsigned short colorspace_conv = 0; 68 module_param(colorspace_conv, ushort, 0444); 69 MODULE_PARM_DESC(colorspace_conv, 70 - "\n<n> Colorspace conversion:" 71 - "\n0 = disable" 72 - "\n1 = enable" 73 - "\nDefault value is 0" 74 - "\n"); 75 76 #define ABOUT "V4L-Driver for Vision CPiA based cameras" 77 ··· 4041 "allowed, it is disabled by default now. Users should fix the " 4042 "applications in case they don't work without conversion " 4043 "reenabled by setting the 'colorspace_conv' module " 4044 - "parameter to 1"); 4045 4046 #ifdef CONFIG_PROC_FS 4047 proc_cpia_create();
··· 64 MODULE_SUPPORTED_DEVICE("video"); 65 #endif 66 67 + static unsigned short colorspace_conv; 68 module_param(colorspace_conv, ushort, 0444); 69 MODULE_PARM_DESC(colorspace_conv, 70 + " Colorspace conversion:" 71 + "\n 0 = disable, 1 = enable" 72 + "\n Default value is 0" 73 + ); 74 75 #define ABOUT "V4L-Driver for Vision CPiA based cameras" 76 ··· 4042 "allowed, it is disabled by default now. Users should fix the " 4043 "applications in case they don't work without conversion " 4044 "reenabled by setting the 'colorspace_conv' module " 4045 + "parameter to 1\n"); 4046 4047 #ifdef CONFIG_PROC_FS 4048 proc_cpia_create();
+1 -1
drivers/media/video/cpia2/cpia2.h
··· 456 int cpia2_allocate_buffers(struct camera_data *cam); 457 void cpia2_free_buffers(struct camera_data *cam); 458 long cpia2_read(struct camera_data *cam, 459 - char *buf, unsigned long count, int noblock); 460 unsigned int cpia2_poll(struct camera_data *cam, 461 struct file *filp, poll_table *wait); 462 int cpia2_remap_buffer(struct camera_data *cam, struct vm_area_struct *vma);
··· 456 int cpia2_allocate_buffers(struct camera_data *cam); 457 void cpia2_free_buffers(struct camera_data *cam); 458 long cpia2_read(struct camera_data *cam, 459 + char __user *buf, unsigned long count, int noblock); 460 unsigned int cpia2_poll(struct camera_data *cam, 461 struct file *filp, poll_table *wait); 462 int cpia2_remap_buffer(struct camera_data *cam, struct vm_area_struct *vma);
+2 -1
drivers/media/video/cx25840/cx25840-audio.c
··· 19 #include <linux/videodev2.h> 20 #include <linux/i2c.h> 21 #include <media/v4l2-common.h> 22 23 - #include "cx25840.h" 24 25 static int set_audclk_freq(struct i2c_client *client, u32 freq) 26 {
··· 19 #include <linux/videodev2.h> 20 #include <linux/i2c.h> 21 #include <media/v4l2-common.h> 22 + #include <media/cx25840.h> 23 24 + #include "cx25840-core.h" 25 26 static int set_audclk_freq(struct i2c_client *client, u32 freq) 27 {
+14 -10
drivers/media/video/cx25840/cx25840-core.c
··· 32 #include <linux/videodev2.h> 33 #include <linux/i2c.h> 34 #include <media/v4l2-common.h> 35 36 - #include "cx25840.h" 37 38 MODULE_DESCRIPTION("Conexant CX25840 audio/video decoder driver"); 39 MODULE_AUTHOR("Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford"); ··· 669 { 670 struct cx25840_state *state = i2c_get_clientdata(client); 671 struct v4l2_tuner *vt = arg; 672 673 switch (cmd) { 674 #ifdef CONFIG_VIDEO_ADV_DEBUG ··· 751 state->radio = 1; 752 break; 753 754 - case VIDIOC_G_INPUT: 755 - *(int *)arg = state->vid_input; 756 break; 757 758 - case VIDIOC_S_INPUT: 759 - return set_input(client, *(enum cx25840_video_input *)arg, state->aud_input); 760 761 - case VIDIOC_S_AUDIO: 762 - { 763 - struct v4l2_audio *input = arg; 764 765 - return set_input(client, state->vid_input, input->index); 766 - } 767 768 case VIDIOC_S_FREQUENCY: 769 input_change(client);
··· 32 #include <linux/videodev2.h> 33 #include <linux/i2c.h> 34 #include <media/v4l2-common.h> 35 + #include <media/cx25840.h> 36 37 + #include "cx25840-core.h" 38 39 MODULE_DESCRIPTION("Conexant CX25840 audio/video decoder driver"); 40 MODULE_AUTHOR("Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford"); ··· 668 { 669 struct cx25840_state *state = i2c_get_clientdata(client); 670 struct v4l2_tuner *vt = arg; 671 + struct v4l2_routing *route = arg; 672 673 switch (cmd) { 674 #ifdef CONFIG_VIDEO_ADV_DEBUG ··· 749 state->radio = 1; 750 break; 751 752 + case VIDIOC_INT_G_VIDEO_ROUTING: 753 + route->input = state->vid_input; 754 + route->output = 0; 755 break; 756 757 + case VIDIOC_INT_S_VIDEO_ROUTING: 758 + return set_input(client, route->input, state->aud_input); 759 760 + case VIDIOC_INT_G_AUDIO_ROUTING: 761 + route->input = state->aud_input; 762 + route->output = 0; 763 + break; 764 765 + case VIDIOC_INT_S_AUDIO_ROUTING: 766 + return set_input(client, state->vid_input, route->input); 767 768 case VIDIOC_S_FREQUENCY: 769 input_change(client);
+13 -2
drivers/media/video/cx25840/cx25840-firmware.c
··· 20 #include <linux/i2c-algo-bit.h> 21 #include <linux/firmware.h> 22 #include <media/v4l2-common.h> 23 24 - #include "cx25840.h" 25 26 #define FWFILE "v4l-cx25840.fw" 27 - #define FWSEND 1024 28 29 #define FWDEV(x) &((x)->adapter->dev) 30
··· 20 #include <linux/i2c-algo-bit.h> 21 #include <linux/firmware.h> 22 #include <media/v4l2-common.h> 23 + #include <media/cx25840.h> 24 25 + #include "cx25840-core.h" 26 27 #define FWFILE "v4l-cx25840.fw" 28 + 29 + /* 30 + * Mike Isely <isely@pobox.com> - The FWSEND parameter controls the 31 + * size of the firmware chunks sent down the I2C bus to the chip. 32 + * Previously this had been set to 1024 but unfortunately some I2C 33 + * implementations can't transfer data in such big gulps. 34 + * Specifically, the pvrusb2 driver has a hard limit of around 60 35 + * bytes, due to the encapsulation there of I2C traffic into USB 36 + * messages. So we have to significantly reduce this parameter. 37 + */ 38 + #define FWSEND 48 39 40 #define FWDEV(x) &((x)->adapter->dev) 41
+5 -4
drivers/media/video/cx25840/cx25840-vbi.c
··· 19 #include <linux/videodev2.h> 20 #include <linux/i2c.h> 21 #include <media/v4l2-common.h> 22 23 - #include "cx25840.h" 24 25 static int odd_parity(u8 c) 26 { ··· 152 case VIDIOC_G_FMT: 153 { 154 static u16 lcr2vbi[] = { 155 - 0, V4L2_SLICED_TELETEXT_PAL_B, 0, /* 1 */ 156 0, V4L2_SLICED_WSS_625, 0, /* 4 */ 157 V4L2_SLICED_CAPTION_525, /* 6 */ 158 0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */ ··· 232 for (i = 7; i <= 23; i++) { 233 for (x = 0; x <= 1; x++) { 234 switch (svbi->service_lines[1-x][i]) { 235 - case V4L2_SLICED_TELETEXT_PAL_B: 236 lcr[i] |= 1 << (4 * x); 237 break; 238 case V4L2_SLICED_WSS_625: ··· 283 284 switch (id2) { 285 case 1: 286 - id2 = V4L2_SLICED_TELETEXT_PAL_B; 287 break; 288 case 4: 289 id2 = V4L2_SLICED_WSS_625;
··· 19 #include <linux/videodev2.h> 20 #include <linux/i2c.h> 21 #include <media/v4l2-common.h> 22 + #include <media/cx25840.h> 23 24 + #include "cx25840-core.h" 25 26 static int odd_parity(u8 c) 27 { ··· 151 case VIDIOC_G_FMT: 152 { 153 static u16 lcr2vbi[] = { 154 + 0, V4L2_SLICED_TELETEXT_B, 0, /* 1 */ 155 0, V4L2_SLICED_WSS_625, 0, /* 4 */ 156 V4L2_SLICED_CAPTION_525, /* 6 */ 157 0, 0, V4L2_SLICED_VPS, 0, 0, /* 9 */ ··· 231 for (i = 7; i <= 23; i++) { 232 for (x = 0; x <= 1; x++) { 233 switch (svbi->service_lines[1-x][i]) { 234 + case V4L2_SLICED_TELETEXT_B: 235 lcr[i] |= 1 << (4 * x); 236 break; 237 case V4L2_SLICED_WSS_625: ··· 282 283 switch (id2) { 284 case 1: 285 + id2 = V4L2_SLICED_TELETEXT_B; 286 break; 287 case 4: 288 id2 = V4L2_SLICED_WSS_625;
+3 -43
drivers/media/video/cx25840/cx25840.h drivers/media/video/cx25840/cx25840-core.h
··· 1 - /* cx25840 API header 2 * 3 * Copyright (C) 2003-2004 Chris Kennedy 4 * ··· 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 20 - #ifndef _CX25840_H_ 21 - #define _CX25840_H_ 22 23 24 #include <linux/videodev2.h> ··· 31 is to select the audio standard explicitly. Many thanks to Hauppauge for 32 providing this information. */ 33 #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) 34 - 35 - enum cx25840_video_input { 36 - /* Composite video inputs In1-In8 */ 37 - CX25840_COMPOSITE1 = 1, 38 - CX25840_COMPOSITE2, 39 - CX25840_COMPOSITE3, 40 - CX25840_COMPOSITE4, 41 - CX25840_COMPOSITE5, 42 - CX25840_COMPOSITE6, 43 - CX25840_COMPOSITE7, 44 - CX25840_COMPOSITE8, 45 - 46 - /* S-Video inputs consist of one luma input (In1-In4) ORed with one 47 - chroma input (In5-In8) */ 48 - CX25840_SVIDEO_LUMA1 = 0x10, 49 - CX25840_SVIDEO_LUMA2 = 0x20, 50 - CX25840_SVIDEO_LUMA3 = 0x30, 51 - CX25840_SVIDEO_LUMA4 = 0x40, 52 - CX25840_SVIDEO_CHROMA4 = 0x400, 53 - CX25840_SVIDEO_CHROMA5 = 0x500, 54 - CX25840_SVIDEO_CHROMA6 = 0x600, 55 - CX25840_SVIDEO_CHROMA7 = 0x700, 56 - CX25840_SVIDEO_CHROMA8 = 0x800, 57 - 58 - /* S-Video aliases for common luma/chroma combinations */ 59 - CX25840_SVIDEO1 = 0x510, 60 - CX25840_SVIDEO2 = 0x620, 61 - CX25840_SVIDEO3 = 0x730, 62 - CX25840_SVIDEO4 = 0x840, 63 - }; 64 - 65 - enum cx25840_audio_input { 66 - /* Audio inputs: serial or In4-In8 */ 67 - CX25840_AUDIO_SERIAL, 68 - CX25840_AUDIO4 = 4, 69 - CX25840_AUDIO5, 70 - CX25840_AUDIO6, 71 - CX25840_AUDIO7, 72 - CX25840_AUDIO8, 73 - }; 74 75 struct cx25840_state { 76 int pvr150_workaround;
··· 1 + /* cx25840 internal API header 2 * 3 * Copyright (C) 2003-2004 Chris Kennedy 4 * ··· 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 20 + #ifndef _CX25840_CORE_H_ 21 + #define _CX25840_CORE_H_ 22 23 24 #include <linux/videodev2.h> ··· 31 is to select the audio standard explicitly. Many thanks to Hauppauge for 32 providing this information. */ 33 #define CX25840_CID_ENABLE_PVR150_WORKAROUND (V4L2_CID_PRIVATE_BASE+0) 34 35 struct cx25840_state { 36 int pvr150_workaround;
+10 -5
drivers/media/video/cx88/Kconfig
··· 1 config VIDEO_CX88 2 tristate "Conexant 2388x (bt878 successor) support" 3 depends on VIDEO_DEV && PCI && I2C ··· 29 30 It only works with boards with function 01 enabled. 31 To check if your board supports, use lspci -n. 32 - If supported, you should see 1471:8801 or 1471:8811 33 PCI device. 34 35 To compile this driver as a module, choose M here: the ··· 77 This adds DVB-T support for cards based on the 78 Connexant 2388x chip and the MT352 demodulator. 79 80 - config VIDEO_CX88_VP3054 81 - tristate "VP-3054 Secondary I2C Bus Support" 82 - default m 83 - depends on DVB_MT352 84 ---help--- 85 This adds DVB-T support for cards based on the 86 Connexant 2388x chip and the MT352 demodulator,
··· 1 + config VIDEO_CX88_VP3054 2 + tristate 3 + depends on VIDEO_CX88_DVB && DVB_MT352 4 + 5 config VIDEO_CX88 6 tristate "Conexant 2388x (bt878 successor) support" 7 depends on VIDEO_DEV && PCI && I2C ··· 25 26 It only works with boards with function 01 enabled. 27 To check if your board supports, use lspci -n. 28 + If supported, you should see 14f1:8801 or 14f1:8811 29 PCI device. 30 31 To compile this driver as a module, choose M here: the ··· 73 This adds DVB-T support for cards based on the 74 Connexant 2388x chip and the MT352 demodulator. 75 76 + config VIDEO_CX88_DVB_VP3054 77 + bool "VP-3054 Secondary I2C Bus Support" 78 + default y 79 + depends on VIDEO_CX88_DVB_MT352 80 + select VIDEO_CX88_VP3054 81 ---help--- 82 This adds DVB-T support for cards based on the 83 Connexant 2388x chip and the MT352 demodulator,
+2 -2
drivers/media/video/em28xx/em28xx-cards.c
··· 151 },{ 152 .type = EM28XX_VMUX_SVIDEO, 153 .vmux = 2, 154 - .amux = MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, 155 - MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART), 156 }}, 157 }, 158 [EM2820_BOARD_MSI_VOX_USB_2] = {
··· 151 },{ 152 .type = EM28XX_VMUX_SVIDEO, 153 .vmux = 2, 154 + .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, 155 + MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), 156 }}, 157 }, 158 [EM2820_BOARD_MSI_VOX_USB_2] = {
+5 -28
drivers/media/video/em28xx/em28xx-video.c
··· 222 if (dev->i2s_speed) 223 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed); 224 route.input = dev->ctl_ainput; 225 - route.output = MSP_OUTPUT(MSP_OUT_SCART1_DA); 226 /* Note: this is msp3400 specific */ 227 em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING, &route); 228 ainput = EM28XX_AUDIO_SRC_TUNER; ··· 1141 case VIDIOC_G_TUNER: 1142 { 1143 struct v4l2_tuner *t = arg; 1144 - int status = 0; 1145 1146 if (0 != t->index) 1147 return -EINVAL; 1148 1149 memset(t, 0, sizeof(*t)); 1150 strcpy(t->name, "Tuner"); 1151 - t->type = V4L2_TUNER_ANALOG_TV; 1152 - t->capability = V4L2_TUNER_CAP_NORM; 1153 - t->rangehigh = 0xffffffffUL; /* FIXME: set correct range */ 1154 - /* t->signal = 0xffff;*/ 1155 - /* em28xx_i2c_call_clients(dev,VIDIOC_G_TUNER,t);*/ 1156 - /* No way to get signal strength? */ 1157 mutex_lock(&dev->lock); 1158 - em28xx_i2c_call_clients(dev, DECODER_GET_STATUS, 1159 - &status); 1160 mutex_unlock(&dev->lock); 1161 - t->signal = 1162 - (status & DECODER_STATUS_GOOD) != 0 ? 0xffff : 0; 1163 - 1164 em28xx_videodbg("VIDIO_G_TUNER: signal=%x, afc=%x\n", t->signal, 1165 t->afc); 1166 return 0; ··· 1158 case VIDIOC_S_TUNER: 1159 { 1160 struct v4l2_tuner *t = arg; 1161 - int status = 0; 1162 1163 if (0 != t->index) 1164 return -EINVAL; 1165 - memset(t, 0, sizeof(*t)); 1166 - strcpy(t->name, "Tuner"); 1167 - t->type = V4L2_TUNER_ANALOG_TV; 1168 - t->capability = V4L2_TUNER_CAP_NORM; 1169 - t->rangehigh = 0xffffffffUL; /* FIXME: set correct range */ 1170 - /* t->signal = 0xffff; */ 1171 - /* No way to get signal strength? */ 1172 mutex_lock(&dev->lock); 1173 - em28xx_i2c_call_clients(dev, DECODER_GET_STATUS, 1174 - &status); 1175 mutex_unlock(&dev->lock); 1176 - t->signal = 1177 - (status & DECODER_STATUS_GOOD) != 0 ? 0xffff : 0; 1178 - 1179 - em28xx_videodbg("VIDIO_S_TUNER: signal=%x, afc=%x\n", 1180 - t->signal, t->afc); 1181 return 0; 1182 } 1183 case VIDIOC_G_FREQUENCY:
··· 222 if (dev->i2s_speed) 223 em28xx_i2c_call_clients(dev, VIDIOC_INT_I2S_CLOCK_FREQ, &dev->i2s_speed); 224 route.input = dev->ctl_ainput; 225 + route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1); 226 /* Note: this is msp3400 specific */ 227 em28xx_i2c_call_clients(dev, VIDIOC_INT_S_AUDIO_ROUTING, &route); 228 ainput = EM28XX_AUDIO_SRC_TUNER; ··· 1141 case VIDIOC_G_TUNER: 1142 { 1143 struct v4l2_tuner *t = arg; 1144 1145 if (0 != t->index) 1146 return -EINVAL; 1147 1148 memset(t, 0, sizeof(*t)); 1149 strcpy(t->name, "Tuner"); 1150 mutex_lock(&dev->lock); 1151 + /* let clients fill in the remainder of this struct */ 1152 + em28xx_i2c_call_clients(dev, cmd, t); 1153 mutex_unlock(&dev->lock); 1154 em28xx_videodbg("VIDIO_G_TUNER: signal=%x, afc=%x\n", t->signal, 1155 t->afc); 1156 return 0; ··· 1168 case VIDIOC_S_TUNER: 1169 { 1170 struct v4l2_tuner *t = arg; 1171 1172 if (0 != t->index) 1173 return -EINVAL; 1174 mutex_lock(&dev->lock); 1175 + /* let clients handle this */ 1176 + em28xx_i2c_call_clients(dev, cmd, t); 1177 mutex_unlock(&dev->lock); 1178 return 0; 1179 } 1180 case VIDIOC_G_FREQUENCY:
+14
drivers/media/video/et61x251/Kconfig
···
··· 1 + config USB_ET61X251 2 + tristate "USB ET61X[12]51 PC Camera Controller support" 3 + depends on USB && VIDEO_DEV 4 + ---help--- 5 + Say Y here if you want support for cameras based on Etoms ET61X151 6 + or ET61X251 PC Camera Controllers. 7 + 8 + See <file:Documentation/video4linux/et61x251.txt> for more info. 9 + 10 + This driver uses the Video For Linux API. You must say Y or M to 11 + "Video For Linux" to use this driver. 12 + 13 + To compile this driver as a module, choose M here: the 14 + module will be called et61x251.
+3
drivers/media/video/ir-kbd-i2c.c
··· 411 case I2C_HW_B_BT848: 412 probe = probe_bttv; 413 break; 414 case I2C_HW_SAA7134: 415 probe = probe_saa7134; 416 break;
··· 411 case I2C_HW_B_BT848: 412 probe = probe_bttv; 413 break; 414 + case I2C_HW_B_CX2341X: 415 + probe = probe_bttv; 416 + break; 417 case I2C_HW_SAA7134: 418 probe = probe_saa7134; 419 break;
+42 -49
drivers/media/video/msp3400-driver.c
··· 279 msp_write_dsp(client, 0x13, state->acb); 280 281 /* Sets I2S speed 0 = 1.024 Mbps, 1 = 2.048 Mbps */ 282 - msp_write_dem(client, 0x40, state->i2s_mode); 283 - } 284 - 285 - void msp_set_mute(struct i2c_client *client) 286 - { 287 - struct msp_state *state = i2c_get_clientdata(client); 288 - 289 - v4l_dbg(1, msp_debug, client, "mute audio\n"); 290 - msp_write_dsp(client, 0x0000, 0); 291 - msp_write_dsp(client, 0x0007, 1); 292 - if (state->has_scart2_out_volume) 293 - msp_write_dsp(client, 0x0040, 1); 294 - if (state->has_headphones) 295 - msp_write_dsp(client, 0x0006, 0); 296 } 297 298 void msp_set_audio(struct i2c_client *client) ··· 288 struct msp_state *state = i2c_get_clientdata(client); 289 int bal = 0, bass, treble, loudness; 290 int val = 0; 291 292 - if (!state->muted) 293 val = (state->volume * 0x7f / 65535) << 8; 294 295 - v4l_dbg(1, msp_debug, client, "mute=%s volume=%d\n", 296 - state->muted ? "on" : "off", state->volume); 297 298 msp_write_dsp(client, 0x0000, val); 299 - msp_write_dsp(client, 0x0007, state->muted ? 0x1 : (val | 0x1)); 300 if (state->has_scart2_out_volume) 301 - msp_write_dsp(client, 0x0040, state->muted ? 0x1 : (val | 0x1)); 302 if (state->has_headphones) 303 msp_write_dsp(client, 0x0006, val); 304 if (!state->has_sound_processing) ··· 336 337 if (NULL == state->kthread) 338 return; 339 - msp_set_mute(client); 340 state->watch_stereo = 0; 341 state->restart = 1; 342 wake_up_interruptible(&state->wq); ··· 363 364 /* ------------------------------------------------------------------------ */ 365 366 - static int msp_mode_v4l2_to_v4l1(int rxsubchans) 367 { 368 - int mode = 0; 369 - 370 - if (rxsubchans & V4L2_TUNER_SUB_STEREO) 371 - mode |= VIDEO_SOUND_STEREO; 372 - if (rxsubchans & V4L2_TUNER_SUB_LANG2) 373 - mode |= VIDEO_SOUND_LANG2 | VIDEO_SOUND_STEREO; 374 - if (rxsubchans & V4L2_TUNER_SUB_LANG1) 375 - mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_STEREO; 376 - if (mode == 0) 377 - mode |= VIDEO_SOUND_MONO; 378 - return mode; 379 } 380 381 static int msp_mode_v4l1_to_v4l2(int mode) ··· 590 break; 591 if (state->opmode == OPMODE_AUTOSELECT) 592 msp_detect_stereo(client); 593 - va->mode = msp_mode_v4l2_to_v4l1(state->rxsubchans); 594 break; 595 } 596 ··· 605 state->treble = va->treble; 606 msp_set_audio(client); 607 608 - if (va->mode != 0 && state->radio == 0) { 609 state->audmode = msp_mode_v4l1_to_v4l2(va->mode); 610 msp_set_audmode(client); 611 } ··· 673 int sc_in = rt->input & 0x7; 674 int sc1_out = rt->output & 0xf; 675 int sc2_out = (rt->output >> 4) & 0xf; 676 - u16 val; 677 678 state->routing = *rt; 679 - if (state->opmode == OPMODE_AUTOSELECT) { 680 - val = msp_read_dem(client, 0x30) & ~0x100; 681 - msp_write_dem(client, 0x30, val | (tuner ? 0x100 : 0)); 682 - } else { 683 - val = msp_read_dem(client, 0xbb) & ~0x100; 684 - msp_write_dem(client, 0xbb, val | (tuner ? 0x100 : 0)); 685 - } 686 msp_set_scart(client, sc_in, 0); 687 msp_set_scart(client, sc1_out, 1); 688 msp_set_scart(client, sc2_out, 2); 689 msp_set_audmode(client); 690 - msp_wake_thread(client); 691 break; 692 } 693 ··· 703 msp_detect_stereo(client); 704 vt->audmode = state->audmode; 705 vt->rxsubchans = state->rxsubchans; 706 - vt->capability = V4L2_TUNER_CAP_STEREO | 707 V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2; 708 break; 709 } ··· 713 struct v4l2_tuner *vt = (struct v4l2_tuner *)arg; 714 715 if (state->radio) /* TODO: add mono/stereo support for radio */ 716 break; 717 state->audmode = vt->audmode; 718 /* only set audmode */ ··· 877 878 memset(state, 0, sizeof(*state)); 879 state->v4l2_std = V4L2_STD_NTSC; 880 - state->audmode = V4L2_TUNER_MODE_LANG1; 881 state->volume = 58880; /* 0db gain */ 882 state->balance = 32768; /* 0db gain */ 883 state->bass = 32768; ··· 921 state->has_radio = msp_revision >= 'G'; 922 /* Has headphones output: not for stripped down products */ 923 state->has_headphones = msp_prod_lo < 5; 924 /* Has scart4 input: not in pre D revisions, not in stripped D revs */ 925 state->has_scart4 = msp_family >= 4 || (msp_revision >= 'D' && msp_prod_lo < 5); 926 - /* Has scart2 and scart3 inputs and scart2 output: not in stripped 927 - down products of the '3' family */ 928 - state->has_scart23_in_scart2_out = msp_family >= 4 || msp_prod_lo < 5; 929 /* Has scart2 a volume control? Not in pre-D revisions. */ 930 - state->has_scart2_out_volume = msp_revision > 'C' && state->has_scart23_in_scart2_out; 931 /* Has a configurable i2s out? */ 932 state->has_i2s_conf = msp_revision >= 'G' && msp_prod_lo < 7; 933 /* Has subwoofer output: not in pre-D revs and not in stripped down products */
··· 279 msp_write_dsp(client, 0x13, state->acb); 280 281 /* Sets I2S speed 0 = 1.024 Mbps, 1 = 2.048 Mbps */ 282 + if (state->has_i2s_conf) 283 + msp_write_dem(client, 0x40, state->i2s_mode); 284 } 285 286 void msp_set_audio(struct i2c_client *client) ··· 300 struct msp_state *state = i2c_get_clientdata(client); 301 int bal = 0, bass, treble, loudness; 302 int val = 0; 303 + int reallymuted = state->muted | state->scan_in_progress; 304 305 + if (!reallymuted) 306 val = (state->volume * 0x7f / 65535) << 8; 307 308 + v4l_dbg(1, msp_debug, client, "mute=%s scanning=%s volume=%d\n", 309 + state->muted ? "on" : "off", state->scan_in_progress ? "yes" : "no", 310 + state->volume); 311 312 msp_write_dsp(client, 0x0000, val); 313 + msp_write_dsp(client, 0x0007, reallymuted ? 0x1 : (val | 0x1)); 314 if (state->has_scart2_out_volume) 315 + msp_write_dsp(client, 0x0040, reallymuted ? 0x1 : (val | 0x1)); 316 if (state->has_headphones) 317 msp_write_dsp(client, 0x0006, val); 318 if (!state->has_sound_processing) ··· 346 347 if (NULL == state->kthread) 348 return; 349 state->watch_stereo = 0; 350 state->restart = 1; 351 wake_up_interruptible(&state->wq); ··· 374 375 /* ------------------------------------------------------------------------ */ 376 377 + static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) 378 { 379 + if (rxsubchans == V4L2_TUNER_SUB_MONO) 380 + return VIDEO_SOUND_MONO; 381 + if (rxsubchans == V4L2_TUNER_SUB_STEREO) 382 + return VIDEO_SOUND_STEREO; 383 + if (audmode == V4L2_TUNER_MODE_LANG2) 384 + return VIDEO_SOUND_LANG2; 385 + return VIDEO_SOUND_LANG1; 386 } 387 388 static int msp_mode_v4l1_to_v4l2(int mode) ··· 605 break; 606 if (state->opmode == OPMODE_AUTOSELECT) 607 msp_detect_stereo(client); 608 + va->mode = msp_mode_v4l2_to_v4l1(state->rxsubchans, state->audmode); 609 break; 610 } 611 ··· 620 state->treble = va->treble; 621 msp_set_audio(client); 622 623 + if (va->mode != 0 && state->radio == 0 && 624 + state->audmode != msp_mode_v4l1_to_v4l2(va->mode)) { 625 state->audmode = msp_mode_v4l1_to_v4l2(va->mode); 626 msp_set_audmode(client); 627 } ··· 687 int sc_in = rt->input & 0x7; 688 int sc1_out = rt->output & 0xf; 689 int sc2_out = (rt->output >> 4) & 0xf; 690 + u16 val, reg; 691 692 + if (state->routing.input == rt->input && 693 + state->routing.output == rt->output) 694 + break; 695 state->routing = *rt; 696 msp_set_scart(client, sc_in, 0); 697 msp_set_scart(client, sc1_out, 1); 698 msp_set_scart(client, sc2_out, 2); 699 msp_set_audmode(client); 700 + reg = (state->opmode == OPMODE_AUTOSELECT) ? 0x30 : 0xbb; 701 + val = msp_read_dem(client, reg); 702 + if (tuner != ((val >> 8) & 1)) { 703 + msp_write_dem(client, reg, (val & ~0x100) | (tuner << 8)); 704 + /* wake thread when a new tuner input is chosen */ 705 + msp_wake_thread(client); 706 + } 707 break; 708 } 709 ··· 715 msp_detect_stereo(client); 716 vt->audmode = state->audmode; 717 vt->rxsubchans = state->rxsubchans; 718 + vt->capability |= V4L2_TUNER_CAP_STEREO | 719 V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2; 720 break; 721 } ··· 725 struct v4l2_tuner *vt = (struct v4l2_tuner *)arg; 726 727 if (state->radio) /* TODO: add mono/stereo support for radio */ 728 + break; 729 + if (state->audmode == vt->audmode) 730 break; 731 state->audmode = vt->audmode; 732 /* only set audmode */ ··· 887 888 memset(state, 0, sizeof(*state)); 889 state->v4l2_std = V4L2_STD_NTSC; 890 + state->audmode = V4L2_TUNER_MODE_STEREO; 891 state->volume = 58880; /* 0db gain */ 892 state->balance = 32768; /* 0db gain */ 893 state->bass = 32768; ··· 931 state->has_radio = msp_revision >= 'G'; 932 /* Has headphones output: not for stripped down products */ 933 state->has_headphones = msp_prod_lo < 5; 934 + /* Has scart2 input: not in stripped down products of the '3' family */ 935 + state->has_scart2 = msp_family >= 4 || msp_prod_lo < 7; 936 + /* Has scart3 input: not in stripped down products of the '3' family */ 937 + state->has_scart3 = msp_family >= 4 || msp_prod_lo < 5; 938 /* Has scart4 input: not in pre D revisions, not in stripped D revs */ 939 state->has_scart4 = msp_family >= 4 || (msp_revision >= 'D' && msp_prod_lo < 5); 940 + /* Has scart2 output: not in stripped down products of the '3' family */ 941 + state->has_scart2_out = msp_family >= 4 || msp_prod_lo < 5; 942 /* Has scart2 a volume control? Not in pre-D revisions. */ 943 + state->has_scart2_out_volume = msp_revision > 'C' && state->has_scart2_out; 944 /* Has a configurable i2s out? */ 945 state->has_i2s_conf = msp_revision >= 'G' && msp_prod_lo < 7; 946 /* Has subwoofer output: not in pre-D revs and not in stripped down products */
+4 -2
drivers/media/video/msp3400-driver.h
··· 54 u8 has_radio; 55 u8 has_headphones; 56 u8 has_ntsc_jp_d_k3; 57 u8 has_scart4; 58 - u8 has_scart23_in_scart2_out; 59 u8 has_scart2_out_volume; 60 u8 has_i2s_conf; 61 u8 has_subwoofer; ··· 85 int volume, muted; 86 int balance, loudness; 87 int bass, treble; 88 89 /* thread */ 90 struct task_struct *kthread; ··· 101 int msp_read_dsp(struct i2c_client *client, int addr); 102 int msp_reset(struct i2c_client *client); 103 void msp_set_scart(struct i2c_client *client, int in, int out); 104 - void msp_set_mute(struct i2c_client *client); 105 void msp_set_audio(struct i2c_client *client); 106 int msp_sleep(struct msp_state *state, int timeout); 107
··· 54 u8 has_radio; 55 u8 has_headphones; 56 u8 has_ntsc_jp_d_k3; 57 + u8 has_scart2; 58 + u8 has_scart3; 59 u8 has_scart4; 60 + u8 has_scart2_out; 61 u8 has_scart2_out_volume; 62 u8 has_i2s_conf; 63 u8 has_subwoofer; ··· 83 int volume, muted; 84 int balance, loudness; 85 int bass, treble; 86 + int scan_in_progress; 87 88 /* thread */ 89 struct task_struct *kthread; ··· 98 int msp_read_dsp(struct i2c_client *client, int addr); 99 int msp_reset(struct i2c_client *client); 100 void msp_set_scart(struct i2c_client *client, int in, int out); 101 void msp_set_audio(struct i2c_client *client); 102 int msp_sleep(struct msp_state *state, int timeout); 103
+64 -57
drivers/media/video/msp3400-kthreads.c
··· 170 msp_write_dsp(client, 0x000a, src); 171 msp_write_dsp(client, 0x000b, src); 172 msp_write_dsp(client, 0x000c, src); 173 - if (state->has_scart23_in_scart2_out) 174 msp_write_dsp(client, 0x0041, src); 175 } 176 ··· 228 char *modestr = (state->audmode >= 0 && state->audmode < 5) ? 229 strmode[state->audmode] : "unknown"; 230 int src = 0; /* channel source: FM/AM, nicam or SCART */ 231 232 if (state->opmode == OPMODE_AUTOSELECT) { 233 /* this method would break everything, let's make sure ··· 240 return; 241 } 242 243 /* switch demodulator */ 244 switch (state->mode) { 245 case MSP_MODE_FM_TERRA: 246 v4l_dbg(1, msp_debug, client, "FM set_audmode: %s\n", modestr); 247 - switch (state->audmode) { 248 case V4L2_TUNER_MODE_STEREO: 249 msp_write_dsp(client, 0x000e, 0x3001); 250 break; ··· 276 break; 277 case MSP_MODE_FM_SAT: 278 v4l_dbg(1, msp_debug, client, "SAT set_audmode: %s\n", modestr); 279 - switch (state->audmode) { 280 case V4L2_TUNER_MODE_MONO: 281 msp3400c_set_carrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5)); 282 break; ··· 315 } 316 317 /* switch audio */ 318 - switch (state->audmode) { 319 case V4L2_TUNER_MODE_STEREO: 320 case V4L2_TUNER_MODE_LANG1_LANG2: 321 src |= 0x0020; ··· 334 src = 0x0030; 335 break; 336 case V4L2_TUNER_MODE_LANG1: 337 - /* switch to stereo for stereo transmission, otherwise 338 - keep first language */ 339 - if (state->rxsubchans & V4L2_TUNER_SUB_STEREO) 340 - src |= 0x0020; 341 break; 342 case V4L2_TUNER_MODE_LANG2: 343 src |= 0x0010; ··· 383 if (val > 32767) 384 val -= 65536; 385 v4l_dbg(2, msp_debug, client, "stereo detect register: %d\n", val); 386 - if (val > 4096) { 387 rxsubchans = V4L2_TUNER_SUB_STEREO; 388 } else if (val < -4096) { 389 rxsubchans = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; ··· 480 if (state->radio || MSP_MODE_EXTERN == state->mode) { 481 /* no carrier scan, just unmute */ 482 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); 483 msp_set_audio(client); 484 continue; 485 } 486 487 - /* mute */ 488 - msp_set_mute(client); 489 msp3400c_set_mode(client, MSP_MODE_AM_DETECT); 490 val1 = val2 = 0; 491 max1 = max2 = -1; 492 state->watch_stereo = 0; 493 state->nicam_on = 0; 494 495 - /* some time for the tuner to sync */ 496 if (msp_sleep(state, 200)) 497 goto restart; 498 ··· 571 /* B/G NICAM */ 572 state->second = msp3400c_carrier_detect_55[max2].cdo; 573 msp3400c_set_mode(client, MSP_MODE_FM_NICAM1); 574 - msp3400c_set_carrier(client, state->second, state->main); 575 state->nicam_on = 1; 576 state->watch_stereo = 1; 577 } else { ··· 581 /* PAL I NICAM */ 582 state->second = MSP_CARRIER(6.552); 583 msp3400c_set_mode(client, MSP_MODE_FM_NICAM2); 584 - msp3400c_set_carrier(client, state->second, state->main); 585 state->nicam_on = 1; 586 state->watch_stereo = 1; 587 break; ··· 594 /* L NICAM or AM-mono */ 595 state->second = msp3400c_carrier_detect_65[max2].cdo; 596 msp3400c_set_mode(client, MSP_MODE_AM_NICAM); 597 - msp3400c_set_carrier(client, state->second, state->main); 598 state->watch_stereo = 1; 599 } else if (max2 == 0 && state->has_nicam) { 600 /* D/K NICAM */ 601 state->second = msp3400c_carrier_detect_65[max2].cdo; 602 msp3400c_set_mode(client, MSP_MODE_FM_NICAM1); 603 - msp3400c_set_carrier(client, state->second, state->main); 604 state->nicam_on = 1; 605 state->watch_stereo = 1; 606 } else { ··· 610 no_second: 611 state->second = msp3400c_carrier_detect_main[max1].cdo; 612 msp3400c_set_mode(client, MSP_MODE_FM_TERRA); 613 - msp3400c_set_carrier(client, state->second, state->main); 614 - state->rxsubchans = V4L2_TUNER_SUB_MONO; 615 break; 616 } 617 618 /* unmute */ 619 - msp_set_audio(client); 620 msp3400c_set_audmode(client); 621 622 if (msp_debug) 623 msp3400c_print_mode(client); 624 625 /* monitor tv audio mode, the first time don't wait 626 so long to get a quick stereo/bilingual result */ 627 - if (msp_sleep(state, 1000)) 628 - goto restart; 629 while (state->watch_stereo) { 630 - if (msp_sleep(state, 5000)) 631 goto restart; 632 watch_stereo(client); 633 } 634 } ··· 641 { 642 struct i2c_client *client = data; 643 struct msp_state *state = i2c_get_clientdata(client); 644 - int val, i, std; 645 646 v4l_dbg(1, msp_debug, client, "msp3410 daemon started\n"); 647 ··· 659 if (state->mode == MSP_MODE_EXTERN) { 660 /* no carrier scan needed, just unmute */ 661 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); 662 msp_set_audio(client); 663 continue; 664 } 665 666 - /* put into sane state (and mute) */ 667 - msp_reset(client); 668 - 669 - /* some time for the tuner to sync */ 670 - if (msp_sleep(state,200)) 671 - goto restart; 672 673 /* start autodetect. Note: autodetect is not supported for 674 NTSC-M and radio, hence we force the standard in those cases. */ ··· 676 std = (state->v4l2_std & V4L2_STD_NTSC) ? 0x20 : 1; 677 state->watch_stereo = 0; 678 state->nicam_on = 0; 679 680 if (msp_debug) 681 v4l_dbg(2, msp_debug, client, "setting standard: %s (0x%04x)\n", ··· 710 state->main = msp_stdlist[i].main; 711 state->second = msp_stdlist[i].second; 712 state->std = val; 713 714 if (msp_amsound && !state->radio && (state->v4l2_std & V4L2_STD_SECAM) && 715 (val != 0x0009)) { ··· 732 else 733 state->mode = MSP_MODE_FM_NICAM1; 734 /* just turn on stereo */ 735 - state->rxsubchans = V4L2_TUNER_SUB_STEREO; 736 state->nicam_on = 1; 737 state->watch_stereo = 1; 738 break; 739 case 0x0009: 740 state->mode = MSP_MODE_AM_NICAM; 741 - state->rxsubchans = V4L2_TUNER_SUB_MONO; 742 state->nicam_on = 1; 743 state->watch_stereo = 1; 744 break; 745 case 0x0020: /* BTSC */ 746 /* The pre-'G' models only have BTSC-mono */ 747 state->mode = MSP_MODE_BTSC; 748 - state->rxsubchans = V4L2_TUNER_SUB_MONO; 749 break; 750 case 0x0040: /* FM radio */ 751 state->mode = MSP_MODE_FM_RADIO; ··· 752 msp3400c_set_mode(client, MSP_MODE_FM_RADIO); 753 msp3400c_set_carrier(client, MSP_CARRIER(10.7), 754 MSP_CARRIER(10.7)); 755 - /* scart routing (this doesn't belong here I think) */ 756 - msp_set_scart(client,SCART_IN2,0); 757 break; 758 case 0x0002: 759 case 0x0003: 760 case 0x0004: 761 case 0x0005: 762 state->mode = MSP_MODE_FM_TERRA; 763 - state->rxsubchans = V4L2_TUNER_SUB_MONO; 764 state->watch_stereo = 1; 765 break; 766 } ··· 771 if (state->has_i2s_conf) 772 msp_write_dem(client, 0x40, state->i2s_mode); 773 774 - /* unmute, restore misc registers */ 775 - msp_set_audio(client); 776 - 777 - msp_write_dsp(client, 0x13, state->acb); 778 msp3400c_set_audmode(client); 779 780 /* monitor tv audio mode, the first time don't wait 781 so long to get a quick stereo/bilingual result */ 782 - if (msp_sleep(state, 1000)) 783 - goto restart; 784 while (state->watch_stereo) { 785 - watch_stereo(client); 786 - if (msp_sleep(state, 5000)) 787 goto restart; 788 } 789 } 790 v4l_dbg(1, msp_debug, client, "thread: exit\n"); ··· 840 source = 0; /* mono only */ 841 matrix = 0x30; 842 break; 843 - case V4L2_TUNER_MODE_LANG1: 844 - source = 3; /* stereo or A */ 845 - matrix = 0x00; 846 - break; 847 case V4L2_TUNER_MODE_LANG2: 848 source = 4; /* stereo or B */ 849 matrix = 0x10; 850 break; 851 - case V4L2_TUNER_MODE_STEREO: 852 case V4L2_TUNER_MODE_LANG1_LANG2: 853 - default: 854 source = 1; /* stereo or A|B */ 855 matrix = 0x20; 856 break; 857 } 858 859 - if (in == MSP_DSP_OUT_TUNER) 860 source = (source << 8) | 0x20; 861 /* the msp34x2g puts the MAIN_AVC, MAIN and AUX sources in 12, 13, 14 862 instead of 11, 12, 13. So we add one for that msp version. */ 863 - else if (in >= MSP_DSP_OUT_MAIN_AVC && state->has_dolby_pro_logic) 864 source = ((in + 1) << 8) | matrix; 865 else 866 source = (in << 8) | matrix; ··· 880 msp34xxg_set_source(client, 0x000c, (in >> 4) & 0xf); 881 msp34xxg_set_source(client, 0x0009, (in >> 8) & 0xf); 882 msp34xxg_set_source(client, 0x000a, (in >> 12) & 0xf); 883 - if (state->has_scart23_in_scart2_out) 884 msp34xxg_set_source(client, 0x0041, (in >> 16) & 0xf); 885 msp34xxg_set_source(client, 0x000b, (in >> 20) & 0xf); 886 } ··· 897 state->std = 1; 898 899 msp_reset(client); 900 - 901 - /* make sure that input/output is muted (paranoid mode) */ 902 - /* ACB, mute DSP input, mute SCART 1 */ 903 - msp_write_dsp(client, 0x13, 0x0f20); 904 905 if (state->has_i2s_conf) 906 msp_write_dem(client, 0x40, state->i2s_mode); ··· 1035 1036 if (state->std == 0x20) { 1037 if ((state->rxsubchans & V4L2_TUNER_SUB_SAP) && 1038 - (state->audmode == V4L2_TUNER_MODE_STEREO || 1039 state->audmode == V4L2_TUNER_MODE_LANG2)) { 1040 msp_write_dem(client, 0x20, 0x21); 1041 } else {
··· 170 msp_write_dsp(client, 0x000a, src); 171 msp_write_dsp(client, 0x000b, src); 172 msp_write_dsp(client, 0x000c, src); 173 + if (state->has_scart2_out) 174 msp_write_dsp(client, 0x0041, src); 175 } 176 ··· 228 char *modestr = (state->audmode >= 0 && state->audmode < 5) ? 229 strmode[state->audmode] : "unknown"; 230 int src = 0; /* channel source: FM/AM, nicam or SCART */ 231 + int audmode = state->audmode; 232 233 if (state->opmode == OPMODE_AUTOSELECT) { 234 /* this method would break everything, let's make sure ··· 239 return; 240 } 241 242 + /* Note: for the C and D revs no NTSC stereo + SAP is possible as 243 + the hardware does not support SAP. So the rxsubchans combination 244 + of STEREO | LANG2 does not occur. */ 245 + 246 + /* switch to mono if only mono is available */ 247 + if (state->rxsubchans == V4L2_TUNER_SUB_MONO) 248 + audmode = V4L2_TUNER_MODE_MONO; 249 + /* if bilingual */ 250 + else if (state->rxsubchans & V4L2_TUNER_SUB_LANG2) { 251 + /* and mono or stereo, then fallback to lang1 */ 252 + if (audmode == V4L2_TUNER_MODE_MONO || 253 + audmode == V4L2_TUNER_MODE_STEREO) 254 + audmode = V4L2_TUNER_MODE_LANG1; 255 + } 256 + /* if stereo, and audmode is not mono, then switch to stereo */ 257 + else if (audmode != V4L2_TUNER_MODE_MONO) 258 + audmode = V4L2_TUNER_MODE_STEREO; 259 + 260 /* switch demodulator */ 261 switch (state->mode) { 262 case MSP_MODE_FM_TERRA: 263 v4l_dbg(1, msp_debug, client, "FM set_audmode: %s\n", modestr); 264 + switch (audmode) { 265 case V4L2_TUNER_MODE_STEREO: 266 msp_write_dsp(client, 0x000e, 0x3001); 267 break; ··· 257 break; 258 case MSP_MODE_FM_SAT: 259 v4l_dbg(1, msp_debug, client, "SAT set_audmode: %s\n", modestr); 260 + switch (audmode) { 261 case V4L2_TUNER_MODE_MONO: 262 msp3400c_set_carrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5)); 263 break; ··· 296 } 297 298 /* switch audio */ 299 + v4l_dbg(1, msp_debug, client, "set audmode %d\n", audmode); 300 + switch (audmode) { 301 case V4L2_TUNER_MODE_STEREO: 302 case V4L2_TUNER_MODE_LANG1_LANG2: 303 src |= 0x0020; ··· 314 src = 0x0030; 315 break; 316 case V4L2_TUNER_MODE_LANG1: 317 break; 318 case V4L2_TUNER_MODE_LANG2: 319 src |= 0x0010; ··· 367 if (val > 32767) 368 val -= 65536; 369 v4l_dbg(2, msp_debug, client, "stereo detect register: %d\n", val); 370 + if (val > 8192) { 371 rxsubchans = V4L2_TUNER_SUB_STEREO; 372 } else if (val < -4096) { 373 rxsubchans = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; ··· 464 if (state->radio || MSP_MODE_EXTERN == state->mode) { 465 /* no carrier scan, just unmute */ 466 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); 467 + state->scan_in_progress = 0; 468 msp_set_audio(client); 469 continue; 470 } 471 472 + /* mute audio */ 473 + state->scan_in_progress = 1; 474 + msp_set_audio(client); 475 + 476 msp3400c_set_mode(client, MSP_MODE_AM_DETECT); 477 val1 = val2 = 0; 478 max1 = max2 = -1; 479 state->watch_stereo = 0; 480 state->nicam_on = 0; 481 482 + /* wait for tuner to settle down after a channel change */ 483 if (msp_sleep(state, 200)) 484 goto restart; 485 ··· 552 /* B/G NICAM */ 553 state->second = msp3400c_carrier_detect_55[max2].cdo; 554 msp3400c_set_mode(client, MSP_MODE_FM_NICAM1); 555 state->nicam_on = 1; 556 state->watch_stereo = 1; 557 } else { ··· 563 /* PAL I NICAM */ 564 state->second = MSP_CARRIER(6.552); 565 msp3400c_set_mode(client, MSP_MODE_FM_NICAM2); 566 state->nicam_on = 1; 567 state->watch_stereo = 1; 568 break; ··· 577 /* L NICAM or AM-mono */ 578 state->second = msp3400c_carrier_detect_65[max2].cdo; 579 msp3400c_set_mode(client, MSP_MODE_AM_NICAM); 580 state->watch_stereo = 1; 581 } else if (max2 == 0 && state->has_nicam) { 582 /* D/K NICAM */ 583 state->second = msp3400c_carrier_detect_65[max2].cdo; 584 msp3400c_set_mode(client, MSP_MODE_FM_NICAM1); 585 state->nicam_on = 1; 586 state->watch_stereo = 1; 587 } else { ··· 595 no_second: 596 state->second = msp3400c_carrier_detect_main[max1].cdo; 597 msp3400c_set_mode(client, MSP_MODE_FM_TERRA); 598 break; 599 } 600 + msp3400c_set_carrier(client, state->second, state->main); 601 602 /* unmute */ 603 + state->scan_in_progress = 0; 604 msp3400c_set_audmode(client); 605 + msp_set_audio(client); 606 607 if (msp_debug) 608 msp3400c_print_mode(client); 609 610 /* monitor tv audio mode, the first time don't wait 611 so long to get a quick stereo/bilingual result */ 612 + count = 3; 613 while (state->watch_stereo) { 614 + if (msp_sleep(state, count ? 1000 : 5000)) 615 goto restart; 616 + if (count) count--; 617 watch_stereo(client); 618 } 619 } ··· 626 { 627 struct i2c_client *client = data; 628 struct msp_state *state = i2c_get_clientdata(client); 629 + int val, i, std, count; 630 631 v4l_dbg(1, msp_debug, client, "msp3410 daemon started\n"); 632 ··· 644 if (state->mode == MSP_MODE_EXTERN) { 645 /* no carrier scan needed, just unmute */ 646 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); 647 + state->scan_in_progress = 0; 648 msp_set_audio(client); 649 continue; 650 } 651 652 + /* mute audio */ 653 + state->scan_in_progress = 1; 654 + msp_set_audio(client); 655 656 /* start autodetect. Note: autodetect is not supported for 657 NTSC-M and radio, hence we force the standard in those cases. */ ··· 663 std = (state->v4l2_std & V4L2_STD_NTSC) ? 0x20 : 1; 664 state->watch_stereo = 0; 665 state->nicam_on = 0; 666 + 667 + /* wait for tuner to settle down after a channel change */ 668 + if (msp_sleep(state, 200)) 669 + goto restart; 670 671 if (msp_debug) 672 v4l_dbg(2, msp_debug, client, "setting standard: %s (0x%04x)\n", ··· 693 state->main = msp_stdlist[i].main; 694 state->second = msp_stdlist[i].second; 695 state->std = val; 696 + state->rxsubchans = V4L2_TUNER_SUB_MONO; 697 698 if (msp_amsound && !state->radio && (state->v4l2_std & V4L2_STD_SECAM) && 699 (val != 0x0009)) { ··· 714 else 715 state->mode = MSP_MODE_FM_NICAM1; 716 /* just turn on stereo */ 717 state->nicam_on = 1; 718 state->watch_stereo = 1; 719 break; 720 case 0x0009: 721 state->mode = MSP_MODE_AM_NICAM; 722 state->nicam_on = 1; 723 state->watch_stereo = 1; 724 break; 725 case 0x0020: /* BTSC */ 726 /* The pre-'G' models only have BTSC-mono */ 727 state->mode = MSP_MODE_BTSC; 728 break; 729 case 0x0040: /* FM radio */ 730 state->mode = MSP_MODE_FM_RADIO; ··· 737 msp3400c_set_mode(client, MSP_MODE_FM_RADIO); 738 msp3400c_set_carrier(client, MSP_CARRIER(10.7), 739 MSP_CARRIER(10.7)); 740 break; 741 case 0x0002: 742 case 0x0003: 743 case 0x0004: 744 case 0x0005: 745 state->mode = MSP_MODE_FM_TERRA; 746 state->watch_stereo = 1; 747 break; 748 } ··· 759 if (state->has_i2s_conf) 760 msp_write_dem(client, 0x40, state->i2s_mode); 761 762 + /* unmute */ 763 msp3400c_set_audmode(client); 764 + state->scan_in_progress = 0; 765 + msp_set_audio(client); 766 767 /* monitor tv audio mode, the first time don't wait 768 so long to get a quick stereo/bilingual result */ 769 + count = 3; 770 while (state->watch_stereo) { 771 + if (msp_sleep(state, count ? 1000 : 5000)) 772 goto restart; 773 + if (count) count--; 774 + watch_stereo(client); 775 } 776 } 777 v4l_dbg(1, msp_debug, client, "thread: exit\n"); ··· 829 source = 0; /* mono only */ 830 matrix = 0x30; 831 break; 832 case V4L2_TUNER_MODE_LANG2: 833 source = 4; /* stereo or B */ 834 matrix = 0x10; 835 break; 836 case V4L2_TUNER_MODE_LANG1_LANG2: 837 source = 1; /* stereo or A|B */ 838 matrix = 0x20; 839 break; 840 + case V4L2_TUNER_MODE_STEREO: 841 + case V4L2_TUNER_MODE_LANG1: 842 + default: 843 + source = 3; /* stereo or A */ 844 + matrix = 0x00; 845 + break; 846 } 847 848 + if (in == MSP_DSP_IN_TUNER) 849 source = (source << 8) | 0x20; 850 /* the msp34x2g puts the MAIN_AVC, MAIN and AUX sources in 12, 13, 14 851 instead of 11, 12, 13. So we add one for that msp version. */ 852 + else if (in >= MSP_DSP_IN_MAIN_AVC && state->has_dolby_pro_logic) 853 source = ((in + 1) << 8) | matrix; 854 else 855 source = (in << 8) | matrix; ··· 869 msp34xxg_set_source(client, 0x000c, (in >> 4) & 0xf); 870 msp34xxg_set_source(client, 0x0009, (in >> 8) & 0xf); 871 msp34xxg_set_source(client, 0x000a, (in >> 12) & 0xf); 872 + if (state->has_scart2_out) 873 msp34xxg_set_source(client, 0x0041, (in >> 16) & 0xf); 874 msp34xxg_set_source(client, 0x000b, (in >> 20) & 0xf); 875 } ··· 886 state->std = 1; 887 888 msp_reset(client); 889 890 if (state->has_i2s_conf) 891 msp_write_dem(client, 0x40, state->i2s_mode); ··· 1028 1029 if (state->std == 0x20) { 1030 if ((state->rxsubchans & V4L2_TUNER_SUB_SAP) && 1031 + (state->audmode == V4L2_TUNER_MODE_LANG1_LANG2 || 1032 state->audmode == V4L2_TUNER_MODE_LANG2)) { 1033 msp_write_dem(client, 0x20, 0x21); 1034 } else {
+28
drivers/media/video/pwc/Kconfig
···
··· 1 + config USB_PWC 2 + tristate "USB Philips Cameras" 3 + depends on USB && VIDEO_DEV 4 + ---help--- 5 + Say Y or M here if you want to use one of these Philips & OEM 6 + webcams: 7 + * Philips PCA645, PCA646 8 + * Philips PCVC675, PCVC680, PCVC690 9 + * Philips PCVC720/40, PCVC730, PCVC740, PCVC750 10 + * Askey VC010 11 + * Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro' 12 + and 'Orbit'/'Sphere' 13 + * Samsung MPC-C10, MPC-C30 14 + * Creative Webcam 5, Pro Ex 15 + * SOTEC Afina Eye 16 + * Visionite VCS-UC300, VCS-UM100 17 + 18 + The PCA635, PCVC665 and PCVC720/20 are not supported by this driver 19 + and never will be, but the 665 and 720/20 are supported by other 20 + drivers. 21 + 22 + See <file:Documentation/usb/philips.txt> for more information and 23 + installation instructions. 24 + 25 + The built-in microphone is enabled by selecting USB Audio support. 26 + 27 + To compile this driver as a module, choose M here: the 28 + module will be called pwc.
+53 -12
drivers/media/video/saa7115.c
··· 40 #include <linux/i2c.h> 41 #include <linux/videodev2.h> 42 #include <media/v4l2-common.h> 43 #include <asm/div64.h> 44 45 MODULE_DESCRIPTION("Philips SAA7113/SAA7114/SAA7115 video decoder driver"); ··· 54 MODULE_PARM_DESC(debug, "Debug level (0-1)"); 55 56 static unsigned short normal_i2c[] = { 57 - 0x4a >>1, 0x48 >>1, /* SAA7113 */ 58 0x42 >> 1, 0x40 >> 1, /* SAA7114 and SAA7115 */ 59 I2C_CLIENT_END }; 60 ··· 723 100 reserved NTSC-Japan (3.58MHz) 724 */ 725 if (state->ident == V4L2_IDENT_SAA7113) { 726 - u8 reg = saa7115_read(client, 0x0e) & 0x8f; 727 728 if (std == V4L2_STD_PAL_M) { 729 - reg|=0x30; 730 } else if (std == V4L2_STD_PAL_N) { 731 - reg|=0x20; 732 } else if (std == V4L2_STD_PAL_60) { 733 - reg|=0x10; 734 } else if (std == V4L2_STD_NTSC_M_JP) { 735 - reg|=0x40; 736 } 737 saa7115_write(client, 0x0e, reg); 738 } ··· 812 u8 lcr[24]; 813 int i, x; 814 815 - /* saa7113/71144 doesn't yet support VBI */ 816 if (state->ident != V4L2_IDENT_SAA7115) 817 return; 818 ··· 852 case 0: 853 lcr[i] |= 0xf << (4 * x); 854 break; 855 - case V4L2_SLICED_TELETEXT_PAL_B: 856 lcr[i] |= 1 << (4 * x); 857 break; 858 case V4L2_SLICED_CAPTION_525: ··· 881 static int saa7115_get_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt) 882 { 883 static u16 lcr2vbi[] = { 884 - 0, V4L2_SLICED_TELETEXT_PAL_B, 0, /* 1 */ 885 0, V4L2_SLICED_CAPTION_525, /* 4 */ 886 V4L2_SLICED_WSS_625, 0, /* 5 */ 887 V4L2_SLICED_VPS, 0, 0, 0, 0, /* 7 */ ··· 1046 /* decode payloads */ 1047 switch (id2) { 1048 case 1: 1049 - vbi->type = V4L2_SLICED_TELETEXT_PAL_B; 1050 break; 1051 case 4: 1052 if (!saa7115_odd_parity(p[0]) || !saa7115_odd_parity(p[1])) ··· 1180 case AUDC_SET_RADIO: 1181 state->radio = 1; 1182 break; 1183 1184 case VIDIOC_G_INPUT: 1185 *(int *)arg = state->input; ··· 1362 1363 saa7115_write(client, 0, 5); 1364 chip_id = saa7115_read(client, 0) & 0x0f; 1365 - if (chip_id <3 && chip_id > 5) { 1366 v4l_dbg(1, debug, client, "saa7115 not found\n"); 1367 kfree(client); 1368 return 0; ··· 1401 v4l_dbg(1, debug, client, "writing init values\n"); 1402 1403 /* init to 60hz/48khz */ 1404 - if (state->ident==V4L2_IDENT_SAA7113) 1405 saa7115_writeregs(client, saa7113_init_auto_input); 1406 else 1407 saa7115_writeregs(client, saa7115_init_auto_input);
··· 40 #include <linux/i2c.h> 41 #include <linux/videodev2.h> 42 #include <media/v4l2-common.h> 43 + #include <media/saa7115.h> 44 #include <asm/div64.h> 45 46 MODULE_DESCRIPTION("Philips SAA7113/SAA7114/SAA7115 video decoder driver"); ··· 53 MODULE_PARM_DESC(debug, "Debug level (0-1)"); 54 55 static unsigned short normal_i2c[] = { 56 + 0x4a >> 1, 0x48 >> 1, /* SAA7113 */ 57 0x42 >> 1, 0x40 >> 1, /* SAA7114 and SAA7115 */ 58 I2C_CLIENT_END }; 59 ··· 722 100 reserved NTSC-Japan (3.58MHz) 723 */ 724 if (state->ident == V4L2_IDENT_SAA7113) { 725 + u8 reg = saa7115_read(client, 0x0e) & 0x8f; 726 727 if (std == V4L2_STD_PAL_M) { 728 + reg |= 0x30; 729 } else if (std == V4L2_STD_PAL_N) { 730 + reg |= 0x20; 731 } else if (std == V4L2_STD_PAL_60) { 732 + reg |= 0x10; 733 } else if (std == V4L2_STD_NTSC_M_JP) { 734 + reg |= 0x40; 735 } 736 saa7115_write(client, 0x0e, reg); 737 } ··· 811 u8 lcr[24]; 812 int i, x; 813 814 + /* saa7113/7114 doesn't yet support VBI */ 815 if (state->ident != V4L2_IDENT_SAA7115) 816 return; 817 ··· 851 case 0: 852 lcr[i] |= 0xf << (4 * x); 853 break; 854 + case V4L2_SLICED_TELETEXT_B: 855 lcr[i] |= 1 << (4 * x); 856 break; 857 case V4L2_SLICED_CAPTION_525: ··· 880 static int saa7115_get_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt) 881 { 882 static u16 lcr2vbi[] = { 883 + 0, V4L2_SLICED_TELETEXT_B, 0, /* 1 */ 884 0, V4L2_SLICED_CAPTION_525, /* 4 */ 885 V4L2_SLICED_WSS_625, 0, /* 5 */ 886 V4L2_SLICED_VPS, 0, 0, 0, 0, /* 7 */ ··· 1045 /* decode payloads */ 1046 switch (id2) { 1047 case 1: 1048 + vbi->type = V4L2_SLICED_TELETEXT_B; 1049 break; 1050 case 4: 1051 if (!saa7115_odd_parity(p[0]) || !saa7115_odd_parity(p[1])) ··· 1179 case AUDC_SET_RADIO: 1180 state->radio = 1; 1181 break; 1182 + 1183 + case VIDIOC_INT_G_VIDEO_ROUTING: 1184 + { 1185 + struct v4l2_routing *route = arg; 1186 + 1187 + route->input = state->input; 1188 + route->output = 0; 1189 + break; 1190 + } 1191 + 1192 + case VIDIOC_INT_S_VIDEO_ROUTING: 1193 + { 1194 + struct v4l2_routing *route = arg; 1195 + 1196 + v4l_dbg(1, debug, client, "decoder set input %d\n", route->input); 1197 + /* saa7113 does not have these inputs */ 1198 + if (state->ident == V4L2_IDENT_SAA7113 && 1199 + (route->input == SAA7115_COMPOSITE4 || 1200 + route->input == SAA7115_COMPOSITE5)) { 1201 + return -EINVAL; 1202 + } 1203 + if (route->input > SAA7115_SVIDEO3) 1204 + return -EINVAL; 1205 + if (state->input == route->input) 1206 + break; 1207 + v4l_dbg(1, debug, client, "now setting %s input\n", 1208 + (route->input >= SAA7115_SVIDEO0) ? "S-Video" : "Composite"); 1209 + state->input = route->input; 1210 + 1211 + /* select mode */ 1212 + saa7115_write(client, 0x02, 1213 + (saa7115_read(client, 0x02) & 0xf0) | 1214 + state->input); 1215 + 1216 + /* bypass chrominance trap for S-Video modes */ 1217 + saa7115_write(client, 0x09, 1218 + (saa7115_read(client, 0x09) & 0x7f) | 1219 + (state->input >= SAA7115_SVIDEO0 ? 0x80 : 0x0)); 1220 + break; 1221 + } 1222 1223 case VIDIOC_G_INPUT: 1224 *(int *)arg = state->input; ··· 1321 1322 saa7115_write(client, 0, 5); 1323 chip_id = saa7115_read(client, 0) & 0x0f; 1324 + if (chip_id < 3 && chip_id > 5) { 1325 v4l_dbg(1, debug, client, "saa7115 not found\n"); 1326 kfree(client); 1327 return 0; ··· 1360 v4l_dbg(1, debug, client, "writing init values\n"); 1361 1362 /* init to 60hz/48khz */ 1363 + if (state->ident == V4L2_IDENT_SAA7113) 1364 saa7115_writeregs(client, saa7113_init_auto_input); 1365 else 1366 saa7115_writeregs(client, saa7115_init_auto_input);
+18 -25
drivers/media/video/saa7127.c
··· 54 #include <linux/i2c.h> 55 #include <linux/videodev2.h> 56 #include <media/v4l2-common.h> 57 58 static int debug = 0; 59 static int test_image = 0; ··· 221 { SAA7127_REG_MULTI, 0xa0 }, 222 { SAA7127_REG_CLOSED_CAPTION, 0x00 }, 223 { 0, 0 } 224 - }; 225 - 226 - /* Enumeration for the Supported input types */ 227 - enum saa7127_input_type { 228 - SAA7127_INPUT_TYPE_NORMAL, 229 - SAA7127_INPUT_TYPE_TEST_IMAGE 230 - }; 231 - 232 - /* Enumeration for the Supported Output signal types */ 233 - enum saa7127_output_type { 234 - SAA7127_OUTPUT_TYPE_BOTH, 235 - SAA7127_OUTPUT_TYPE_COMPOSITE, 236 - SAA7127_OUTPUT_TYPE_SVIDEO, 237 - SAA7127_OUTPUT_TYPE_RGB, 238 - SAA7127_OUTPUT_TYPE_YUV_C, 239 - SAA7127_OUTPUT_TYPE_YUV_V 240 }; 241 242 /* ··· 546 { 547 struct saa7127_state *state = i2c_get_clientdata(client); 548 struct v4l2_format *fmt = arg; 549 - int *iarg = arg; 550 551 switch (cmd) { 552 case VIDIOC_S_STD: ··· 558 *(v4l2_std_id *)arg = state->std; 559 break; 560 561 - case VIDIOC_S_INPUT: 562 - if (state->input_type == *iarg) 563 - break; 564 - return saa7127_set_input_type(client, *iarg); 565 566 - case VIDIOC_S_OUTPUT: 567 - if (state->output_type == *iarg) 568 - break; 569 - return saa7127_set_output_type(client, *iarg); 570 571 case VIDIOC_STREAMON: 572 case VIDIOC_STREAMOFF:
··· 54 #include <linux/i2c.h> 55 #include <linux/videodev2.h> 56 #include <media/v4l2-common.h> 57 + #include <media/saa7127.h> 58 59 static int debug = 0; 60 static int test_image = 0; ··· 220 { SAA7127_REG_MULTI, 0xa0 }, 221 { SAA7127_REG_CLOSED_CAPTION, 0x00 }, 222 { 0, 0 } 223 }; 224 225 /* ··· 561 { 562 struct saa7127_state *state = i2c_get_clientdata(client); 563 struct v4l2_format *fmt = arg; 564 + struct v4l2_routing *route = arg; 565 566 switch (cmd) { 567 case VIDIOC_S_STD: ··· 573 *(v4l2_std_id *)arg = state->std; 574 break; 575 576 + case VIDIOC_INT_G_VIDEO_ROUTING: 577 + route->input = state->input_type; 578 + route->output = state->output_type; 579 + break; 580 581 + case VIDIOC_INT_S_VIDEO_ROUTING: 582 + { 583 + int rc = 0; 584 + 585 + if (state->input_type != route->input) { 586 + rc = saa7127_set_input_type(client, route->input); 587 + } 588 + if (rc == 0 && state->output_type != route->output) { 589 + rc = saa7127_set_output_type(client, route->output); 590 + } 591 + return rc; 592 + } 593 594 case VIDIOC_STREAMON: 595 case VIDIOC_STREAMOFF:
+1
drivers/media/video/saa7134/Kconfig
··· 39 tristate "DVB/ATSC Support for saa7134 based TV cards" 40 depends on VIDEO_SAA7134 && DVB_CORE 41 select VIDEO_BUF_DVB 42 ---help--- 43 This adds support for DVB cards based on the 44 Philips saa7134 chip.
··· 39 tristate "DVB/ATSC Support for saa7134 based TV cards" 40 depends on VIDEO_SAA7134 && DVB_CORE 41 select VIDEO_BUF_DVB 42 + select FW_LOADER 43 ---help--- 44 This adds support for DVB cards based on the 45 Philips saa7134 chip.
+63 -3
drivers/media/video/saa7134/saa7134-cards.c
··· 208 [SAA7134_BOARD_FLYTVPLATINUM_FM] = { 209 /* LifeView FlyTV Platinum FM (LR214WF) */ 210 /* "Peter Missel <peter.missel@onlinehome.de> */ 211 - .name = "LifeView FlyTV Platinum FM", 212 .audio_clock = 0x00200000, 213 .tuner_type = TUNER_PHILIPS_TDA8290, 214 .radio_type = UNSET, ··· 2660 .mpeg = SAA7134_MPEG_DVB, 2661 .inputs = {{ 2662 .name = name_comp1, 2663 - .vmux = 0, 2664 .amux = LINE1, 2665 },{ 2666 .name = name_svideo, ··· 2671 [SAA7134_BOARD_FLYDVBT_LR301] = { 2672 /* LifeView FlyDVB-T */ 2673 /* Giampiero Giancipoli <gianci@libero.it> */ 2674 - .name = "LifeView FlyDVB-T", 2675 .audio_clock = 0x00200000, 2676 .tuner_type = TUNER_ABSENT, 2677 .radio_type = UNSET, ··· 2807 .radio_type = UNSET, 2808 .tuner_addr = ADDR_UNSET, 2809 .radio_addr = ADDR_UNSET, 2810 }, 2811 }; 2812 ··· 3367 .subdevice = 0x0005, 3368 .driver_data = SAA7134_BOARD_MD7134_BRIDGE_2, 3369 },{ 3370 /* --- boards without eeprom + subsystem ID --- */ 3371 .vendor = PCI_VENDOR_ID_PHILIPS, 3372 .device = PCI_DEVICE_ID_PHILIPS_SAA7134, ··· 3520 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06); 3521 break; 3522 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: 3523 saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); 3524 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); 3525 break; ··· 3692 } 3693 break; 3694 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: 3695 /* make the tda10046 find its eeprom */ 3696 { 3697 u8 data[] = { 0x3c, 0x33, 0x62};
··· 208 [SAA7134_BOARD_FLYTVPLATINUM_FM] = { 209 /* LifeView FlyTV Platinum FM (LR214WF) */ 210 /* "Peter Missel <peter.missel@onlinehome.de> */ 211 + .name = "LifeView FlyTV Platinum FM / Gold", 212 .audio_clock = 0x00200000, 213 .tuner_type = TUNER_PHILIPS_TDA8290, 214 .radio_type = UNSET, ··· 2660 .mpeg = SAA7134_MPEG_DVB, 2661 .inputs = {{ 2662 .name = name_comp1, 2663 + .vmux = 1, 2664 .amux = LINE1, 2665 },{ 2666 .name = name_svideo, ··· 2671 [SAA7134_BOARD_FLYDVBT_LR301] = { 2672 /* LifeView FlyDVB-T */ 2673 /* Giampiero Giancipoli <gianci@libero.it> */ 2674 + .name = "LifeView FlyDVB-T / Genius VideoWonder DVB-T", 2675 .audio_clock = 0x00200000, 2676 .tuner_type = TUNER_ABSENT, 2677 .radio_type = UNSET, ··· 2807 .radio_type = UNSET, 2808 .tuner_addr = ADDR_UNSET, 2809 .radio_addr = ADDR_UNSET, 2810 + }, 2811 + [SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS] = { 2812 + .name = "LifeView FlyDVB-T Hybrid Cardbus", 2813 + .audio_clock = 0x00200000, 2814 + .tuner_type = TUNER_PHILIPS_TDA8290, 2815 + .radio_type = UNSET, 2816 + .tuner_addr = ADDR_UNSET, 2817 + .radio_addr = ADDR_UNSET, 2818 + .mpeg = SAA7134_MPEG_DVB, 2819 + .gpiomask = 0x00600000, /* Bit 21 0=Radio, Bit 22 0=TV */ 2820 + .inputs = {{ 2821 + .name = name_tv, 2822 + .vmux = 1, 2823 + .amux = TV, 2824 + .gpio = 0x200000, /* GPIO21=High for TV input */ 2825 + .tv = 1, 2826 + },{ 2827 + .name = name_svideo, /* S-Video signal on S-Video input */ 2828 + .vmux = 8, 2829 + .amux = LINE2, 2830 + },{ 2831 + .name = name_comp1, /* Composite signal on S-Video input */ 2832 + .vmux = 0, 2833 + .amux = LINE2, 2834 + },{ 2835 + .name = name_comp2, /* Composite input */ 2836 + .vmux = 3, 2837 + .amux = LINE2, 2838 + }}, 2839 + .radio = { 2840 + .name = name_radio, 2841 + .amux = TV, 2842 + .gpio = 0x000000, /* GPIO21=Low for FM radio antenna */ 2843 + }, 2844 }, 2845 }; 2846 ··· 3333 .subdevice = 0x0005, 3334 .driver_data = SAA7134_BOARD_MD7134_BRIDGE_2, 3335 },{ 3336 + .vendor = PCI_VENDOR_ID_PHILIPS, 3337 + .device = PCI_DEVICE_ID_PHILIPS_SAA7134, 3338 + .subvendor = 0x1489, 3339 + .subdevice = 0x0301, 3340 + .driver_data = SAA7134_BOARD_FLYDVBT_LR301, 3341 + },{ 3342 + .vendor = PCI_VENDOR_ID_PHILIPS, 3343 + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, 3344 + .subvendor = 0x5168, /* Animation Technologies (LifeView) */ 3345 + .subdevice = 0x0304, 3346 + .driver_data = SAA7134_BOARD_FLYTVPLATINUM_FM, 3347 + },{ 3348 + .vendor = PCI_VENDOR_ID_PHILIPS, 3349 + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, 3350 + .subvendor = 0x5168, 3351 + .subdevice = 0x3306, 3352 + .driver_data = SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS, 3353 + },{ 3354 + .vendor = PCI_VENDOR_ID_PHILIPS, 3355 + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, 3356 + .subvendor = 0x5168, 3357 + .subdevice = 0x3502, /* whats the difference to 0x3306 ?*/ 3358 + .driver_data = SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS, 3359 + },{ 3360 /* --- boards without eeprom + subsystem ID --- */ 3361 .vendor = PCI_VENDOR_ID_PHILIPS, 3362 .device = PCI_DEVICE_ID_PHILIPS_SAA7134, ··· 3462 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06); 3463 break; 3464 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: 3465 + case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: 3466 saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); 3467 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); 3468 break; ··· 3633 } 3634 break; 3635 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: 3636 + case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: 3637 /* make the tda10046 find its eeprom */ 3638 { 3639 u8 data[] = { 0x3c, 0x33, 0x62};
+4
drivers/media/video/saa7134/saa7134-dvb.c
··· 1064 dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, 1065 &dev->i2c_adap); 1066 break; 1067 #endif 1068 #ifdef HAVE_NXT200X 1069 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180:
··· 1064 dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, 1065 &dev->i2c_adap); 1066 break; 1067 + case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: 1068 + dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, 1069 + &dev->i2c_adap); 1070 + break; 1071 #endif 1072 #ifdef HAVE_NXT200X 1073 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180:
+1
drivers/media/video/saa7134/saa7134.h
··· 220 #define SAA7134_BOARD_AVERMEDIA_A169_B 91 221 #define SAA7134_BOARD_AVERMEDIA_A169_B1 92 222 #define SAA7134_BOARD_MD7134_BRIDGE_2 93 223 224 #define SAA7134_MAXBOARDS 8 225 #define SAA7134_INPUT_MAX 8
··· 220 #define SAA7134_BOARD_AVERMEDIA_A169_B 91 221 #define SAA7134_BOARD_AVERMEDIA_A169_B1 92 222 #define SAA7134_BOARD_MD7134_BRIDGE_2 93 223 + #define SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS 94 224 225 #define SAA7134_MAXBOARDS 8 226 #define SAA7134_INPUT_MAX 8
+11
drivers/media/video/sn9c102/Kconfig
···
··· 1 + config USB_SN9C102 2 + tristate "USB SN9C10x PC Camera Controller support" 3 + depends on USB && VIDEO_DEV 4 + ---help--- 5 + Say Y here if you want support for cameras based on SONiX SN9C101, 6 + SN9C102 or SN9C103 PC Camera Controllers. 7 + 8 + See <file:Documentation/video4linux/sn9c102.txt> for more info. 9 + 10 + To compile this driver as a module, choose M here: the 11 + module will be called sn9c102.
+7 -5
drivers/media/video/tuner-core.c
··· 401 } 402 tuner_info("Tuner mode: %s\n", p); 403 tuner_info("Frequency: %lu.%02lu MHz\n", freq, freq_fraction); 404 - tuner_info("Standard: 0x%08llx\n", t->std); 405 if (t->mode != V4L2_TUNER_RADIO) 406 return; 407 if (t->has_signal) { ··· 558 559 static inline int check_v4l2(struct tuner *t) 560 { 561 - if (t->using_v4l2) { 562 - tuner_dbg ("ignore v4l1 call\n"); 563 - return EINVAL; 564 - } 565 return 0; 566 } 567 ··· 744 switch_v4l2(); 745 746 tuner->type = t->mode; 747 if (t->mode != V4L2_TUNER_RADIO) { 748 tuner->rangelow = tv_range[0] * 16; 749 tuner->rangehigh = tv_range[1] * 16;
··· 401 } 402 tuner_info("Tuner mode: %s\n", p); 403 tuner_info("Frequency: %lu.%02lu MHz\n", freq, freq_fraction); 404 + tuner_info("Standard: 0x%08lx\n", (unsigned long)t->std); 405 if (t->mode != V4L2_TUNER_RADIO) 406 return; 407 if (t->has_signal) { ··· 558 559 static inline int check_v4l2(struct tuner *t) 560 { 561 + /* bttv still uses both v4l1 and v4l2 calls to the tuner (v4l2 for 562 + TV, v4l1 for radio), until that is fixed this code is disabled. 563 + Otherwise the radio (v4l1) wouldn't tune after using the TV (v4l2) 564 + first. */ 565 return 0; 566 } 567 ··· 744 switch_v4l2(); 745 746 tuner->type = t->mode; 747 + if (t->mode == V4L2_TUNER_ANALOG_TV) 748 + tuner->capability |= V4L2_TUNER_CAP_NORM; 749 if (t->mode != V4L2_TUNER_RADIO) { 750 tuner->rangelow = tv_range[0] * 16; 751 tuner->rangehigh = tv_range[1] * 16;
-15
drivers/media/video/tvaudio.c
··· 1706 break; 1707 } 1708 1709 - case VIDIOC_S_AUDIO: 1710 - { 1711 - struct v4l2_audio *sarg = arg; 1712 - 1713 - if (!(desc->flags & CHIP_HAS_INPUTSEL) || sarg->index >= 4) 1714 - return -EINVAL; 1715 - /* There are four inputs: tuner, radio, extern and intern. */ 1716 - chip->input = sarg->index; 1717 - if (chip->muted) 1718 - break; 1719 - chip_write_masked(chip, desc->inputreg, 1720 - desc->inputmap[chip->input], desc->inputmask); 1721 - break; 1722 - } 1723 - 1724 case VIDIOC_S_TUNER: 1725 { 1726 struct v4l2_tuner *vt = arg;
··· 1706 break; 1707 } 1708 1709 case VIDIOC_S_TUNER: 1710 { 1711 struct v4l2_tuner *vt = arg;
+3 -3
drivers/media/video/tveeprom.c
··· 757 static int 758 tveeprom_attach_adapter (struct i2c_adapter *adapter) 759 { 760 - if (adapter->id != I2C_HW_B_BT848) 761 - return 0; 762 - return i2c_probe(adapter, &addr_data, tveeprom_detect_client); 763 } 764 765 static int
··· 757 static int 758 tveeprom_attach_adapter (struct i2c_adapter *adapter) 759 { 760 + if (adapter->class & I2C_CLASS_TV_ANALOG) 761 + return i2c_probe(adapter, &addr_data, tveeprom_detect_client); 762 + return 0; 763 } 764 765 static int
+17 -123
drivers/media/video/tvp5150.c
··· 53 .minimum = 0, 54 .maximum = 255, 55 .step = 1, 56 - .default_value = 0, 57 .flags = 0, 58 }, { 59 .id = V4L2_CID_CONTRAST, ··· 62 .minimum = 0, 63 .maximum = 255, 64 .step = 0x1, 65 - .default_value = 0x10, 66 .flags = 0, 67 }, { 68 .id = V4L2_CID_SATURATION, ··· 71 .minimum = 0, 72 .maximum = 255, 73 .step = 0x1, 74 - .default_value = 0x10, 75 .flags = 0, 76 }, { 77 .id = V4L2_CID_HUE, ··· 80 .minimum = -128, 81 .maximum = 127, 82 .step = 0x1, 83 - .default_value = 0x10, 84 .flags = 0, 85 } 86 }; ··· 500 501 static struct i2c_vbi_ram_value vbi_ram_default[] = 502 { 503 {0x010, /* Teletext, SECAM, WST System A */ 504 {V4L2_SLICED_TELETEXT_SECAM,6,23,1}, 505 { 0xaa, 0xaa, 0xff, 0xff, 0xe7, 0x2e, 0x20, 0x26, 506 0xe6, 0xb4, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00 } 507 }, 508 {0x030, /* Teletext, PAL, WST System B */ 509 - {V4L2_SLICED_TELETEXT_PAL_B,6,22,1}, 510 { 0xaa, 0xaa, 0xff, 0xff, 0x27, 0x2e, 0x20, 0x2b, 511 0xa6, 0x72, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00 } 512 }, 513 {0x050, /* Teletext, PAL, WST System C */ 514 {V4L2_SLICED_TELETEXT_PAL_C,6,22,1}, 515 { 0xaa, 0xaa, 0xff, 0xff, 0xe7, 0x2e, 0x20, 0x22, ··· 540 { 0xaa, 0x2a, 0xff, 0x3f, 0x04, 0x51, 0x6e, 0x02, 541 0xa6, 0x7b, 0x09, 0x00, 0x00, 0x00, 0x27, 0x00 } 542 }, 543 {0x0f0, /* Closed Caption, NTSC */ 544 {V4L2_SLICED_CAPTION_525,21,21,1}, 545 { 0xaa, 0x2a, 0xff, 0x3f, 0x04, 0x51, 0x6e, 0x02, ··· 551 { 0x5b, 0x55, 0xc5, 0xff, 0x00, 0x71, 0x6e, 0x42, 552 0xa6, 0xcd, 0x0f, 0x00, 0x00, 0x00, 0x3a, 0x00 } 553 }, 554 {0x130, /* Wide Screen Signal, NTSC C */ 555 {V4L2_SLICED_WSS_525,20,20,1}, 556 { 0x38, 0x00, 0x3f, 0x00, 0x00, 0x71, 0x6e, 0x43, ··· 567 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x6d, 0x49, 568 0x69, 0x94, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00 } 569 }, 570 {0x190, /* Video Program System (VPS), PAL */ 571 {V4L2_SLICED_VPS,16,16,0}, 572 { 0xaa, 0xaa, 0xff, 0xff, 0xba, 0xce, 0x2b, 0x0d, ··· 858 859 case 0: 860 case VIDIOC_INT_RESET: 861 - case DECODER_INIT: 862 tvp5150_reset(c); 863 break; 864 case VIDIOC_S_STD: ··· 956 #endif 957 958 case VIDIOC_LOG_STATUS: 959 - case DECODER_DUMP: 960 dump_reg(c); 961 break; 962 963 - case DECODER_GET_CAPABILITIES: 964 { 965 - struct video_decoder_capability *cap = arg; 966 967 - cap->flags = VIDEO_DECODER_PAL | 968 - VIDEO_DECODER_NTSC | 969 - VIDEO_DECODER_SECAM | 970 - VIDEO_DECODER_AUTO | VIDEO_DECODER_CCIR; 971 - cap->inputs = 3; 972 - cap->outputs = 1; 973 - break; 974 - } 975 - case DECODER_GET_STATUS: 976 - { 977 - int *iarg = arg; 978 - int status; 979 - int res=0; 980 - status = tvp5150_read(c, 0x88); 981 - if(status&0x08){ 982 - res |= DECODER_STATUS_COLOR; 983 - } 984 - if(status&0x04 && status&0x02){ 985 - res |= DECODER_STATUS_GOOD; 986 - } 987 - *iarg=res; 988 - break; 989 - } 990 - 991 - case DECODER_SET_GPIO: 992 - break; 993 - 994 - case DECODER_SET_VBI_BYPASS: 995 - break; 996 - 997 - case DECODER_SET_NORM: 998 - { 999 - int *iarg = arg; 1000 - 1001 - switch (*iarg) { 1002 - 1003 - case VIDEO_MODE_NTSC: 1004 - break; 1005 - 1006 - case VIDEO_MODE_PAL: 1007 - break; 1008 - 1009 - case VIDEO_MODE_SECAM: 1010 - break; 1011 - 1012 - case VIDEO_MODE_AUTO: 1013 - break; 1014 - 1015 - default: 1016 - return -EINVAL; 1017 - 1018 - } 1019 - decoder->norm = *iarg; 1020 - break; 1021 - } 1022 - case DECODER_SET_INPUT: 1023 - { 1024 - int *iarg = arg; 1025 - if (*iarg < 0 || *iarg > 3) { 1026 - return -EINVAL; 1027 - } 1028 - 1029 - decoder->input = *iarg; 1030 - tvp5150_selmux(c, decoder->input); 1031 - 1032 - break; 1033 - } 1034 - case DECODER_SET_OUTPUT: 1035 - { 1036 - int *iarg = arg; 1037 - 1038 - /* not much choice of outputs */ 1039 - if (*iarg != 0) { 1040 - return -EINVAL; 1041 - } 1042 - break; 1043 - } 1044 - case DECODER_ENABLE_OUTPUT: 1045 - { 1046 - int *iarg = arg; 1047 - 1048 - decoder->enable = (*iarg != 0); 1049 - 1050 - tvp5150_selmux(c, decoder->input); 1051 - 1052 break; 1053 } 1054 case VIDIOC_QUERYCTRL: ··· 1010 return -EINVAL; 1011 } 1012 1013 - case DECODER_SET_PICTURE: 1014 - { 1015 - struct video_picture *pic = arg; 1016 - if (decoder->bright != pic->brightness) { 1017 - /* We want 0 to 255 we get 0-65535 */ 1018 - decoder->bright = pic->brightness; 1019 - tvp5150_write(c, TVP5150_BRIGHT_CTL, 1020 - decoder->bright >> 8); 1021 - } 1022 - if (decoder->contrast != pic->contrast) { 1023 - /* We want 0 to 255 we get 0-65535 */ 1024 - decoder->contrast = pic->contrast; 1025 - tvp5150_write(c, TVP5150_CONTRAST_CTL, 1026 - decoder->contrast >> 8); 1027 - } 1028 - if (decoder->sat != pic->colour) { 1029 - /* We want 0 to 255 we get 0-65535 */ 1030 - decoder->sat = pic->colour; 1031 - tvp5150_write(c, TVP5150_SATURATION_CTL, 1032 - decoder->contrast >> 8); 1033 - } 1034 - if (decoder->hue != pic->hue) { 1035 - /* We want -128 to 127 we get 0-65535 */ 1036 - decoder->hue = pic->hue; 1037 - tvp5150_write(c, TVP5150_HUE_CTL, 1038 - (decoder->hue - 32768) >> 8); 1039 - } 1040 - break; 1041 - } 1042 default: 1043 return -EINVAL; 1044 }
··· 53 .minimum = 0, 54 .maximum = 255, 55 .step = 1, 56 + .default_value = 128, 57 .flags = 0, 58 }, { 59 .id = V4L2_CID_CONTRAST, ··· 62 .minimum = 0, 63 .maximum = 255, 64 .step = 0x1, 65 + .default_value = 128, 66 .flags = 0, 67 }, { 68 .id = V4L2_CID_SATURATION, ··· 71 .minimum = 0, 72 .maximum = 255, 73 .step = 0x1, 74 + .default_value = 128, 75 .flags = 0, 76 }, { 77 .id = V4L2_CID_HUE, ··· 80 .minimum = -128, 81 .maximum = 127, 82 .step = 0x1, 83 + .default_value = 0, 84 .flags = 0, 85 } 86 }; ··· 500 501 static struct i2c_vbi_ram_value vbi_ram_default[] = 502 { 503 + /* FIXME: Current api doesn't handle all VBI types, those not 504 + yet supported are placed under #if 0 */ 505 + #if 0 506 {0x010, /* Teletext, SECAM, WST System A */ 507 {V4L2_SLICED_TELETEXT_SECAM,6,23,1}, 508 { 0xaa, 0xaa, 0xff, 0xff, 0xe7, 0x2e, 0x20, 0x26, 509 0xe6, 0xb4, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00 } 510 }, 511 + #endif 512 {0x030, /* Teletext, PAL, WST System B */ 513 + {V4L2_SLICED_TELETEXT_B,6,22,1}, 514 { 0xaa, 0xaa, 0xff, 0xff, 0x27, 0x2e, 0x20, 0x2b, 515 0xa6, 0x72, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00 } 516 }, 517 + #if 0 518 {0x050, /* Teletext, PAL, WST System C */ 519 {V4L2_SLICED_TELETEXT_PAL_C,6,22,1}, 520 { 0xaa, 0xaa, 0xff, 0xff, 0xe7, 0x2e, 0x20, 0x22, ··· 535 { 0xaa, 0x2a, 0xff, 0x3f, 0x04, 0x51, 0x6e, 0x02, 536 0xa6, 0x7b, 0x09, 0x00, 0x00, 0x00, 0x27, 0x00 } 537 }, 538 + #endif 539 {0x0f0, /* Closed Caption, NTSC */ 540 {V4L2_SLICED_CAPTION_525,21,21,1}, 541 { 0xaa, 0x2a, 0xff, 0x3f, 0x04, 0x51, 0x6e, 0x02, ··· 545 { 0x5b, 0x55, 0xc5, 0xff, 0x00, 0x71, 0x6e, 0x42, 546 0xa6, 0xcd, 0x0f, 0x00, 0x00, 0x00, 0x3a, 0x00 } 547 }, 548 + #if 0 549 {0x130, /* Wide Screen Signal, NTSC C */ 550 {V4L2_SLICED_WSS_525,20,20,1}, 551 { 0x38, 0x00, 0x3f, 0x00, 0x00, 0x71, 0x6e, 0x43, ··· 560 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x6d, 0x49, 561 0x69, 0x94, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00 } 562 }, 563 + #endif 564 {0x190, /* Video Program System (VPS), PAL */ 565 {V4L2_SLICED_VPS,16,16,0}, 566 { 0xaa, 0xaa, 0xff, 0xff, 0xba, 0xce, 0x2b, 0x0d, ··· 850 851 case 0: 852 case VIDIOC_INT_RESET: 853 tvp5150_reset(c); 854 break; 855 case VIDIOC_S_STD: ··· 949 #endif 950 951 case VIDIOC_LOG_STATUS: 952 dump_reg(c); 953 break; 954 955 + case VIDIOC_G_TUNER: 956 { 957 + struct v4l2_tuner *vt = arg; 958 + int status = tvp5150_read(c, 0x88); 959 960 + vt->signal = ((status & 0x04) && (status & 0x02)) ? 0xffff : 0x0; 961 break; 962 } 963 case VIDIOC_QUERYCTRL: ··· 1087 return -EINVAL; 1088 } 1089 1090 default: 1091 return -EINVAL; 1092 }
+286
drivers/media/video/upd64031a.c
···
··· 1 + /* 2 + * upd64031A - NEC Electronics Ghost Reduction for NTSC in Japan 3 + * 4 + * 2003 by T.Adachi <tadachi@tadachi-net.com> 5 + * 2003 by Takeru KOMORIYA <komoriya@paken.org> 6 + * 2006 by Hans Verkuil <hverkuil@xs4all.nl> 7 + * 8 + * This program is free software; you can redistribute it and/or modify 9 + * it under the terms of the GNU General Public License as published by 10 + * the Free Software Foundation; either version 2 of the License, or 11 + * (at your option) any later version. 12 + * 13 + * This program is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 + * GNU General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU General Public License 19 + * along with this program; if not, write to the Free Software 20 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 + */ 22 + 23 + 24 + #include <linux/version.h> 25 + #include <linux/module.h> 26 + #include <linux/kernel.h> 27 + #include <linux/i2c.h> 28 + #include <linux/videodev2.h> 29 + #include <media/v4l2-common.h> 30 + #include <media/upd64031a.h> 31 + 32 + // --------------------- read registers functions define ----------------------- 33 + 34 + /* bit masks */ 35 + #define GR_MODE_MASK 0xc0 36 + #define DIRECT_3DYCS_CONNECT_MASK 0xc0 37 + #define SYNC_CIRCUIT_MASK 0xa0 38 + 39 + // ----------------------------------------------------------------------------- 40 + 41 + MODULE_DESCRIPTION("uPD64031A driver"); 42 + MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil"); 43 + MODULE_LICENSE("GPL"); 44 + 45 + static int debug = 0; 46 + module_param(debug, int, 0644); 47 + 48 + MODULE_PARM_DESC(debug, "Debug level (0-1)"); 49 + 50 + static unsigned short normal_i2c[] = { 0x24 >> 1, 0x26 >> 1, I2C_CLIENT_END }; 51 + 52 + 53 + I2C_CLIENT_INSMOD; 54 + 55 + enum { 56 + R00 = 0, R01, R02, R03, R04, 57 + R05, R06, R07, R08, R09, 58 + R0A, R0B, R0C, R0D, R0E, R0F, 59 + /* unused registers 60 + R10, R11, R12, R13, R14, 61 + R15, R16, R17, 62 + */ 63 + TOT_REGS 64 + }; 65 + 66 + struct upd64031a_state { 67 + u8 regs[TOT_REGS]; 68 + u8 gr_mode; 69 + u8 direct_3dycs_connect; 70 + u8 ext_comp_sync; 71 + u8 ext_vert_sync; 72 + }; 73 + 74 + static u8 upd64031a_init[] = { 75 + 0x00, 0xb8, 0x48, 0xd2, 0xe6, 76 + 0x03, 0x10, 0x0b, 0xaf, 0x7f, 77 + 0x00, 0x00, 0x1d, 0x5e, 0x00, 78 + 0xd0 79 + }; 80 + 81 + /* ------------------------------------------------------------------------ */ 82 + 83 + static u8 upd64031a_read(struct i2c_client *client, u8 reg) 84 + { 85 + u8 buf[2]; 86 + 87 + if (reg >= sizeof(buf)) 88 + return 0xff; 89 + i2c_master_recv(client, buf, 2); 90 + return buf[reg]; 91 + } 92 + 93 + /* ------------------------------------------------------------------------ */ 94 + 95 + static void upd64031a_write(struct i2c_client *client, u8 reg, u8 val) 96 + { 97 + u8 buf[2]; 98 + 99 + buf[0] = reg; 100 + buf[1] = val; 101 + v4l_dbg(1, debug, client, "writing reg addr: %02X val: %02X\n", reg, val); 102 + if (i2c_master_send(client, buf, 2) != 2) 103 + v4l_err(client, "I/O error write 0x%02x/0x%02x\n", reg, val); 104 + } 105 + 106 + /* ------------------------------------------------------------------------ */ 107 + 108 + /* The input changed due to new input or channel changed */ 109 + static void upd64031a_change(struct i2c_client *client) 110 + { 111 + struct upd64031a_state *state = i2c_get_clientdata(client); 112 + u8 reg = state->regs[R00]; 113 + 114 + v4l_dbg(1, debug, client, "changed input or channel\n"); 115 + upd64031a_write(client, R00, reg | 0x10); 116 + upd64031a_write(client, R00, reg & ~0x10); 117 + } 118 + 119 + /* ------------------------------------------------------------------------ */ 120 + 121 + static int upd64031a_command(struct i2c_client *client, unsigned int cmd, void *arg) 122 + { 123 + struct upd64031a_state *state = i2c_get_clientdata(client); 124 + struct v4l2_routing *route = arg; 125 + 126 + switch (cmd) { 127 + case VIDIOC_S_FREQUENCY: 128 + upd64031a_change(client); 129 + break; 130 + 131 + case VIDIOC_INT_G_VIDEO_ROUTING: 132 + route->input = (state->gr_mode >> 6) | 133 + (state->direct_3dycs_connect >> 4) | 134 + (state->ext_comp_sync >> 1) | 135 + (state->ext_vert_sync >> 2); 136 + route->output = 0; 137 + break; 138 + 139 + case VIDIOC_INT_S_VIDEO_ROUTING: 140 + { 141 + u8 r00, r05, r08; 142 + 143 + state->gr_mode = (route->input & 3) << 6; 144 + state->direct_3dycs_connect = (route->input & 0xc) << 4; 145 + state->ext_comp_sync = (route->input & UPD64031A_COMPOSITE_EXTERNAL) << 1; 146 + state->ext_vert_sync = (route->input & UPD64031A_VERTICAL_EXTERNAL) << 2; 147 + r00 = (state->regs[R00] & ~GR_MODE_MASK) | state->gr_mode; 148 + r05 = (state->regs[R00] & ~SYNC_CIRCUIT_MASK) | 149 + state->ext_comp_sync | state->ext_vert_sync; 150 + r08 = (state->regs[R08] & ~DIRECT_3DYCS_CONNECT_MASK) | 151 + state->direct_3dycs_connect; 152 + upd64031a_write(client, R00, r00); 153 + upd64031a_write(client, R05, r05); 154 + upd64031a_write(client, R08, r08); 155 + upd64031a_change(client); 156 + break; 157 + } 158 + 159 + case VIDIOC_LOG_STATUS: 160 + v4l_info(client, "Status: SA00=0x%02x SA01=0x%02x\n", 161 + upd64031a_read(client, 0), upd64031a_read(client, 1)); 162 + break; 163 + 164 + #ifdef CONFIG_VIDEO_ADV_DEBUG 165 + case VIDIOC_INT_G_REGISTER: 166 + { 167 + struct v4l2_register *reg = arg; 168 + 169 + if (reg->i2c_id != I2C_DRIVERID_UPD64031A) 170 + return -EINVAL; 171 + reg->val = upd64031a_read(client, reg->reg & 0xff); 172 + break; 173 + } 174 + 175 + case VIDIOC_INT_S_REGISTER: 176 + { 177 + struct v4l2_register *reg = arg; 178 + u8 addr = reg->reg & 0xff; 179 + u8 val = reg->val & 0xff; 180 + 181 + if (reg->i2c_id != I2C_DRIVERID_UPD64031A) 182 + return -EINVAL; 183 + if (!capable(CAP_SYS_ADMIN)) 184 + return -EPERM; 185 + upd64031a_write(client, addr, val); 186 + break; 187 + } 188 + #endif 189 + 190 + default: 191 + break; 192 + } 193 + return 0; 194 + } 195 + 196 + /* ------------------------------------------------------------------------ */ 197 + 198 + /* i2c implementation */ 199 + 200 + static struct i2c_driver i2c_driver; 201 + 202 + static int upd64031a_attach(struct i2c_adapter *adapter, int address, int kind) 203 + { 204 + struct i2c_client *client; 205 + struct upd64031a_state *state; 206 + int i; 207 + 208 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 209 + return 0; 210 + 211 + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); 212 + if (client == NULL) { 213 + return -ENOMEM; 214 + } 215 + 216 + client->addr = address; 217 + client->adapter = adapter; 218 + client->driver = &i2c_driver; 219 + snprintf(client->name, sizeof(client->name) - 1, "uPD64031A"); 220 + 221 + v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); 222 + 223 + state = kmalloc(sizeof(struct upd64031a_state), GFP_KERNEL); 224 + if (state == NULL) { 225 + kfree(client); 226 + return -ENOMEM; 227 + } 228 + i2c_set_clientdata(client, state); 229 + memcpy(state->regs, upd64031a_init, sizeof(state->regs)); 230 + state->gr_mode = UPD64031A_GR_ON << 6; 231 + state->direct_3dycs_connect = UPD64031A_3DYCS_COMPOSITE << 4; 232 + state->ext_comp_sync = state->ext_vert_sync = 0; 233 + for (i = 0; i < TOT_REGS; i++) { 234 + upd64031a_write(client, i, state->regs[i]); 235 + } 236 + 237 + i2c_attach_client(client); 238 + 239 + return 0; 240 + } 241 + 242 + static int upd64031a_probe(struct i2c_adapter *adapter) 243 + { 244 + if (adapter->class & I2C_CLASS_TV_ANALOG) 245 + return i2c_probe(adapter, &addr_data, upd64031a_attach); 246 + return 0; 247 + } 248 + 249 + static int upd64031a_detach(struct i2c_client *client) 250 + { 251 + int err; 252 + 253 + err = i2c_detach_client(client); 254 + if (err) 255 + return err; 256 + 257 + kfree(client); 258 + return 0; 259 + } 260 + 261 + /* ----------------------------------------------------------------------- */ 262 + 263 + /* i2c implementation */ 264 + static struct i2c_driver i2c_driver = { 265 + .driver = { 266 + .name = "upd64031a", 267 + }, 268 + .id = I2C_DRIVERID_UPD64031A, 269 + .attach_adapter = upd64031a_probe, 270 + .detach_client = upd64031a_detach, 271 + .command = upd64031a_command, 272 + }; 273 + 274 + 275 + static int __init upd64031a_init_module(void) 276 + { 277 + return i2c_add_driver(&i2c_driver); 278 + } 279 + 280 + static void __exit upd64031a_exit_module(void) 281 + { 282 + i2c_del_driver(&i2c_driver); 283 + } 284 + 285 + module_init(upd64031a_init_module); 286 + module_exit(upd64031a_exit_module);
+262
drivers/media/video/upd64083.c
···
··· 1 + /* 2 + * upd6408x - NEC Electronics 3-Dimensional Y/C separation driver 3 + * 4 + * 2003 by T.Adachi (tadachi@tadachi-net.com) 5 + * 2003 by Takeru KOMORIYA <komoriya@paken.org> 6 + * 2006 by Hans Verkuil <hverkuil@xs4all.nl> 7 + * 8 + * This program is free software; you can redistribute it and/or 9 + * modify it under the terms of the GNU General Public License 10 + * as published by the Free Software Foundation; either version 2 11 + * of the License, or (at your option) any later version. 12 + * 13 + * This program is distributed in the hope that it will be useful, 14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 + * GNU General Public License for more details. 17 + * 18 + * You should have received a copy of the GNU General Public License 19 + * along with this program; if not, write to the Free Software 20 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 + */ 22 + 23 + #include <linux/version.h> 24 + #include <linux/module.h> 25 + #include <linux/kernel.h> 26 + #include <linux/i2c.h> 27 + #include <linux/videodev2.h> 28 + #include <media/v4l2-common.h> 29 + #include <media/upd64083.h> 30 + 31 + MODULE_DESCRIPTION("uPD64083 driver"); 32 + MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil"); 33 + MODULE_LICENSE("GPL"); 34 + 35 + static int debug = 0; 36 + module_param(debug, bool, 0644); 37 + 38 + MODULE_PARM_DESC(debug, "Debug level (0-1)"); 39 + 40 + static unsigned short normal_i2c[] = { 0xb8 >> 1, 0xba >> 1, I2C_CLIENT_END }; 41 + 42 + 43 + I2C_CLIENT_INSMOD; 44 + 45 + enum { 46 + R00 = 0, R01, R02, R03, R04, 47 + R05, R06, R07, R08, R09, 48 + R0A, R0B, R0C, R0D, R0E, R0F, 49 + R10, R11, R12, R13, R14, 50 + R15, R16, 51 + TOT_REGS 52 + }; 53 + 54 + struct upd64083_state { 55 + u8 mode; 56 + u8 ext_y_adc; 57 + u8 regs[TOT_REGS]; 58 + }; 59 + 60 + /* Initial values when used in combination with the 61 + NEC upd64031a ghost reduction chip. */ 62 + static u8 upd64083_init[] = { 63 + 0x1f, 0x01, 0xa0, 0x2d, 0x29, /* we use EXCSS=0 */ 64 + 0x36, 0xdd, 0x05, 0x56, 0x48, 65 + 0x00, 0x3a, 0xa0, 0x05, 0x08, 66 + 0x44, 0x60, 0x08, 0x52, 0xf8, 67 + 0x53, 0x60, 0x10 68 + }; 69 + 70 + /* ------------------------------------------------------------------------ */ 71 + 72 + static void upd64083_log_status(struct i2c_client *client) 73 + { 74 + u8 buf[7]; 75 + 76 + i2c_master_recv(client, buf, 7); 77 + v4l_info(client, "Status: SA00=%02x SA01=%02x SA02=%02x SA03=%02x " 78 + "SA04=%02x SA05=%02x SA06=%02x\n", 79 + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); 80 + } 81 + 82 + /* ------------------------------------------------------------------------ */ 83 + 84 + static void upd64083_write(struct i2c_client *client, u8 reg, u8 val) 85 + { 86 + u8 buf[2]; 87 + 88 + buf[0] = reg; 89 + buf[1] = val; 90 + v4l_dbg(1, debug, client, "writing reg addr: %02x val: %02x\n", reg, val); 91 + if (i2c_master_send(client, buf, 2) != 2) 92 + v4l_err(client, "I/O error write 0x%02x/0x%02x\n", reg, val); 93 + } 94 + 95 + /* ------------------------------------------------------------------------ */ 96 + 97 + #ifdef CONFIG_VIDEO_ADV_DEBUG 98 + static u8 upd64083_read(struct i2c_client *client, u8 reg) 99 + { 100 + u8 buf[7]; 101 + 102 + if (reg >= sizeof(buf)) 103 + return 0xff; 104 + i2c_master_recv(client, buf, sizeof(buf)); 105 + return buf[reg]; 106 + } 107 + #endif 108 + 109 + /* ------------------------------------------------------------------------ */ 110 + 111 + static int upd64083_command(struct i2c_client *client, unsigned int cmd, void *arg) 112 + { 113 + struct upd64083_state *state = i2c_get_clientdata(client); 114 + struct v4l2_routing *route = arg; 115 + 116 + switch (cmd) { 117 + case VIDIOC_INT_G_VIDEO_ROUTING: 118 + route->input = (state->mode >> 6) | (state->ext_y_adc >> 3); 119 + route->output = 0; 120 + break; 121 + 122 + case VIDIOC_INT_S_VIDEO_ROUTING: 123 + { 124 + u8 r00, r02; 125 + 126 + if (route->input > 7 || (route->input & 6) == 6) 127 + return -EINVAL; 128 + state->mode = (route->input & 3) << 6; 129 + state->ext_y_adc = (route->input & UPD64083_EXT_Y_ADC) << 3; 130 + r00 = (state->regs[R00] & ~(3 << 6)) | state->mode; 131 + r02 = (state->regs[R02] & ~(1 << 5)) | state->ext_y_adc; 132 + upd64083_write(client, R00, r00); 133 + upd64083_write(client, R02, r02); 134 + break; 135 + } 136 + 137 + case VIDIOC_LOG_STATUS: 138 + upd64083_log_status(client); 139 + break; 140 + 141 + #ifdef CONFIG_VIDEO_ADV_DEBUG 142 + case VIDIOC_INT_G_REGISTER: 143 + { 144 + struct v4l2_register *reg = arg; 145 + 146 + if (reg->i2c_id != I2C_DRIVERID_UPD64083) 147 + return -EINVAL; 148 + reg->val = upd64083_read(client, reg->reg & 0xff); 149 + break; 150 + } 151 + 152 + case VIDIOC_INT_S_REGISTER: 153 + { 154 + struct v4l2_register *reg = arg; 155 + u8 addr = reg->reg & 0xff; 156 + u8 val = reg->val & 0xff; 157 + 158 + if (reg->i2c_id != I2C_DRIVERID_UPD64083) 159 + return -EINVAL; 160 + if (!capable(CAP_SYS_ADMIN)) 161 + return -EPERM; 162 + upd64083_write(client, addr, val); 163 + break; 164 + } 165 + #endif 166 + default: 167 + break; 168 + } 169 + 170 + return 0; 171 + } 172 + 173 + /* ------------------------------------------------------------------------ */ 174 + 175 + /* i2c implementation */ 176 + 177 + static struct i2c_driver i2c_driver; 178 + 179 + static int upd64083_attach(struct i2c_adapter *adapter, int address, int kind) 180 + { 181 + struct i2c_client *client; 182 + struct upd64083_state *state; 183 + int i; 184 + 185 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 186 + return 0; 187 + 188 + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); 189 + if (client == NULL) { 190 + return -ENOMEM; 191 + } 192 + 193 + client->addr = address; 194 + client->adapter = adapter; 195 + client->driver = &i2c_driver; 196 + snprintf(client->name, sizeof(client->name) - 1, "uPD64083"); 197 + 198 + v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); 199 + 200 + state = kmalloc(sizeof(struct upd64083_state), GFP_KERNEL); 201 + if (state == NULL) { 202 + kfree(client); 203 + return -ENOMEM; 204 + } 205 + i2c_set_clientdata(client, state); 206 + /* Initially assume that a ghost reduction chip is present */ 207 + state->mode = 0; /* YCS mode */ 208 + state->ext_y_adc = (1 << 5); 209 + memcpy(state->regs, upd64083_init, TOT_REGS); 210 + for (i = 0; i < TOT_REGS; i++) { 211 + upd64083_write(client, i, state->regs[i]); 212 + } 213 + i2c_attach_client(client); 214 + 215 + return 0; 216 + } 217 + 218 + static int upd64083_probe(struct i2c_adapter *adapter) 219 + { 220 + if (adapter->class & I2C_CLASS_TV_ANALOG) 221 + return i2c_probe(adapter, &addr_data, upd64083_attach); 222 + return 0; 223 + } 224 + 225 + static int upd64083_detach(struct i2c_client *client) 226 + { 227 + int err; 228 + 229 + err = i2c_detach_client(client); 230 + if (err) 231 + return err; 232 + 233 + kfree(client); 234 + return 0; 235 + } 236 + 237 + /* ----------------------------------------------------------------------- */ 238 + 239 + /* i2c implementation */ 240 + static struct i2c_driver i2c_driver = { 241 + .driver = { 242 + .name = "upd64083", 243 + }, 244 + .id = I2C_DRIVERID_UPD64083, 245 + .attach_adapter = upd64083_probe, 246 + .detach_client = upd64083_detach, 247 + .command = upd64083_command, 248 + }; 249 + 250 + 251 + static int __init upd64083_init_module(void) 252 + { 253 + return i2c_add_driver(&i2c_driver); 254 + } 255 + 256 + static void __exit upd64083_exit_module(void) 257 + { 258 + i2c_del_driver(&i2c_driver); 259 + } 260 + 261 + module_init(upd64083_init_module); 262 + module_exit(upd64083_exit_module);
+38
drivers/media/video/usbvideo/Kconfig
···
··· 1 + config VIDEO_USBVIDEO 2 + tristate 3 + 4 + config USB_VICAM 5 + tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)" 6 + depends on USB && VIDEO_DEV && EXPERIMENTAL 7 + select VIDEO_USBVIDEO 8 + ---help--- 9 + Say Y here if you have 3com homeconnect camera (vicam). 10 + 11 + To compile this driver as a module, choose M here: the 12 + module will be called vicam. 13 + 14 + config USB_IBMCAM 15 + tristate "USB IBM (Xirlink) C-it Camera support" 16 + depends on USB && VIDEO_DEV 17 + select VIDEO_USBVIDEO 18 + ---help--- 19 + Say Y here if you want to connect a IBM "C-It" camera, also known as 20 + "Xirlink PC Camera" to your computer's USB port. 21 + 22 + To compile this driver as a module, choose M here: the 23 + module will be called ibmcam. 24 + 25 + This camera has several configuration options which 26 + can be specified when you load the module. Read 27 + <file:Documentation/video4linux/ibmcam.txt> to learn more. 28 + 29 + config USB_KONICAWC 30 + tristate "USB Konica Webcam support" 31 + depends on USB && VIDEO_DEV 32 + select VIDEO_USBVIDEO 33 + ---help--- 34 + Say Y here if you want support for webcams based on a Konica 35 + chipset. This is known to work with the Intel YC76 webcam. 36 + 37 + To compile this driver as a module, choose M here: the 38 + module will be called konicawc.
+4 -4
drivers/media/video/usbvideo/Makefile
··· 1 - obj-$(CONFIG_USB_IBMCAM) += ibmcam.o usbvideo.o ultracam.o 2 - obj-$(CONFIG_USB_KONICAWC) += konicawc.o usbvideo.o 3 - obj-$(CONFIG_USB_VICAM) += vicam.o usbvideo.o 4 -
··· 1 + obj-$(CONFIG_VIDEO_USBVIDEO) += usbvideo.o 2 + obj-$(CONFIG_USB_IBMCAM) += ibmcam.o ultracam.o 3 + obj-$(CONFIG_USB_KONICAWC) += konicawc.o 4 + obj-$(CONFIG_USB_VICAM) += vicam.o
+7 -1
drivers/media/video/v4l2-common.c
··· 317 [_IOC_NR(TUNER_SET_STANDBY)] = "TUNER_SET_STANDBY", 318 [_IOC_NR(TDA9887_SET_CONFIG)] = "TDA9887_SET_CONFIG", 319 320 [_IOC_NR(VIDIOC_INT_S_REGISTER)] = "VIDIOC_INT_S_REGISTER", 321 [_IOC_NR(VIDIOC_INT_G_REGISTER)] = "VIDIOC_INT_G_REGISTER", 322 [_IOC_NR(VIDIOC_INT_RESET)] = "VIDIOC_INT_RESET", ··· 326 [_IOC_NR(VIDIOC_INT_S_VBI_DATA)] = "VIDIOC_INT_S_VBI_DATA", 327 [_IOC_NR(VIDIOC_INT_G_VBI_DATA)] = "VIDIOC_INT_G_VBI_DATA", 328 [_IOC_NR(VIDIOC_INT_G_CHIP_IDENT)] = "VIDIOC_INT_G_CHIP_IDENT", 329 - [_IOC_NR(VIDIOC_INT_I2S_CLOCK_FREQ)] = "VIDIOC_INT_I2S_CLOCK_FREQ" 330 }; 331 #define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls) 332
··· 317 [_IOC_NR(TUNER_SET_STANDBY)] = "TUNER_SET_STANDBY", 318 [_IOC_NR(TDA9887_SET_CONFIG)] = "TDA9887_SET_CONFIG", 319 320 + [_IOC_NR(VIDIOC_INT_S_TUNER_MODE)] = "VIDIOC_INT_S_TUNER_MODE", 321 [_IOC_NR(VIDIOC_INT_S_REGISTER)] = "VIDIOC_INT_S_REGISTER", 322 [_IOC_NR(VIDIOC_INT_G_REGISTER)] = "VIDIOC_INT_G_REGISTER", 323 [_IOC_NR(VIDIOC_INT_RESET)] = "VIDIOC_INT_RESET", ··· 325 [_IOC_NR(VIDIOC_INT_S_VBI_DATA)] = "VIDIOC_INT_S_VBI_DATA", 326 [_IOC_NR(VIDIOC_INT_G_VBI_DATA)] = "VIDIOC_INT_G_VBI_DATA", 327 [_IOC_NR(VIDIOC_INT_G_CHIP_IDENT)] = "VIDIOC_INT_G_CHIP_IDENT", 328 + [_IOC_NR(VIDIOC_INT_I2S_CLOCK_FREQ)] = "VIDIOC_INT_I2S_CLOCK_FREQ", 329 + [_IOC_NR(VIDIOC_INT_S_STANDBY)] = "VIDIOC_INT_S_STANDBY", 330 + [_IOC_NR(VIDIOC_INT_S_AUDIO_ROUTING)] = "VIDIOC_INT_S_AUDIO_ROUTING", 331 + [_IOC_NR(VIDIOC_INT_G_AUDIO_ROUTING)] = "VIDIOC_INT_G_AUDIO_ROUTING", 332 + [_IOC_NR(VIDIOC_INT_S_VIDEO_ROUTING)] = "VIDIOC_INT_S_VIDEO_ROUTING", 333 + [_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)] = "VIDIOC_INT_G_VIDEO_ROUTING" 334 }; 335 #define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls) 336
+10 -4
drivers/media/video/video-buf.c
··· 399 int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma) 400 { 401 struct videobuf_queue q; 402 403 q.dev=pci; 404 - q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg; 405 406 - return (videobuf_dma_unmap(&q,dma)); 407 } 408 409 int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma) 410 { 411 struct videobuf_queue q; 412 413 q.dev=pci; 414 - q.ops->vb_map_sg=(vb_map_sg_t *)pci_unmap_sg; 415 416 return (videobuf_dma_unmap(&q,dma)); 417 } ··· 929 /* need to capture a new frame */ 930 retval = -ENOMEM; 931 q->read_buf = videobuf_alloc(q->msize); 932 - dprintk(1,"video alloc=0x%08x\n",(unsigned int) q->read_buf); 933 if (NULL == q->read_buf) 934 goto done; 935 q->read_buf->memory = V4L2_MEMORY_USERPTR;
··· 399 int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma) 400 { 401 struct videobuf_queue q; 402 + struct videobuf_queue_ops qops; 403 404 q.dev=pci; 405 + qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg; 406 + qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg; 407 + q.ops = &qops; 408 409 + return (videobuf_dma_map(&q,dma)); 410 } 411 412 int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma) 413 { 414 struct videobuf_queue q; 415 + struct videobuf_queue_ops qops; 416 417 q.dev=pci; 418 + qops.vb_map_sg=(vb_map_sg_t *)pci_map_sg; 419 + qops.vb_unmap_sg=(vb_map_sg_t *)pci_unmap_sg; 420 + q.ops = &qops; 421 422 return (videobuf_dma_unmap(&q,dma)); 423 } ··· 923 /* need to capture a new frame */ 924 retval = -ENOMEM; 925 q->read_buf = videobuf_alloc(q->msize); 926 + dprintk(1,"video alloc=0x%p\n", q->read_buf); 927 if (NULL == q->read_buf) 928 goto done; 929 q->read_buf->memory = V4L2_MEMORY_USERPTR;
+355
drivers/media/video/wm8739.c
···
··· 1 + /* 2 + * wm8739 3 + * 4 + * Copyright (C) 2005 T. Adachi <tadachi@tadachi-net.com> 5 + * 6 + * Copyright (C) 2005 Hans Verkuil <hverkuil@xs4all.nl> 7 + * - Cleanup 8 + * 9 + * This program is free software; you can redistribute it and/or modify 10 + * it under the terms of the GNU General Public License as published by 11 + * the Free Software Foundation; either version 2 of the License, or 12 + * (at your option) any later version. 13 + * 14 + * This program is distributed in the hope that it will be useful, 15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 + * GNU General Public License for more details. 18 + * 19 + * You should have received a copy of the GNU General Public License 20 + * along with this program; if not, write to the Free Software 21 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 + */ 23 + 24 + #include <linux/module.h> 25 + #include <linux/types.h> 26 + #include <linux/ioctl.h> 27 + #include <asm/uaccess.h> 28 + #include <linux/i2c.h> 29 + #include <linux/i2c-id.h> 30 + #include <linux/videodev.h> 31 + #include <media/v4l2-common.h> 32 + 33 + MODULE_DESCRIPTION("wm8739 driver"); 34 + MODULE_AUTHOR("T. Adachi, Hans Verkuil"); 35 + MODULE_LICENSE("GPL"); 36 + 37 + static int debug = 0; 38 + static unsigned short normal_i2c[] = { 0x34 >> 1, 0x36 >> 1, I2C_CLIENT_END }; 39 + 40 + module_param(debug, int, 0644); 41 + 42 + MODULE_PARM_DESC(debug, "Debug level (0-1)"); 43 + 44 + 45 + I2C_CLIENT_INSMOD; 46 + 47 + /* ------------------------------------------------------------------------ */ 48 + 49 + enum { 50 + R0 = 0, R1, 51 + R5 = 5, R6, R7, R8, R9, R15 = 15, 52 + TOT_REGS 53 + }; 54 + 55 + struct wm8739_state { 56 + u32 clock_freq; 57 + u8 muted; 58 + u16 volume; 59 + u16 balance; 60 + u8 vol_l; /* +12dB to -34.5dB 1.5dB step (5bit) def:0dB */ 61 + u8 vol_r; /* +12dB to -34.5dB 1.5dB step (5bit) def:0dB */ 62 + }; 63 + 64 + /* ------------------------------------------------------------------------ */ 65 + 66 + static int wm8739_write(struct i2c_client *client, int reg, u16 val) 67 + { 68 + int i; 69 + 70 + if (reg < 0 || reg >= TOT_REGS) { 71 + v4l_err(client, "Invalid register R%d\n", reg); 72 + return -1; 73 + } 74 + 75 + v4l_dbg(1, debug, client, "write: %02x %02x\n", reg, val); 76 + 77 + for (i = 0; i < 3; i++) { 78 + if (i2c_smbus_write_byte_data(client, (reg << 1) | 79 + (val >> 8), val & 0xff) == 0) { 80 + return 0; 81 + } 82 + } 83 + v4l_err(client, "I2C: cannot write %03x to register R%d\n", val, reg); 84 + return -1; 85 + } 86 + 87 + /* write regs to set audio volume etc */ 88 + static void wm8739_set_audio(struct i2c_client *client) 89 + { 90 + struct wm8739_state *state = i2c_get_clientdata(client); 91 + u16 mute = state->muted ? 0x80 : 0; 92 + 93 + /* Volume setting: bits 0-4, 0x1f = 12 dB, 0x00 = -34.5 dB 94 + * Default setting: 0x17 = 0 dB 95 + */ 96 + wm8739_write(client, R0, (state->vol_l & 0x1f) | mute); 97 + wm8739_write(client, R1, (state->vol_r & 0x1f) | mute); 98 + } 99 + 100 + static int wm8739_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl) 101 + { 102 + struct wm8739_state *state = i2c_get_clientdata(client); 103 + 104 + switch (ctrl->id) { 105 + case V4L2_CID_AUDIO_MUTE: 106 + ctrl->value = state->muted; 107 + break; 108 + 109 + case V4L2_CID_AUDIO_VOLUME: 110 + ctrl->value = state->volume; 111 + break; 112 + 113 + case V4L2_CID_AUDIO_BALANCE: 114 + ctrl->value = state->balance; 115 + break; 116 + 117 + default: 118 + return -EINVAL; 119 + } 120 + return 0; 121 + } 122 + 123 + static int wm8739_set_ctrl(struct i2c_client *client, struct v4l2_control *ctrl) 124 + { 125 + struct wm8739_state *state = i2c_get_clientdata(client); 126 + unsigned int work_l, work_r; 127 + 128 + switch (ctrl->id) { 129 + case V4L2_CID_AUDIO_MUTE: 130 + state->muted = ctrl->value; 131 + break; 132 + 133 + case V4L2_CID_AUDIO_VOLUME: 134 + state->volume = ctrl->value; 135 + break; 136 + 137 + case V4L2_CID_AUDIO_BALANCE: 138 + state->balance = ctrl->value; 139 + break; 140 + 141 + default: 142 + return -EINVAL; 143 + } 144 + 145 + /* normalize ( 65535 to 0 -> 31 to 0 (12dB to -34.5dB) ) */ 146 + work_l = (min(65536 - state->balance, 32768) * state->volume) / 32768; 147 + work_r = (min(state->balance, (u16)32768) * state->volume) / 32768; 148 + 149 + state->vol_l = (long)work_l * 31 / 65535; 150 + state->vol_r = (long)work_r * 31 / 65535; 151 + 152 + /* set audio volume etc. */ 153 + wm8739_set_audio(client); 154 + return 0; 155 + } 156 + 157 + /* ------------------------------------------------------------------------ */ 158 + 159 + static struct v4l2_queryctrl wm8739_qctrl[] = { 160 + { 161 + .id = V4L2_CID_AUDIO_VOLUME, 162 + .name = "Volume", 163 + .minimum = 0, 164 + .maximum = 65535, 165 + .step = 65535/100, 166 + .default_value = 58880, 167 + .flags = 0, 168 + .type = V4L2_CTRL_TYPE_INTEGER, 169 + },{ 170 + .id = V4L2_CID_AUDIO_MUTE, 171 + .name = "Mute", 172 + .minimum = 0, 173 + .maximum = 1, 174 + .step = 1, 175 + .default_value = 1, 176 + .flags = 0, 177 + .type = V4L2_CTRL_TYPE_BOOLEAN, 178 + },{ 179 + .id = V4L2_CID_AUDIO_BALANCE, 180 + .name = "Balance", 181 + .minimum = 0, 182 + .maximum = 65535, 183 + .step = 65535/100, 184 + .default_value = 32768, 185 + .flags = 0, 186 + .type = V4L2_CTRL_TYPE_INTEGER, 187 + } 188 + }; 189 + 190 + /* ------------------------------------------------------------------------ */ 191 + 192 + static int wm8739_command(struct i2c_client *client, unsigned int cmd, void *arg) 193 + { 194 + struct wm8739_state *state = i2c_get_clientdata(client); 195 + 196 + switch (cmd) { 197 + case VIDIOC_INT_AUDIO_CLOCK_FREQ: 198 + { 199 + u32 audiofreq = *(u32 *)arg; 200 + 201 + state->clock_freq = audiofreq; 202 + wm8739_write(client, R9, 0x000); /* de-activate */ 203 + switch (audiofreq) { 204 + case 44100: 205 + wm8739_write(client, R8, 0x020); /* 256fps, fs=44.1k */ 206 + break; 207 + case 48000: 208 + wm8739_write(client, R8, 0x000); /* 256fps, fs=48k */ 209 + break; 210 + case 32000: 211 + wm8739_write(client, R8, 0x018); /* 256fps, fs=32k */ 212 + break; 213 + default: 214 + break; 215 + } 216 + wm8739_write(client, R9, 0x001); /* activate */ 217 + break; 218 + } 219 + 220 + case VIDIOC_G_CTRL: 221 + return wm8739_get_ctrl(client, arg); 222 + 223 + case VIDIOC_S_CTRL: 224 + return wm8739_set_ctrl(client, arg); 225 + 226 + case VIDIOC_QUERYCTRL: 227 + { 228 + struct v4l2_queryctrl *qc = arg; 229 + int i; 230 + 231 + for (i = 0; i < ARRAY_SIZE(wm8739_qctrl); i++) 232 + if (qc->id && qc->id == wm8739_qctrl[i].id) { 233 + memcpy(qc, &wm8739_qctrl[i], sizeof(*qc)); 234 + return 0; 235 + } 236 + return -EINVAL; 237 + } 238 + 239 + case VIDIOC_LOG_STATUS: 240 + v4l_info(client, "Frequency: %u Hz\n", state->clock_freq); 241 + v4l_info(client, "Volume L: %02x%s\n", state->vol_l & 0x1f, 242 + state->muted ? " (muted)" : ""); 243 + v4l_info(client, "Volume R: %02x%s\n", state->vol_r & 0x1f, 244 + state->muted ? " (muted)" : ""); 245 + break; 246 + 247 + default: 248 + return -EINVAL; 249 + } 250 + 251 + return 0; 252 + } 253 + 254 + /* ------------------------------------------------------------------------ */ 255 + 256 + /* i2c implementation */ 257 + 258 + static struct i2c_driver i2c_driver; 259 + 260 + static int wm8739_attach(struct i2c_adapter *adapter, int address, int kind) 261 + { 262 + struct i2c_client *client; 263 + struct wm8739_state *state; 264 + 265 + /* Check if the adapter supports the needed features */ 266 + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 267 + return 0; 268 + 269 + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); 270 + if (client == NULL) 271 + return -ENOMEM; 272 + 273 + client->addr = address; 274 + client->adapter = adapter; 275 + client->driver = &i2c_driver; 276 + snprintf(client->name, sizeof(client->name) - 1, "wm8739"); 277 + 278 + v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); 279 + 280 + state = kmalloc(sizeof(struct wm8739_state), GFP_KERNEL); 281 + if (state == NULL) { 282 + kfree(client); 283 + return -ENOMEM; 284 + } 285 + state->vol_l = 0x17; /* 0dB */ 286 + state->vol_r = 0x17; /* 0dB */ 287 + state->muted = 0; 288 + state->balance = 32768; 289 + /* normalize (12dB(31) to -34.5dB(0) [0dB(23)] -> 65535 to 0) */ 290 + state->volume = ((long)state->vol_l + 1) * 65535 / 31; 291 + state->clock_freq = 48000; 292 + i2c_set_clientdata(client, state); 293 + 294 + /* initialize wm8739 */ 295 + wm8739_write(client, R15, 0x00); /* reset */ 296 + wm8739_write(client, R5, 0x000); /* filter setting, high path, offet clear */ 297 + wm8739_write(client, R6, 0x000); /* ADC, OSC, Power Off mode Disable */ 298 + wm8739_write(client, R7, 0x049); /* Digital Audio interface format */ 299 + /* Enable Master mode */ 300 + /* 24 bit, MSB first/left justified */ 301 + wm8739_write(client, R8, 0x000); /* sampling control */ 302 + /* normal, 256fs, 48KHz sampling rate */ 303 + wm8739_write(client, R9, 0x001); /* activate */ 304 + wm8739_set_audio(client); /* set volume/mute */ 305 + 306 + i2c_attach_client(client); 307 + 308 + return 0; 309 + } 310 + 311 + static int wm8739_probe(struct i2c_adapter *adapter) 312 + { 313 + if (adapter->class & I2C_CLASS_TV_ANALOG) 314 + return i2c_probe(adapter, &addr_data, wm8739_attach); 315 + return 0; 316 + } 317 + 318 + static int wm8739_detach(struct i2c_client *client) 319 + { 320 + int err; 321 + 322 + err = i2c_detach_client(client); 323 + if (err) 324 + return err; 325 + 326 + kfree(client); 327 + return 0; 328 + } 329 + 330 + /* ----------------------------------------------------------------------- */ 331 + 332 + /* i2c implementation */ 333 + static struct i2c_driver i2c_driver = { 334 + .driver = { 335 + .name = "wm8739", 336 + }, 337 + .id = I2C_DRIVERID_WM8739, 338 + .attach_adapter = wm8739_probe, 339 + .detach_client = wm8739_detach, 340 + .command = wm8739_command, 341 + }; 342 + 343 + 344 + static int __init wm8739_init_module(void) 345 + { 346 + return i2c_add_driver(&i2c_driver); 347 + } 348 + 349 + static void __exit wm8739_cleanup_module(void) 350 + { 351 + i2c_del_driver(&i2c_driver); 352 + } 353 + 354 + module_init(wm8739_init_module); 355 + module_exit(wm8739_cleanup_module);
+11
drivers/media/video/zc0301/Kconfig
···
··· 1 + config USB_ZC0301 2 + tristate "USB ZC0301 Image Processor and Control Chip support" 3 + depends on USB && VIDEO_DEV 4 + ---help--- 5 + Say Y here if you want support for cameras based on the ZC0301 6 + Image Processor and Control Chip. 7 + 8 + See <file:Documentation/video4linux/zc0301.txt> for more info. 9 + 10 + To compile this driver as a module, choose M here: the 11 + module will be called zc0301.
+6 -55
include/linux/videodev2.h
··· 966 967 /* Teletext World System Teletext 968 (WST), defined on ITU-R BT.653-2 */ 969 - #define V4L2_SLICED_TELETEXT_PAL_B (0x000001) 970 - #define V4L2_SLICED_TELETEXT_PAL_C (0x000002) 971 - #define V4L2_SLICED_TELETEXT_NTSC_B (0x000010) 972 - #define V4L2_SLICED_TELETEXT_SECAM (0x000020) 973 - 974 - /* Teletext North American Broadcast Teletext Specification 975 - (NABTS), defined on ITU-R BT.653-2 */ 976 - #define V4L2_SLICED_TELETEXT_NTSC_C (0x000040) 977 - #define V4L2_SLICED_TELETEXT_NTSC_D (0x000080) 978 - 979 /* Video Program System, defined on ETS 300 231*/ 980 - #define V4L2_SLICED_VPS (0x000400) 981 - 982 /* Closed Caption, defined on EIA-608 */ 983 - #define V4L2_SLICED_CAPTION_525 (0x001000) 984 - #define V4L2_SLICED_CAPTION_625 (0x002000) 985 - 986 /* Wide Screen System, defined on ITU-R BT1119.1 */ 987 - #define V4L2_SLICED_WSS_625 (0x004000) 988 989 - /* Wide Screen System, defined on IEC 61880 */ 990 - #define V4L2_SLICED_WSS_525 (0x008000) 991 992 - /* Vertical Interval Timecode (VITC), defined on SMPTE 12M */ 993 - #define V4l2_SLICED_VITC_625 (0x010000) 994 - #define V4l2_SLICED_VITC_525 (0x020000) 995 - 996 - #define V4L2_SLICED_TELETEXT_B (V4L2_SLICED_TELETEXT_PAL_B |\ 997 - V4L2_SLICED_TELETEXT_NTSC_B) 998 - 999 - #define V4L2_SLICED_TELETEXT (V4L2_SLICED_TELETEXT_PAL_B |\ 1000 - V4L2_SLICED_TELETEXT_PAL_C |\ 1001 - V4L2_SLICED_TELETEXT_SECAM |\ 1002 - V4L2_SLICED_TELETEXT_NTSC_B |\ 1003 - V4L2_SLICED_TELETEXT_NTSC_C |\ 1004 - V4L2_SLICED_TELETEXT_NTSC_D) 1005 - 1006 - #define V4L2_SLICED_CAPTION (V4L2_SLICED_CAPTION_525 |\ 1007 - V4L2_SLICED_CAPTION_625) 1008 - 1009 - #define V4L2_SLICED_WSS (V4L2_SLICED_WSS_525 |\ 1010 - V4L2_SLICED_WSS_625) 1011 - 1012 - #define V4L2_SLICED_VITC (V4L2_SLICED_VITC_525 |\ 1013 - V4L2_SLICED_VITC_625) 1014 - 1015 - #define V4L2_SLICED_VBI_525 (V4L2_SLICED_TELETEXT_NTSC_B |\ 1016 - V4L2_SLICED_TELETEXT_NTSC_C |\ 1017 - V4L2_SLICED_TELETEXT_NTSC_D |\ 1018 - V4L2_SLICED_CAPTION_525 |\ 1019 - V4L2_SLICED_WSS_525 |\ 1020 - V4l2_SLICED_VITC_525) 1021 - 1022 - #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_PAL_B |\ 1023 - V4L2_SLICED_TELETEXT_PAL_C |\ 1024 - V4L2_SLICED_TELETEXT_SECAM |\ 1025 - V4L2_SLICED_VPS |\ 1026 - V4L2_SLICED_CAPTION_625 |\ 1027 - V4L2_SLICED_WSS_625 |\ 1028 - V4l2_SLICED_VITC_625) 1029 1030 struct v4l2_sliced_vbi_cap 1031 {
··· 966 967 /* Teletext World System Teletext 968 (WST), defined on ITU-R BT.653-2 */ 969 + #define V4L2_SLICED_TELETEXT_B (0x0001) 970 /* Video Program System, defined on ETS 300 231*/ 971 + #define V4L2_SLICED_VPS (0x0400) 972 /* Closed Caption, defined on EIA-608 */ 973 + #define V4L2_SLICED_CAPTION_525 (0x1000) 974 /* Wide Screen System, defined on ITU-R BT1119.1 */ 975 + #define V4L2_SLICED_WSS_625 (0x4000) 976 977 + #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) 978 + #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) 979 980 981 struct v4l2_sliced_vbi_cap 982 {
+64
include/media/cx25840.h
···
··· 1 + /* 2 + cx25840.h - definition for cx25840/1/2/3 inputs 3 + 4 + Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) 5 + 6 + This program is free software; you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation; either version 2 of the License, or 9 + (at your option) any later version. 10 + 11 + This program is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with this program; if not, write to the Free Software 18 + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 + */ 20 + 21 + #ifndef _CX25840_H_ 22 + #define _CX25840_H_ 23 + 24 + enum cx25840_video_input { 25 + /* Composite video inputs In1-In8 */ 26 + CX25840_COMPOSITE1 = 1, 27 + CX25840_COMPOSITE2, 28 + CX25840_COMPOSITE3, 29 + CX25840_COMPOSITE4, 30 + CX25840_COMPOSITE5, 31 + CX25840_COMPOSITE6, 32 + CX25840_COMPOSITE7, 33 + CX25840_COMPOSITE8, 34 + 35 + /* S-Video inputs consist of one luma input (In1-In4) ORed with one 36 + chroma input (In5-In8) */ 37 + CX25840_SVIDEO_LUMA1 = 0x10, 38 + CX25840_SVIDEO_LUMA2 = 0x20, 39 + CX25840_SVIDEO_LUMA3 = 0x30, 40 + CX25840_SVIDEO_LUMA4 = 0x40, 41 + CX25840_SVIDEO_CHROMA4 = 0x400, 42 + CX25840_SVIDEO_CHROMA5 = 0x500, 43 + CX25840_SVIDEO_CHROMA6 = 0x600, 44 + CX25840_SVIDEO_CHROMA7 = 0x700, 45 + CX25840_SVIDEO_CHROMA8 = 0x800, 46 + 47 + /* S-Video aliases for common luma/chroma combinations */ 48 + CX25840_SVIDEO1 = 0x510, 49 + CX25840_SVIDEO2 = 0x620, 50 + CX25840_SVIDEO3 = 0x730, 51 + CX25840_SVIDEO4 = 0x840, 52 + }; 53 + 54 + enum cx25840_audio_input { 55 + /* Audio inputs: serial or In4-In8 */ 56 + CX25840_AUDIO_SERIAL, 57 + CX25840_AUDIO4 = 4, 58 + CX25840_AUDIO5, 59 + CX25840_AUDIO6, 60 + CX25840_AUDIO7, 61 + CX25840_AUDIO8, 62 + }; 63 + 64 + #endif
+30 -30
include/media/msp3400.h
··· 80 */ 81 82 /* SCART input to DSP selection */ 83 - #define MSP_IN_SCART_1 0 /* Pin SC1_IN */ 84 - #define MSP_IN_SCART_2 1 /* Pin SC2_IN */ 85 - #define MSP_IN_SCART_3 2 /* Pin SC3_IN */ 86 - #define MSP_IN_SCART_4 3 /* Pin SC4_IN */ 87 #define MSP_IN_MONO 6 /* Pin MONO_IN */ 88 #define MSP_IN_MUTE 7 /* Mute DSP input */ 89 #define MSP_SCART_TO_DSP(in) (in) 90 /* Tuner input to demodulator and DSP selection */ 91 - #define MSP_IN_TUNER_1 0 /* Analog Sound IF input pin ANA_IN1 */ 92 - #define MSP_IN_TUNER_2 1 /* Analog Sound IF input pin ANA_IN2 */ 93 #define MSP_TUNER_TO_DSP(in) ((in) << 3) 94 95 /* The msp has up to 5 DSP outputs, each output can independently select ··· 109 DSP. This is currently not implemented. Also not implemented is the 110 multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate 111 a need for one of those features then additional support can be added. */ 112 - #define MSP_DSP_OUT_TUNER 0 /* Tuner output */ 113 - #define MSP_DSP_OUT_SCART 2 /* SCART output */ 114 - #define MSP_DSP_OUT_I2S1 5 /* I2S1 output */ 115 - #define MSP_DSP_OUT_I2S2 6 /* I2S2 output */ 116 - #define MSP_DSP_OUT_I2S3 7 /* I2S3 output */ 117 - #define MSP_DSP_OUT_MAIN_AVC 11 /* MAIN AVC processed output */ 118 - #define MSP_DSP_OUT_MAIN 12 /* MAIN output */ 119 - #define MSP_DSP_OUT_AUX 13 /* AUX output */ 120 #define MSP_DSP_TO_MAIN(in) ((in) << 4) 121 #define MSP_DSP_TO_AUX(in) ((in) << 8) 122 #define MSP_DSP_TO_SCART1(in) ((in) << 12) ··· 125 126 /* Output SCART select: the SCART outputs can select which input 127 to use. */ 128 - #define MSP_OUT_SCART1 0 /* SCART1 input, bypassing the DSP */ 129 - #define MSP_OUT_SCART2 1 /* SCART2 input, bypassing the DSP */ 130 - #define MSP_OUT_SCART3 2 /* SCART3 input, bypassing the DSP */ 131 - #define MSP_OUT_SCART4 3 /* SCART4 input, bypassing the DSP */ 132 - #define MSP_OUT_SCART1_DA 4 /* DSP SCART1 output */ 133 - #define MSP_OUT_SCART2_DA 5 /* DSP SCART2 output */ 134 - #define MSP_OUT_MONO 6 /* MONO input, bypassing the DSP */ 135 - #define MSP_OUT_MUTE 7 /* MUTE output */ 136 - #define MSP_OUT_TO_SCART1(in) (in) 137 - #define MSP_OUT_TO_SCART2(in) ((in) << 4) 138 139 /* Shortcut macros */ 140 #define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ ··· 145 MSP_DSP_TO_SCART1(sc_i2s_src) | \ 146 MSP_DSP_TO_SCART2(sc_i2s_src) | \ 147 MSP_DSP_TO_I2S(sc_i2s_src)) 148 - #define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, \ 149 - MSP_DSP_OUT_TUNER, MSP_DSP_OUT_TUNER) 150 #define MSP_OUTPUT(sc) \ 151 - (MSP_OUT_TO_SCART1(sc) | \ 152 - MSP_OUT_TO_SCART2(sc)) 153 /* This equals the RESET position of the msp3400 ACB register */ 154 - #define MSP_OUTPUT_DEFAULT (MSP_OUT_TO_SCART1(MSP_OUT_SCART3) | \ 155 - MSP_OUT_TO_SCART2(MSP_OUT_SCART1_DA)) 156 157 /* Tuner inputs vs. msp version */ 158 /* Chip TUNER_1 TUNER_2
··· 80 */ 81 82 /* SCART input to DSP selection */ 83 + #define MSP_IN_SCART1 0 /* Pin SC1_IN */ 84 + #define MSP_IN_SCART2 1 /* Pin SC2_IN */ 85 + #define MSP_IN_SCART3 2 /* Pin SC3_IN */ 86 + #define MSP_IN_SCART4 3 /* Pin SC4_IN */ 87 #define MSP_IN_MONO 6 /* Pin MONO_IN */ 88 #define MSP_IN_MUTE 7 /* Mute DSP input */ 89 #define MSP_SCART_TO_DSP(in) (in) 90 /* Tuner input to demodulator and DSP selection */ 91 + #define MSP_IN_TUNER1 0 /* Analog Sound IF input pin ANA_IN1 */ 92 + #define MSP_IN_TUNER2 1 /* Analog Sound IF input pin ANA_IN2 */ 93 #define MSP_TUNER_TO_DSP(in) ((in) << 3) 94 95 /* The msp has up to 5 DSP outputs, each output can independently select ··· 109 DSP. This is currently not implemented. Also not implemented is the 110 multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate 111 a need for one of those features then additional support can be added. */ 112 + #define MSP_DSP_IN_TUNER 0 /* Tuner DSP input */ 113 + #define MSP_DSP_IN_SCART 2 /* SCART DSP input */ 114 + #define MSP_DSP_IN_I2S1 5 /* I2S1 DSP input */ 115 + #define MSP_DSP_IN_I2S2 6 /* I2S2 DSP input */ 116 + #define MSP_DSP_IN_I2S3 7 /* I2S3 DSP input */ 117 + #define MSP_DSP_IN_MAIN_AVC 11 /* MAIN AVC processed DSP input */ 118 + #define MSP_DSP_IN_MAIN 12 /* MAIN DSP input */ 119 + #define MSP_DSP_IN_AUX 13 /* AUX DSP input */ 120 #define MSP_DSP_TO_MAIN(in) ((in) << 4) 121 #define MSP_DSP_TO_AUX(in) ((in) << 8) 122 #define MSP_DSP_TO_SCART1(in) ((in) << 12) ··· 125 126 /* Output SCART select: the SCART outputs can select which input 127 to use. */ 128 + #define MSP_SC_IN_SCART1 0 /* SCART1 input, bypassing the DSP */ 129 + #define MSP_SC_IN_SCART2 1 /* SCART2 input, bypassing the DSP */ 130 + #define MSP_SC_IN_SCART3 2 /* SCART3 input, bypassing the DSP */ 131 + #define MSP_SC_IN_SCART4 3 /* SCART4 input, bypassing the DSP */ 132 + #define MSP_SC_IN_DSP_SCART1 4 /* DSP SCART1 input */ 133 + #define MSP_SC_IN_DSP_SCART2 5 /* DSP SCART2 input */ 134 + #define MSP_SC_IN_MONO 6 /* MONO input, bypassing the DSP */ 135 + #define MSP_SC_IN_MUTE 7 /* MUTE output */ 136 + #define MSP_SC_TO_SCART1(in) (in) 137 + #define MSP_SC_TO_SCART2(in) ((in) << 4) 138 139 /* Shortcut macros */ 140 #define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \ ··· 145 MSP_DSP_TO_SCART1(sc_i2s_src) | \ 146 MSP_DSP_TO_SCART2(sc_i2s_src) | \ 147 MSP_DSP_TO_I2S(sc_i2s_src)) 148 + #define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \ 149 + MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER) 150 #define MSP_OUTPUT(sc) \ 151 + (MSP_SC_TO_SCART1(sc) | \ 152 + MSP_SC_TO_SCART2(sc)) 153 /* This equals the RESET position of the msp3400 ACB register */ 154 + #define MSP_OUTPUT_DEFAULT (MSP_SC_TO_SCART1(MSP_SC_IN_SCART3) | \ 155 + MSP_SC_TO_SCART2(MSP_SC_IN_DSP_SCART1)) 156 157 /* Tuner inputs vs. msp version */ 158 /* Chip TUNER_1 TUNER_2
+37
include/media/saa7115.h
···
··· 1 + /* 2 + saa7115.h - definition for saa7113/4/5 inputs 3 + 4 + Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) 5 + 6 + This program is free software; you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation; either version 2 of the License, or 9 + (at your option) any later version. 10 + 11 + This program is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with this program; if not, write to the Free Software 18 + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 + */ 20 + 21 + #ifndef _SAA7115_H_ 22 + #define _SAA7115_H_ 23 + 24 + /* SAA7113/4/5 HW inputs */ 25 + #define SAA7115_COMPOSITE0 0 26 + #define SAA7115_COMPOSITE1 1 27 + #define SAA7115_COMPOSITE2 2 28 + #define SAA7115_COMPOSITE3 3 29 + #define SAA7115_COMPOSITE4 4 /* not available for the saa7113 */ 30 + #define SAA7115_COMPOSITE5 5 /* not available for the saa7113 */ 31 + #define SAA7115_SVIDEO0 6 32 + #define SAA7115_SVIDEO1 7 33 + #define SAA7115_SVIDEO2 8 34 + #define SAA7115_SVIDEO3 9 35 + 36 + #endif 37 +
+41
include/media/saa7127.h
···
··· 1 + /* 2 + saa7127.h - definition for saa7126/7/8/9 inputs/outputs 3 + 4 + Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) 5 + 6 + This program is free software; you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation; either version 2 of the License, or 9 + (at your option) any later version. 10 + 11 + This program is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with this program; if not, write to the Free Software 18 + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 + */ 20 + 21 + #ifndef _SAA7127_H_ 22 + #define _SAA7127_H_ 23 + 24 + /* Enumeration for the supported input types */ 25 + enum saa7127_input_type { 26 + SAA7127_INPUT_TYPE_NORMAL, 27 + SAA7127_INPUT_TYPE_TEST_IMAGE 28 + }; 29 + 30 + /* Enumeration for the supported output signal types */ 31 + enum saa7127_output_type { 32 + SAA7127_OUTPUT_TYPE_BOTH, 33 + SAA7127_OUTPUT_TYPE_COMPOSITE, 34 + SAA7127_OUTPUT_TYPE_SVIDEO, 35 + SAA7127_OUTPUT_TYPE_RGB, 36 + SAA7127_OUTPUT_TYPE_YUV_C, 37 + SAA7127_OUTPUT_TYPE_YUV_V 38 + }; 39 + 40 + #endif 41 +
+40
include/media/upd64031a.h
···
··· 1 + /* 2 + * upd64031a - NEC Electronics Ghost Reduction input defines 3 + * 4 + * 2006 by Hans Verkuil (hverkuil@xs4all.nl) 5 + * 6 + * This program is free software; you can redistribute it and/or 7 + * modify it under the terms of the GNU General Public License 8 + * as published by the Free Software Foundation; either version 2 9 + * of the License, or (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 + */ 20 + 21 + #ifndef _UPD64031A_H_ 22 + #define _UPD64031A_H_ 23 + 24 + /* Ghost reduction modes */ 25 + #define UPD64031A_GR_ON 0 26 + #define UPD64031A_GR_OFF 1 27 + #define UPD64031A_GR_THROUGH 3 28 + 29 + /* Direct 3D/YCS Connection */ 30 + #define UPD64031A_3DYCS_DISABLE (0 << 2) 31 + #define UPD64031A_3DYCS_COMPOSITE (2 << 2) 32 + #define UPD64031A_3DYCS_SVIDEO (3 << 2) 33 + 34 + /* Composite sync digital separation circuit */ 35 + #define UPD64031A_COMPOSITE_EXTERNAL (1 << 4) 36 + 37 + /* Vertical sync digital separation circuit */ 38 + #define UPD64031A_VERTICAL_EXTERNAL (1 << 5) 39 + 40 + #endif
+58
include/media/upd64083.h
···
··· 1 + /* 2 + * upd6408x - NEC Electronics 3-Dimensional Y/C separation input defines 3 + * 4 + * 2006 by Hans Verkuil (hverkuil@xs4all.nl) 5 + * 6 + * This program is free software; you can redistribute it and/or 7 + * modify it under the terms of the GNU General Public License 8 + * as published by the Free Software Foundation; either version 2 9 + * of the License, or (at your option) any later version. 10 + * 11 + * This program is distributed in the hope that it will be useful, 12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + * GNU General Public License for more details. 15 + * 16 + * You should have received a copy of the GNU General Public License 17 + * along with this program; if not, write to the Free Software 18 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 + */ 20 + 21 + #ifndef _UPD64083_H_ 22 + #define _UPD64083_H_ 23 + 24 + /* There are two bits of information that the driver needs in order 25 + to select the correct routing: the operating mode and the selection 26 + of the Y input (external or internal). 27 + 28 + The first two operating modes expect a composite signal on the Y input, 29 + the second two operating modes use both the Y and C inputs. 30 + 31 + Normally YCS_MODE is used for tuner and composite inputs, and the 32 + YCNR mode is used for S-Video inputs. 33 + 34 + The external Y-ADC is selected when the composite input comes from a 35 + upd64031a ghost reduction device. If this device is not present, or 36 + the input is a S-Video signal, then the internal Y-ADC input should 37 + be used. */ 38 + 39 + /* Operating modes: */ 40 + 41 + /* YCS mode: Y/C separation (burst locked clocking) */ 42 + #define UPD64083_YCS_MODE 0 43 + /* YCS+ mode: 2D Y/C separation and YCNR (burst locked clocking) */ 44 + #define UPD64083_YCS_PLUS_MODE 1 45 + 46 + /* Note: the following two modes cannot be used in combination with the 47 + external Y-ADC. */ 48 + /* MNNR mode: frame comb type YNR+C delay (line locked clocking) */ 49 + #define UPD64083_MNNR_MODE 2 50 + /* YCNR mode: frame recursive YCNR (burst locked clocking) */ 51 + #define UPD64083_YCNR_MODE 3 52 + 53 + /* Select external Y-ADC: this should be set if this device is used in 54 + combination with the upd64031a ghost reduction device. 55 + Otherwise leave at 0 (use internal Y-ADC). */ 56 + #define UPD64083_EXT_Y_ADC (1 << 2) 57 + 58 + #endif