summaryrefslogtreecommitdiff
path: root/drivers/media/pci
AgeCommit message (Collapse)Author
2014-11-03[media] cx88: increase API command timeoutHans Verkuil
The timeout is way too small. Especially complicated command like CX2341X_ENC_STOP_CAPTURE takes much more time than 10 ms. Increase the timeout to 1 second, just as ivtv does (the cx88-blackbird has the same IP core for MPEG compression as ivtv). This solves a nasty issue where STOP_CAPTURE would timeout and the mailbox is left in a busy state, making it impossible to start streaming a second time without reloading the driver first. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: remove dependency on btcx-riscHans Verkuil
btcx-risc is for the bt8xx driver and other drivers shouldn't depend on it. There is no benefit to use that module just to do a pci_zalloc_consistent. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: drop cx88_free_bufferHans Verkuil
Remove this function. This makes all vb2 queues behave the same, which simplifies comparing the various vb2 queue op implementations. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: return proper errors during fw loadHans Verkuil
Don't return -1, return a proper error. Replace dprintk(0, ...) by pr_err since firmware load errors should just be reported as an error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: fix sparse warningHans Verkuil
drivers/media/pci/cx88/cx88-blackbird.c:476:25: warning: cast to restricted __le32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: convert to vb2Hans Verkuil
As usual, this patch is very large due to the fact that half a vb2 conversion isn't possible. And since this affects blackbird, alsa, core, dvb, vbi and video the changes are all over. What made this more difficult was the peculiar way the risc program was setup. The driver allowed for running out of buffers in which case the DMA would stop and restart when the next buffer was queued. There was also a complicated timeout system for when buffers weren't filled. This was replaced by a much simpler scheme where there is always one buffer around and the DMA will just cycle that buffer until a new buffer is queued. In that case the previous buffer will be chained to the new buffer. An interrupt is generated at the start of the new buffer telling the driver that the previous buffer can be passed on to userspace. Much simpler and more robust. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: drop videobuf abuse in cx88-alsaHans Verkuil
The alsa driver uses videobuf low-level functions that are not available in vb2, so replace them by driver-specific functions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: drop the bogus 'queue' list in dmaqueueHans Verkuil
This list is only used if the width, height and/or format of a buffer has changed, but that can never happen. Remove it and all associated code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx88: remove fmt from the buffer structHans Verkuil
This is a duplicate of dev->fmt and can be removed. As a consequence a lot of tests that check if the format has changed midstream can be removed as well: the format cannot change midstream, so this is a bogus check. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] cx23885: add IR for DVBSky T9580 Dual DVB-S2/T2/C PCIe cardnibble.max
DVBSky T9580 uses Integrated CX23885 IR controller to decode IR signal. The IR type of DVBSky remote control is RC5. Signed-off-by: Nibble Max <nibble.max@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] cx23855: add CI support for DVBSky T980COlli Salonen
Add CI support for DVBSky T980C card. The new host device independent CIMaX SP2 I2C driver was used to implement it. IRQ handling is not implemented at this point. It could be used to detect the CAM insertion/removal instantly. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] cx23885: add I2C client for CI into state and handle unregisteringOlli Salonen
If the CI chip has an I2C driver, we need to store I2C client into state. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] cx23855: add support for DVBSky T980C (no CI support)Olli Salonen
This patch adds basic support for DVBSky T980C card. CI interface is not supported. DVBSky T980C is a PCIe card with the following components: - CX23885 PCIe bridge - Si2168-A20 demodulator - Si2158-A20 tuner - CIMaX SP2 CI chip The demodulator and tuner need firmware. They're the same as used with TT CT2-4650 CI: https://www.mail-archive.com/linux-media@vger.kernel.org/msg78033.html Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24[media] tw68: remove bogus I2C_ALGOBIT dependencyHans Verkuil
tw68 doesn't use i2c at all, so remove this bogus dependency to prevent this warning: warning: (CAN_PEAK_PCIEC && SFC && IGB && VIDEO_TW68 && DRM && FB_DDC && FB_VIA) selects I2C_ALGOBIT which has unmet direct dependencies (I2C) CC [M] drivers/i2c/algos/i2c-algo-bit.o ../drivers/i2c/algos/i2c-algo-bit.c: In function 'i2c_bit_add_bus': ../drivers/i2c/algos/i2c-algo-bit.c:658:33: error: 'i2c_add_adapter' undeclared (first use in this function) ../drivers/i2c/algos/i2c-algo-bit.c:658:33: note: each undeclared identifier is reported only once for each function it appears in ../drivers/i2c/algos/i2c-algo-bit.c: In function 'i2c_bit_add_numbered_bus': ../drivers/i2c/algos/i2c-algo-bit.c:664:33: error: 'i2c_add_numbered_adapter' undeclared (first use in this function) ../drivers/i2c/algos/i2c-algo-bit.c: In function 'i2c_bit_add_bus': ../drivers/i2c/algos/i2c-algo-bit.c:659:1: warning: control reaches end of non-void function [-Wreturn-type] ../drivers/i2c/algos/i2c-algo-bit.c: In function 'i2c_bit_add_numbered_bus': ../drivers/i2c/algos/i2c-algo-bit.c:665:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24[media] tw68: remove deprecated IRQF_DISABLEDFabian Frederick
See include/linux/interrupt.h: "This flag is a NOOP and scheduled to be removed" Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21[media] cx23885: initialize config structs for T9580Olli Salonen
The config structs used for DVBSky T9580 were not initialized. This patch fixes that. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-28[media] pt3: fix DTV FE I2C driver load error pathsAntti Palosaari
Get rid of 'module_is_live' usage. on x86_64: when CONFIG_MODULES is not enabled: ../drivers/media/pci/pt3/pt3.c: In function 'pt3_attach_fe': ../drivers/media/pci/pt3/pt3.c:433:6: error: implicit declaration of function 'module_is_live' [-Werror=implicit-function-declaration] Reported-by: Randy Dunlap <rdunlap@infradead.org> Cc: Akihiro Tsukada <tskd08@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] pci drivers: use %zu instead of %zdMauro Carvalho Chehab
size_t is unsigned. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] cx88: remove return after BUG()Mauro Carvalho Chehab
As reported by smatch: drivers/media/pci/cx88/cx88-video.c:699 get_queue() info: ignoring unreachable code. drivers/media/pci/cx88/cx88-video.c:714 get_resource() info: ignoring unreachable code. drivers/media/pci/cx88/cx88-video.c:815 video_read() info: ignoring unreachable code. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] cx88: fix cards table CodingStyleMauro Carvalho Chehab
This is actually a coding style issue, but it was generating lots of smatch warnings: drivers/media/pci/cx88/cx88-cards.c:1513:37: warning: Initializer entry defined twice drivers/media/pci/cx88/cx88-cards.c:1517:19: also defined here drivers/media/pci/cx88/cx88-cards.c:1533:36: warning: Initializer entry defined twice drivers/media/pci/cx88/cx88-cards.c:1538:19: also defined here ... Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] saa7164-core: declare symbols as staticMauro Carvalho Chehab
Those symbols are used only at saa7164-core. drivers/media/pci/saa7164/saa7164-core.c:55:14: warning: symbol 'fw_debug' was not declared. Should it be static? drivers/media/pci/saa7164/saa7164-core.c:75:14: warning: symbol 'print_histogram' was not declared. Should it be static? drivers/media/pci/saa7164/saa7164-core.c:83:14: warning: symbol 'guard_checking' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] sta2x11_vip: fix address space castingMauro Carvalho Chehab
drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:1140:30: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:1140:30: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:1140:30: got void volatile [noderef] <asn:2>*iomem drivers/media/pci/sta2x11/sta2x11_vip.c:1184:30: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:1184:30: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:1184:30: got void volatile [noderef] <asn:2>*iomem drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: warning: incorrect type in argument 1 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:226:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: warning: incorrect type in argument 2 (different modifiers) drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: expected void [noderef] <asn:2>*<noident> drivers/media/pci/sta2x11/sta2x11_vip.c:221:38: got void volatile [noderef] <asn:2>* Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] cx23855: add support for DVBSky T9580 DVB-C/T2/S2 tunerOlli Salonen
DVBSky T9580 is a dual tuner card with one DVB-T2/C tuner and one DVB-S2 tuner. It contains the following components: - PCIe bridge: Conexant CX23885 - Demod for terrestrial/cable: Silicon Labs Si2168-A30 - Tuner for terrestrial/cable: Silicon Labs Si2158-A20 - Demod for sat: Montage DS3103 - Tuner for sat: Montage TS2022 This patch depends on Max Nibble's patch for m88ds3103 (see patchwork 25312: https://patchwork.linuxtv.org/patch/25312/ ). 3 firmwares are needed: - Si2168-A30 demod and Si2158-A20 tuner: same as TechnoTrend CT2-4400, https://www.mail-archive.com/linux-media@vger.kernel.org/msg76944.html - Montage DS3103 demod: same as PCTV 461e, Antti has it on his LinuxTV project page: http://palosaari.fi/linux/v4l-dvb/firmware/M88DS3103/ IR receiver is not supported. Values in cx23885_gpio_setup, cx23885_card_setup and dvbsky_t9580_set_voltage as well as the EEPROM read function are taken from the manufacturer provided semi-open source driver. The drivers in question are Linux GPL'd media tree drivers for cx23885 modified by Max Nibble (nibble.max@gmail.com) with proprietary tuner/demod drivers. Max is aware of this patch and has approved my use of the values in this patch. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] cx23855: add frontend set voltage function into stateOlli Salonen
Setting the LNB voltage requires setting some GPIOs on the cx23885 with some boards before calling the actual set_voltage function in the demod driver. Add a function pointer into state for that case. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] cx23885: add i2c client handling into dvb_unregister and stateOlli Salonen
Prepare cx23885 driver for handling I2C client that is needed for certain demodulators and tuners (for example Si2168 and Si2157). I2C client for tuner and demod stored in state and unregistering of the I2C devices added into dvb_unregister. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] pt3: make pt3_pm_ops() staticMauro Carvalho Chehab
drivers/media/pci/pt3/pt3.c:862:1: warning: symbol 'pt3_pm_ops' was not declared. Should it be static? Cc: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] pt3: add support for Earthsoft PT3 ISDB-S/T receiver cardAkihiro Tsukada
This patch adds support for PT3 PCIe cards. PT3 has an FPGA PCIe bridge chip, a TC90522 demod chip and a VA4M6JC2103 tuner module which contains two QM1D1C0042 chips for ISDB-S and two MxL301RF's for ISDB-T. It can receive and deliver 4 (2x ISDB-S, 2x ISDB-T) streams simultaneously, and a kthread is used per stream to poll incoming data, because PT3 does not have interrupts. As an antenna input for each delivery system is split in the tuner module and shared between the corresponding two tuner chips, LNB/LNA controls that the FPGA chip provides are (naturally) shared as well. The tuner chips also share the power line in the tuner module, which is controlled on/off by a GPIO pin of the demod chip. As with the demod chip and the ISDB-T tuner chip, the init sequences/register settings for those chips are not disclosed and stored in a private memory of the FPGA, PT3 driver executes the init of those chips on behalf of their drivers. Signed-off-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] saa7134: Remove unused status varMauro Carvalho Chehab
drivers/media/pci/saa7134/saa7134-go7007.c: In function ‘saa7134_go7007_interface_reset’: drivers/media/pci/saa7134/saa7134-go7007.c:147:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
2014-09-23[media] saa7134: Remove some casting warningsMauro Carvalho Chehab
drivers/media/pci/saa7134/saa7134-go7007.c:247:17: warning: incorrect type in argument 1 (different base types) drivers/media/pci/saa7134/saa7134-go7007.c:247:17: expected unsigned int [unsigned] val drivers/media/pci/saa7134/saa7134-go7007.c:247:17: got restricted __le32 [usertype] <noident> drivers/media/pci/saa7134/saa7134-go7007.c:252:17: warning: incorrect type in argument 1 (different base types) drivers/media/pci/saa7134/saa7134-go7007.c:252:17: expected unsigned int [unsigned] val drivers/media/pci/saa7134/saa7134-go7007.c:252:17: got restricted __le32 [usertype] <noident> drivers/media/pci/saa7134/saa7134-go7007.c:299:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/saa7134/saa7134-go7007.c:299:9: expected unsigned int [unsigned] val drivers/media/pci/saa7134/saa7134-go7007.c:299:9: got restricted __le32 [usertype] <noident> drivers/media/pci/saa7134/saa7134-go7007.c:300:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/saa7134/saa7134-go7007.c:300:9: expected unsigned int [unsigned] val drivers/media/pci/saa7134/saa7134-go7007.c:300:9: got restricted __le32 [usertype] <noident> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] saa7134: Fix compilation breakage when go7007 is not selectedMauro Carvalho Chehab
All error/warnings: drivers/built-in.o: In function `saa7134_go7007_fini': >> saa7134-go7007.c:(.text+0x3b628b): undefined reference to `go7007_snd_remove' drivers/built-in.o: In function `saa7134_go7007_interface_reset': >> saa7134-go7007.c:(.text+0x3b659a): undefined reference to `go7007_read_interrupt' drivers/built-in.o: In function `saa7134_go7007_init': >> saa7134-go7007.c:(.text+0x3b65fa): undefined reference to `go7007_alloc' >> saa7134-go7007.c:(.text+0x3b66ed): undefined reference to `go7007_boot_encoder' >> saa7134-go7007.c:(.text+0x3b66fe): undefined reference to `go7007_register_encoder' drivers/built-in.o: In function `saa7134_go7007_irq_ts_done': >> saa7134-go7007.c:(.text+0x3b6c2a): undefined reference to `go7007_parse_video_stream' >> saa7134-go7007.c:(.text+0x3b6c86): undefined reference to `go7007_parse_video_stream' This happens when: - VIDEO_SAA7134 is either 'm' or 'y' - VIDEO_GO7007 is not selected. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] saa7134: add saa7134-go7007Hans Verkuil
This patch adds support to saa7134 for 'WIS Voyager or compatible' PCI boards such as the Sensoray model 614 with which this patch was tested. It is a saa7134-based PCI board with a go7007 MPEG encoder. This was a patch when the go7007 was still in staging and was not applied when go7007 was moved to drivers/media since it needed more work. That work is now done and this last piece of go7007 support can now go in. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] saa7134: also capture the WSS signal for 50 Hz VBI captureHans Verkuil
The saa7134 driver missed capturing line 23 of the VBI area for the 50 Hz formats. Include that line in the VBI capture. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] cx23885: fix size helper functionsHans Verkuil
The norm_swidth function was unused and is dropped. It's not clear what the purpose of that function was. The norm_maxh function was changed so it tests for 60 Hz standards rather than for 50 Hz standards. The is the preferred order. The norm_maxw function was poorly written and used: it gives the maximum allowed line width for the given standard. For 60 Hz that's 720, but for 50 Hz that's 768 which allows for 768x576 which gives you square pixels. For 60 Hz formats it is 640x480 that gives square pixels, so there is no need to go beyond 720. The initial width was set using norm_maxh(), which was wrong. Just set to 720, that's what you normally use. Since the initial standard was NTSC anyway the initial width was always 720 anyway. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] cx23885: fix VBI supportHans Verkuil
Tested VBI support and discovered that the wrong offset was used. After this change it is now working. Verified with CC/XDS for NTSC and WSS/Teletext on PAL. It also reported the wrong start lines for the second field. That's now fixed as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21Merge remote-tracking branch 'linus/master' into patchworkMauro Carvalho Chehab
There are some patches that depends on media-v3.16-rc6. So, merge back from upstream before applying them. * linus/master: (1123 commits) drm/nouveau: ltc/gf100-: fix cbc issues on certain boards drm/bochs: add missing drm_connector_register call drm/cirrus: add missing drm_connector_register call staging: vt6655: buffer overflow in ioctl USB: storage: Add quirks for Entrega/Xircom USB to SCSI converters USB: storage: Add quirk for Ariston Technologies iConnect USB to SCSI adapter USB: storage: Add quirk for Adaptec USBConnect 2000 USB-to-SCSI Adapter USB: EHCI: unlink QHs even after the controller has stopped [SCSI] fix for bidi use after free [SCSI] fix regression that accidentally disabled block-based tcq [SCSI] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu drm/radeon: Fix typo 'addr' -> 'entry' in rs400_gart_set_page drm/nouveau/runpm: fix module unload drm/radeon/px: fix module unload vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops drm/radeon: don't reset dma on r6xx-evergreen init drm/radeon: don't reset sdma on CIK init drm/radeon: don't reset dma on NI/SI init drm/radeon/dpm: fix resume on mullins drm/radeon: Disable HDP flush before every CS again for < r600 ...
2014-09-08[media] tw68: drop bogus cpu_to_le32() callHans Verkuil
tw_writel maps to writel which maps to __raw_writel(__cpu_to_le32(b),addr). So tw_writel already calls cpu_to_le32 and it shouldn't be called again in the code. Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] tw68: simplify tw68_buffer_countHans Verkuil
The code to calculate the maximum number of buffers allowed in 4 MB is 1) wrong if PAGE_SIZE != 4096 and 2) unnecessarily complex. Fix and simplify the code. Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] cx23885: Add busy checks before changing formatsHans Verkuil
Before you can change the standard or the capture format, make sure the various vb2_queues aren't in use since you cannot change the buffer size from underneath a a busy vb2_queue. Also make sure that the return code of cx23885_set_tvnorm is returned correctly, otherwise the -EBUSY will be lost. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] cx23885: remove btcx-risc dependencyHans Verkuil
It's just as easy to do it in the driver. This dependency only uses a fraction of the btcx-risc module and doing it directly in the driver adds only a few lines. The btcx-risc module is really meant for the bttv driver, not for other drivers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] cx23885: fix field handlingHans Verkuil
Add missing SEQ_BT/TB support, bottom field is first for all 60 Hz formats, not just NTSC, restore an overwritten field value and initialize dev->field correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] cx23885: convert to vb2Hans Verkuil
As usual, this patch is very large due to the fact that half a vb2 conversion isn't possible. And since this affects 417, alsa, core, dvb, vbi and video the changes are all over. What made this more difficult was the peculiar way the risc program was setup. The driver allowed for running out of buffers in which case the DMA would stop and restart when the next buffer was queued. There was also a complicated timeout system for when buffers weren't filled. This was replaced by a much simpler scheme where there is always one buffer around and the DMA will just cycle that buffer until a new buffer is queued. In that case the previous buffer will be chained to the new buffer. An interrupt is generated at the start of the new buffer telling the driver that the previous buffer can be passed on to userspace. Much simpler and more robust. The old code seems to be copied from the cx88 driver. But it didn't fit the vb2 ops very well and replacing it with the new scheme made the code easier to understand. Not to mention that this patch removes 600 lines of code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] ngene: properly handle __user ptrMauro Carvalho Chehab
Sparse is complaining about ngene's bad usage of a __user ptr: >> drivers/media/pci/ngene/ngene-dvb.c:62:48: sparse: incorrect type in argument 2 (different address spaces) drivers/media/pci/ngene/ngene-dvb.c:62:48: expected unsigned char const [usertype] *buf drivers/media/pci/ngene/ngene-dvb.c:62:48: got char const [noderef] <asn:1>*buf As this is intercepting a .write() file ops, we can't just memcpy. We need to use copy_from_user. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04[media] tw68: make tw68_pci_tbl static and constifyMauro Carvalho Chehab
drivers/media/pci/tw68/tw68-core.c:72:22: warning: symbol 'tw68_pci_tbl' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04[media] tw68: refactor and cleanup the tw68 driverHans Verkuil
Refactor and clean up the tw68 driver. It's now using the proper V4L2 core frameworks. Tested with my Techwell tw6805a and tw6816 grabber boards. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04[media] tw68: add original tw68 codeHans Verkuil
This tw68 driver has been out-of-tree for many years on gitorious: https://gitorious.org/tw68/tw68-v2. This copies that code to the kernel as a record of that original code. Note that William Brack's email address in these sources is no longer valid and I have not been able to contact him. However, all the code is standard GPL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] saa7164: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] bt8xx: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] lm3560: simplify a boolean testMauro Carvalho Chehab
lml33dpatch is boolean. So, the possible values are true or false. Instead of using if (lml33dpath), just use if (!lml33dpath). That allows a faster mental parsing when analyzing the code. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] bttv-driver: remove an uneeded semicolonMauro Carvalho Chehab
We don't use semicolons after curly braces in the middle of the code. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] cx18: fix sparse warningsHans Verkuil
/home/hans/work/build/media-git/drivers/media/pci/cx18/cx18-firmware.c:169:32: warning: cast to restricted __le32 /home/hans/work/build/media-git/drivers/media/pci/cx18/cx18-firmware.c:170:32: warning: cast to restricted __le32 /home/hans/work/build/media-git/drivers/media/pci/cx18/cx18-firmware.c:171:31: warning: cast to restricted __le32 /home/hans/work/build/media-git/drivers/media/pci/cx18/cx18-firmware.c:172:31: warning: cast to restricted __le32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>