summaryrefslogtreecommitdiff
path: root/drivers/media/usb
AgeCommit message (Collapse)Author
2013-06-22Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Another set of fixes for Kernel 3.10. This series contain: - two Kbuild fixes for randconfig - a buffer overflow when using rtl28xuu with r820t tuner - one clk fixup on exynos4-is driver" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] Fix build when drivers are builtin and frontend modules [media] s5p makefiles: don't override other selections on obj-[ym] [media] exynos4-is: Fix FIMC-IS clocks initialization [media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner
2013-06-18Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Series of fixes for 3.10. There are some usual driver fixes (mostly on s5p/exynos playform drivers), plus some fixes at V4L2 core" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits) [media] soc_camera: error dev remove and v4l2 call [media] sh_veu: fix the buffer size calculation [media] sh_veu: keep power supply until the m2m context is released [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted [media] v4l2-ioctl: don't print the clips list [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls [media] cx88: fix NULL pointer dereference [media] DocBook/media/v4l: update version number [media] exynos4-is: Remove "sysreg" clock handling [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded [media] s5p-mfc: Add NULL check for allocated buffer [media] s5p-mfc: added missing end-of-lines in debug messages [media] s5p-mfc: v4l2 controls setup routine moved to initialization code [media] s5p-mfc: separate encoder parameters for h264 and mpeg4 [media] s5p-mfc: Remove special clock usage in driver [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function [media] v4l2: mem2mem: save irq flags correctly [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support ...
2013-06-17[media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tunerGianluca Gennari
As suggested by Antti, this patch replaces: https://patchwork.kernel.org/patch/2649861/ The buffer overflow is fixed by reading only the r820t ID register. Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-07[media] gspca-sonixb: Adjust hstart on sn9c103 + pas202Hans de Goede
For some unknown reason we need to increase hstart by 1 on when using the PAS202 on the sn9c103 (versus on the sn9c102), otherwise we get the wrong colors, due to shifting of the bayer pattern. Reported-by: Patrizio Bassi <patrizio.bassi@gmail.com> Tested-by: Patrizio Bassi <patrizio.bassi@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-07[media] pwc: Fix comment wrt lock orderingHans de Goede
With all the changes to handle the locking in the v4l2-core rather then at the driver level, the order in which the 2 pwc locks need to be taken has changed, update the comment in the header file to correctly reflect this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-30Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media update from Mauro Carvalho Chehab: - OF documentation and patches at core and drivers, to be used by for embedded media systems - some I2C drivers used on go7007 were rewritten/promoted from staging: sony-btf-mpx, tw2804, tw9903, tw9906, wis-ov7640, wis-uda1342 - add fimc-is driver (Exynos) - add a new radio driver: radio-si476x - add a two new tuners: r820t and tuner_it913x - split camera code on em28xx driver and add more models - the cypress firmware load is used outside dvb usb drivers. So, move it to a common directory to make easier to re-use it - siano media driver updated to work with sms2270 devices - several work done in order to promote go7007 and solo6x1x out of staging (still, there are some pending issues) - several API compliance fixes at v4l2 drivers that don't behave as expected - as usual, lots of driver fixes, improvements, cleanups and new device addition at the existing drivers. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (831 commits) [media] cx88: make core less verbose [media] em28xx: fix oops at em28xx_dvb_bus_ctrl() [media] s5c73m3: fix indentation of the help section in Kconfig [media] cx25821-alsa: get rid of a __must_check warning [media] cx25821-video: declare cx25821_vidioc_s_std as static [media] cx25821-video: remove maxw from cx25821_vidioc_try_fmt_vid_cap [media] r820t: Remove a warning for an unused value [media] dib0090: Fix a warning at dib0090_set_EFUSE [media] dib8000: fix a warning [media] dib8000: Fix sub-channel range [media] dib8000: store dtv_property_cache in a temp var [media] dib8000: warning fix: declare internal functions as static [media] r820t: quiet gcc warning on n_ring [media] r820t: memory leak in release() [media] r820t: precendence bug in r820t_xtal_check() [media] videodev2.h: Remove the unused old V4L1 buffer types [media] anysee: Grammar s/report the/report to/ [media] anysee: Initialize ret = 0 in anysee_frontend_attach() [media] media: videobuf2: fix the length check for mmap [media] em28xx: save isoc endpoint number for DVB only if endpoint has alt settings with xMaxPacketSize != 0 ...
2013-04-28[media] em28xx: fix oops at em28xx_dvb_bus_ctrl()Mauro Carvalho Chehab
em28xx is oopsing with some DVB devices: [10856.061884] general protection fault: 0000 [#1] SMP [10856.067041] Modules linked in: rc_hauppauge em28xx_rc xc5000 drxk em28xx_dvb dvb_core em28xx videobuf2_vmalloc videobuf2_memops videobuf2_core rc_pixelview_new tuner_xc2028 tuner cx8800 cx88xx tveeprom btcx_risc videobuf_dma_sg videobuf_core rc_core v4l2_common videodev ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_CHECKSUM be2iscsi iscsi_boot_sysfs iptable_mangle bnx2i cnic uio cxgb4i cxgb4 tun bridge cxgb3i cxgb3 stp ip6t_REJECT mdio libcxgbi nf_conntrack_ipv6 llc nf_defrag_ipv6 ib_iser rdma_cm ib_addr xt_conntrack iw_cm ib_cm ib_sa nf_conntrack ib_mad ib_core bnep bluetooth iscsi_tcp libiscsi_tcp ip6table_filter libiscsi ip6_tables scsi_transport_iscsi xfs libcrc32c snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm tg3 snd_page_alloc snd_timer [10856.139176] snd ptp iTCO_wdt soundcore pps_core iTCO_vendor_support lpc_ich mfd_core coretemp nfsd hp_wmi crc32c_intel microcode serio_raw rfkill sparse_keymap nfs_acl lockd sunrpc kvm_intel kvm uinput binfmt_misc firewire_ohci nouveau mxm_wmi i2c_algo_bit drm_kms_helper firewire_core crc_itu_t ttm drm i2c_core wmi [last unloaded: dib0070] [10856.168969] CPU 1 [10856.170799] Pid: 13606, comm: dvbv5-zap Not tainted 3.9.0-rc5+ #26 Hewlett-Packard HP Z400 Workstation/0AE4h [10856.181187] RIP: 0010:[<ffffffffa0459e47>] [<ffffffffa0459e47>] em28xx_write_regs_req+0x37/0x1c0 [em28xx] [10856.191028] RSP: 0018:ffff880118401a58 EFLAGS: 00010282 [10856.196533] RAX: 00020000012d0000 RBX: ffff88010804aec8 RCX: ffff880118401b14 [10856.203852] RDX: 0000000000000048 RSI: 0000000000000000 RDI: ffff88010804aec8 [10856.211174] RBP: ffff880118401ac8 R08: 0000000000000001 R09: 0000000000000000 [10856.218496] R10: 0000000000000000 R11: 0000000000000006 R12: 0000000000000048 [10856.226026] R13: ffff880118401b14 R14: ffff88011752b258 R15: ffff88011752b258 [10856.233352] FS: 00007f26636d2740(0000) GS:ffff88011fc20000(0000) knlGS:0000000000000000 [10856.241626] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [10856.247565] CR2: 00007f2663716e20 CR3: 00000000c7eb1000 CR4: 00000000000007e0 [10856.254889] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [10856.262215] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [10856.269542] Process dvbv5-zap (pid: 13606, threadinfo ffff880118400000, task ffff8800cd625d40) [10856.278340] Stack: [10856.280564] ffff88011ffe8de8 0000000000000002 0000000000000000 ffff88011ffe9b00 [10856.288191] ffff880118401b14 00ff88011ffe9b08 ffff880100000048 ffffffff8112a52a [10856.295893] 0000000000000001 ffff88010804aec8 0000000000000048 ffff880118401b14 [10856.303521] Call Trace: [10856.306182] [<ffffffff8112a52a>] ? __alloc_pages_nodemask+0x15a/0x960 [10856.312912] [<ffffffffa045a002>] em28xx_write_regs+0x32/0xa0 [em28xx] [10856.319638] [<ffffffffa045a221>] em28xx_write_reg+0x21/0x30 [em28xx] [10856.326279] [<ffffffffa045a2cc>] em28xx_gpio_set+0x9c/0x100 [em28xx] [10856.332919] [<ffffffffa045a3ac>] em28xx_set_mode+0x7c/0x80 [em28xx] [10856.339472] [<ffffffffa03ef032>] em28xx_dvb_bus_ctrl+0x32/0x40 [em28xx_dvb] This is caused by commit c7a45e5b4f8c2f96cd242ae1b1c06e7fb19a08d0, that added support for two I2C buses. A partial fix was applied at 3de09fbbfaa521e68675bd30cfece252c4856600, but it doesn't cover all cases, as the DVB core fills fe->dvb->priv with adapter->priv. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25Merge branch 'topic/r820t' into patchworkMauro Carvalho Chehab
* topic/r820t: (31 commits) [media] r820t: Don't divide the IF by two [media] r820t: disable auto gain/VGA setting [media] rtl2832: Fix IF calculus [media] r820t: put it into automatic gain mode [media] r820t: Fix hp_cor filter mask [media] r820t: fix PLL calculus [media] r820t: Don't put it in standby if not initialized yet [media] r820t: avoid rewrite all regs when not needed [media] r820t: Allow disabling IMR callibration [media] r820t: add a commented code for GPIO [media] r820t: add IMR calibrate code [media] r820t: proper initialize the PLL register [media] r820t: use usleep_range() [media] r820t: fix prefix of the r820t_read() function [media] r820t: split the function that read cached regs [media] r820t: better report signal strength [media] r820t: add support for diplexer [media] r820t: Show the read data in the bit-reversed order [media] r820t: use the second table for 7MHz [media] r820t: Invert bits for read ops ...
2013-04-25[media] anysee: Grammar s/report the/report to/Geert Uytterhoeven
[mchehab@redhat.com: Fix a merge conflict] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] anysee: Initialize ret = 0 in anysee_frontend_attach()Geert Uytterhoeven
drivers/media/usb/dvb-usb-v2/anysee.c: In function ‘anysee_frontend_attach’: drivers/media/usb/dvb-usb-v2/anysee.c:641: warning: ‘ret’ may be used uninitialized in this function And gcc is right (see the ANYSEE_HW_507T case), so initialize ret to zero to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] em28xx: save isoc endpoint number for DVB only if endpoint has alt ↵Frank Schaefer
settings with xMaxPacketSize != 0 X-Patchwork-Delegate: mchehab@redhat.com In addition to commit 72cc9ba3 "em28xx: ignore isoc DVB USB endpoints with wMaxPacketSize = 0 bytes for all alt settings" we should not save the endpoint number of the isoc DVB endpoint before it has been validated. While the current code works fine, dev->dvb_ep_isoc != 0 could be interpreted as indicator that the device provides DVB support. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] dib7090p: improve the support of the dib7090 and dib7790Olivier Grenie
The intend of this patch is to improve the support of the dib7090 and dib7790. The AGC1 min value is set to 32768 by default. The actual AGC1 min and the external attenuation are controled depending on the received RF level. Signed-off-by: Olivier Grenie <olivier.grenie@parrot.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@parrot.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] dib7090p: remove the support for the dib7090EOlivier Grenie
The intend of this patch is to remove the support for the dib7090E. The DiB7090E-package has never left prototype state and never made it to mass-prod-state. Signed-off-by: Olivier Grenie <olivier.grenie@parrot.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@parrot.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] dib8096: enhancementOlivier Grenie
The intend of this patch is to improve the support of the dib8096. The PLL parameters are not automatically computed. The limit to set/unset external diode for attenuation has been updated. The TFE8096P board is using the new I2C API. Signed-off-by: Olivier Grenie <olivier.grenie@parrot.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@parrot.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] dib8000: enhancementPatrick Boettcher
The intend of this patch is to improve the support of the dib8000. Signed-off-by: Olivier Grenie <olivier.grenie@parrot.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@parrot.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22[media] em28xx: add a missing le16_to_cpu conversionFrank Schaefer
commit 61ff5d69 "em28xx: improve em2710/em2820 distinction" missed the le16_to_cpu conversion of the USB vendor ID. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-17[media] rtl28xxu: use r820t to obtain the signal strengthMauro Carvalho Chehab
Now that we can get the strength from r820t, use it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
2013-04-17[media] rtl28xxu: add support for Rafael Micro r820tMauro Carvalho Chehab
This tuner is used on some rtl2882 dongles. Add it to the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Antti Palosaari <crope@iki.fi>
2013-04-16[media] it913x: rename its tuner driver to tuner_it913xMauro Carvalho Chehab
There are three drivers with *it913x name on it, and they all belong to the same device: a tuner, at it913x.c; a frontend: it913x-fe.c; a bridge: it913x.c, renamed to dvb_usb_it913x by the building system. This is confusing. Even more confusing are the two .c files with the same name under different directories, with different contents and different functions. So, prepend the tuner one. This also breaks the out-of-tree compilation system. Reported-by: Frederic Fays <frederic.fays@gmail.com> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] em28xx: Put remaining .vidioc_g_chip_info instance under ADV_DEBUGMichal Marek
Commit cd634f1 ("[media] v4l2: put VIDIOC_DBG_G_CHIP_NAME under ADV_DEBUG") missed the initializer of radio_ioctl_ops: drivers/media/usb/em28xx/em28xx-video.c:1830:2: error: unknown field 'vidioc_g_chip_info' specified in initializer drivers/media/usb/em28xx/em28xx-video.c:1830:26: error: 'vidioc_g_chip_info' undeclared here (not in a function) Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-15[media] em28xx: map remote for 1b80:e425Antti Palosaari
Map RC_MAP_REDDO to that device. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] em28xx: improve em2710/em2820 distinctionFrank Schaefer
Chip id 18 is used by the em2710 and em2820. The current code assumes that if the device is a camera, the chip is an em2710 and an em2820 otherwise. But it turned out that the em2820 is also used in camera devices. "Silvercrest 1.3 MPix" webcams for example are available with both chips. Fortunately both variants are using different generic USD IDs which give us a hint about the used chip. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] em28xx: fix snapshot button supportFrank Schaefer
The snapshot button support is currently broken, because module em28xx-rc is loaded only if the device has remote control support. Fix it by also loading this module if the device has a snapshot button. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: allow g/s/enum/querystd when in legacy modeHans Verkuil
Both MythTV and gstreamer expect that they can set/get/query/enumerate the standards, even if the input is the component input for which standards really do not apply. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: add dv_timings supportHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: add g/querystd, remove deprecated current_normHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: recognize firmware version 0x1eHans Verkuil
This is the latest firmware version and - it seems - the most reliable. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: register the video node at the end of probeHans Verkuil
Video nodes can be used at once after registration, so make sure the full initialization is done before registering them. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: small fixesHans Verkuil
- return EBUSY instead of EAGAIN. - add missing break. - remove unnecessary buf type check (done by the core). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: support device_caps in querycapHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: add prio and control event supportHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: remove hdpvr_fh and just use v4l2_fhHans Verkuil
This prepares the driver for priority and control event handling. This patch also checks for correct streaming ownership and it makes a small improvement to the encoder_cmd ioctls: always zero 'flags' and drop the memset of 'raw' as that is already done by the v4l2 core. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] hdpvr: convert to the control frameworkHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] em28xx: fix kernel oops when watching digital TVHans Verkuil
dvb->adapter.priv should also be set to the i2c bus since that's what em28xx_tuner_callback expects. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] v4l2: rename VIDIOC_DBG_G_CHIP_NAME to _CHIP_INFOHans Verkuil
This ioctl will be extended to return more information than just the name. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14[media] v4l2: put VIDIOC_DBG_G_CHIP_NAME under ADV_DEBUGHans Verkuil
Only enable this ioctl if the VIDEO_ADV_DEBUG config option is set. This prevents abuse from both userspace and kernelspace (some bridge drivers abuse DBG_G_CHIP_IDENT, lets prevent that from happening again with this ioctl). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08[media] demux.h: Remove duplicated enumMauro Carvalho Chehab
"enum dmx_ts_pes" and "typedef enum dmx_pes_type_t" are just the same enum declared twice, since Kernel (2.6.12). There's no reason to duplicate it there, and sparse complains about that: drivers/media/dvb-core/dmxdev.c:600:55: warning: mixing different enum types So, remove the internal define, keeping just the external one. Internally, use only "enum dmx_ts_pes", as it is too late to drop dmx_pes_type_t from the userspace API. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] m920x: Fix uninitialized variable warningJean Delvare
drivers/media/usb/dvb-usb/m920x.c:91:6: warning: "ret" may be used uninitialized in this function [-Wuninitialized] drivers/media/usb/dvb-usb/m920x.c:70:6: note: "ret" was declared here This is real, if a remote control has an empty initialization sequence we would get success or failure randomly. OTOH the initialization of ret in m920x_init is needless, the function returns with an error as soon as an error happens, so the last return can only be a success and we can hard-code 0 there. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-31[media] em28xx: fix typo in scale_to_size()Hans Verkuil
em28xx: fix typo in scale_to_size(). The second hscale should be vscale. This bug caused xawtv to fail because it cannot find a workable image size. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] media: move dvb-usb-v2/cypress_firmware.c to media/commonHans Verkuil
Loading the cypress firmware is not dvb specific and should be common functionality. Move the source to media/common and make it a standalone module. As a result we can remove the dependency on dvb-usb in go7007, which has nothing to do with dvb. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] gspca: remove obsolete Kconfig macrosPaul Bolle
The et61x251 driver was removed in v3.5. Remove the last references to its Kconfig macro now. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: add basic support for OmniVision OV2640 sensorsFrank Schaefer
This sensor is used by the "SpeedLink Vicious And Devine Laplace webcam" and others. It supports resolutions up to 1600x1200 (at 7-8 fps), but for resolutions higher than 640x480, further driver changes will be necessary, such as sensor output resolution switching (including further configuration changes), bridge xclk adjustment and disabling of 16 bit (12 bit) output formats at high resolutions. Image quality should also needs to be improved. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: add comment about Samsung and Kodak sensor probing addressesFrank Schaefer
The Windows driver also probes at least two further i2c addresses (0x22 >> 1 and 0x66 >> 1). I've got some hints that they are very likely used by Samsung and Kodak sensors, which are known to be used in Empia devices, too. We havn't seen any devices using these sensors yet and don't know how to probe them properly, so leave a comment. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: add probing procedure for OmniVision sensorsFrank Schaefer
OmniVision sensors are used as well in Empiatech based cameras such as the "SpeedLink Vicious And Devine Laplace" webcam (EM2765 + Omnivision OV2640). With this patch applied, OminiVision sensors with 8 bit address and register width are detected (recent models have a 16 bit address width and use different client addresses). The most commonly used sensors (including the ones listed by Empiatech) are detected properly, although there is no support for them yet. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: move the probing of Micron sensors to a separate functionFrank Schaefer
Other sensors like the ones from OmniVision need a different probing procedure, so it makes sense have separate functions for each manufacturer/sensor type. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: detect further Micron sensorsFrank Schaefer
Add further Micron chip IDs to be able to identify all Micron sensors listed by Empiatech. Also probe the two alternate i2c addresses used by Micron sensors with 8 bit address and 16 bit register width. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: move sensor code to a separate source code file em28xx-camera.cFrank Schaefer
em28xx-cards.c is very large and the sensor/camera related code is growing, so move this code to a separate source code file em28xx-camera.c. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: rename em28xx_hint_sensor() to em28xx_detect_sensor()Frank Schaefer
Now that the board hints and the sensor initialization/configuration have been separated, em28xx_detect_sensor() is the better name for this function. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: separate sensor detection and initialization/configurationFrank Schaefer
Sensor detection and initialization/configuration are currently mixed together. This works as long as all devices with a particular sensor are working with the same board configuration. In the long run, this will be not sufficient, so separate these both steps to make the code more flexible and future proof. This also makes the code more consistent, because the initialization of the MT9V011 sensor subdevice is already separated. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29[media] em28xx: fix and separate the board hints for sensor devicesFrank Schaefer
The current board hint code is mixed together with the sensor detection and initialization code. It actually selects a board depending on the detected sensor type only, with the result that 3 of the 6 webcam boards are currently dead. Separate it and move it to em28xx_hint_board() which already contains the board hints for analog capturing+TV and DVB devices. This way, we have all board hints at a common place which makes it easier to extend the code and reduces the risk of regressions. It also makes it possible again to use the boards EM2750_BOARD_DLCW_130, EM2820_BOARD_VIDEOLOGY_20K14XUSB and EM2860_BOARD_NETGMBH_CAM (using the module parameter "card"). NOTE: the current board hint logic for webcams is preserved. Not more not less. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>