summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] v4l2-common: remove obsolete v4l_fill_dv_preset_infoHans Verkuil2013-03-242-48/+0
| | | | | | | It's no longer used, so it can now be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: add support for ADS Tech DVD Xpress DX2Hans Verkuil2013-03-245-3/+75
| | | | | | | Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tw9906: add Techwell tw9906 video decoderHans Verkuil2013-03-243-0/+252
| | | | | | | Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: drop firmware name in board config, make configs constHans Verkuil2013-03-245-34/+25
| | | | | | | | The firmware is always the same, so drop it from the board configs. Also make the board configs const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: correct a header check: MPEG4 has a different GOP codeHans Verkuil2013-03-241-2/+4
| | | | | | | | Actually it's called "Group of VOP" start code in MPEG4 terminology. Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: add back 'repeat sequence header' controlHans Verkuil2013-03-242-1/+5
| | | | | | | But now as a proper standard MPEG control. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: Restore b_frame controlVolokh Konstantin2013-03-242-2/+7
| | | | | | Signed-off-by: Volokh Konstantin <volokh84@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: a small improvement to querystd handlingHans Verkuil2013-03-241-4/+4
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] MAINTAINERS: add the go7007 driverHans Verkuil2013-03-241-0/+5
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007-loader: add support for the other devices and move fw filesHans Verkuil2013-03-244-92/+68
| | | | | | | | | | Add support for the other devices that need to load the boot firmware. All firmware files are now placed in a single go7007 directory. Also remove the device_extension_s stuff: this is clearly a left-over from the olden days. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007-loader: renamed from s2250-loaderHans Verkuil2013-03-244-70/+54
| | | | | | | | All s2250 names are renamed to go7007. This will be the generic go7007 firmware loader for any go7007 device, not just for the s2250/1. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] s2250: add comment describing the hardwareHans Verkuil2013-03-241-0/+7
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: remove cropping functionsHans Verkuil2013-03-241-92/+0
| | | | | | | Remove these dummy cropping functions: cropping was never implemented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: embed struct video_deviceHans Verkuil2013-03-245-37/+26
| | | | | | | Do not allocate it, but just embed in the go7007 struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: convert to core locking and vb2Hans Verkuil2013-03-246-526/+205
| | | | | | | Convert this driver to videobuf2 and core locking. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: drop struct go7007_fileHans Verkuil2013-03-242-121/+67
| | | | | | | | | Remove struct go7007_file: all fields contained in that struct are moved to the go7007 struct since they are really global values. The lock has just been deleted (what's the point of a per-fh lock??). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: set up the saa7115 audio clock correctlyHans Verkuil2013-03-243-1/+12
| | | | | | | | The s_crystal_freq operation has to be called for the saa7115 to set up the audio clock correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: simplify the PX-TV402U board ID handlingHans Verkuil2013-03-243-24/+9
| | | | | | | | There really is no need to split out the board IDs for each tuner. That's what the tuner_type is for, after all. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: standardize MPEG handling supportHans Verkuil2013-03-245-507/+181
| | | | | | | | | | | | | The go7007 produces elementary streams, so we shouldn't use the STREAM_TYPE control, since that is for multiplexed streams. Instead use V4L2_PIX_FMT_MPEG1/2/4. Initially set up all the values for MPEG-2 dvd-mode, and select the dvd_mode field if those values match that setup precisely. Clean up lots of obsolete code relating to the custom ioctls for the MPEG support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: tuner/std related fixesHans Verkuil2013-03-245-155/+154
| | | | | | | | | | | | | | | | | | | | | | | - The Adlink is initially detected as a sensor board, so the driver config is set up as if it was a sensor. Later the driver discovers that it really is a video capture card and that means that the driver configuration has to be updated for a PAL/NTSC capture card. - Setup the correct initial std based on the TV tuner type. - Remember the exact std the user selected, don't map it to STD_PAL or NTSC. - Use v4l2_disable_ioctl to disable ioctls based on the board config and drop a lot of checking code in each of those ioctls since that is no longer needed. - enum_input should use tvnorms to fill its std field. - configure the input, std and initial tuner frequency at driver initialization. - fix std handling in the s2250 driver. - the code handling scaling for devices without a scaler was broken. This is now fixed. - correctly set readbuffers and capability in g/s_parm. - remove the bogus test for capturemode in s_parm. - correctly implement enum_framesizes/intervals. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: add log_status supportHans Verkuil2013-03-241-1/+9
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: add prio and control event supportHans Verkuil2013-03-242-5/+20
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] s2250: convert to the control frameworkHans Verkuil2013-03-241-103/+46
| | | | | Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: convert to the control framework and remove obsolete ↵Hans Verkuil2013-03-243-192/+71
| | | | | | | | | | JPEGCOMP support Just add a read-only V4L2_CID_JPEG_ACTIVE_MARKER control to replace the JPEGCOMP support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: fix unregister/disconnect handlingHans Verkuil2013-03-246-80/+85
| | | | | | | | | | | | - use the v4l2_device's release() callback - remove the unnecessary ref_count - don't free usb data structures on disconnect, only do that in the final release callback. This is the correct way in order to safely handle disconnect and removal of modules. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: remember boot firmwareHans Verkuil2013-03-242-21/+24
| | | | | | | | | | Don't load it everytime you stop encoding. Instead remember it. Another reason for not loading it every time is that this could be called from within the release() file operation, which turns out to be deadly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: fix DMA related errorsHans Verkuil2013-03-244-23/+20
| | | | | | | | - Don't pass data allocated on the stack to usb_control_msg. - Use dma_mapping_error after calling dma_map_page(). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: remove current_normHans Verkuil2013-03-241-1/+0
| | | | | | | | It's deprecated and replaced by g_std. Since this driver already implements g_std the use of current_norm can just be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: go7007: add device_caps and bus_info support to querycapHans Verkuil2013-03-244-7/+6
| | | | | | | And don't set the version field, the core does that for you. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] s2250-loader: use usbv2_cypress_load_firmwareHans Verkuil2013-03-242-5/+6
| | | | | | | | The v2 of this function doesn't do DMA to objects on the stack like its predecessor does. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: add audio input ioctlsHans Verkuil2013-03-241-3/+48
| | | | | | | | Since we now know what audio inputs there are, we can also get/set and enumerate them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: remove all wis* driversHans Verkuil2013-03-248-2398/+0
| | | | | | | These are now no longer used and so they can be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: switch to standard tuner/i2c subdevsHans Verkuil2013-03-248-134/+135
| | | | | | | | | | | | | | | | Instead of using the wis-* drivers we now use the standard 'proper' subdev drivers. The board configuration tables now also list the possible audio inputs, this will be used later to implement audio inputs. Special mention deserves a little change in set_capture_size() where the height passed to s_mbus_fmt is doubled: that is because the saa7115 driver expects to see the frame height, not the field height as the wis_saa7115 driver did. Another change is that the tuner input is moved from last to the first input, which is consistent with the common practice in other video drivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: i2c initialization changes for tw2804Volokh Konstantin2013-03-243-10/+14
| | | | | | | | | Do i2c initialization via struct item as tw2804 has a 0x00 i2c address, so we need to use the I2C_CLIENT_TEN flag for validity. Signed-off-by: Volokh Konstantin <volokh84@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tw2804: modify ADC power controlVolokh Konstantin2013-03-241-0/+1
| | | | | | | | | Switch off all ADC (max 4) with first init, we control it when starting/stopping streaming. Signed-off-by: Volokh Konstantin <volokh84@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tw2804: add support for the Techwell tw2804Hans Verkuil2013-03-243-1/+478
| | | | | | | | | | This is based on the wis-tw2804.c driver that's part of the go7007 driver. It has been converted to a v4l subdev driver by Volokh Konstantin, and I made additional cleanups. Based on work by: Volokh Konstantin <volokh84@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tw9903: add new tw9903 video decoderHans Verkuil2013-03-243-0/+283
| | | | | | | | | | This based on the wis-tw9903.c driver that's part of the go7007 driver. It has been converted to a v4l subdev driver by Pete Eberlein, and I made additional cleanups. Based on work by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] uda1342: add new uda1342 audio codec driverHans Verkuil2013-03-244-0/+152
| | | | | | | | | | This based on the wis-uda1342.c driver that's part of the go7007 driver. It has been converted to a v4l subdev driver by Pete Eberlein, and I made additional cleanups. Based on work by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ov7640: add new ov7640 driverHans Verkuil2013-03-243-1/+119
| | | | | | | | | | This based on the wis-ov7640.c driver that's part of the go7007 driver. It has been converted to a v4l subdev driver by Pete Eberlein, and I made additional cleanups. Based on work by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] sony-btf-mpx: the MPX driver for the sony BTF PAL/SECAM tunerHans Verkuil2013-03-243-1/+410
| | | | | | | | | | | | The Sony BTF PG472Z has an internal MPX to deal with mono/stereo/bilingual audio. This is split off from the wis-sony-tuner driver that is part of the go7007 driver as it should be a separate i2c sub-device driver. The wis-sony-tuner is really three i2c devices: a standard tuner, a tda9887 compatible demodulator and this mpx. After this patch the wis-sony-tuner can be replaced by this driver and the standard tuner driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner: add Sony BTF tunersHans Verkuil2013-03-246-6/+78
| | | | | | | | | | | | | | This adds support for three Sony BTF tuners: TUNER_SONY_BTF_PG472Z: PAL+SECAM TUNER_SONY_BTF_PK467Z: NTSC-M-JP TUNER_SONY_BTF_PB463Z: NTSC-M These come from the go7007 staging driver where they were implemented in the wis-sony-tuner i2c driver. Adding support for these tuners to tuner-types.c is the first step towards removing the wis-sony-tuner driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] go7007: fix i2c_xfer return codesHans Verkuil2013-03-242-13/+13
| | | | | | | | | The i2c_xfer functions didn't return the proper error codes and (especially important) on success they returned 0 instead of the number of transferred messages. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7115: add support for double-rate ASCLKHans Verkuil2013-03-242-8/+15
| | | | | | | | Some devices expect a double rate ASCLK. Add a flag to let the driver know through the s_crystal_freq call. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7115: improve querystd handling for the saa7115Hans Verkuil2013-03-241-28/+28
| | | | | | | | The saa7115 has better PAL/NTSC detection, so it can detect PAL even though the chip is currently set up for NTSC. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7115: add config flag to change the IDQ polarityHans Verkuil2013-03-242-10/+27
| | | | | | | | Needed by the go7007 driver: it assumes a different polarity of the IDQ signal, so we need to be able to tell the saa7115 about this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ctrls: add V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER controlHans Verkuil2013-03-243-0/+9
| | | | | | | Control whether video sequence headers should be repeated. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ioctl: check if an ioctl is validHans Verkuil2013-03-241-9/+13
| | | | | | | | | | | | | | | | Just checking if the op exists isn't correct, you should check if the ioctl is valid (which implies that the op exists as well). One exception is g_std: if current_norm is non-zero, then the g_std op may be absent. This sort of weird behavior is one of the reasons why I am trying to get rid of current_norm. This patch fixes the case where the g/s_std op is set, but these ioctls are disabled. This can happen in drivers supporting multiple models, some that have TV input (and support the STD API) and some that have a sensor (and do not support the STD API). In the latter case qv4l2 would still show the Standards combobox. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-core: add code to check for specific opsHans Verkuil2013-03-242-0/+16
| | | | | | | | | | | This patch adds a v4l2_subdev_has_op() macro and a v4l2_device_has_op macro to quickly check if a specific subdev or any subdev supports a particular subdev operation. This makes it easy for drivers to disable certain ioctls if none of the subdevs supports the necessary functionality. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2-ctrls: eliminate lockdep false alarms for struct ↵Andy Walls2013-03-242-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v4l2_ctrl_handler.lock When calling v4l2_ctrl_add_handler(), lockdep would detect a potential recursive locking problem on a situation that is by design intended and not a recursive lock. This happened because all struct v4l2_ctrl_handler.lock mutexes were created as members of the same lock class in v4l2_ctrl_handler_init(), and v4l2_ctrl_add_handler() takes the hdl->lock on two different v4l2_ctrl_handler instances. This change breaks the large lockdep lock class for struct v4l2_ctrl_handler.lock and breaks it into v4l2_ctrl_handler instantiation specific lock classes with meaningful class names. This will validly eliminate lockdep alarms for v4l2_ctrl_handler locking validation, as long as the relationships between drivers adding v4l2 controls to their own handler from other v4l2 drivers' control handlers remains straightforward. struct v4l2_ctrl_handler.lock lock classes are created with names such that the output of cat /proc/lockdep indicates where in the v4l2 driver code v4l2_ctrl_handle_init() is being called on instantiations: ffffffffa045f490 FD: 10 BD: 8 +.+...: cx2341x:1534:(hdl)->lock ffffffffa0497d20 FD: 12 BD: 2 +.+.+.: saa7115:1581:(hdl)->lock ffffffffa04ac660 FD: 14 BD: 2 +.+.+.: msp3400_driver:756:(hdl)->lock ffffffffa0484b90 FD: 12 BD: 1 +.+.+.: ivtv_gpio:366:(&itv->hdl_gpio)->lock ffffffffa04eb530 FD: 11 BD: 2 +.+.+.: cx25840_core:1982:(&state->hdl)->lock ffffffffa04fbc80 FD: 11 BD: 3 +.+.+.: wm8775:246:(&state->hdl)->lock Some lock chains, that were previously causing the recursion alarms, are now visible in the output of cat /proc/lockdep_chains: irq_context: 0 [ffffffffa0497d20] saa7115:1581:(hdl)->lock [ffffffffa045f490] cx2341x:1534:(hdl)->lock irq_context: 0 [ffffffffa04ac660] msp3400_driver:756:(hdl)->lock [ffffffffa045f490] cx2341x:1534:(hdl)->lock irq_context: 0 [ffffffffa0484b90] ivtv_gpio:366:(&itv->hdl_gpio)->lock [ffffffffa045f490] cx2341x:1534:(hdl)->lock irq_context: 0 [ffffffffa04eb530] cx25840_core:1982:(&state->hdl)->lock [ffffffffa045f490] cx2341x:1534:(hdl)->lock irq_context: 0 [ffffffffa04fbc80] wm8775:246:(&state->hdl)->lock [ffffffffa045f490] cx2341x:1534:(hdl)->lock Signed-off-by: Andy Walls <awalls@md.metrocast.net> [hans.verkuil@cisco.com: keep mutex_init in v4l2_ctrl_handler_init_class] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] documentation: DocBook/media : Fix typo in dvbproperty.xmlMasanari Iida2013-03-241-3/+3
| | | | | | | Correct spelling typos. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud