Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (35 commits)
V4L/DVB (9516): cx18: Move DVB buffer transfer handling from irq handler to work_queue
V4L/DVB (9557): gspca: Small changes for the sensor HV7131B in zc3xx.
V4L/DVB (9556): gspca: Bad init sequence for sensor HV7131B in zc3xx.
V4L/DVB (9549): gspca: Fix a typo in one of gspca chips name.
V4L/DVB (9515): cx18: Use correct Mailbox IRQ Ack values and misc IRQ handling cleanup
V4L/DVB (9493): kconfig patch
V4L/DVB (9527): af9015: fix compile warnings
V4L/DVB (9524): af9013: fix bug in status reading
V4L/DVB (9511): cx18: Mark CX18_CPU_DE_RELEASE_MDL as a slow API call
V4L/DVB (9510): cx18: Fix write retries for registers that always change - part 2.
V4L/DVB (9506): ivtv/cx18: fix test whether modules should be loaded or not.
V4L/DVB (9499): cx88-mpeg: final fix for analogue only compilation + de-alloc fix
V4L/DVB (9496): cx88-blackbird: bugfix: cx88-blackbird-mpeg-users
V4L/DVB (9495): cx88-blackbird: bugfix: cx88-blackbird-poll-fix
V4L/DVB (9494): anysee: initialize anysee_usb_mutex statically
V4L/DVB (9492): unplug oops from dvb_frontend_init...
V4L/DVB (9486): ivtv/ivtvfb: no longer experimental
V4L/DVB (9485): ivtv: remove incorrect V4L1 & tvaudio dependency
V4L/DVB (9482): Documentation, especially regarding audio and informational links
V4L/DVB (9475): cx18: Disable write retries for registers that always change - part 1.
...

