summaryrefslogtreecommitdiffstats
path: root/drivers/media/video
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (12302): cx23885-417: fix broken IOCTL handlingMichael Krufky2009-07-241-0/+1
| | | | | | | | IOCTLS will never get handled if we dont connect video_ioctl2 to mpeg_fops.ioctl Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12300): bttv: fix regression: tvaudio must be loaded before tunerHans Verkuil2009-07-243-44/+50
| | | | | | | | | | | | Both tvaudio and the tuner share i2c address 0x42. The tvaudio module can check whether it really is a tda9840, but the tuner can't. So the tvaudio module must be loaded before the tuner module. This was also the case for 2.6.29, but the order was swapped in 2.6.30. Thanks to Krzysztof Grygiencz for reporting and testing this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12286): sn9c20x: reorder includes to be like other driversMauro Carvalho Chehab2009-07-241-4/+5
| | | | | | | This is not just pure cosmetic, since the order affects the out-of-tree module build at the -hg development tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12284): gspca - jpeg subdrivers: Check the result of kmalloc(jpeg ↵Julia Lawall2009-07-247-0/+14
| | | | | | | | header). Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12283): gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.Brian Johnson2009-07-243-0/+2451
| | | | | | Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12282): gspca - main: Support for vidioc_g_chip_ident and ↵Brian Johnson2009-07-242-0/+82
| | | | | | | | vidioc_g/s_register. Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12267): gspca - sonixj: Bad sensor init of non ov76xx sensors.Jean-Francois Moine2009-07-241-0/+2
| | | | | | | The bug was introduced when adding the light frequency control Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12265): em28xx: fix tuning problem in HVR-900 (R1)Devin Heitmueller2009-07-241-3/+11
| | | | | | | | | | | | | | | | | | | When the change was introduced in the zl10353 for the i2c gate behavior, this broke the HVR-900 which was not behind a gate. Use a version of the zl10353 config profile that indicates the tuner is not behind such a gate. Without this patch the first tune succeeds, but subsequent tuning attempts will fail. The change also renames the terratec zl10353 profile I wrote to be more generic, since it is shared by the non-terratec device. Thanks to Michael Krufky for providing a HVR-900 and DVB-T environment to test with. Cc: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12263): em28xx: set demod profile for Pinnacle Hybrid Pro 320eDevin Heitmueller2009-07-241-0/+1
| | | | | | | | | | | | The Pinnacle Hybrid Pro 320e was missing a demod config for the xc3028, which is required for digital tuning to work properly. Add the missing profile. Thanks to Andreas Lunderhage for testing patches and providing a remote debug environment. Cc: Andreas Lunderhage <lunderhage@home.se> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12262): em28xx: Make sure the tuner is initialized if generic empia ↵Devin Heitmueller2009-07-241-0/+1
| | | | | | | | | | | | | | | | | | | USB id was used In cases where the device has a generic Empia USB ID, the call in the precard setup phase did not set the tuner GPIO. As a result, the tuner may not be taken out of reset before attempting initialization in the analog driver. This problem was not seen before with the EVGA inDtube, since that particular board has the analog GPIO setup to include taking the tuner out of reset. Thanks to Andreas Lunderhage for testing patches and providing a remote debug environment for the Pinnacle 320e. Cc: Andreas Lunderhage <lunderhage@home.se> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12261): em28xx: set GPIO properly for Pinnacle Hybrid Pro analog ↵Devin Heitmueller2009-07-241-1/+1
| | | | | | | | | | support Set the GPIO properly for the analog side of the Pinnacle Hybrid Pro, or else the emp202 doesn't get detected properly. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12260): em28xx: make support work for the Pinnacle Hybrid Pro ↵Devin Heitmueller2009-07-242-4/+21
| | | | | | | | | | | | | | (eb1a:2881) Setup the GPIOs properly and enable support for the DVB side of the Pinnacle Hybrid Pro USB stick. Thanks to Andreas Lunderhage for testing patches and providing a remote debug environment. Cc: Andreas Lunderhage <lunderhage@home.se> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12258): em28xx: fix typo in mt352 init sequence for Terratec ↵Devin Heitmueller2009-07-241-1/+1
| | | | | | | | | | | | | | Cinergy T XS USB Andy walls pointed out that we were passing 0x5d to the TUNER_GO register, instead of 0x01. Set the register properly (note the code did still work with the incorrect value, so this does not address a regression). Thanks to Andy Walls for noticing the issue. Cc: Andy Walls <awalls@radix.net> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12257): em28xx: make tuning work for Terratec Cinergy T XS USB ↵Devin Heitmueller2009-07-241-6/+41
| | | | | | | | | | | | | (mt352 variant) The Terratec Cinergy T XS USB can have either a zl10353 or an mt352. Add support for the MT352 variant. Thanks to Jelle de Jong for providing a unit to test/debug with. Cc: Jelle de Jong <jelledejong@powercraft.nl> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12245): em28xx: add support for mt9m001 webcamsMauro Carvalho Chehab2009-07-242-0/+42
| | | | | | | Thanks to Wally <wally@voosen.eu> for bringing the issue and helping with the tests. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12244): em28xx: adjust vinmode/vinctl based on the stream input formatMauro Carvalho Chehab2009-07-243-14/+17
| | | | | | | | | Depending on the video input format, vinmode/vinctl needs adjustments. For TV, this is not relevant, since the supported decoders output data at the same format. However, webcam sensors may have different formats, so, this needs to be adjusted based on the device. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12243): em28xx: allow specifying sensor xtal frequencyMauro Carvalho Chehab2009-07-242-3/+10
| | | | | | | | | | | | | | In order to properly estimate fps, mt9v011 sensor driver needs to know what is the used frequency on the sensor cristal. Adds the proper fields and initialization code for specifying the cristal frequency. Also, based on experimentation, it was noticed that the Silvercrest is outputing data at 7 fps. This means that it should be using a 6.3 MHz cristal. This information needs to be double checked later, by opening the device. Anyway, by using this value for xtal, at least now we have the correct fps report. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12242): mt9v011: implement core->s_config to allow adjusting xtal ↵Mauro Carvalho Chehab2009-07-241-0/+17
| | | | | | | | | | frequency Since frames per second is a function of cristal frequency, and this is device-specific, add a function that allows adjusting it, via subdev->core->s_config callback. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12241): mt9v011: Fix vstartMauro Carvalho Chehab2009-07-241-1/+1
| | | | | | vstart calculus were wrong. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12240): mt9v011: add a function to calculate frames per second rateMauro Carvalho Chehab2009-07-241-1/+31
| | | | | | | | | | | It is possible to adjust the fps rate by changing some register values. This is function of the connected Xtal at the camera sensor, being a 27 MHz cristal needed, in order to support 640x480 at 30 fps. For now, it will only calculate the values for fps. Later patches may introduce V4L2 ioctls, to allow frequency rate adjustments. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12239): em28xx: fix webcam scalingMauro Carvalho Chehab2009-07-244-24/+18Star
| | | | | | | | | | | | | | | While trying to fix an mt9v001 webcam, I noticed that HSCALE/VSCALE do work with em28xx + webcam. The issue is that the scaling setup depends on the number of visible rows/cols of the input image. With mt9v011 (Silvercrest), the resolution is 640x480. So, the scaling is different from a normal TV image (720x480 on NTSC). This were causing a wrong scaling and a previous patch disabled scaling. As each sensor have their different resolution setting, the xres/yres should be adjusted accordingly with the input sensor. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12238): em28xx: call sensor detection code for all webcam entriesMauro Carvalho Chehab2009-07-241-9/+9
| | | | | | | | | | | | With the previous approach, autodetection were working only for the two generic entries (em275x and em2820 unknown ones). So, if someone would try to force probing an specific device, the code would not properly run the autodetection code. With the new approach, the sensor autodetection will be run not only for the two generic entries, but also do webcam specific ones. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12237): mt9v011: implement VIDIOC_QUERYCTRLMauro Carvalho Chehab2009-07-241-0/+18
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12236): em28xx: stop abusing of board->decoder for sensor informationMauro Carvalho Chehab2009-07-242-3/+9
| | | | | | | | | | Instead of using em28xx board decoder field for storing sensor information, let's use instead a separate field for it. Also, as sensors are currently autodetected, there's no need of having it at the boards description. So, move it to the main em28xx struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12235): em28xx: detects sensors also with the generic em2750/2750 entryMauro Carvalho Chehab2009-07-241-4/+5
| | | | | | | Webcams in general don't have eeprom. So, the sensor hint code should be called to properly detect what sensor is inside. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12234): em28xx-cards: use is_webcam flag for devices that are known ↵Mauro Carvalho Chehab2009-07-241-4/+8
| | | | | | | | | to be webcams By having the webcam devices marked as such, it will help the em28xx driver to do the right thing on those devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12233): em28xx: rename is_27xx to is_webcamMauro Carvalho Chehab2009-07-244-7/+7
| | | | | | | Just renames the flag, to use a clearer name. Later patches will use this flag to properly set some drivers behaviors for webcams. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12224): gspca - m5602-s5k4aa: Remove erroneous register writesErik Andrén2009-07-241-6/+0Star
| | | | | | | | A couple of erroneous register writes snuck in that made the image go haywire. Remove these. Many thanks to Grégory Lardière for finding this out Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12223): gspca - stv06xx-hdcs: Correct the pixelformatErik Andrén2009-07-241-2/+2
| | | | | Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12222): gspca - stv06xx-hdcs: Fix sensor sequence bugErik Andrén2009-07-241-3/+5
| | | | | | | All hdcs registers use bit 0 as a read/write flag and needs to be shifted one bit to the left. This wasn't accounted for when doing a sequence of writes. Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12221): gspca - stv06xx-hdcs: Actually update the sensor stateErik Andrén2009-07-241-1/+3
| | | | | Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* headers: smp_lock.h reduxAlexey Dobriyan2009-07-1220-4/+16
| | | | | | | | | | | | | * Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (12202): em28xx, fix lock imbalanceJiri Slaby2009-07-061-0/+1
| | | | | | | | There is one omitted unlock in em28xx_usb_probe. Fix that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12172): em28xx: Add autodetection code for Silvercrest 1.3 mpixMauro Carvalho Chehab2009-07-062-1/+45
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12171): em28xx: fix webcam usage with different output formatsMauro Carvalho Chehab2009-07-062-24/+23Star
| | | | | | | | | | Discovered the bug that were limiting the output format to just RGB565. Now, it is possible to output image at Bayer format (the original one, as generated by Silvercrest sensor, and two others), and also on YUY. Adds Bayer formats also to the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12169): em28xx-video: fix VIDIOC_G_FMT and VIDIOC_ENUMFMT with webcamsMauro Carvalho Chehab2009-07-051-30/+49
| | | | | | | | | Webcams have different constraints than other v4l devices. This patch makes the format ioctls to behave better. It also fixes a bug at open() handler, that were always reseting resolution to the maximum available one. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 ↵Devin Heitmueller2009-07-052-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | version) Fix the code so that the zl10353 version of the Terratec Cinergy T XS USB starts working again. This includes fixing what must have been a typo in the GPIO definition for the digital side of the board, and setting of the disable_i2c_gate_ctrl property for the zl10353 config, so that the i2c bus doesn't get wedged the first time something tries to close the gate. Also, add a printk() making clear that the mt352 version still isn't supported. This issue is still being actively debugged, but in the meantime at least the dmesg output will show a very clear error... Thanks to Jelle de Jong for providing sample hardware to test with. Thanks to Simon Kenyon for testing various patches and providing SSH access to his environment so I could debug with access to a valid signal source. Cc: Jelle de Jong <jelledejong@powercraft.nl> Cc: Simon Kenyon <simon@koala.ie> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12139): em28xx: add other video formatsMauro Carvalho Chehab2009-07-051-1/+18
| | | | | | | Add suppport for the teste RGB565 format (16 bits/pixel). Currently, webcam support works only at RGB565, at 640x480. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12138): em28xx: add support for Silvercrest WebcamMauro Carvalho Chehab2009-07-054-7/+68
| | | | | | | | | | | | | | This webcam uses a em2710 chipset, that identifies itself as em2820, plus a mt9v011 sensor, and a DY-301P lens. It needs a few different initializations than a normal em28xx device. Thanks to Hans de Goede <hdegoede@redhat.com> and Douglas Landgraf <dougsland@redhat.com> for providing the acces for the webcam during this weekend, I could make a patch for it while returning back from FISL/Fudcom LATAM 2009. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12174): mt9v011: let's stick with datasheet values where it worksMauro Carvalho Chehab2009-07-051-16/+7Star
| | | | | | | | | | | The original driver for Silvercrest cameras were using some values that are different from what datasheet says. As result, it was taken very less snapshots per second than expected. A test with the datasheet values showed that they work fine and give a better frame rate. So, let's stick with datasheet values. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12173): mt9v011: properly calculate image resolution registersMauro Carvalho Chehab2009-07-051-20/+94
| | | | | | | | | | | | | | Instead of working with a table of precalculated values, fill them with the proper values. Also, adds format functions that allow changing the resolution, by cropping the image to the center of the sensor. While here, move the sensor version check to the probe routine, to indicate to the caller if the sensor is not supported by this driver. Also, fixes a stupid bug where we're using &buffer[] instead of buffer[]. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12137): mt9v011: CodingStyle fixesMauro Carvalho Chehab2009-07-051-4/+7
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12136): mt9v011: Some fixes at the register initialization tableMauro Carvalho Chehab2009-07-051-6/+14
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12135): Add a driver for mt9v011 sensorMauro Carvalho Chehab2009-07-054-0/+399
| | | | | | | | | Adds driver for mt9v011 based on its datasheet, available at: http://download.micron.com/pdf/datasheets/imaging/MT9V011.pdf The driver was tested with a webcam that will be added on a next patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12166): cx23885: add FIXME comment above set_frontend overrideMichael Krufky2009-07-052-0/+3
| | | | | | | | add FIXME comment to indicate that the set_frontend override is a temporary hack. This will be done a better way in the next kernel. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12165): cx23885: override set_frontend to allow rf input path ↵Michael Krufky2009-07-052-0/+31
| | | | | | | | | | switching on the HVR1275 Use separate RF input spigots for Antennae and Cable. Reviewed-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12148): move V4L2_PIX_FMT_SGRBG8 to the proper placeMauro Carvalho Chehab2009-07-051-4/+0Star
| | | | | | | Instead of defining a new pif format on an internal header, move it to the V4L2 API header. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12182): cx18: Add DVB-T support for Yuan MPC-718 cards with an ↵Andy Walls2009-07-052-2/+162
| | | | | | | | | | | | | | | | | | MT352 or ZL10353 Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353 demodulator. There are apparently some units with a DiBcom demodulator which could be supported by one of the dib7000 modules - but this is not implemented in the cx18 driver (yet). Due to lack of porgramming details for the MT352 and the mt352 module requiring a "demod_init" function, a "firmware" must be obtained and loaded to get DVB-T working for Yuan MPC-718 cards with an MT352. Tested-by: Steve Firth <firth650@btinternet.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12180): cx18: Update Yuan MPC-718 card entry with better ↵Andy Walls2009-07-051-12/+22
| | | | | | | information and guesses Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (12160): soc-camera: fix missing clean up on error pathGuennadi Liakhovetski2009-07-051-3/+7
| | | | | | | | | If soc_camera_init_user_formats() fails in soc_camera_probe(), we have to call client's .remove() method to unregister the video device. Reported-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>