summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx
Commit message (Collapse)AuthorAgeFilesLines
* media: em28xx: fix spelling mistake, "Cinnergy" -> "Cinergy"Colin Ian King2018-12-031-1/+1
| | | | | | | | Fix name of the Hybrid T USB XS em28xx card, should be Cinergy. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* Merge tag 'media/v4.20-1' of ↵Linus Torvalds2018-10-295-39/+145
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new dvb frontend driver: lnbh29 - new sensor drivers: imx319 and imx 355 - some old soc_camera driver renames to avoid conflict with new drivers - new i.MX Pixel Pipeline (PXP) mem-to-mem platform driver - a new V4L2 frontend for the FWHT codec - several other improvements, bug fixes, code cleanups, etc * tag 'media/v4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (289 commits) media: rename soc_camera I2C drivers media: cec: forgot to cancel delayed work media: vivid: Support 480p for webcam capture media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD media: vivid: Add 16-bit bayer to format list media: v4l2-tpg-core: Add 16-bit bayer media: pvrusb2: replace `printk` with `pr_*` media: venus: vdec: fix decoded data size media: cx231xx: fix potential sign-extension overflow on large shift media: dt-bindings: media: rcar_vin: add device tree support for r8a7744 media: isif: fix a NULL pointer dereference bug media: exynos4-is: make const array config_ids static media: cx23885: make const array addr_list static media: ivtv: make const array addr_list static media: bttv-input: make const array addr_list static media: cx18: Don't check for address of video_dev media: dw9807-vcm: Fix probe error handling media: dw9714: Remove useless error message media: dw9714: Fix error handling in probe function media: cec: name for RC passthrough device does not need 'RC for' ...
| * media: em28xx: make v4l2-compliance happier by starting sequence on zeroMauro Carvalho Chehab2018-09-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v4l2-compliance tool complains if a video doesn't start with a zero sequence number. While this shouldn't cause any real problem for apps, let's make it happier, in order to better check the v4l2-compliance differences before and after patchsets. This is actually an old issue. It is there since at least its videobuf2 conversion, e. g. changeset 3829fadc461 ("[media] em28xx: convert to videobuf2"), if VB1 wouldn't suffer from the same issue. Cc: stable@vger.kernel.org Fixes: d3829fadc461 ("[media] em28xx: convert to videobuf2") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * media: em28xx: fix input name for Terratec AV 350Mauro Carvalho Chehab2018-09-171-2/+2
| | | | | | | | | | | | | | | | | | Instead of using a register value, use an AMUX name, as otherwise VIDIOC_G_AUDIO would fail. Cc: stable@vger.kernel.org Fixes: 766ed64de554 ("V4L/DVB (11827): Add support for Terratec Grabster AV350") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * media: em28xx: use a default format if TRY_FMT failsMauro Carvalho Chehab2018-09-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Follow the V4L2 spec, as warned by v4l2-compliance: warn: v4l2-test-formats.cpp(732): TRY_FMT cannot handle an invalid pixelformat. warn: v4l2-test-formats.cpp(733): This may or may not be a problem. For more information see: warn: v4l2-test-formats.cpp(734): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html Cc: stable@vger.kernel.org Fixes: bddcf63313c6 ("V4L/DVB (9927): em28xx: use a more standard way to specify video formats") Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * media: em28xx: fix handler for vidioc_s_input()Mauro Carvalho Chehab2018-09-173-9/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The a->index is not the name of the internal amux entry, but, instead a value from zero to the maximum number of audio inputs. As the actual available inputs depend on each board, build it dynamically. This is broken for a really long time. On a quick check, since at least commit 195a4ef627e1 ("V4L/DVB (6585): Convert em28xx to video_ioctl2") this was not implemented right. Fixes: 195a4ef627e1 ("V4L/DVB (6585): Convert em28xx to video_ioctl2") Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * media: em28xx-audio: use GFP_KERNEL for memory allocation during initSebastian Andrzej Siewior2018-09-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | As far as I can tell em28xx_audio_urb_init() is called once during initialization from non atomic context. Memory allocation from non atomic context should use GFP_KERNEL to avoid using emergency pool for memory allocation. Use GFP_KERNEL for memory allocation. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * media: replace strcpy() by strscpy()Mauro Carvalho Chehab2018-09-113-16/+17
| | | | | | | | | | | | | | | | | | The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
| * media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab2018-09-111-5/+5
| | | | | | | | | | | | | | | | | | | | | | The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx-audio: use irqsave() in USB's complete callbackSebastian Andrzej Siewior2018-09-102-4/+6
|/ | | | | | | | | | | | | | | The USB completion callback does not disable interrupts while acquiring the lock. We want to remove the local_irq_disable() invocation from __usb_hcd_giveback_urb() and therefore it is required for the callback handler to disable the interrupts while acquiring the lock. The callback may be invoked either in IRQ or BH context depending on the USB host controller. Use the _irqsave() variant of the locking primitives. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* media: usb: em28xx: Replace mdelay() with msleep() in em28xx_pre_card_setup()Jia-Ju Bai2018-08-021-10/+10
| | | | | | | | | | | em28xx_pre_card_setup() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: usb: em28xx: Replace GFP_ATOMIC with GFP_KERNEL in em28xx_init_usb_xfer()Jia-Ju Bai2018-08-021-1/+1
| | | | | | | | | | | em28xx_init_usb_xfer() is never called in atomic context. It calls usb_submit_urb() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC can be replaced with GFP_KERNEL. This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: disable null packet filter for WinTVdualHDRobert Schlabbach2018-07-301-1/+1
| | | | | | | | | | | | | This patch disables the null packet filter for the Hauppauge WinTV-dualHD. There are applications which require the unfiltered transport stream (e.g. DOCSIS segment load analyzers). Tests showed that the device is capable of delivering two unfiltered EuroDOCSIS 3.0 transport streams simultaneously, i.e. over 100 Mbit/s worth of data, without any losses. Signed-off-by: Robert Schlabbach <Robert.Schlabbach@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: explicitly disable TS packet filterRobert Schlabbach2018-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | The em28xx driver never touched the EM2874 register bits that control the transport stream packet filters, leaving them at whatever default the firmware has set. E.g. the Pinnacle 290e disables them by default, while the Hauppauge WinTV dualHD enables discarding NULL packets by default. However, some applications require NULL packets, e.g. to determine the load in DOCSIS segments, so discarding NULL packets is undesired for such applications. This patch simply extends the bit mask when starting or stopping the transport stream packet capture, so that the filter bits are cleared. It has been verified that this makes the Hauppauge WinTV dualHD pass an unfiltered DVB-C stream including NULL packets, which it didn't before. Signed-off-by: Robert Schlabbach <Robert.Schlabbach@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx-cards: disable V4L2 mode for dual tunersMauro Carvalho Chehab2018-07-271-0/+11
| | | | | | | | | | | | | Right now, the code that calculates alternate modes is not ready for devices with dual tuners. That's ok, as we currently don't have any such devices, but better to add a warning for such case, as, if anyone adds such device, the logic will need to be reviewed. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Brad Love <brad@nextdimension.cc> Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: Remove duplicate PIDBrad Love2018-07-271-2/+0
| | | | | | | | | | Half-revert: commit 5b1a270d224b ("media: dvb: add alternative USB PID for Hauppauge WinTV-soloHD")' The PID already exists on the line above. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Michael Ira Krufky <mkrufky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: Fix DualHD disconnect oopsBrad Love2018-07-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the duplication of em28xx state for the second tuner pair a pointer to alt_max_pkt_size_isoc is copied. During tear down the second tuner is destroyed first and kfrees alt_max_pkt_size_isoc, then the first tuner is destroyed and kfrees it again. The property should only be kfree'd if the tuner is PRIMARY_TS. [ 354.888560] ------------[ cut here ]------------ [ 354.888562] kernel BUG at mm/slub.c:296! [ 354.888574] invalid opcode: 0000 [#1] SMP NOPTI [ 354.888869] CPU: 1 PID: 19 Comm: kworker/1:0 Not tainted 4.18.0-rc1+ #20 [ 354.889140] Hardware name: MSI MS-7A39/B350M GAMING PRO (MS-7A39), BIOS 2.G0 04/27/2018 [ 354.889408] Workqueue: usb_hub_wq hub_event [ 354.889679] RIP: 0010:__slab_free+0x217/0x370 [ 354.889942] Code: bb c0 e8 07 41 38 c7 72 39 48 83 c4 70 5b 41 5a 41 5c 41 5d 41 5e 41 5f 5d 49 8d 62 f8 c3 f3 90 49 8b 04 24 a8 01 75 f6 eb 82 <0f> 0b 44 89 45 80 48 89 4d 88 e8 aa fa ff ff 85 c0 74 cc e9 b7 fe [ 354.890598] RSP: 0018:ffffb84c41a4fad0 EFLAGS: 00010246 [ 354.890934] RAX: ffff948646e85150 RBX: ffff948646e85150 RCX: ffff948646e85150 [ 354.891280] RDX: 00000000820001d9 RSI: fffffa8fd01ba140 RDI: ffff94865e807c00 [ 354.891649] RBP: ffffb84c41a4fb70 R08: 0000000000000001 R09: ffffffffc059ce21 [ 354.892025] R10: ffff948646e85150 R11: 0000000000000001 R12: fffffa8fd01ba140 [ 354.892403] R13: ffff948646e85150 R14: ffff94865e807c00 R15: ffff94864c92e0a0 [ 354.892780] FS: 0000000000000000(0000) GS:ffff94865ec40000(0000) knlGS:0000000000000000 [ 354.893150] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 354.893530] CR2: 00007f4e476da950 CR3: 000000040112c000 CR4: 00000000003406e0 [ 354.893917] Call Trace: [ 354.894315] ? __dev_printk+0x3c/0x80 [ 354.894695] ? _dev_info+0x64/0x80 [ 354.895082] ? em28xx_free_device+0x41/0x50 [em28xx] [ 354.895464] kfree+0x17a/0x190 [ 354.895852] ? kfree+0x17a/0x190 [ 354.896310] em28xx_free_device+0x41/0x50 [em28xx] [ 354.896698] em28xx_usb_disconnect+0xfa/0x110 [em28xx] [ 354.897083] usb_unbind_interface+0x7a/0x270 [ 354.897475] device_release_driver_internal+0x17c/0x250 [ 354.897864] device_release_driver+0x12/0x20 [ 354.898252] bus_remove_device+0xec/0x160 [ 354.898639] device_del+0x13d/0x320 [ 354.899018] ? usb_remove_ep_devs+0x1f/0x30 [ 354.899392] usb_disable_device+0x9e/0x270 [ 354.899772] usb_disconnect+0x92/0x2a0 [ 354.900149] hub_event+0x98e/0x1650 [ 354.900519] ? sched_clock_cpu+0x11/0xa0 [ 354.900890] process_one_work+0x167/0x3f0 [ 354.901251] worker_thread+0x4d/0x460 [ 354.901610] kthread+0x105/0x140 [ 354.901964] ? rescuer_thread+0x360/0x360 [ 354.902318] ? kthread_associate_blkcg+0xa0/0xa0 [ 354.902672] ret_from_fork+0x22/0x40 [ 354.903024] Modules linked in: rc_hauppauge em28xx_rc rc_core si2157 lgdt3306a i2c_mux em28xx_dvb dvb_core videobuf2_vmalloc videobuf2_memops videobuf2_common snd_hda_codec_hdmi nls_iso8859_1 edac_mce_amd kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi aesni_intel snd_seq_midi_event aes_x86_64 snd_rawmidi crypto_simd em28xx cryptd glue_helper asix tveeprom usbnet snd_seq v4l2_common mii videodev snd_seq_device media input_leds snd_timer joydev ccp k10temp wmi_bmof snd soundcore mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables vfio_pci vfio_virqfd irqbypass vfio_iommu_type1 vfio nouveau mxm_wmi video i2c_algo_bit ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops i2c_piix4 drm ahci libahci [ 354.905129] wmi gpio_amdpt gpio_generic hid_generic usbhid hid [ 354.908140] ---[ end trace c230d02716298c34 ]--- [ 354.908145] RIP: 0010:__slab_free+0x217/0x370 [ 354.908147] Code: bb c0 e8 07 41 38 c7 72 39 48 83 c4 70 5b 41 5a 41 5c 41 5d 41 5e 41 5f 5d 49 8d 62 f8 c3 f3 90 49 8b 04 24 a8 01 75 f6 eb 82 <0f> 0b 44 89 45 80 48 89 4d 88 e8 aa fa ff ff 85 c0 74 cc e9 b7 fe [ 354.908183] RSP: 0018:ffffb84c41a4fad0 EFLAGS: 00010246 [ 354.908186] RAX: ffff948646e85150 RBX: ffff948646e85150 RCX: ffff948646e85150 [ 354.908189] RDX: 00000000820001d9 RSI: fffffa8fd01ba140 RDI: ffff94865e807c00 [ 354.908191] RBP: ffffb84c41a4fb70 R08: 0000000000000001 R09: ffffffffc059ce21 [ 354.908193] R10: ffff948646e85150 R11: 0000000000000001 R12: fffffa8fd01ba140 [ 354.908195] R13: ffff948646e85150 R14: ffff94865e807c00 R15: ffff94864c92e0a0 [ 354.908198] FS: 0000000000000000(0000) GS:ffff94865ec40000(0000) knlGS:0000000000000000 [ 354.908201] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 354.908203] CR2: 00007f4e476da950 CR3: 000000016b20a000 CR4: 00000000003406e0 Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Michael Ira Krufky <mkrufky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: Fix dual transport stream operationBrad Love2018-07-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Addresses the following, which introduced a regression itself: Commit 509f89652f83 ("media: em28xx: fix a regression with HVR-950") The regression fix breaks dual transport stream support. Currently, when a tuner starts streaming it sets alt mode on the USB interface. The problem is, in a dual tuner model, both tuners share the same USB interface, so when the second tuner becomes active and sets alt mode on the interface it kills streaming on the other port. This patch addresses the regression by only setting alt mode on the USB interface during em28xx_start_streaming, if the device is not a dual tuner model. This allows all older and single tuner devices to explicitly set alt mode during stream startup. Testers report both isoc and bulk DualHD models work correctly with the alt mode set only once, in em28xx_dvb_init. Fixes: 509f89652f83 ("media: em28xx: fix a regression with HVR-950") Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Michael Ira Krufky <mkrufky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: don't check number of messages in the driverWolfram Sang2018-07-271-4/+0
| | | | | | | | | Since commit 1eace8344c02 ("i2c: add param sanity check to i2c_transfer()"), the I2C core does this check now. We can remove it from drivers. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx: Demote several dev_err to dev_infoBrad Love2018-05-111-2/+2
| | | | | | | | These two statements are not errors, reduce to appropriate level. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: update/fix my e-mail on some placesMauro Carvalho Chehab2018-05-101-1/+1
| | | | | | | | | | | | There are two places pointing to an unexisting "m.chehab@kernel.org" email. I never had such email, so, I'm unsure how it ends there. Anyway, it is plain wrong. While here, use my canonical e-mail on a bunch of places that are pointing to another e-mail. The idea is that, from now on, all places will be pointing to the same SMTP server. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* Merge tag 'v4.17-rc4' into patchworkMauro Carvalho Chehab2018-05-108-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 4.17-rc4 * tag 'v4.17-rc4': (920 commits) Linux 4.17-rc4 KVM: x86: remove APIC Timer periodic/oneshot spikes genksyms: fix typo in parse.tab.{c,h} generation rules kbuild: replace hardcoded bison in cmd_bison_h with $(YACC) gcc-plugins: fix build condition of SANCOV plugin MAINTAINERS: Update Kbuild entry with a few paths Revert "usb: host: ehci: Use dma_pool_zalloc()" platform/x86: Kconfig: Fix dell-laptop dependency chain. platform/x86: asus-wireless: Fix NULL pointer dereference arm64: vgic-v2: Fix proxying of cpuif access KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance KVM: arm64: Fix order of vcpu_write_sys_reg() arguments MAINTAINERS & files: Canonize the e-mails I use at files media: imx-media-csi: Fix inconsistent IS_ERR and PTR_ERR tools: power/acpi, revert to LD = gcc bdi: Fix oops in wb_workfn() RDMA/cma: Do not query GID during QP state transition to RTR IB/mlx4: Fix integer overflow when calculating optimal MTT size IB/hfi1: Fix memory leak in exception path in get_irq_affinity() IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure ...
| * MAINTAINERS & files: Canonize the e-mails I use at filesMauro Carvalho Chehab2018-05-048-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From now on, I'll start using my @kernel.org as my development e-mail. As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file. For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work. For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org. For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Brian Warner <brian.warner@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx: Fix DualHD broken second tunerBrad Love2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of a hard coded i2c address breaks the creation of the second tuner in DualHD 01595 models. The issue is compounded by lack of any error message stating that a driver failed initialization. Use addr, which contains the correct address for each tuner. Fixes: ad32495b1513 ("media: em28xx-dvb: simplify DVB module probing logic") Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx: Add new dvb-t board ":Zolid Hybrid Tv Stick"Marcel Stork2018-05-053-1/+31
| | | | | | | | | | | | | | | | Extra code to be able to use this stick, only digital, not analog nor remote-control. Signed-off-by: Marcel Stork <mjstork@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx: merge two identical cases inside a switch()Marcel Stork2018-05-051-2/+0
| | | | | | | | | | | | | | | | A cosmetic change by combining two sets of boards into one set because having the same arguments. Signed-off-by: Marcel Stork <mjstork@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx-cards: output regular messages as infoChris Mayo2018-05-041-6/+6
| | | | | | | | | | | | | | Messages expected during device probe were being marked as errors. Signed-off-by: Chris Mayo <aklhfex@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: dvb: add alternative USB PID for Hauppauge WinTV-soloHDRainer Keller2018-05-041-0/+2
| | | | | | | | | | | | | | Newer DVB receivers of this type have a different USB PID. Signed-off-by: Rainer Keller <mail@rainerkeller.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: lgdt330x: convert it to the new I2C binding wayMauro Carvalho Chehab2018-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | Convert the driver to allow its usage with the new I2C binding way. Please notice that this patch doesn't convert the callers to bind to it using the new way. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx: fix a regression with HVR-950Mauro Carvalho Chehab2018-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") removed the logic with sets the alternate for the DVB device. Without setting the right alternate, the device won't be able to submit URBs, and userspace fails with -EMSGSIZE: ERROR DMX_SET_PES_FILTER failed (PID = 0x2000): 90 Message too long Tested with Hauppauge HVR-950 model A1C0. Fixes: be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") Cc: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* | media: em28xx: Don't use ops->resume if NULLMauro Carvalho Chehab2018-05-041-2/+3
|/ | | | | | | | | | | | | | | | | | | | Changeset be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") introduced a potential NULL pointer dereference, as pointed by Coverity: CID 1434731 (#1 of 1): Dereference after null check (FORWARD_NULL)16. var_deref_op: Dereferencing null pointer ops->resume. var_compare_op: Comparing ops->resume to null implies that ops->resume might be null. 1174 if (ops->resume) 1175 ops->resume(dev); 1176 if (dev->dev_next) 1177 ops->resume(dev->dev_next); Fixes: be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: em28xx-input: improve error handling codeMauro Carvalho Chehab2018-03-231-1/+6
| | | | | | | | | | | The current I2C error handling logic makes static analyzers confused: drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: uninitialized symbol 'b'. Change it to match the coding style we're using elsewhere. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: add tuner standby op, use where neededHans Verkuil2018-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v4l2_subdev core s_power op was used for two different things: power on/off sensors or video decoders/encoders and to put a tuner in standby (and only the tuner!). There is no 'tuner wakeup' op, that's done automatically when the tuner is accessed. The danger with calling (s_power, 0) to put a tuner into standby is that it is usually broadcast for all subdevs. So a video receiver subdev that supports s_power will also be powered off, and since there is no corresponding (s_power, 1) they will never be powered on again. In addition, this is specifically meant for tuners only since they draw the most current. This patch adds a new tuner op called 'standby' and replaces all calls to (core, s_power, 0) by (tuner, standby). This prevents confusion between the two uses of s_power. Note that there is no overlap: bridge drivers either just want to put the tuner into standby, or they deal with powering on/off sensors. Never both. This also makes it easier to replace s_power for the remaining bridge drivers with some PM code later. Whether we want something cleaner for tuners in the future is a separate topic. There is a lot of legacy code surrounding tuners, and I am very hesitant about making changes there. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-cards: fix em28xx_duplicate_dev()Dan Carpenter2018-03-081-1/+1
| | | | | | | | | There is a double sizeof() typo here so we don't duplicate the struct properly. Fixes: be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
* media: em28xx: Change hex to lower caseBrad Love2018-03-071-1/+1
| | | | | | | Coding style fix. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx: Enable inversion for Solo/Dual HD DVB modelsBrad Love2018-03-061-0/+2
| | | | | | | | | | Hauppauge Solo/Dual HD DVB models use a si2157 tuner, which is set to produce inverted spectrum. This configures the si2168 DVB demod for inverted spectrum on both affected models. [mchehab@s-opensource.com: rebased on the top of upstream] Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-video: fix most coding style issuesMauro Carvalho Chehab2018-03-061-119/+158
| | | | | | | | | | | There are a number of coding style issues at em28xx-video. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-input: fix most coding style issuesMauro Carvalho Chehab2018-03-061-47/+74
| | | | | | | | | | | There are a number of coding style issues at em28xx-input. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-i2c: fix most coding style issuesMauro Carvalho Chehab2018-03-061-42/+48
| | | | | | | | | | | There are a number of coding style issues at em28xx-i2c. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-core: fix most coding style issuesMauro Carvalho Chehab2018-03-061-63/+60
| | | | | | | | | | | There are a number of coding style issues at em28xx-core. Fix most of them, by using checkpatch in strict mode to point for it. Automatic fixes were made with --fix-inplace, but those were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-cards: rework the em28xx probing codeMauro Carvalho Chehab2018-03-061-134/+149
| | | | | | | | | | | | There is a complex loop there with identifies the em28xx endpoints. It has lots of identations inside, and big names, making harder to understand. Simplify it by moving the main logic into a static function. While here, rename "interface" var to "intf". Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-cards: fix most coding style issuesMauro Carvalho Chehab2018-03-061-132/+189
| | | | | | | | | There are a number of coding style issues, pointed by checkpatch on strict mode. Fix the ones that don't require code refactor here. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-camera: fix coding style issuesMauro Carvalho Chehab2018-03-061-5/+8
| | | | | | | | | | There are some coding style issues at em28xx-camera. Fix them, by using checkpatch in strict mode to point for it. Automatic fixes with --fix-inplace were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-audio: fix coding style issuesMauro Carvalho Chehab2018-03-061-30/+40
| | | | | | | | | There are a number of coding style issues at em28xx-audio. Fix them, by using checkpatch in strict mode to point for it. Automatic fixes with --fix-inplace were complemented by manual work. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-reg.h: Fix coding style issuesMauro Carvalho Chehab2018-03-061-23/+24
| | | | | | | | | | | | | | | Use BIT() macros and fix one comment that is not following the Kernel coding style. It should be noticed that the registers bit masks should be casted to unsigned char, as, otherwise, it would produce warnings like: drivers/media/usb/em28xx/em28xx-cards.c:81:33: warning: large integer implicitly truncated to unsigned type [-Woverflow] {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, ^ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx.h: Fix most coding style issuesMauro Carvalho Chehab2018-03-061-129/+181
| | | | | | | | | | | There used to have a lot of coding style issues there. The ones detected by checkpatch, in strict mode, got fixed. Still, we need to work more on it, in order to document all struct fields using kernel-doc macros, but this will be done on some future patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx: Add SPDX license tags where neededMauro Carvalho Chehab2018-03-0612-245/+220
| | | | | | | | | | Most of the files there are missing a SPDX license tag. Add. While here fix some DRIVER_LICENSE macro in order to reflect the source file license, as some of the headers are GPL v2 only. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-dvb: do some coding style improvementsMauro Carvalho Chehab2018-03-061-84/+97
| | | | | | | | As we're touching a lot on this file, let's solve several Coding Style issues there using checkpatch --fix-inline --strict, and manually adjusting the results. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: s5h14*.h: fix typos for CONTINUOUSMauro Carvalho Chehab2018-03-061-1/+1
| | | | | | | | | | | | | | There is a typo at the several s5h14*.h headers: continuous were spelled incorrectly. Fix it with this script: for i in $(git grep -l S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK); do sed s,S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK,S5H1409_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK,g -i $i done for i in $(git grep -l -i continous drivers/media); do sed s,CONTINOUS,CONTINUOUS,g -i $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: em28xx-dvb: simplify DVB module probing logicMauro Carvalho Chehab2018-03-061-401/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | The module probing logic there is a way more complex than it should be, and requires some special magic to avoid stack overflows when KASAN is enabled. Solve it by creating ancillary functions to setup the platform data and request module. Now, the probing functions are cleaner and easier to understand. As a side effect, the size of the module was reduced by about 9.7% on x86_64: Before this patch: text data bss dec hex filename 51090 14192 96 65378 ff62 drivers/media/usb/em28xx/em28xx-dvb.o After this patch: text data bss dec hex filename 44743 14192 96 59031 e697 drivers/media/usb/em28xx/em28xx-dvb.o Tested with a PCTV 461e device. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
OpenPOWER on IntegriCloud