+508 -266
-24
Documentation/feature-removal-schedule.txt
··· 56 56 57 57 --------------------------- 58 58 59 - What: old tuner-3036 i2c driver 60 - When: 2.6.28 61 - Why: This driver is for VERY old i2c-over-parallel port teletext receiver 62 - boxes. Rather then spending effort on converting this driver to V4L2, 63 - and since it is extremely unlikely that anyone still uses one of these 64 - devices, it was decided to drop it. 65 - Who: Hans Verkuil <hverkuil@xs4all.nl> 66 - Mauro Carvalho Chehab <mchehab@infradead.org> 67 - 68 - --------------------------- 69 - 70 - What: V4L2 dpc7146 driver 71 - When: 2.6.28 72 - Why: Old driver for the dpc7146 demonstration board that is no longer 73 - relevant. The last time this was tested on actual hardware was 74 - probably around 2002. Since this is a driver for a demonstration 75 - board the decision was made to remove it rather than spending a 76 - lot of effort continually updating this driver to stay in sync 77 - with the latest internal V4L2 or I2C API. 78 - Who: Hans Verkuil <hverkuil@xs4all.nl> 79 - Mauro Carvalho Chehab <mchehab@infradead.org> 80 - 81 - --------------------------- 82 - 83 59 What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl]) 84 60 When: November 2005 85 61 Files: drivers/pcmcia/: pcmcia_ioctl.c
+2 -2
Documentation/video4linux/README.cx88
··· 27 27 sound card) should be possible, but there is no code yet ... 28 28 29 29 vbi 30 - - some code present. Doesn't crash any more, but also doesn't 31 - work yet ... 30 + - Code present. Works for NTSC closed caption. PAL and other 31 + TV norms may or may not work. 32 32 33 33 34 34 how to add support for new cards
+118
Documentation/video4linux/si470x.txt
··· 1 + Driver for USB radios for the Silicon Labs Si470x FM Radio Receivers 2 + 3 + Copyright (c) 2008 Tobias Lorenz <tobias.lorenz@gmx.net> 4 + 5 + 6 + Information from Silicon Labs 7 + ============================= 8 + Silicon Laboratories is the manufacturer of the radio ICs, that nowadays are the 9 + most often used radio receivers in cell phones. Usually they are connected with 10 + I2C. But SiLabs also provides a reference design, which integrates this IC, 11 + together with a small microcontroller C8051F321, to form a USB radio. 12 + Part of this reference design is also a radio application in binary and source 13 + code. The software also contains an automatic firmware upgrade to the most 14 + current version. Information on these can be downloaded here: 15 + http://www.silabs.com/usbradio 16 + 17 + 18 + Supported ICs 19 + ============= 20 + The following ICs have a very similar register set, so that they are or will be 21 + supported somewhen by the driver: 22 + - Si4700: FM radio receiver 23 + - Si4701: FM radio receiver, RDS Support 24 + - Si4702: FM radio receiver 25 + - Si4703: FM radio receiver, RDS Support 26 + - Si4704: FM radio receiver, no external antenna required 27 + - Si4705: FM radio receiver, no external antenna required, RDS support, Dig I/O 28 + - Si4706: Enhanced FM RDS/TMC radio receiver, no external antenna required, RDS 29 + Support 30 + - Si4707: Dedicated weather band radio receiver with SAME decoder, RDS Support 31 + - Si4708: Smallest FM receivers 32 + - Si4709: Smallest FM receivers, RDS Support 33 + More information on these can be downloaded here: 34 + http://www.silabs.com/products/mcu/Pages/USBFMRadioRD.aspx 35 + 36 + 37 + Supported USB devices 38 + ===================== 39 + Currently the following USB radios (vendor:product) with the Silicon Labs si470x 40 + chips are known to work: 41 + - 10c4:818a: Silicon Labs USB FM Radio Reference Design 42 + - 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF) 43 + - 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700) 44 + 45 + 46 + Software 47 + ======== 48 + Testing is usually done with most application under Debian/testing: 49 + - fmtools - Utility for managing FM tuner cards 50 + - gnomeradio - FM-radio tuner for the GNOME desktop 51 + - gradio - GTK FM radio tuner 52 + - kradio - Comfortable Radio Application for KDE 53 + - radio - ncurses-based radio application 54 + 55 + There is also a library libv4l, which can be used. It's going to have a function 56 + for frequency seeking, either by using hardware functionality as in radio-si470x 57 + or by implementing a function as we currently have in every of the mentioned 58 + programs. Somewhen the radio programs should make use of libv4l. 59 + 60 + For processing RDS information, there is a project ongoing at: 61 + http://rdsd.berlios.de/ 62 + 63 + There is currently no project for making TMC sentences human readable. 64 + 65 + 66 + Audio Listing 67 + ============= 68 + USB Audio is provided by the ALSA snd_usb_audio module. It is recommended to 69 + also select SND_USB_AUDIO, as this is required to get sound from the radio. For 70 + listing you have to redirect the sound, for example using one of the following 71 + commands. 72 + 73 + If you just want to test audio (very poor quality): 74 + cat /dev/dsp1 > /dev/dsp 75 + 76 + If you use OSS try: 77 + sox -2 --endian little -r 96000 -t oss /dev/dsp1 -t oss /dev/dsp 78 + 79 + If you use arts try: 80 + arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B - 81 + 82 + 83 + Module Parameters 84 + ================= 85 + After loading the module, you still have access to some of them in the sysfs 86 + mount under /sys/module/radio_si470x/parameters. The contents of read-only files 87 + (0444) are not updated, even if space, band and de are changed using private 88 + video controls. The others are runtime changeable. 89 + 90 + 91 + Errors 92 + ====== 93 + Increase tune_timeout, if you often get -EIO errors. 94 + 95 + When timed out or band limit is reached, hw_freq_seek returns -EAGAIN. 96 + 97 + If you get any errors from snd_usb_audio, please report them to the ALSA people. 98 + 99 + 100 + Open Issues 101 + =========== 102 + V4L minor device allocation and parameter setting is not perfect. A solution is 103 + currently under discussion. 104 + 105 + There is an USB interface for downloading/uploading new firmware images. Support 106 + for it can be implemented using the request_firmware interface. 107 + 108 + There is a RDS interrupt mode. The driver is already using the same interface 109 + for polling RDS information, but is currently not using the interrupt mode. 110 + 111 + There is a LED interface, which can be used to override the LED control 112 + programmed in the firmware. This can be made available using the LED support 113 + functions in the kernel. 114 + 115 + 116 + Other useful information and links 117 + ================================== 118 + http://www.silabs.com/usbradio
+31
MAINTAINERS
··· 1879 1879 W: http://www.kernel.org/pub/linux/kernel/people/rml/hdaps/ 1880 1880 S: Maintained 1881 1881 1882 + GSPCA FINEPIX SUBDRIVER 1883 + P: Frank Zago 1884 + M: frank@zago.net 1885 + L: video4linux-list@redhat.com 1886 + S: Maintained 1887 + 1888 + GSPCA M5602 SUBDRIVER 1889 + P: Erik Andren 1890 + M: erik.andren@gmail.com 1891 + L: video4linux-list@redhat.com 1892 + S: Maintained 1893 + 1894 + GSPCA PAC207 SONIXB SUBDRIVER 1895 + P: Hans de Goede 1896 + M: hdegoede@redhat.com 1897 + L: video4linux-list@redhat.com 1898 + S: Maintained 1899 + 1900 + GSPCA T613 SUBDRIVER 1901 + P: Leandro Costantino 1902 + M: lcostantino@gmail.com 1903 + L: video4linux-list@redhat.com 1904 + S: Maintained 1905 + 1906 + GSPCA USB WEBCAM DRIVER 1907 + P: Jean-Francois Moine 1908 + M: moinejf@free.fr 1909 + W: http://moinejf.free.fr 1910 + L: video4linux-list@redhat.com 1911 + S: Maintained 1912 + 1882 1913 HARDWARE MONITORING 1883 1914 L: lm-sensors@lm-sensors.org 1884 1915 W: http://www.lm-sensors.org/
+1
drivers/hid/hid-core.c
··· 1265 1265 { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, 1266 1266 { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) }, 1267 1267 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, 1268 + { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) }, 1268 1269 { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, 1269 1270 { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, 1270 1271 { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
+3
drivers/hid/hid-ids.h
··· 253 253 #define USB_VENDOR_ID_KBGEAR 0x084e 254 254 #define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001 255 255 256 + #define USB_VENDOR_ID_KWORLD 0x1b80 257 + #define USB_DEVICE_ID_KWORLD_RADIO_FM700 0xd700 258 + 256 259 #define USB_VENDOR_ID_LABTEC 0x1020 257 260 #define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 258 261
+2
drivers/media/dvb/dvb-core/dvb_frontend.c
··· 223 223 if (fe->ops.init) 224 224 fe->ops.init(fe); 225 225 if (fe->ops.tuner_ops.init) { 226 + if (fe->ops.i2c_gate_ctrl) 227 + fe->ops.i2c_gate_ctrl(fe, 1); 226 228 fe->ops.tuner_ops.init(fe); 227 229 if (fe->ops.i2c_gate_ctrl) 228 230 fe->ops.i2c_gate_ctrl(fe, 0);
+2 -1
drivers/media/dvb/dvb-usb/Kconfig
··· 261 261 Say Y here to support the DvbWorld DVB-S/S2 USB2.0 receivers 262 262 and the TeVii S650. 263 263 264 - config DVB_USB_CINERGY_T2 264 + config DVB_USB_CINERGY_T2 265 265 tristate "Terratec CinergyT2/qanu USB 2.0 DVB-T receiver" 266 266 depends on DVB_USB 267 267 help ··· 283 283 config DVB_USB_DTV5100 284 284 tristate "AME DTV-5100 USB2.0 DVB-T support" 285 285 depends on DVB_USB 286 + select DVB_ZL10353 if !DVB_FE_CUSTOMISE 286 287 select MEDIA_TUNER_QT1010 if !DVB_FE_CUSTOMISE 287 288 help 288 289 Say Y here to support the AME DTV-5100 USB2.0 DVB-T receiver.
+7 -7
drivers/media/dvb/dvb-usb/af9015.c
··· 31 31 #include "mc44s80x.h" 32 32 #endif 33 33 34 - int dvb_usb_af9015_debug; 34 + static int dvb_usb_af9015_debug; 35 35 module_param_named(debug, dvb_usb_af9015_debug, int, 0644); 36 36 MODULE_PARM_DESC(debug, "set debugging level" DVB_USB_DEBUG_STATUS); 37 - int dvb_usb_af9015_remote; 37 + static int dvb_usb_af9015_remote; 38 38 module_param_named(remote, dvb_usb_af9015_remote, int, 0644); 39 39 MODULE_PARM_DESC(remote, "select remote"); 40 - int dvb_usb_af9015_dual_mode; 40 + static int dvb_usb_af9015_dual_mode; 41 41 module_param_named(dual_mode, dvb_usb_af9015_dual_mode, int, 0644); 42 42 MODULE_PARM_DESC(dual_mode, "enable dual mode"); 43 43 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); ··· 46 46 47 47 static struct af9015_config af9015_config; 48 48 static struct dvb_usb_device_properties af9015_properties[2]; 49 - int af9015_properties_count = ARRAY_SIZE(af9015_properties); 49 + static int af9015_properties_count = ARRAY_SIZE(af9015_properties); 50 50 51 51 static struct af9013_config af9015_af9013_config[] = { 52 52 { ··· 549 549 return 0; 550 550 } 551 551 552 - int af9015_download_ir_table(struct dvb_usb_device *d) 552 + static int af9015_download_ir_table(struct dvb_usb_device *d) 553 553 { 554 554 int i, packets = 0, ret; 555 555 u16 addr = 0x9a56; /* ir-table start address */ ··· 999 999 } 1000 1000 1001 1001 /* init 2nd I2C adapter */ 1002 - int af9015_i2c_init(struct dvb_usb_device *d) 1002 + static int af9015_i2c_init(struct dvb_usb_device *d) 1003 1003 { 1004 1004 int ret; 1005 1005 struct af9015_state *state = d->priv; ··· 1419 1419 return ret; 1420 1420 } 1421 1421 1422 - void af9015_i2c_exit(struct dvb_usb_device *d) 1422 + static void af9015_i2c_exit(struct dvb_usb_device *d) 1423 1423 { 1424 1424 struct af9015_state *state = d->priv; 1425 1425 deb_info("%s: \n", __func__);
-1
drivers/media/dvb/dvb-usb/af9015.h
··· 27 27 #define DVB_USB_LOG_PREFIX "af9015" 28 28 #include "dvb-usb.h" 29 29 30 - extern int dvb_usb_af9015_debug; 31 30 #define deb_info(args...) dprintk(dvb_usb_af9015_debug, 0x01, args) 32 31 #define deb_rc(args...) dprintk(dvb_usb_af9015_debug, 0x02, args) 33 32 #define deb_xfer(args...) dprintk(dvb_usb_af9015_debug, 0x04, args)
+1 -3
drivers/media/dvb/dvb-usb/anysee.c
··· 46 46 MODULE_PARM_DESC(delsys, "select delivery mode (0=DVB-C, 1=DVB-T)"); 47 47 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); 48 48 49 - static struct mutex anysee_usb_mutex; 49 + static DEFINE_MUTEX(anysee_usb_mutex); 50 50 51 51 static int anysee_ctrl_msg(struct dvb_usb_device *d, u8 *sbuf, u8 slen, 52 52 u8 *rbuf, u8 rlen) ··· 455 455 struct dvb_usb_device *d; 456 456 struct usb_host_interface *alt; 457 457 int ret; 458 - 459 - mutex_init(&anysee_usb_mutex); 460 458 461 459 /* There is one interface with two alternate settings. 462 460 Alternate setting 0 is for bulk transfer.
+3 -3
drivers/media/dvb/dvb-usb/dvb-usb-urb.c
··· 13 13 { 14 14 int actlen,ret = -ENOMEM; 15 15 16 + if (!d || wbuf == NULL || wlen == 0) 17 + return -EINVAL; 18 + 16 19 if (d->props.generic_bulk_ctrl_endpoint == 0) { 17 20 err("endpoint for generic control not specified."); 18 21 return -EINVAL; 19 22 } 20 - 21 - if (wbuf == NULL || wlen == 0) 22 - return -EINVAL; 23 23 24 24 if ((ret = mutex_lock_interruptible(&d->usb_mutex))) 25 25 return ret;
+3 -3
drivers/media/dvb/frontends/af9013.c
··· 1187 1187 if (tmp) 1188 1188 *status |= FE_HAS_SYNC | FE_HAS_LOCK; 1189 1189 1190 - if (!*status & FE_HAS_SIGNAL) { 1190 + if (!(*status & FE_HAS_SIGNAL)) { 1191 1191 /* AGC lock */ 1192 1192 ret = af9013_read_reg_bits(state, 0xd1a0, 6, 1, &tmp); 1193 1193 if (ret) ··· 1196 1196 *status |= FE_HAS_SIGNAL; 1197 1197 } 1198 1198 1199 - if (!*status & FE_HAS_CARRIER) { 1199 + if (!(*status & FE_HAS_CARRIER)) { 1200 1200 /* CFO lock */ 1201 1201 ret = af9013_read_reg_bits(state, 0xd333, 7, 1, &tmp); 1202 1202 if (ret) ··· 1205 1205 *status |= FE_HAS_CARRIER; 1206 1206 } 1207 1207 1208 - if (!*status & FE_HAS_CARRIER) { 1208 + if (!(*status & FE_HAS_CARRIER)) { 1209 1209 /* SFOE lock */ 1210 1210 ret = af9013_read_reg_bits(state, 0xd334, 6, 1, &tmp); 1211 1211 if (ret)
+14
drivers/media/radio/Kconfig
··· 355 355 tristate "Silicon Labs Si470x FM Radio Receiver support" 356 356 depends on USB && VIDEO_V4L2 357 357 ---help--- 358 + This is a driver for USB devices with the Silicon Labs SI470x 359 + chip. Currently these devices are known to work: 360 + - 10c4:818a: Silicon Labs USB FM Radio Reference Design 361 + - 06e1:a155: ADS/Tech FM Radio Receiver (formerly Instant FM Music) 362 + - 1b80:d700: KWorld USB FM Radio SnapMusic Mobile 700 (FM700) 363 + 364 + Sound is provided by the ALSA USB Audio/MIDI driver. Therefore 365 + if you don't want to use the device solely for RDS receiving, 366 + it is recommended to also select SND_USB_AUDIO. 367 + 368 + Please have a look at the documentation, especially on how 369 + to redirect the audio stream from the radio to your sound device: 370 + Documentation/video4linux/si470x.txt 371 + 358 372 Say Y here if you want to connect this type of radio to your 359 373 computer's USB port. 360 374
+6 -13
drivers/media/radio/radio-si470x.c
··· 4 4 * Driver for USB radios for the Silicon Labs Si470x FM Radio Receivers: 5 5 * - Silicon Labs USB FM Radio Reference Design 6 6 * - ADS/Tech FM Radio Receiver (formerly Instant FM Music) (RDX-155-EF) 7 + * - KWorld USB FM Radio SnapMusic Mobile 700 (FM700) 7 8 * 8 9 * Copyright (c) 2008 Tobias Lorenz <tobias.lorenz@gmx.net> 9 10 * ··· 21 20 * You should have received a copy of the GNU General Public License 22 21 * along with this program; if not, write to the Free Software 23 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 - */ 25 - 26 - 27 - /* 28 - * User Notes: 29 - * - USB Audio is provided by the alsa snd_usb_audio module. 30 - * For listing you have to redirect the sound, for example using: 31 - * arecord -D hw:1,0 -r96000 -c2 -f S16_LE | artsdsp aplay -B - 32 - * - regarding module parameters in /sys/module/radio_si470x/parameters: 33 - * the contents of read-only files (0444) are not updated, even if 34 - * space, band and de are changed using private video controls 35 - * - increase tune_timeout, if you often get -EIO errors 36 - * - hw_freq_seek returns -EAGAIN, when timed out or band limit is reached 37 23 */ 38 24 39 25 ··· 93 105 * - afc indication 94 106 * - more safety checks, let si470x_get_freq return errno 95 107 * - vidioc behavior corrected according to v4l2 spec 108 + * 2008-10-20 Alexey Klimov <klimov.linux@gmail.com> 109 + * - add support for KWorld USB FM Radio FM700 110 + * - blacklisted KWorld radio in hid-core.c and hid-ids.h 96 111 * 97 112 * ToDo: 98 113 * - add firmware download/update support ··· 136 145 { USB_DEVICE_AND_INTERFACE_INFO(0x10c4, 0x818a, USB_CLASS_HID, 0, 0) }, 137 146 /* ADS/Tech FM Radio Receiver (formerly Instant FM Music) */ 138 147 { USB_DEVICE_AND_INTERFACE_INFO(0x06e1, 0xa155, USB_CLASS_HID, 0, 0) }, 148 + /* KWorld USB FM Radio SnapMusic Mobile 700 (FM700) */ 149 + { USB_DEVICE_AND_INTERFACE_INFO(0x1b80, 0xd700, USB_CLASS_HID, 0, 0) }, 139 150 /* Terminating entry */ 140 151 { } 141 152 };
+1 -5
drivers/media/video/cafe_ccic.c
··· 1476 1476 { 1477 1477 struct cafe_camera *cam; 1478 1478 1479 - lock_kernel(); 1480 1479 cam = cafe_find_dev(iminor(inode)); 1481 - if (cam == NULL) { 1482 - unlock_kernel(); 1480 + if (cam == NULL) 1483 1481 return -ENODEV; 1484 - } 1485 1482 filp->private_data = cam; 1486 1483 1487 1484 mutex_lock(&cam->s_mutex); ··· 1490 1493 } 1491 1494 (cam->users)++; 1492 1495 mutex_unlock(&cam->s_mutex); 1493 - unlock_kernel(); 1494 1496 return 0; 1495 1497 } 1496 1498
+3
drivers/media/video/compat_ioctl32.c
··· 867 867 case VIDIOC_STREAMON32: 868 868 case VIDIOC_STREAMOFF32: 869 869 case VIDIOC_G_PARM: 870 + case VIDIOC_S_PARM: 870 871 case VIDIOC_G_STD: 871 872 case VIDIOC_S_STD: 872 873 case VIDIOC_G_TUNER: ··· 886 885 case VIDIOC_S_INPUT32: 887 886 case VIDIOC_TRY_FMT32: 888 887 case VIDIOC_S_HW_FREQ_SEEK: 888 + case VIDIOC_ENUM_FRAMESIZES: 889 + case VIDIOC_ENUM_FRAMEINTERVALS: 889 890 ret = do_video_ioctl(file, cmd, arg); 890 891 break; 891 892
+14 -3
drivers/media/video/cx18/cx18-driver.c
··· 448 448 mutex_init(&cx->gpio_lock); 449 449 450 450 spin_lock_init(&cx->lock); 451 - spin_lock_init(&cx->dma_reg_lock); 451 + 452 + cx->work_queue = create_singlethread_workqueue(cx->name); 453 + if (cx->work_queue == NULL) { 454 + CX18_ERR("Could not create work queue\n"); 455 + return -1; 456 + } 457 + 458 + INIT_WORK(&cx->work, cx18_work_handler); 452 459 453 460 /* start counting open_id at 1 */ 454 461 cx->open_id = 1; ··· 588 581 589 582 #ifdef MODULE 590 583 /* load modules */ 591 - #ifndef CONFIG_MEDIA_TUNER 584 + #ifdef CONFIG_MEDIA_TUNER_MODULE 592 585 hw = cx18_request_module(cx, hw, "tuner", CX18_HW_TUNER); 593 586 #endif 594 - #ifndef CONFIG_VIDEO_CS5345 587 + #ifdef CONFIG_VIDEO_CS5345_MODULE 595 588 hw = cx18_request_module(cx, hw, "cs5345", CX18_HW_CS5345); 596 589 #endif 597 590 #endif ··· 839 832 free_mem: 840 833 release_mem_region(cx->base_addr, CX18_MEM_SIZE); 841 834 free_workqueue: 835 + destroy_workqueue(cx->work_queue); 842 836 err: 843 837 if (retval == 0) 844 838 retval = -ENODEV; ··· 939 931 cx18_sw2_irq_disable(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK); 940 932 941 933 cx18_halt_firmware(cx); 934 + 935 + flush_workqueue(cx->work_queue); 936 + destroy_workqueue(cx->work_queue); 942 937 943 938 cx18_streams_cleanup(cx, 1); 944 939
+12 -8
drivers/media/video/cx18/cx18-driver.h
··· 199 199 #define CX18_F_S_APPL_IO 8 /* this stream is used read/written by an application */ 200 200 201 201 /* per-cx18, i_flags */ 202 - #define CX18_F_I_LOADED_FW 0 /* Loaded the firmware the first time */ 203 - #define CX18_F_I_EOS 4 /* End of encoder stream reached */ 204 - #define CX18_F_I_RADIO_USER 5 /* The radio tuner is selected */ 205 - #define CX18_F_I_ENC_PAUSED 13 /* the encoder is paused */ 206 - #define CX18_F_I_INITED 21 /* set after first open */ 207 - #define CX18_F_I_FAILED 22 /* set if first open failed */ 202 + #define CX18_F_I_LOADED_FW 0 /* Loaded firmware 1st time */ 203 + #define CX18_F_I_EOS 4 /* End of encoder stream */ 204 + #define CX18_F_I_RADIO_USER 5 /* radio tuner is selected */ 205 + #define CX18_F_I_ENC_PAUSED 13 /* the encoder is paused */ 206 + #define CX18_F_I_HAVE_WORK 15 /* there is work to be done */ 207 + #define CX18_F_I_WORK_HANDLER_DVB 18 /* work to be done for DVB */ 208 + #define CX18_F_I_INITED 21 /* set after first open */ 209 + #define CX18_F_I_FAILED 22 /* set if first open failed */ 210 + #define CX18_F_I_WORK_INITED 23 /* worker thread initialized */ 208 211 209 212 /* These are the VBI types as they appear in the embedded VBI private packets. */ 210 213 #define CX18_SLICED_TYPE_TELETEXT_B (1) ··· 405 402 spinlock_t lock; /* lock access to this struct */ 406 403 int search_pack_header; 407 404 408 - spinlock_t dma_reg_lock; /* lock access to DMA engine registers */ 409 - 410 405 int open_id; /* incremented each time an open occurs, used as 411 406 unique ID. Starts at 1, so 0 can be used as 412 407 uninitialized value in the stream->id. */ ··· 433 432 wait_queue_head_t cap_w; 434 433 /* when the current DMA is finished this queue is woken up */ 435 434 wait_queue_head_t dma_waitq; 435 + 436 + struct workqueue_struct *work_queue; 437 + struct work_struct work; 436 438 437 439 /* i2c */ 438 440 struct i2c_adapter i2c_adap[2];
+23
drivers/media/video/cx18/cx18-dvb.c
··· 23 23 #include "cx18-dvb.h" 24 24 #include "cx18-io.h" 25 25 #include "cx18-streams.h" 26 + #include "cx18-queue.h" 27 + #include "cx18-scb.h" 26 28 #include "cx18-cards.h" 27 29 #include "s5h1409.h" 28 30 #include "mxl5005s.h" ··· 301 299 } 302 300 303 301 return ret; 302 + } 303 + 304 + void cx18_dvb_work_handler(struct cx18 *cx) 305 + { 306 + struct cx18_buffer *buf; 307 + struct cx18_stream *s = &cx->streams[CX18_ENC_STREAM_TYPE_TS]; 308 + 309 + while ((buf = cx18_dequeue(s, &s->q_full)) != NULL) { 310 + if (s->dvb.enabled) 311 + dvb_dmx_swfilter(&s->dvb.demux, buf->buf, 312 + buf->bytesused); 313 + 314 + cx18_enqueue(s, buf, &s->q_free); 315 + cx18_buf_sync_for_device(s, buf); 316 + if (s->handle == CX18_INVALID_TASK_HANDLE) /* FIXME: improve */ 317 + continue; 318 + 319 + cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, 320 + (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 321 + 1, buf->id, s->buf_size); 322 + } 304 323 }
+1
drivers/media/video/cx18/cx18-dvb.h
··· 23 23 24 24 int cx18_dvb_register(struct cx18_stream *stream); 25 25 void cx18_dvb_unregister(struct cx18_stream *stream); 26 + void cx18_dvb_work_handler(struct cx18 *cx);
+15 -2
drivers/media/video/cx18/cx18-io.c
··· 88 88 cx18_log_write_retries(cx, i, addr); 89 89 } 90 90 91 + void _cx18_writel_expect(struct cx18 *cx, u32 val, void __iomem *addr, 92 + u32 eval, u32 mask) 93 + { 94 + int i; 95 + eval &= mask; 96 + for (i = 0; i < CX18_MAX_MMIO_RETRIES; i++) { 97 + cx18_writel_noretry(cx, val, addr); 98 + if (eval == (cx18_readl_noretry(cx, addr) & mask)) 99 + break; 100 + } 101 + cx18_log_write_retries(cx, i, addr); 102 + } 103 + 91 104 void cx18_writew_retry(struct cx18 *cx, u16 val, void __iomem *addr) 92 105 { 93 106 int i; ··· 231 218 void cx18_sw1_irq_enable(struct cx18 *cx, u32 val) 232 219 { 233 220 u32 r; 234 - cx18_write_reg(cx, val, SW1_INT_STATUS); 221 + cx18_write_reg_expect(cx, val, SW1_INT_STATUS, ~val, val); 235 222 r = cx18_read_reg(cx, SW1_INT_ENABLE_PCI); 236 223 cx18_write_reg(cx, r | val, SW1_INT_ENABLE_PCI); 237 224 } ··· 246 233 void cx18_sw2_irq_enable(struct cx18 *cx, u32 val) 247 234 { 248 235 u32 r; 249 - cx18_write_reg(cx, val, SW2_INT_STATUS); 236 + cx18_write_reg_expect(cx, val, SW2_INT_STATUS, ~val, val); 250 237 r = cx18_read_reg(cx, SW2_INT_ENABLE_PCI); 251 238 cx18_write_reg(cx, r | val, SW2_INT_ENABLE_PCI); 252 239 }
+17
drivers/media/video/cx18/cx18-io.h
··· 133 133 cx18_writel_noretry(cx, val, addr); 134 134 } 135 135 136 + void _cx18_writel_expect(struct cx18 *cx, u32 val, void __iomem *addr, 137 + u32 eval, u32 mask); 136 138 137 139 static inline 138 140 void cx18_writew_noretry(struct cx18 *cx, u16 val, void __iomem *addr) ··· 269 267 { 270 268 if (cx18_retry_mmio) 271 269 cx18_write_reg_retry(cx, val, reg); 270 + else 271 + cx18_write_reg_noretry(cx, val, reg); 272 + } 273 + 274 + static inline void _cx18_write_reg_expect(struct cx18 *cx, u32 val, u32 reg, 275 + u32 eval, u32 mask) 276 + { 277 + _cx18_writel_expect(cx, val, cx->reg_mem + reg, eval, mask); 278 + } 279 + 280 + static inline void cx18_write_reg_expect(struct cx18 *cx, u32 val, u32 reg, 281 + u32 eval, u32 mask) 282 + { 283 + if (cx18_retry_mmio) 284 + _cx18_write_reg_expect(cx, val, reg, eval, mask); 272 285 else 273 286 cx18_write_reg_noretry(cx, val, reg); 274 287 }
+57 -39
drivers/media/video/cx18/cx18-irq.c
··· 29 29 #include "cx18-mailbox.h" 30 30 #include "cx18-vbi.h" 31 31 #include "cx18-scb.h" 32 + #include "cx18-dvb.h" 32 33 33 - #define DMA_MAGIC_COOKIE 0x000001fe 34 + void cx18_work_handler(struct work_struct *work) 35 + { 36 + struct cx18 *cx = container_of(work, struct cx18, work); 37 + if (test_and_clear_bit(CX18_F_I_WORK_INITED, &cx->i_flags)) { 38 + struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; 39 + /* This thread must use the FIFO scheduler as it 40 + * is realtime sensitive. */ 41 + sched_setscheduler(current, SCHED_FIFO, &param); 42 + } 43 + if (test_and_clear_bit(CX18_F_I_WORK_HANDLER_DVB, &cx->i_flags)) 44 + cx18_dvb_work_handler(cx); 45 + } 34 46 35 47 static void epu_dma_done(struct cx18 *cx, struct cx18_mailbox *mb) 36 48 { ··· 79 67 if (buf) { 80 68 cx18_buf_sync_for_cpu(s, buf); 81 69 if (s->type == CX18_ENC_STREAM_TYPE_TS && s->dvb.enabled) { 82 - /* process the buffer here */ 83 - CX18_DEBUG_HI_DMA("TS recv and sent bytesused=%d\n", 70 + CX18_DEBUG_HI_DMA("TS recv bytesused = %d\n", 84 71 buf->bytesused); 85 72 86 - dvb_dmx_swfilter(&s->dvb.demux, buf->buf, 87 - buf->bytesused); 88 - 89 - cx18_buf_sync_for_device(s, buf); 90 - cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, 91 - (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 92 - 1, buf->id, s->buf_size); 73 + set_bit(CX18_F_I_WORK_HANDLER_DVB, &cx->i_flags); 74 + set_bit(CX18_F_I_HAVE_WORK, &cx->i_flags); 93 75 } else 94 76 set_bit(CX18_F_B_NEED_BUF_SWAP, &buf->b_flags); 95 77 } else { ··· 115 109 CX18_INFO("FW version: %s\n", p - 1); 116 110 } 117 111 118 - static void hpu_cmd(struct cx18 *cx, u32 sw1) 112 + static void epu_cmd(struct cx18 *cx, u32 sw1) 119 113 { 120 114 struct cx18_mailbox mb; 121 115 ··· 131 125 epu_debug(cx, &mb); 132 126 break; 133 127 default: 134 - CX18_WARN("Unexpected mailbox command %08x\n", mb.cmd); 128 + CX18_WARN("Unknown CPU_TO_EPU mailbox command %#08x\n", 129 + mb.cmd); 135 130 break; 136 131 } 137 132 } 138 - if (sw1 & (IRQ_APU_TO_EPU | IRQ_HPU_TO_EPU)) 139 - CX18_WARN("Unexpected interrupt %08x\n", sw1); 133 + 134 + if (sw1 & IRQ_APU_TO_EPU) { 135 + cx18_memcpy_fromio(cx, &mb, &cx->scb->apu2epu_mb, sizeof(mb)); 136 + CX18_WARN("Unknown APU_TO_EPU mailbox command %#08x\n", mb.cmd); 137 + } 138 + 139 + if (sw1 & IRQ_HPU_TO_EPU) { 140 + cx18_memcpy_fromio(cx, &mb, &cx->scb->hpu2epu_mb, sizeof(mb)); 141 + CX18_WARN("Unknown HPU_TO_EPU mailbox command %#08x\n", mb.cmd); 142 + } 143 + } 144 + 145 + static void xpu_ack(struct cx18 *cx, u32 sw2) 146 + { 147 + if (sw2 & IRQ_CPU_TO_EPU_ACK) 148 + wake_up(&cx->mb_cpu_waitq); 149 + if (sw2 & IRQ_APU_TO_EPU_ACK) 150 + wake_up(&cx->mb_apu_waitq); 151 + if (sw2 & IRQ_HPU_TO_EPU_ACK) 152 + wake_up(&cx->mb_hpu_waitq); 140 153 } 141 154 142 155 irqreturn_t cx18_irq_handler(int irq, void *dev_id) ··· 165 140 u32 sw2, sw2_mask; 166 141 u32 hw2, hw2_mask; 167 142 168 - spin_lock(&cx->dma_reg_lock); 169 - 143 + sw1_mask = cx18_read_reg(cx, SW1_INT_ENABLE_PCI); 144 + sw1 = cx18_read_reg(cx, SW1_INT_STATUS) & sw1_mask; 145 + sw2_mask = cx18_read_reg(cx, SW2_INT_ENABLE_PCI); 146 + sw2 = cx18_read_reg(cx, SW2_INT_STATUS) & sw2_mask; 170 147 hw2_mask = cx18_read_reg(cx, HW2_INT_MASK5_PCI); 171 148 hw2 = cx18_read_reg(cx, HW2_INT_CLR_STATUS) & hw2_mask; 172 - sw2_mask = cx18_read_reg(cx, SW2_INT_ENABLE_PCI) | IRQ_EPU_TO_HPU_ACK; 173 - sw2 = cx18_read_reg(cx, SW2_INT_STATUS) & sw2_mask; 174 - sw1_mask = cx18_read_reg(cx, SW1_INT_ENABLE_PCI) | IRQ_EPU_TO_HPU; 175 - sw1 = cx18_read_reg(cx, SW1_INT_STATUS) & sw1_mask; 176 149 177 - cx18_write_reg(cx, sw2&sw2_mask, SW2_INT_STATUS); 178 - cx18_write_reg(cx, sw1&sw1_mask, SW1_INT_STATUS); 179 - cx18_write_reg(cx, hw2&hw2_mask, HW2_INT_CLR_STATUS); 150 + if (sw1) 151 + cx18_write_reg_expect(cx, sw1, SW1_INT_STATUS, ~sw1, sw1); 152 + if (sw2) 153 + cx18_write_reg_expect(cx, sw2, SW2_INT_STATUS, ~sw2, sw2); 154 + if (hw2) 155 + cx18_write_reg_expect(cx, hw2, HW2_INT_CLR_STATUS, ~hw2, hw2); 180 156 181 157 if (sw1 || sw2 || hw2) 182 158 CX18_DEBUG_HI_IRQ("SW1: %x SW2: %x HW2: %x\n", sw1, sw2, hw2); 183 159 184 160 /* To do: interrupt-based I2C handling 185 - if (hw2 & 0x00c00000) { 161 + if (hw2 & (HW2_I2C1_INT|HW2_I2C2_INT)) { 186 162 } 187 163 */ 188 164 189 - if (sw2) { 190 - if (sw2 & (cx18_readl(cx, &cx->scb->cpu2hpu_irq_ack) | 191 - cx18_readl(cx, &cx->scb->cpu2epu_irq_ack))) 192 - wake_up(&cx->mb_cpu_waitq); 193 - if (sw2 & (cx18_readl(cx, &cx->scb->apu2hpu_irq_ack) | 194 - cx18_readl(cx, &cx->scb->apu2epu_irq_ack))) 195 - wake_up(&cx->mb_apu_waitq); 196 - if (sw2 & cx18_readl(cx, &cx->scb->epu2hpu_irq_ack)) 197 - wake_up(&cx->mb_epu_waitq); 198 - if (sw2 & cx18_readl(cx, &cx->scb->hpu2epu_irq_ack)) 199 - wake_up(&cx->mb_hpu_waitq); 200 - } 165 + if (sw2) 166 + xpu_ack(cx, sw2); 201 167 202 168 if (sw1) 203 - hpu_cmd(cx, sw1); 204 - spin_unlock(&cx->dma_reg_lock); 169 + epu_cmd(cx, sw1); 205 170 206 - return (hw2 | sw1 | sw2) ? IRQ_HANDLED : IRQ_NONE; 171 + if (test_and_clear_bit(CX18_F_I_HAVE_WORK, &cx->i_flags)) 172 + queue_work(cx->work_queue, &cx->work); 173 + 174 + return (sw1 || sw2 || hw2) ? IRQ_HANDLED : IRQ_NONE; 207 175 }
+1 -3
drivers/media/video/cx18/cx18-irq.h
··· 32 32 33 33 irqreturn_t cx18_irq_handler(int irq, void *dev_id); 34 34 35 - void cx18_irq_work_handler(struct work_struct *work); 36 - void cx18_dma_stream_dec_prepare(struct cx18_stream *s, u32 offset, int lock); 37 - void cx18_unfinished_dma(unsigned long arg); 35 + void cx18_work_handler(struct work_struct *work);
+3 -3
drivers/media/video/cx18/cx18-mailbox.c
··· 83 83 API_ENTRY(CPU, CX18_CPU_DE_SET_MDL_ACK, 0), 84 84 API_ENTRY(CPU, CX18_CPU_DE_SET_MDL, API_FAST), 85 85 API_ENTRY(CPU, CX18_APU_RESETAI, API_FAST), 86 - API_ENTRY(CPU, CX18_CPU_DE_RELEASE_MDL, 0), 86 + API_ENTRY(CPU, CX18_CPU_DE_RELEASE_MDL, API_SLOW), 87 87 API_ENTRY(0, 0, 0), 88 88 }; 89 89 ··· 176 176 177 177 cx18_setup_page(cx, SCB_OFFSET); 178 178 cx18_write_sync(cx, mb->request, &ack_mb->ack); 179 - cx18_write_reg(cx, ack_irq, SW2_INT_SET); 179 + cx18_write_reg_expect(cx, ack_irq, SW2_INT_SET, ack_irq, ack_irq); 180 180 return 0; 181 181 } 182 182 ··· 225 225 } 226 226 if (info->flags & API_FAST) 227 227 timeout /= 2; 228 - cx18_write_reg(cx, irq, SW1_INT_SET); 228 + cx18_write_reg_expect(cx, irq, SW1_INT_SET, irq, irq); 229 229 230 230 while (!sig && cx18_readl(cx, &mb->ack) != cx18_readl(cx, &mb->request) 231 231 && cnt < 660) {
+6 -8
drivers/media/video/cx18/cx18-queue.c
··· 88 88 89 89 if (buf->id != id) 90 90 continue; 91 + 91 92 buf->bytesused = bytesused; 92 - /* the transport buffers are handled differently, 93 - they are not moved to the full queue */ 94 - if (s->type != CX18_ENC_STREAM_TYPE_TS) { 95 - atomic_dec(&s->q_free.buffers); 96 - atomic_inc(&s->q_full.buffers); 97 - s->q_full.bytesused += buf->bytesused; 98 - list_move_tail(&buf->list, &s->q_full.list); 99 - } 93 + atomic_dec(&s->q_free.buffers); 94 + atomic_inc(&s->q_full.buffers); 95 + s->q_full.bytesused += buf->bytesused; 96 + list_move_tail(&buf->list, &s->q_full.list); 97 + 100 98 spin_unlock(&s->qlock); 101 99 return buf; 102 100 }
+20 -20
drivers/media/video/cx18/cx18-scb.h
··· 128 128 u32 apu2cpu_irq; 129 129 /* Value to write to register SW2 register set (0xC7003140) after the 130 130 command is cleared */ 131 - u32 apu2cpu_irq_ack; 131 + u32 cpu2apu_irq_ack; 132 132 u32 reserved2[13]; 133 133 134 134 u32 hpu2cpu_mb_offset; 135 135 u32 hpu2cpu_irq; 136 - u32 hpu2cpu_irq_ack; 136 + u32 cpu2hpu_irq_ack; 137 137 u32 reserved3[13]; 138 138 139 139 u32 ppu2cpu_mb_offset; 140 140 u32 ppu2cpu_irq; 141 - u32 ppu2cpu_irq_ack; 141 + u32 cpu2ppu_irq_ack; 142 142 u32 reserved4[13]; 143 143 144 144 u32 epu2cpu_mb_offset; 145 145 u32 epu2cpu_irq; 146 - u32 epu2cpu_irq_ack; 146 + u32 cpu2epu_irq_ack; 147 147 u32 reserved5[13]; 148 148 u32 reserved6[8]; 149 149 ··· 153 153 u32 reserved11[7]; 154 154 u32 cpu2apu_mb_offset; 155 155 u32 cpu2apu_irq; 156 - u32 cpu2apu_irq_ack; 156 + u32 apu2cpu_irq_ack; 157 157 u32 reserved12[13]; 158 158 159 159 u32 hpu2apu_mb_offset; 160 160 u32 hpu2apu_irq; 161 - u32 hpu2apu_irq_ack; 161 + u32 apu2hpu_irq_ack; 162 162 u32 reserved13[13]; 163 163 164 164 u32 ppu2apu_mb_offset; 165 165 u32 ppu2apu_irq; 166 - u32 ppu2apu_irq_ack; 166 + u32 apu2ppu_irq_ack; 167 167 u32 reserved14[13]; 168 168 169 169 u32 epu2apu_mb_offset; 170 170 u32 epu2apu_irq; 171 - u32 epu2apu_irq_ack; 171 + u32 apu2epu_irq_ack; 172 172 u32 reserved15[13]; 173 173 u32 reserved16[8]; 174 174 ··· 178 178 u32 reserved21[7]; 179 179 u32 cpu2hpu_mb_offset; 180 180 u32 cpu2hpu_irq; 181 - u32 cpu2hpu_irq_ack; 181 + u32 hpu2cpu_irq_ack; 182 182 u32 reserved22[13]; 183 183 184 184 u32 apu2hpu_mb_offset; 185 185 u32 apu2hpu_irq; 186 - u32 apu2hpu_irq_ack; 186 + u32 hpu2apu_irq_ack; 187 187 u32 reserved23[13]; 188 188 189 189 u32 ppu2hpu_mb_offset; 190 190 u32 ppu2hpu_irq; 191 - u32 ppu2hpu_irq_ack; 191 + u32 hpu2ppu_irq_ack; 192 192 u32 reserved24[13]; 193 193 194 194 u32 epu2hpu_mb_offset; 195 195 u32 epu2hpu_irq; 196 - u32 epu2hpu_irq_ack; 196 + u32 hpu2epu_irq_ack; 197 197 u32 reserved25[13]; 198 198 u32 reserved26[8]; 199 199 ··· 203 203 u32 reserved31[7]; 204 204 u32 cpu2ppu_mb_offset; 205 205 u32 cpu2ppu_irq; 206 - u32 cpu2ppu_irq_ack; 206 + u32 ppu2cpu_irq_ack; 207 207 u32 reserved32[13]; 208 208 209 209 u32 apu2ppu_mb_offset; 210 210 u32 apu2ppu_irq; 211 - u32 apu2ppu_irq_ack; 211 + u32 ppu2apu_irq_ack; 212 212 u32 reserved33[13]; 213 213 214 214 u32 hpu2ppu_mb_offset; 215 215 u32 hpu2ppu_irq; 216 - u32 hpu2ppu_irq_ack; 216 + u32 ppu2hpu_irq_ack; 217 217 u32 reserved34[13]; 218 218 219 219 u32 epu2ppu_mb_offset; 220 220 u32 epu2ppu_irq; 221 - u32 epu2ppu_irq_ack; 221 + u32 ppu2epu_irq_ack; 222 222 u32 reserved35[13]; 223 223 u32 reserved36[8]; 224 224 ··· 228 228 u32 reserved41[7]; 229 229 u32 cpu2epu_mb_offset; 230 230 u32 cpu2epu_irq; 231 - u32 cpu2epu_irq_ack; 231 + u32 epu2cpu_irq_ack; 232 232 u32 reserved42[13]; 233 233 234 234 u32 apu2epu_mb_offset; 235 235 u32 apu2epu_irq; 236 - u32 apu2epu_irq_ack; 236 + u32 epu2apu_irq_ack; 237 237 u32 reserved43[13]; 238 238 239 239 u32 hpu2epu_mb_offset; 240 240 u32 hpu2epu_irq; 241 - u32 hpu2epu_irq_ack; 241 + u32 epu2hpu_irq_ack; 242 242 u32 reserved44[13]; 243 243 244 244 u32 ppu2epu_mb_offset; 245 245 u32 ppu2epu_irq; 246 - u32 ppu2epu_irq_ack; 246 + u32 epu2ppu_irq_ack; 247 247 u32 reserved45[13]; 248 248 u32 reserved46[8]; 249 249
+10 -2
drivers/media/video/cx88/cx88-blackbird.c
··· 1078 1078 } 1079 1079 } 1080 1080 1081 - if (blackbird_initialize_codec(dev) < 0) { 1081 + if (!atomic_read(&dev->core->mpeg_users) && blackbird_initialize_codec(dev) < 0) { 1082 1082 if (drv) 1083 1083 drv->request_release(drv); 1084 1084 unlock_kernel(); ··· 1109 1109 fh->mpegq.field); 1110 1110 unlock_kernel(); 1111 1111 1112 + atomic_inc(&dev->core->mpeg_users); 1113 + 1112 1114 return 0; 1113 1115 } 1114 1116 ··· 1120 1118 struct cx8802_dev *dev = fh->dev; 1121 1119 struct cx8802_driver *drv = NULL; 1122 1120 1123 - if (dev->mpeg_active) 1121 + if (dev->mpeg_active && atomic_read(&dev->core->mpeg_users) == 1) 1124 1122 blackbird_stop_codec(dev); 1125 1123 1126 1124 cx8802_cancel_buffers(fh->dev); ··· 1139 1137 drv = cx8802_get_driver(dev, CX88_MPEG_BLACKBIRD); 1140 1138 if (drv) 1141 1139 drv->request_release(drv); 1140 + 1141 + atomic_dec(&dev->core->mpeg_users); 1142 1142 1143 1143 return 0; 1144 1144 } ··· 1162 1158 mpeg_poll(struct file *file, struct poll_table_struct *wait) 1163 1159 { 1164 1160 struct cx8802_fh *fh = file->private_data; 1161 + struct cx8802_dev *dev = fh->dev; 1162 + 1163 + if (!dev->mpeg_active) 1164 + blackbird_start_codec(file, fh); 1165 1165 1166 1166 return videobuf_poll_stream(file, &fh->mpegq, wait); 1167 1167 }
+5
drivers/media/video/cx88/cx88-dvb.c
··· 598 598 struct videobuf_dvb_frontend *fe0, *fe1 = NULL; 599 599 int mfe_shared = 0; /* bus not shared by default */ 600 600 601 + if (0 != core->i2c_rc) { 602 + printk(KERN_ERR "%s/2: no i2c-bus available, cannot attach dvb drivers\n", core->name); 603 + goto frontend_detach; 604 + } 605 + 601 606 /* Get the first frontend */ 602 607 fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); 603 608 if (!fe0)
+14 -12
drivers/media/video/cx88/cx88-mpeg.c
··· 769 769 struct cx8802_dev *dev; 770 770 struct cx88_core *core; 771 771 int err; 772 - #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) 773 - struct videobuf_dvb_frontend *demod; 774 - int i; 775 - #endif 776 772 777 773 /* general setup */ 778 774 core = cx88_core_get(pci_dev); ··· 799 803 mutex_init(&dev->frontends.lock); 800 804 INIT_LIST_HEAD(&dev->frontends.felist); 801 805 802 - if (core->board.num_frontends) 803 - printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends); 806 + if (core->board.num_frontends) { 807 + struct videobuf_dvb_frontend *fe; 808 + int i; 804 809 805 - for (i = 1; i <= core->board.num_frontends; i++) { 806 - demod = videobuf_dvb_alloc_frontend(&dev->frontends, i); 807 - if(demod == NULL) { 808 - printk(KERN_ERR "%s() failed to alloc\n", __func__); 809 - err = -ENOMEM; 810 - goto fail_free; 810 + printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, 811 + core->board.num_frontends); 812 + for (i = 1; i <= core->board.num_frontends; i++) { 813 + fe = videobuf_dvb_alloc_frontend(&dev->frontends, i); 814 + if(fe == NULL) { 815 + printk(KERN_ERR "%s() failed to alloc\n", 816 + __func__); 817 + videobuf_dvb_dealloc_frontends(&dev->frontends); 818 + err = -ENOMEM; 819 + goto fail_free; 820 + } 811 821 } 812 822 } 813 823 #endif
+8 -2
drivers/media/video/cx88/cx88-video.c
··· 1216 1216 struct cx8800_fh *fh = priv; 1217 1217 struct cx8800_dev *dev = fh->dev; 1218 1218 1219 - if (unlikely(fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)) 1219 + /* We should remember that this driver also supports teletext, */ 1220 + /* so we have to test if the v4l2_buf_type is VBI capture data. */ 1221 + if (unlikely((fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) && 1222 + (fh->type != V4L2_BUF_TYPE_VBI_CAPTURE))) 1220 1223 return -EINVAL; 1224 + 1221 1225 if (unlikely(i != fh->type)) 1222 1226 return -EINVAL; 1223 1227 ··· 1236 1232 struct cx8800_dev *dev = fh->dev; 1237 1233 int err, res; 1238 1234 1239 - if (fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1235 + if ((fh->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) && 1236 + (fh->type != V4L2_BUF_TYPE_VBI_CAPTURE)) 1240 1237 return -EINVAL; 1238 + 1241 1239 if (i != fh->type) 1242 1240 return -EINVAL; 1243 1241
+1
drivers/media/video/cx88/cx88.h
··· 352 352 /* various v4l controls */ 353 353 u32 freq; 354 354 atomic_t users; 355 + atomic_t mpeg_users; 355 356 356 357 /* cx88-video needs to access cx8802 for hybrid tuner pll access. */ 357 358 struct cx8802_dev *dvbdev;
+72 -72
drivers/media/video/gspca/Kconfig
··· 3 3 depends on VIDEO_V4L2 4 4 default m 5 5 ---help--- 6 - Say Y here if you want to enable selecting webcams based 7 - on the GSPCA framework. 6 + Say Y here if you want to enable selecting webcams based 7 + on the GSPCA framework. 8 8 9 - See <file:Documentation/video4linux/gspca.txt> for more info. 9 + See <file:Documentation/video4linux/gspca.txt> for more info. 10 10 11 - This driver uses the Video For Linux API. You must say Y or M to 12 - "Video For Linux" to use this driver. 11 + This driver uses the Video For Linux API. You must say Y or M to 12 + "Video For Linux" to use this driver. 13 13 14 - To compile this driver as modules, choose M here: the 15 - modules will be called gspca_main. 14 + To compile this driver as modules, choose M here: the 15 + modules will be called gspca_main. 16 16 17 17 18 18 if USB_GSPCA && VIDEO_V4L2 ··· 23 23 tristate "Conexant Camera Driver" 24 24 depends on VIDEO_V4L2 && USB_GSPCA 25 25 help 26 - Say Y here if you want support for cameras based on the Conexant chip. 26 + Say Y here if you want support for cameras based on the Conexant chip. 27 27 28 - To compile this driver as a module, choose M here: the 29 - module will be called gspca_conex. 28 + To compile this driver as a module, choose M here: the 29 + module will be called gspca_conex. 30 30 31 31 config USB_GSPCA_ETOMS 32 32 tristate "Etoms USB Camera Driver" 33 33 depends on VIDEO_V4L2 && USB_GSPCA 34 34 help 35 - Say Y here if you want support for cameras based on the Etoms chip. 35 + Say Y here if you want support for cameras based on the Etoms chip. 36 36 37 - To compile this driver as a module, choose M here: the 38 - module will be called gspca_etoms. 37 + To compile this driver as a module, choose M here: the 38 + module will be called gspca_etoms. 39 39 40 40 config USB_GSPCA_FINEPIX 41 41 tristate "Fujifilm FinePix USB V4L2 driver" 42 42 depends on VIDEO_V4L2 && USB_GSPCA 43 43 help 44 - Say Y here if you want support for cameras based on the FinePix chip. 44 + Say Y here if you want support for cameras based on the FinePix chip. 45 45 46 - To compile this driver as a module, choose M here: the 47 - module will be called gspca_finepix. 46 + To compile this driver as a module, choose M here: the 47 + module will be called gspca_finepix. 48 48 49 49 config USB_GSPCA_MARS 50 50 tristate "Mars USB Camera Driver" 51 51 depends on VIDEO_V4L2 && USB_GSPCA 52 52 help 53 - Say Y here if you want support for cameras based on the Mars chip. 53 + Say Y here if you want support for cameras based on the Mars chip. 54 54 55 - To compile this driver as a module, choose M here: the 56 - module will be called gspca_mars. 55 + To compile this driver as a module, choose M here: the 56 + module will be called gspca_mars. 57 57 58 58 config USB_GSPCA_OV519 59 59 tristate "OV519 USB Camera Driver" 60 60 depends on VIDEO_V4L2 && USB_GSPCA 61 61 help 62 - Say Y here if you want support for cameras based on the OV519 chip. 62 + Say Y here if you want support for cameras based on the OV519 chip. 63 63 64 - To compile this driver as a module, choose M here: the 65 - module will be called gspca_ov519. 64 + To compile this driver as a module, choose M here: the 65 + module will be called gspca_ov519. 66 66 67 67 config USB_GSPCA_PAC207 68 68 tristate "Pixart PAC207 USB Camera Driver" 69 69 depends on VIDEO_V4L2 && USB_GSPCA 70 70 help 71 - Say Y here if you want support for cameras based on the PAC207 chip. 71 + Say Y here if you want support for cameras based on the PAC207 chip. 72 72 73 - To compile this driver as a module, choose M here: the 74 - module will be called gspca_pac207. 73 + To compile this driver as a module, choose M here: the 74 + module will be called gspca_pac207. 75 75 76 76 config USB_GSPCA_PAC7311 77 77 tristate "Pixart PAC7311 USB Camera Driver" 78 78 depends on VIDEO_V4L2 && USB_GSPCA 79 79 help 80 - Say Y here if you want support for cameras based on the PAC7311 chip. 80 + Say Y here if you want support for cameras based on the PAC7311 chip. 81 81 82 - To compile this driver as a module, choose M here: the 83 - module will be called gspca_pac7311. 82 + To compile this driver as a module, choose M here: the 83 + module will be called gspca_pac7311. 84 84 85 85 config USB_GSPCA_SONIXB 86 86 tristate "SN9C102 USB Camera Driver" 87 87 depends on VIDEO_V4L2 && USB_GSPCA 88 88 help 89 - Say Y here if you want support for cameras based on the SONIXB chip. 89 + Say Y here if you want support for cameras based on the SONIXB chip. 90 90 91 - To compile this driver as a module, choose M here: the 92 - module will be called gspca_sonixb. 91 + To compile this driver as a module, choose M here: the 92 + module will be called gspca_sonixb. 93 93 94 94 config USB_GSPCA_SONIXJ 95 95 tristate "SONIX JPEG USB Camera Driver" 96 96 depends on VIDEO_V4L2 && USB_GSPCA 97 97 help 98 - Say Y here if you want support for cameras based on the SONIXJ chip. 98 + Say Y here if you want support for cameras based on the SONIXJ chip. 99 99 100 - To compile this driver as a module, choose M here: the 101 - module will be called gspca_sonixj 100 + To compile this driver as a module, choose M here: the 101 + module will be called gspca_sonixj 102 102 103 103 config USB_GSPCA_SPCA500 104 104 tristate "SPCA500 USB Camera Driver" 105 105 depends on VIDEO_V4L2 && USB_GSPCA 106 106 help 107 - Say Y here if you want support for cameras based on the SPCA500 chip. 107 + Say Y here if you want support for cameras based on the SPCA500 chip. 108 108 109 - To compile this driver as a module, choose M here: the 110 - module will be called gspca_spca500. 109 + To compile this driver as a module, choose M here: the 110 + module will be called gspca_spca500. 111 111 112 112 config USB_GSPCA_SPCA501 113 113 tristate "SPCA501 USB Camera Driver" 114 114 depends on VIDEO_V4L2 && USB_GSPCA 115 115 help 116 - Say Y here if you want support for cameras based on the SPCA501 chip. 116 + Say Y here if you want support for cameras based on the SPCA501 chip. 117 117 118 - To compile this driver as a module, choose M here: the 119 - module will be called gspca_spca501. 118 + To compile this driver as a module, choose M here: the 119 + module will be called gspca_spca501. 120 120 121 121 config USB_GSPCA_SPCA505 122 122 tristate "SPCA505 USB Camera Driver" 123 123 depends on VIDEO_V4L2 && USB_GSPCA 124 124 help 125 - Say Y here if you want support for cameras based on the SPCA505 chip. 125 + Say Y here if you want support for cameras based on the SPCA505 chip. 126 126 127 - To compile this driver as a module, choose M here: the 128 - module will be called gspca_spca505. 127 + To compile this driver as a module, choose M here: the 128 + module will be called gspca_spca505. 129 129 130 130 config USB_GSPCA_SPCA506 131 131 tristate "SPCA506 USB Camera Driver" 132 132 depends on VIDEO_V4L2 && USB_GSPCA 133 133 help 134 - Say Y here if you want support for cameras based on the SPCA506 chip. 134 + Say Y here if you want support for cameras based on the SPCA506 chip. 135 135 136 - To compile this driver as a module, choose M here: the 137 - module will be called gspca_spca506. 136 + To compile this driver as a module, choose M here: the 137 + module will be called gspca_spca506. 138 138 139 139 config USB_GSPCA_SPCA508 140 140 tristate "SPCA508 USB Camera Driver" 141 141 depends on VIDEO_V4L2 && USB_GSPCA 142 142 help 143 - Say Y here if you want support for cameras based on the SPCA508 chip. 143 + Say Y here if you want support for cameras based on the SPCA508 chip. 144 144 145 - To compile this driver as a module, choose M here: the 146 - module will be called gspca_spca508. 145 + To compile this driver as a module, choose M here: the 146 + module will be called gspca_spca508. 147 147 148 148 config USB_GSPCA_SPCA561 149 149 tristate "SPCA561 USB Camera Driver" 150 150 depends on VIDEO_V4L2 && USB_GSPCA 151 151 help 152 - Say Y here if you want support for cameras based on the SPCA561 chip. 152 + Say Y here if you want support for cameras based on the SPCA561 chip. 153 153 154 - To compile this driver as a module, choose M here: the 155 - module will be called gspca_spca561. 154 + To compile this driver as a module, choose M here: the 155 + module will be called gspca_spca561. 156 156 157 157 config USB_GSPCA_STK014 158 158 tristate "Syntek DV4000 (STK014) USB Camera Driver" 159 159 depends on VIDEO_V4L2 && USB_GSPCA 160 160 help 161 - Say Y here if you want support for cameras based on the STK014 chip. 161 + Say Y here if you want support for cameras based on the STK014 chip. 162 162 163 - To compile this driver as a module, choose M here: the 164 - module will be called gspca_stk014. 163 + To compile this driver as a module, choose M here: the 164 + module will be called gspca_stk014. 165 165 166 166 config USB_GSPCA_SUNPLUS 167 167 tristate "SUNPLUS USB Camera Driver" 168 168 depends on VIDEO_V4L2 && USB_GSPCA 169 169 help 170 - Say Y here if you want support for cameras based on the Sunplus 171 - SPCA504(abc) SPCA533 SPCA536 chips. 170 + Say Y here if you want support for cameras based on the Sunplus 171 + SPCA504(abc) SPCA533 SPCA536 chips. 172 172 173 - To compile this driver as a module, choose M here: the 174 - module will be called gspca_spca5xx. 173 + To compile this driver as a module, choose M here: the 174 + module will be called gspca_spca5xx. 175 175 176 176 config USB_GSPCA_T613 177 177 tristate "T613 (JPEG Compliance) USB Camera Driver" 178 178 depends on VIDEO_V4L2 && USB_GSPCA 179 179 help 180 - Say Y here if you want support for cameras based on the T613 chip. 180 + Say Y here if you want support for cameras based on the T613 chip. 181 181 182 - To compile this driver as a module, choose M here: the 183 - module will be called gspca_t613. 182 + To compile this driver as a module, choose M here: the 183 + module will be called gspca_t613. 184 184 185 185 config USB_GSPCA_TV8532 186 186 tristate "TV8532 USB Camera Driver" 187 187 depends on VIDEO_V4L2 && USB_GSPCA 188 188 help 189 - Say Y here if you want support for cameras based on the TV8531 chip. 189 + Say Y here if you want support for cameras based on the TV8531 chip. 190 190 191 - To compile this driver as a module, choose M here: the 192 - module will be called gspca_tv8532. 191 + To compile this driver as a module, choose M here: the 192 + module will be called gspca_tv8532. 193 193 194 194 config USB_GSPCA_VC032X 195 195 tristate "VC032X USB Camera Driver" 196 196 depends on VIDEO_V4L2 && USB_GSPCA 197 197 help 198 - Say Y here if you want support for cameras based on the VC032X chip. 198 + Say Y here if you want support for cameras based on the VC032X chip. 199 199 200 - To compile this driver as a module, choose M here: the 201 - module will be called gspca_vc032x. 200 + To compile this driver as a module, choose M here: the 201 + module will be called gspca_vc032x. 202 202 203 203 config USB_GSPCA_ZC3XX 204 - tristate "VC3xx USB Camera Driver" 204 + tristate "ZC3XX USB Camera Driver" 205 205 depends on VIDEO_V4L2 && USB_GSPCA 206 206 help 207 - Say Y here if you want support for cameras based on the ZC3XX chip. 207 + Say Y here if you want support for cameras based on the ZC3XX chip. 208 208 209 - To compile this driver as a module, choose M here: the 210 - module will be called gspca_zc3xx. 209 + To compile this driver as a module, choose M here: the 210 + module will be called gspca_zc3xx. 211 211 212 212 endif
+7 -5
drivers/media/video/gspca/zc3xx.c
··· 2266 2266 {} 2267 2267 }; 2268 2268 2269 - static const struct usb_action hv7131bxx_Initial[] = { 2269 + static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */ 2270 2270 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, 2271 2271 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, 2272 2272 {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, ··· 2290 2290 {0xaa, 0x14, 0x0001}, 2291 2291 {0xaa, 0x15, 0x00e8}, 2292 2292 {0xaa, 0x16, 0x0002}, 2293 - {0xaa, 0x17, 0x0086}, 2293 + {0xaa, 0x17, 0x0086}, /* 00,17,88,aa */ 2294 2294 {0xaa, 0x31, 0x0038}, 2295 2295 {0xaa, 0x32, 0x0038}, 2296 2296 {0xaa, 0x33, 0x0038}, ··· 2309 2309 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, 2310 2310 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, 2311 2311 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, 2312 - {0xaa, 0x02, 0x0080}, /* {0xaa, 0x02, 0x0090}; */ 2312 + {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ 2313 2313 {0xa1, 0x01, 0x0002}, 2314 2314 {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, 2315 2315 {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, ··· 2374 2374 {} 2375 2375 }; 2376 2376 2377 - static const struct usb_action hv7131bxx_InitialScale[] = { 2377 + static const struct usb_action hv7131bxx_InitialScale[] = { /* 640x480*/ 2378 2378 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, 2379 2379 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, 2380 2380 {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, ··· 6388 6388 /*fixme: is it really write to 011d and 018d for all other sensors? */ 6389 6389 brightness = sd->brightness; 6390 6390 reg_w(gspca_dev->dev, brightness, 0x011d); 6391 + if (sd->sensor == SENSOR_HV7131B) 6392 + return; 6391 6393 if (brightness < 0x70) 6392 6394 brightness += 0x10; 6393 6395 else ··· 6531 6529 6532 6530 switch (sd->sensor) { 6533 6531 case SENSOR_GC0305: 6532 + case SENSOR_HV7131B: 6534 6533 case SENSOR_OV7620: 6535 6534 case SENSOR_PO2030: 6536 6535 return; ··· 7212 7209 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; 7213 7210 zc3_init = init_tb[(int) sd->sensor][mode]; 7214 7211 switch (sd->sensor) { 7215 - case SENSOR_HV7131B: 7216 7212 case SENSOR_HV7131C: 7217 7213 zcxx_probeSensor(gspca_dev); 7218 7214 break;
+2 -3
drivers/media/video/ivtv/Kconfig
··· 1 1 config VIDEO_IVTV 2 2 tristate "Conexant cx23416/cx23415 MPEG encoder/decoder support" 3 - depends on VIDEO_V4L1 && VIDEO_V4L2 && PCI && I2C && EXPERIMENTAL 3 + depends on VIDEO_V4L2 && PCI && I2C 4 4 depends on INPUT # due to VIDEO_IR 5 5 select I2C_ALGOBIT 6 6 select VIDEO_IR ··· 12 12 select VIDEO_SAA711X 13 13 select VIDEO_SAA717X 14 14 select VIDEO_SAA7127 15 - select VIDEO_TVAUDIO 16 15 select VIDEO_CS53L32A 17 16 select VIDEO_M52790 18 17 select VIDEO_WM8775 ··· 31 32 32 33 config VIDEO_FB_IVTV 33 34 tristate "Conexant cx23415 framebuffer support" 34 - depends on VIDEO_IVTV && FB && EXPERIMENTAL 35 + depends on VIDEO_IVTV && FB 35 36 select FB_CFB_FILLRECT 36 37 select FB_CFB_COPYAREA 37 38 select FB_CFB_IMAGEBLIT
+13 -13
drivers/media/video/ivtv/ivtv-driver.c
··· 875 875 876 876 #ifdef MODULE 877 877 /* load modules */ 878 - #ifndef CONFIG_MEDIA_TUNER 878 + #ifdef CONFIG_MEDIA_TUNER_MODULE 879 879 hw = ivtv_request_module(itv, hw, "tuner", IVTV_HW_TUNER); 880 880 #endif 881 - #ifndef CONFIG_VIDEO_CX25840 881 + #ifdef CONFIG_VIDEO_CX25840_MODULE 882 882 hw = ivtv_request_module(itv, hw, "cx25840", IVTV_HW_CX25840); 883 883 #endif 884 - #ifndef CONFIG_VIDEO_SAA711X 884 + #ifdef CONFIG_VIDEO_SAA711X_MODULE 885 885 hw = ivtv_request_module(itv, hw, "saa7115", IVTV_HW_SAA711X); 886 886 #endif 887 - #ifndef CONFIG_VIDEO_SAA7127 887 + #ifdef CONFIG_VIDEO_SAA7127_MODULE 888 888 hw = ivtv_request_module(itv, hw, "saa7127", IVTV_HW_SAA7127); 889 889 #endif 890 - #ifndef CONFIG_VIDEO_SAA717X 890 + #ifdef CONFIG_VIDEO_SAA717X_MODULE 891 891 hw = ivtv_request_module(itv, hw, "saa717x", IVTV_HW_SAA717X); 892 892 #endif 893 - #ifndef CONFIG_VIDEO_UPD64031A 893 + #ifdef CONFIG_VIDEO_UPD64031A_MODULE 894 894 hw = ivtv_request_module(itv, hw, "upd64031a", IVTV_HW_UPD64031A); 895 895 #endif 896 - #ifndef CONFIG_VIDEO_UPD64083 896 + #ifdef CONFIG_VIDEO_UPD64083_MODULE 897 897 hw = ivtv_request_module(itv, hw, "upd64083", IVTV_HW_UPD6408X); 898 898 #endif 899 - #ifndef CONFIG_VIDEO_MSP3400 899 + #ifdef CONFIG_VIDEO_MSP3400_MODULE 900 900 hw = ivtv_request_module(itv, hw, "msp3400", IVTV_HW_MSP34XX); 901 901 #endif 902 - #ifndef CONFIG_VIDEO_VP27SMPX 902 + #ifdef CONFIG_VIDEO_VP27SMPX_MODULE 903 903 hw = ivtv_request_module(itv, hw, "vp27smpx", IVTV_HW_VP27SMPX); 904 904 #endif 905 - #ifndef CONFIG_VIDEO_WM8775 905 + #ifdef CONFIG_VIDEO_WM8775_MODULE 906 906 hw = ivtv_request_module(itv, hw, "wm8775", IVTV_HW_WM8775); 907 907 #endif 908 - #ifndef CONFIG_VIDEO_WM8739 908 + #ifdef CONFIG_VIDEO_WM8739_MODULE 909 909 hw = ivtv_request_module(itv, hw, "wm8739", IVTV_HW_WM8739); 910 910 #endif 911 - #ifndef CONFIG_VIDEO_CS53L32A 911 + #ifdef CONFIG_VIDEO_CS53L32A_MODULE 912 912 hw = ivtv_request_module(itv, hw, "cs53l32a", IVTV_HW_CS53L32A); 913 913 #endif 914 - #ifndef CONFIG_VIDEO_M52790 914 + #ifdef CONFIG_VIDEO_M52790_MODULE 915 915 hw = ivtv_request_module(itv, hw, "m52790", IVTV_HW_M52790); 916 916 #endif 917 917 #endif
+2 -2
drivers/media/video/saa7110.c
··· 47 47 MODULE_PARM_DESC(debug, "Debug level (0-1)"); 48 48 49 49 #define SAA7110_MAX_INPUT 9 /* 6 CVBS, 3 SVHS */ 50 - #define SAA7110_MAX_OUTPUT 0 /* its a decoder only */ 50 + #define SAA7110_MAX_OUTPUT 1 /* 1 YUV */ 51 51 52 52 #define SAA7110_NR_REG 0x35 53 53 ··· 327 327 328 328 case DECODER_SET_INPUT: 329 329 v = *(int *) arg; 330 - if (v < 0 || v > SAA7110_MAX_INPUT) { 330 + if (v < 0 || v >= SAA7110_MAX_INPUT) { 331 331 v4l_dbg(1, debug, client, "input=%d not available\n", v); 332 332 return -EINVAL; 333 333 }
+2 -1
drivers/media/video/saa7134/saa7134-core.c
··· 941 941 dev->name,(unsigned long long)pci_resource_start(pci_dev,0)); 942 942 goto fail1; 943 943 } 944 - dev->lmmio = ioremap(pci_resource_start(pci_dev,0), 0x1000); 944 + dev->lmmio = ioremap(pci_resource_start(pci_dev, 0), 945 + pci_resource_len(pci_dev, 0)); 945 946 dev->bmmio = (__u8 __iomem *)dev->lmmio; 946 947 if (NULL == dev->lmmio) { 947 948 err = -EIO;
+6 -6
drivers/media/video/usbvideo/ibmcam.c
··· 3695 3695 unsigned char video_ep = 0; 3696 3696 3697 3697 if (debug >= 1) 3698 - dev_info(&uvd->dev->dev, "ibmcam_probe(%p,%u.)\n", intf, ifnum); 3698 + dev_info(&dev->dev, "ibmcam_probe(%p,%u.)\n", intf, ifnum); 3699 3699 3700 3700 /* We don't handle multi-config cameras */ 3701 3701 if (dev->descriptor.bNumConfigurations != 1) ··· 3746 3746 brand = "IBM PC Camera"; /* a.k.a. Xirlink C-It */ 3747 3747 break; 3748 3748 } 3749 - dev_info(&uvd->dev->dev, 3749 + dev_info(&dev->dev, 3750 3750 "%s USB camera found (model %d, rev. 0x%04x)\n", 3751 3751 brand, model, le16_to_cpu(dev->descriptor.bcdDevice)); 3752 3752 } while (0); ··· 3754 3754 /* Validate found interface: must have one ISO endpoint */ 3755 3755 nas = intf->num_altsetting; 3756 3756 if (debug > 0) 3757 - dev_info(&uvd->dev->dev, "Number of alternate settings=%d.\n", 3757 + dev_info(&dev->dev, "Number of alternate settings=%d.\n", 3758 3758 nas); 3759 3759 if (nas < 2) { 3760 3760 err("Too few alternate settings for this camera!"); ··· 3799 3799 actInterface = i; 3800 3800 maxPS = le16_to_cpu(endpoint->wMaxPacketSize); 3801 3801 if (debug > 0) 3802 - dev_info(&uvd->dev->dev, 3802 + dev_info(&dev->dev, 3803 3803 "Active setting=%d. " 3804 3804 "maxPS=%d.\n", i, maxPS); 3805 3805 } else ··· 3840 3840 RESTRICT_TO_RANGE(framerate, 0, 5); 3841 3841 break; 3842 3842 default: 3843 - dev_info(&uvd->dev->dev, "IBM camera: using 320x240\n"); 3843 + dev_info(&dev->dev, "IBM camera: using 320x240\n"); 3844 3844 size = SIZE_320x240; 3845 3845 /* No break here */ 3846 3846 case SIZE_320x240: ··· 3869 3869 canvasY = 120; 3870 3870 break; 3871 3871 default: 3872 - dev_info(&uvd->dev->dev, "IBM NetCamera: using 176x144\n"); 3872 + dev_info(&dev->dev, "IBM NetCamera: using 176x144\n"); 3873 3873 size = SIZE_176x144; 3874 3874 /* No break here */ 3875 3875 case SIZE_176x144: