summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2012-08-09[media] xc5000: don't invoke auto calibration unless we really did reset tunerDevin Heitmueller
The current code invokes the auto calibration of the tuner whenever the init routine is called (whenever the DVB frontend opens the device). However we should really only be invoking the calibration if we actually did reset the device and reload the firmware. Rework the routine to only do calibration if reset and firmware load was performed. Also because the called function is now a no-op if the firmware is already loaded, the caller no longer needs to invoke is_firmware_loaded(). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au8522: fix regression in logging introduced by separation of modulesDevin Heitmueller
The au8522 driver was broken into three modules (dig, decoder, common), and as a result the debug modprobe option doesn't work for any of the common functions. Copy the module macros over to the common module so that the debug option works again. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au0828: make sure video standard is setup in tuner-coreDevin Heitmueller
If the user performs a tuning attempt without explicitly calling the s_std ioctl(), a value of zero is sent from tuner-core to xc5000. This causes the xc5000 driver to leave the standard unchanged. The problem was masked by the fact that the xc5000 driver defaulted to NTSC, but if you happened to perform an ATSC/ClearQAM tuning attempt and then do an analog tune, the net effect is an analog tune with the standard still set to DTV6. Keep track of whether the standard has ever been sent to tuner-core. We don't make an s_std subdev call explicitly during probe because that will cause a firmware load (which is very time consuming on the 950q). With the logic in this patch, the s_std call will occur automatically on the s_freq call if it hasn't already been set. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au0828: fix race condition that causes xc5000 to not bind for digitalDevin Heitmueller
In some cases users would see the xc5000_attach() call failing for the digital side of the tuner on initialization. This is because of udev running v4l-id while the digital side of the board is still coming up. This is the exact same race condition which was present in em28xx (not surprising since I copied all the locking logic from that driver when I added analog support). Reproduce Mauro's fix from the em28xx driver in au0828. Reported-by: Rick Harding <rharding@mitechie.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: properly report i2c write failuresDevin Heitmueller
The logic as written would *never* actually return an error condition, since the loop would run until the counter hit zero but the check was for a value less than zero. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: add support for showing the SNR and gain in the debug outputDevin Heitmueller
When debugging is enabled, also show the analog SNR and the total gain status values. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] xc5000: properly show quality register valuesDevin Heitmueller
The quality register only has relevant data in bits 2-0, so discard the other bits (which results in a value being printed that is consistent with the expected 0-7 range). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au0828: Make the s_reg and g_reg advanced debug calls work against ↵Devin Heitmueller
the bridge The g_reg and s_reg calls worked properly if acting on subdev registers (such as the au8522), but didn't work against the au0828 itself. Copy the logic over from em28xx. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au8522: properly recover from the au8522 delivering misaligned TS ↵Devin Heitmueller
streams There is an apparent bug in the au8522 TS clocking which can result in it delivering a TS payload to the au0828 that is shifted by some number of bits. For example, the device will announce a packet containing "FA 38 FF F8" which if you shift left one bit is "1F 47 1F FF F0..." This presents itself as no TS stream being delivered from the kernel to userland, since the kernel demux will drop every packet. In the event that this condition occurs, restart the DVB stream. Also, this patch includes a couple of lines of cleanup to not change the FIFO configuration while the FIFO is running (which can screw up the state machine), and dequeue the buffers before turning off the FIFO. This puts the logic in sync with the Windows driver. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au8522: Fix off-by-one in SNR table for QAM256Devin Heitmueller
The table of valid SNR values for QAM 256 is off by one, and as a result if the SNR is oscillating between 40.0 and 39.9 dB, tools like azap show it going back and forth between 40.0 and 0 (misleading some people, including myself, to think signal lock is being lost or there is a problem with register reads). Fix the table so that 40.0 dB is properly represented. Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] au8522: fix intermittent lockup of analog video decoderDevin Heitmueller
It turns up the autodetection for the video standard in the au8522 is prone to hanging the chip until a reset is performed. This condition is trivial to reproduce simply by tuning to a station and then rapidly unplugging/ replugging the coax feed. Because we've never claimed to support anything other than NTSC-M, just disable the video-standard autodetection logic and force it to always be NTSC-M. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] v4l2-dev: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
All drivers that needed V4L2_FL_LOCK_ALL_FOPS have been converted, so remove this flag altogether. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] mem2mem_testdev: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] vpif_capture: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] vpif_display: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] s5p-mfc: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] s5p-tv: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] s5p-g2d: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] s5p-jpeg: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] soc_camera: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] cx231xx: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] bfin_capture: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] sh_vou: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] mx2_emmaprp: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] vpbe_display: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] s2255drv: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] fsl-viu: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] wl128x: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] tm6000: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] em28xx: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] usbvision: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] cpia2: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] saa7146: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. I also removed some dead code in the form of the saa7146_devices list and saa7146_devices_lock mutex: these were used once but that was a long time ago. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-09[media] ivtv: remove V4L2_FL_LOCK_ALL_FOPSHans Verkuil
Add proper locking to the file operations, allowing for the removal of the V4L2_FL_LOCK_ALL_FOPS flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: Update copyrightMauro Carvalho Chehab
Update copyright comments after dvb-usb-v2 conversion. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: handle CI during suspend/resumeMauro Carvalho Chehab
The dvb-usb-v2 core doesn't know anything about CI. So, the driver needs to handle it by hand. This patch stops CI just before stopping URB's/RC, and restarts it before URB/RC start. It should be noticed that suspend/resume is not yet working properly, as the PM model requires the implementation of reset_resume: dvb_usb_az6007 1-6:1.0: no reset_resume for driver dvb_usb_az6007? But this is not implemented there at dvb-usb-v2 yet. Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: make all functions staticMauro Carvalho Chehab
There's no reason why those functions shouldn't be static. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: rename "st" to "state" at az6007_power_ctrl()Mauro Carvalho Chehab
On all other parts, this var is called state. So, use the same name here, to be consistent. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: Fix the number of parameters for QAM setupMauro Carvalho Chehab
Remove those warning messages: [ 121.696758] drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params: [ 121.703401] drxk: 02 00 00 00 10 00 07 00 03 02 .......... [ 121.703587] drxk: Warning -22 on QAMDemodulatorCommand Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: fix the I2C W+R logicMauro Carvalho Chehab
The test for I2C W+R will never be true. Fix it. Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] az6007: convert it to use dvb-usb-v2Mauro Carvalho Chehab
Change it to use dvb-usb-v2. The driver should be working as before. The only functional changes should be at the driver debug logs. This driver needs the cypress firmware load, so, auto-selects it. Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] dvb-usb-v2: Don't ask user to select Cypress firmware moduleMauro Carvalho Chehab
The dvb-usb-v2 cypress firmware module is not optional, as drivers won't work without it. So, instead of opening a menu for the user to manually select, let the drivers that need it to select, hiding this option from the Kconfig menu. Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] dvb-usb-v2: Fix cypress firmware compilationMauro Carvalho Chehab
ERROR: "usbv2_cypress_load_firmware" [drivers/media/dvb/dvb-usb-v2/dvb-usb-az6007.ko] undefined! Cypress fimware will never be compiled properly, as the Makefile rule is wrong. Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] media: i.MX27: Fix mx2_emmaprp mem2mem driver clocksJavier Martin
This driver wasn't converted to the new clock framework (e038ed50a4a767add205094c035b6943e7b30140). Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] m2m-deinterlace: fix two warningsMauro Carvalho Chehab
drivers/media/video/m2m-deinterlace.c: In function ‘deinterlace_issue_dma’: drivers/media/video/m2m-deinterlace.c:363:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat] drivers/media/video/m2m-deinterlace.c:363:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat] Cc: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] media: Add mem2mem deinterlacing driverJavier Martin
Some video decoders such as tvp5150 provide separate video fields (V4L2_FIELD_SEQ_TB/BT). This driver uses dmaengine to convert this format to V4L2_FIELD_INTERLACED_TB/BT (weaving) or V4L2_FIELD_NONE (line doubling) so that the image can be displayed or processed. Of course there will be combing effect in the image but this can be accepted for some low quality applications. Currently only YUV420 and YUYV formats are supported but it can be extended later. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-06[media] media: coda: Add driver for Coda video codecJavier Martin
Coda is a range of video codecs from Chips&Media that support H.264, H.263, MPEG4 and other video standards. Currently only support for the codadx6 included in the i.MX27 SoC is added. H.264 and MPEG4 video encoding are the only supported capabilities by now. [mchehab@redhat.com: Add missing include linux/of.h] Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Reviewed-by: Philipp Zabel<p.zabel@pengutronix.de> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-05[media] move dvb-usb-ids.h to dvb-coreMauro Carvalho Chehab
While this header were meant to be used just by dvb-usb driver, it is now being used also by dvb-usb-v2 and cx231xx. So, move it to a better place. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-04[media] dvb_usbv2: rename dvb_usb_firmware to cypress_firmwareAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-04[media] af9015: remote controller fixesAntti Palosaari
1) AF9015 remote controller query will fail rarely due to register access failures and dvb_usb_v2 will stop rc polling when error returned. Add logic to allow errors until two consecutive errors occurs. 2) Remote controller key map was not loaded in case of key map was set as a device property. Fix it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>