Commit graph

744 commits

Author SHA1 Message Date
Mauro Carvalho Chehab
3c71d978c5 [media] saa7164: Check if dev is NULL before dereferencing it
As reported by smatch:
	drivers/media/pci/saa7164/saa7164-core.c:631 saa7164_irq() warn: variable dereferenced before check 'dev' (see line 621)

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30 13:34:08 -03:00
Mauro Carvalho Chehab
5a4faee2d0 [media] ngene: preventing dereferencing a NULL pointer
As reported by smatch:
	drivers/media/pci/ngene/ngene-core.c:1529 init_channel() error: we previously assumed 'chan->fe' could be null (see line 1521)

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30 13:33:06 -03:00
Mauro Carvalho Chehab
f8781a0820 [media] saa7134: fix indent issues
As reported by smatch:
	drivers/media/pci/saa7134/saa7134-cards.c:7197 saa7134_xc2028_callback() warn: inconsistent indenting
	drivers/media/pci/saa7134/saa7134-cards.c:7846 saa7134_board_init2() warn: inconsistent indenting
	drivers/media/pci/saa7134/saa7134-cards.c:7913 saa7134_board_init2() warn: inconsistent indenting

While here, fix a few CodingStyle issues on the affected code

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30 13:16:29 -03:00
Mauro Carvalho Chehab
2f9e682d05 [media] cx18: avoid going past input/audio array
As reported by smatch:
	drivers/media/pci/cx18/cx18-driver.c:807 cx18_init_struct2() error: buffer overflow 'cx->card->video_inputs' 6 <= 6

That happens because nof_inputs and nof_audio_inputs can be initialized
as CX18_CARD_MAX_VIDEO_INPUTS, instead of CX18_CARD_MAX_VIDEO_INPUTS - 1.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30 13:15:31 -03:00
Mauro Carvalho Chehab
64131a87f2 Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits)
  media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format
  hexdump: avoid warning in test function
  fs: take i_mutex during prepare_binprm for set[ug]id executables
  smp: Fix error case handling in smp_call_function_*()
  iommu-common: Fix PARISC compile-time warnings
  sparc: Make LDC use common iommu poll management functions
  sparc: Make sparc64 use scalable lib/iommu-common.c functions
  Break up monolithic iommu table/lock into finer graularity pools and lock
  sparc: Revert generic IOMMU allocator.
  tools/power turbostat: correct dumped pkg-cstate-limit value
  tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL
  tools/power turbostat: correct DRAM RAPL units on recent Xeon processors
  tools/power turbostat: Initial Skylake support
  tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile
  tools/power turbostat: modprobe msr, if needed
  tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2
  tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names
  Bluetooth: hidp: Fix regression with older userspace and flags validation
  config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
  perf/x86/intel/pt: Fix and clean up error handling in pt_event_add()
  ...

That solves several merge conflicts:
	Documentation/DocBook/media/v4l/subdev-formats.xml
	Documentation/devicetree/bindings/vendor-prefixes.txt
	drivers/staging/media/mn88473/mn88473.c
	include/linux/kconfig.h
	include/uapi/linux/media-bus-format.h

The ones at subdev-formats.xml and media-bus-format.h are not trivial.
That's why we opted to merge from DRM.
2015-04-21 09:44:55 -03:00
Mauro Carvalho Chehab
676ee36be0 Merge branch 'patchwork' into v4l_for_linus
* patchwork: (404 commits)
  [media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRL
  [media] uvcvideo: fix cropcap v4l2-compliance failure
  [media] media: omap3isp: remove unused clkdev
  [media] coda: Add tracing support
  [media] coda: drop dma_sync_single_for_device in coda_bitstream_queue
  [media] coda: fix fill bitstream errors in nonstreaming case
  [media] coda: call SEQ_END when the first queue is stopped
  [media] coda: fail to start streaming if userspace set invalid formats
  [media] coda: remove duplicate error messages for buffer allocations
  [media] coda: move parameter buffer in together with context buffer allocation
  [media] coda: allocate bitstream buffer from REQBUFS, size depends on the format
  [media] coda: allocate per-context buffers from REQBUFS
  [media] coda: use strlcpy instead of snprintf
  [media] coda: bitstream payload is unsigned
  [media] coda: fix double call to debugfs_remove
  [media] coda: check kasprintf return value in coda_open
  [media] coda: bitrate can only be set in kbps steps
  [media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove
  [media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init
  [media] coda: set allow_zero_bytesused flag for vb2_queue_init
  ...
2015-04-21 06:12:35 -03:00
Linus Torvalds
d19d5efd8c powerpc updates for 4.1
- Numerous minor fixes, cleanups etc.
 - More EEH work from Gavin to remove its dependency on device_nodes.
 - Memory hotplug implemented entirely in the kernel from Nathan Fontenot.
 - Removal of redundant CONFIG_PPC_OF by Kevin Hao.
 - Rewrite of VPHN parsing logic & tests from Greg Kurz.
 - A fix from Nish Aravamudan to reduce memory usage by clamping
   nodes_possible_map.
 - Support for pstore on powernv from Hari Bathini.
 - Removal of old powerpc specific byte swap routines by David Gibson.
 - Fix from Vasant Hegde to prevent the flash driver telling you it was flashing
   your firmware when it wasn't.
 - Patch from Ben Herrenschmidt to add an OPAL heartbeat driver.
 - Fix for an oops causing get/put_cpu_var() imbalance in perf by Jan Stancek.
 - Some fixes for migration from Tyrel Datwyler.
 - A new syscall to switch the cpu endian by Michael Ellerman.
 - Large series from Wei Yang to implement SRIOV, reviewed and acked by Bjorn.
 - A fix for the OPAL sensor driver from Cédric Le Goater.
 - Fixes to get STRICT_MM_TYPECHECKS building again by Michael Ellerman.
 - Large series from Daniel Axtens to make our PCI hooks per PHB rather than per
   machine.
 - Small patch from Sam Bobroff to explicitly abort non-suspended transactions
   on syscalls, plus a test to exercise it.
 - Numerous reworks and fixes for the 24x7 PMU from Sukadev Bhattiprolu.
 - Small patch to enable the hard lockup detector from Anton Blanchard.
 - Fix from Dave Olson for missing L2 cache information on some CPUs.
 - Some fixes from Michael Ellerman to get Cell machines booting again.
 - Freescale updates from Scott: Highlights include BMan device tree nodes, an
   MSI erratum workaround, a couple minor performance improvements, config
   updates, and misc fixes/cleanup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVL2cxAAoJEFHr6jzI4aWAR8cP/19VTo/CzCE4ffPSx7qR464n
 F+WFZcbNjIMXu6+B0YLuJZEsuWtKKrCit/MCg3+mSgE4iqvxmtI+HDD0445Buszj
 UD4E4HMdPrXQ+KUSUDORvRjv/FFUXIa94LSv/0g2UeMsPz/HeZlhMxEu7AkXw9Nf
 rTxsmRTsOWME85Y/c9ss7XHuWKXT3DJV7fOoK9roSaN3dJAuWTtG3WaKS0nUu0ok
 0M81D6ZczoD6ybwh2DUMPD9K6SGxLdQ4OzQwtW6vWzcQIBDfy5Pdeo0iAFhGPvXf
 T4LLPkv4cF4AwHsAC4rKDPHQNa+oZBoLlScrHClaebAlDiv+XYKNdMogawUObvSh
 h7avKmQr0Ygp1OvvZAaXLhuDJI9FJJ8lf6AOIeULgHsDR9SyKMjZWxRzPe11uarO
 Fyi0qj3oJaQu6LjazZraApu8mo+JBtQuD3z3o5GhLxeFtBBF60JXj6zAXJikufnl
 kk1/BUF10nKUhtKcDX767AMUCtMH3fp5hx8K/z9T5v+pobJB26Wup1bbdT68pNBT
 NjdKUppV6QTjZvCsA6U2/ECu6E9KeIaFtFSL2IRRoiI0dWBN5/5eYn3RGkO2ZFoL
 1NdwKA2XJcchwTPkpSRrUG70sYH0uM2AldNYyaLfjzrQqza7Y6lF699ilxWmCN/H
 OplzJAE5cQ8Am078veTW
 =03Yh
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux

Pull powerpc updates from Michael Ellerman:

 - Numerous minor fixes, cleanups etc.

 - More EEH work from Gavin to remove its dependency on device_nodes.

 - Memory hotplug implemented entirely in the kernel from Nathan
   Fontenot.

 - Removal of redundant CONFIG_PPC_OF by Kevin Hao.

 - Rewrite of VPHN parsing logic & tests from Greg Kurz.

 - A fix from Nish Aravamudan to reduce memory usage by clamping
   nodes_possible_map.

 - Support for pstore on powernv from Hari Bathini.

 - Removal of old powerpc specific byte swap routines by David Gibson.

 - Fix from Vasant Hegde to prevent the flash driver telling you it was
   flashing your firmware when it wasn't.

 - Patch from Ben Herrenschmidt to add an OPAL heartbeat driver.

 - Fix for an oops causing get/put_cpu_var() imbalance in perf by Jan
   Stancek.

 - Some fixes for migration from Tyrel Datwyler.

 - A new syscall to switch the cpu endian by Michael Ellerman.

 - Large series from Wei Yang to implement SRIOV, reviewed and acked by
   Bjorn.

 - A fix for the OPAL sensor driver from Cédric Le Goater.

 - Fixes to get STRICT_MM_TYPECHECKS building again by Michael Ellerman.

 - Large series from Daniel Axtens to make our PCI hooks per PHB rather
   than per machine.

 - Small patch from Sam Bobroff to explicitly abort non-suspended
   transactions on syscalls, plus a test to exercise it.

 - Numerous reworks and fixes for the 24x7 PMU from Sukadev Bhattiprolu.

 - Small patch to enable the hard lockup detector from Anton Blanchard.

 - Fix from Dave Olson for missing L2 cache information on some CPUs.

 - Some fixes from Michael Ellerman to get Cell machines booting again.

 - Freescale updates from Scott: Highlights include BMan device tree
   nodes, an MSI erratum workaround, a couple minor performance
   improvements, config updates, and misc fixes/cleanup.

* tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (196 commits)
  powerpc/powermac: Fix build error seen with powermac smp builds
  powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE
  powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()
  powerpc/cell: Fix iommu breakage caused by controller_ops change
  powerpc/eeh: Fix crash in eeh_add_device_early() on Cell
  powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH
  powerpc/perf/hv-24x7: Fail 24x7 initcall if create_events_from_catalog() fails
  powerpc/pseries: Correct memory hotplug locking
  powerpc: Fix missing L2 cache size in /sys/devices/system/cpu
  powerpc: Add ppc64 hard lockup detector support
  oprofile: Disable oprofile NMI timer on ppc64
  powerpc/perf/hv-24x7: Add missing put_cpu_var()
  powerpc/perf/hv-24x7: Break up single_24x7_request
  powerpc/perf/hv-24x7: Define update_event_count()
  powerpc/perf/hv-24x7: Whitespace cleanup
  powerpc/perf/hv-24x7: Define add_event_to_24x7_request()
  powerpc/perf/hv-24x7: Rename hv_24x7_event_update
  powerpc/perf/hv-24x7: Move debug prints to separate function
  powerpc/perf/hv-24x7: Drop event_24x7_request()
  powerpc/perf/hv-24x7: Use pr_devel() to log message
  ...

Conflicts:
	tools/testing/selftests/powerpc/Makefile
	tools/testing/selftests/powerpc/tm/Makefile
2015-04-16 13:53:32 -05:00
Arnd Bergmann
9b174527e7 [media] Add and use IS_REACHABLE macro
In the media drivers, the v4l2 core knows about all submodules
and calls into them from a common function. However this cannot
work if the modules that get called are loadable and the
core is built-in. In that case we get

drivers/built-in.o: In function `set_type':
drivers/media/v4l2-core/tuner-core.c:301: undefined reference to `tea5767_attach'
drivers/media/v4l2-core/tuner-core.c:307: undefined reference to `tea5761_attach'
drivers/media/v4l2-core/tuner-core.c:349: undefined reference to `tda9887_attach'
drivers/media/v4l2-core/tuner-core.c:405: undefined reference to `xc4000_attach'

This was working previously, until the IS_ENABLED() macro was used
to replace the construct like

 #if defined(CONFIG_DVB_CX24110) || (defined(CONFIG_DVB_CX24110_MODULE) && defined(MODULE))

with the difference that the new code no longer checks whether it is being
built as a loadable module itself.

To fix this, this new patch adds an 'IS_REACHABLE' macro, which evaluates
true in exactly the condition that was used previously. The downside
of this is that this trades an obvious link error for a more subtle
runtime failure, but it is clear that the change that introduced the
link error was unintentional and it seems better to revert it for
now. Also, a similar change was originally created by Trent Piepho
and then reverted by teh change to the IS_ENABLED macro.

Ideally Kconfig would be used to avoid the case of a broken dependency,
or the code restructured in a way to turn around the dependency, but either
way would require much larger changes here.

Fixes: 7b34be71db ("[media] use IS_ENABLED() macro")
See-also: c5dec9fb24 ("V4L/DVB (4751): Fix DBV_FE_CUSTOMISE for card drivers compiled into kernel")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 15:02:07 -03:00
Hans Verkuil
23fb4c5ea1 [media] bttv: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:45:12 -03:00
Hans Verkuil
34080bc25f [media] cx88: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:43:16 -03:00
Hans Verkuil
55cda4ab53 [media] cx18: replace cropping ioctls by selection ioctls
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:42:41 -03:00
Hans Verkuil
3a29a4f177 [media] cx18: fix VIDIOC_ENUMINPUT: wrong std value
The std field of v4l2_input is always V4L2_STD_ALL. For tuner inputs
this should be cx->tuner_std.

This fixes a v4l2-compliance failure.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:42:14 -03:00
Hans Verkuil
eaa80c44d6 [media] cx18: add support for control events
v4l2-compliance failed due to missing control event support in cx18.
Add this to the driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:41:17 -03:00
David Howells
af7f388e74 [media] cx23885: Always initialise dev->slock spinlock
The slock spinlock in the cx23885_dev struct is only initialised if analogue
video is being used, but is used in other places too, leading to the attached
lockdep complaint.

Move the lock initialisation so that it is done unconditionally.

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 4413 Comm: scandvb Tainted: G        W       4.0.0-rc1-fsdevel+ #25
Hardware name: System manufacturer System Product Name/P5Q PRO TURBO, BIOS 0701    10/08/2012
 0000000000000000 ffff880129d779d8 ffffffff8162bbdf 0000000000000006
 0000000000000000 ffff880129d77aa8 ffffffff810780e3 0000000000000001
 0000000000000046 0000000000000004 ffffffff81c3f180 0000000000000000
Call Trace:
 [<ffffffff8162bbdf>] dump_stack+0x4c/0x65
 [<ffffffff810780e3>] __lock_acquire+0x7b5/0x1a0e
 [<ffffffff810799ee>] lock_acquire+0x97/0x10c
 [<ffffffffa006494e>] ? cx23885_buf_queue+0x69/0x142 [cx23885]
 [<ffffffff8102e9bc>] ? amd_set_subcaches+0x19b/0x19b
 [<ffffffff816313b4>] _raw_spin_lock_irqsave+0x36/0x4a
 [<ffffffffa006494e>] ? cx23885_buf_queue+0x69/0x142 [cx23885]
 [<ffffffffa006494e>] cx23885_buf_queue+0x69/0x142 [cx23885]
 [<ffffffffa00662cb>] buffer_queue+0x17/0x19 [cx23885]
 [<ffffffffa00382d5>] __enqueue_in_driver+0x6a/0x6f [videobuf2_core]
 [<ffffffffa0038ead>] vb2_start_streaming+0x37/0x129 [videobuf2_core]
 [<ffffffffa003a6c0>] vb2_internal_streamon+0xc5/0x105 [videobuf2_core]
 [<ffffffffa003b889>] __vb2_init_fileio+0x224/0x286 [videobuf2_core]
 [<ffffffffa003bcc0>] ? vb2_thread_start+0x7b/0x15f [videobuf2_core]
 [<ffffffffa0050182>] ? vb2_dvb_start_feed+0x86/0x86 [videobuf2_dvb]
 [<ffffffffa003bd06>] vb2_thread_start+0xc1/0x15f [videobuf2_core]
 [<ffffffff8150d393>] ? dmx_section_feed_start_filtering+0x2f/0x14f
 [<ffffffffa0050157>] vb2_dvb_start_feed+0x5b/0x86 [videobuf2_dvb]
 [<ffffffff8150d461>] dmx_section_feed_start_filtering+0xfd/0x14f
 [<ffffffff8150afc7>] dvb_dmxdev_filter_start+0x23f/0x315
 [<ffffffff8150b6ad>] dvb_demux_do_ioctl+0x1fb/0x556
 [<ffffffff81509e94>] dvb_usercopy+0xb4/0x11c
 [<ffffffff8150b4b2>] ? dvb_dmxdev_ts_callback+0xd0/0xd0
 [<ffffffff8150a11a>] dvb_demux_ioctl+0x10/0x14
 [<ffffffff81144ac4>] do_vfs_ioctl+0x3c1/0x474
 [<ffffffff8126f181>] ? file_has_perm+0x5b/0x7f
 [<ffffffff810bf6ca>] ? __audit_syscall_entry+0xbc/0xde
 [<ffffffff81144bcc>] SyS_ioctl+0x55/0x7a
 [<ffffffff81631d52>] system_call_fastpath+0x12/0x17

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08 06:28:01 -03:00
Hans Verkuil
08569d6477 [media] cx18: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03 00:05:36 -03:00
Hans Verkuil
38a1421ddd [media] ivtv: disable fbuf support if ivtvfb isn't loaded
Disable all fbuf-related functionality if ivtvfb isn't loaded. This
caused various v4l2-compliance failures.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 23:57:51 -03:00
Hans Verkuil
bbc9fa2ece [media] ivtv: replace crop by selection
Replace the old g/s_crop ioctls by the new g/s_selection ioctls.
This solves a v4l2-compliance failure, and it is something that needs
to be done anyway to eventually be able to remove the old g/s_crop
ioctl ops.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 23:57:19 -03:00
Hans Verkuil
4db4ca7450 [media] sta2x11: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 23:56:44 -03:00
Hans Verkuil
e239129ca7 [media] meye: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 23:35:01 -03:00
Hans Verkuil
3ae863e0db [media] saa7146: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 23:29:01 -03:00
Hans Verkuil
635d62f073 [media] ivtv: embed video_device
Embed the video_device struct to simplify the error handling and in
order to (eventually) get rid of video_device_alloc/release.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:34:55 -03:00
Antti Palosaari
2ad8dd417a [media] smipcie: switch ts2022 to ts2020 driver
Change ts2022 driver to ts2020 driver. ts2020 driver supports
both tuner chip models.

Cc: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:25:14 -03:00
Antti Palosaari
d76e08784c [media] cx23885: switch ts2022 to ts2020 driver
Change ts2022 driver to ts2020 driver. ts2020 driver supports
both chip models.

Cc: Olli Salonen <olli.salonen@iki.fi>
Cc: Nibble Max <nibble.max@gmail.com>
Tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 22:24:52 -03:00
Julia Lawall
fae119bedd [media] media: pci: cx23885: don't export static symbol
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL;
@@

-EXPORT_SYMBOL(f);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02 18:21:53 -03:00
Hans Verkuil
6b46211f0a [media] cx23885: fix querycap
cap->device_caps wasn't set in cx23885-417.c causing a warning from
the v4l2-core.

Reported-by: Joseph Jasi <joe.yasi@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: <stable@vger.kernel.org>      # for v3.19 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-01 06:56:56 -03:00
Benjamin Herrenschmidt
c2d5a71064 media/bt8xx: Remove old powerpc cruft
The powerpc arch code enables PCI_COMMAND_MEMORY (and has done so for
more than 10 years at least !) on pci_enable_device() and the hackery
on the MMIO accessor is useless as well, our writel does everything
this driver should need.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2015-03-24 13:33:50 +11:00
Simon Farnsworth
48ab45adcc [media] cx18: Fix bytes_per_line
Current GStreamer userspace respects the bytes_per_line from the driver. Set
it to something reasonable for the format chosen.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03 11:24:34 -03:00
Olli Salonen
3f845f3c4c [media] saa7164: free_irq before pci_disable_device
Free the IRQ before disabling the device. Otherwise errors like this when unloading the module:

[21135.458560] ------------[ cut here ]------------
[21135.458569] WARNING: CPU: 4 PID: 1696 at /home/apw/COD/linux/fs/proc/generic.c:521 remove_proc_entry+0x1a1/0x1b0()
[21135.458572] remove_proc_entry: removing non-empty directory 'irq/47', leaking at least 'saa7164[0]'

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03 11:16:09 -03:00
Christian Engelmayer
96df988bb9 [media] cx88: Fix possible leak in cx8802_probe()
In case allocation vb2_dma_sg_init_ctx() fails during cx8802_probe(), the
already allocated cx8802 device structure memory is not freed in the used
exit path. Thus adapt the cleanup handling accordingly. Detected by Coverity
CID 1260065.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02 14:47:19 -03:00
Andrea Arcangeli
7e33912849 mm: gup: use get_user_pages_unlocked
This allows those get_user_pages calls to pass FAULT_FLAG_ALLOW_RETRY to
the page fault in order to release the mmap_sem during the I/O.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Peter Feiner <pfeiner@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-11 17:06:05 -08:00
Mauro Carvalho Chehab
86c330fa59 [media] cx88-dvb: whitespace cleanup
X-Patchwork-Delegate: m.chehab@samsung.com
Fix the following smatch warning:
	drivers/media/pci/cx88//cx88-dvb.c:1508 dvb_register() warn: if statement not indented

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03 17:12:12 -02:00
Nibble Max
ab98180ac2 [media] smipcie: return more proper value in interrupt handler
Although IRQ_HANDLED is "safe" value to return,
it is better to let the kernel know whether the driver handle the interrupt or not.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02 14:42:53 -02:00
Mauro Carvalho Chehab
2b0aac3011 [media] cx23885: move CI/MAC registration to a separate function
As reported by smatch:
	drivers/media/pci/cx23885/cx23885-dvb.c:2080 dvb_register() Function too hairy.  Giving up.

This is indeed a too complex function, with lots of stuff inside.
Breaking this into two functions makes it a little bit less hairy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02 13:16:01 -02:00
Lars-Peter Clausen
d5d51a827b [media] adv7180: Add media controller support
Add media controller support to the adv7180 driver by registering a media
entity instance for it as well as implementing pad ops for configuring the
format.

As there currently don't seem to be any users of the video ops format
operations those are removed as well in this patch.

Also set the V4L2_SUBDEV_FL_HAS_DEVNODE flag for the subdevice so it is
possible to create a subdevice device node.

Since the driver now depends on VIDEO_V4L2_SUBDEV_API all drivers which
select the driver need to depend on that symbol as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02 11:45:35 -02:00
Ondrej Zary
35655bf854 [media] bttv: Improve TEA575x support
Improve g_tuner and add s_hw_freq_seek and enum_freq_bands support for cards
with TEA575x radio.

This allows signal/stereo detection and HW seek to work on these cards.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:14:20 -02:00
Ondrej Zary
1b50037315 [media] bttv: Convert to generic TEA575x interface
Remove tea575x-specific code from bttv and use the common driver instead.

Only set_frequency is implemented (signal/stereo detection or seek would
require more changes to bttv).

It works fine on Video Highway Xtreme (it actually makes the radio usable as
it currently cannot be tuned properly).

Miro/Pinnacle is untested but seems to be simple and should work.

However, I don't understand the Terratec Active Radio Upgrade code. The HW
seems to need IOR, IOW and CSEL signals that were taken from ISA bus on
older cards (IOR and IOW directly and CSEL from some address decoder) and
are emulated here using GPIOs. But the code manipulating these signals in
bttv seems to be broken - it never asserts the IOR signal. If anyone has
this HW, please test if I got that right.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:13:19 -02:00
Rickard Strandqvist
0badd3c79b [media] media: pci: saa7134: saa7134-video.c: Remove unused function
Remove the function saa7134_queue() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:10:23 -02:00
Rickard Strandqvist
df58433145 [media] media: pci: mantis: mantis_core.c: Remove unused function
Remove the function write_eeprom_byte() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:10:06 -02:00
Fabian Frederick
11ede411b4 [media] tw68: remove unnecessary version.h inclusion
Based on versioncheck.

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>
2015-01-27 10:08:49 -02:00
Ismael Luceno
af29ba97f1 [media] solo6x10: s/uint8_t/u8/
s/uint8_t/u8/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:03:19 -02:00
Ismael Luceno
b1bb7ee2d9 [media] solo6x10: Fix solo_eeprom_read retval type
s/unsigned short/u16/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:03:00 -02:00
Ismael Luceno
469ac53e7c [media] solo6x10: Fix eeprom_* functions buffer's type
s/unsigned short/u16/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:02:42 -02:00
Ismael Luceno
8a4d9a9cf9 [media] solo6x10: s/unsigned char/u8/
s/unsigned char/u8/

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:02:07 -02:00
Mauro Carvalho Chehab
4a8ba33197 Linux 3.19-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUxbzlAAoJEHm+PkMAQRiGtqYIAJ8YlKX9cXKYmXx8/FncINH+
 2erj94KyHG080R1uwSq1+7zXWCZUUlxiJnDnsup5rG0dImcicqgOE48oHax1aN6b
 yHfPONkTjNJ1HYepuGC3YWCG9wIjPZQ5S8KHrwRjyVoE+ddhe9gWgvArA3jl/fW/
 2fYNWekoRoMcRiNb4/w2weyOOBywdSVpmj0WYiwdztysG2ymw5hUXRHJhvSf1AFm
 RQJfUHkhCOYpQGY7XFba/1uGhTJfOgDmYAfspAOLzmrXE/DJcCutsVdBZO+12fAL
 nhGpM/PkRYxMvwzDKIUoG35qsymYOMqo54oXhr0S2JjyXTGdGmB6qHxIfqnV5Tk=
 =O/Lr
 -----END PGP SIGNATURE-----

Merge tag 'v3.19-rc6' into patchwork

This is needed in order to get the media fixes applied on -rc6.

Linux 3.19-rc6

* tag 'v3.19-rc6': (891 commits)
  Linux 3.19-rc6
  dm: fix handling of multiple internal suspends
  hwmon: (i5500_temp) Convert to use ATTRIBUTE_GROUPS macro
  hwmon: (i5500_temp) Convert to module_pci_driver
  hwmon: (i5500_temp) Don't bind to disabled sensors
  hwmon: (i5500_temp) Convert to devm_hwmon_device_register_with_groups
  hwmon: (i5500_temp) New driver for the Intel 5500/5520/X58 chipsets
  arm64: dts: add baud rate to Juno stdout-path
  Revert "platform: x86: dell-laptop: Add support for keyboard backlight"
  Revert "Documentation: Add entry for dell-laptop sysfs interface"
  dm cache: fix problematic dual use of a single migration count variable
  dm cache: share cache-metadata object across inactive and active DM tables
  of/unittest: Overlays with sub-devices tests
  KVM: x86: SYSENTER emulation is broken
  KVM: x86: Fix of previously incomplete fix for CVE-2014-8480
  arm64: dump: Fix implicit inclusion of definition for PCI_IOBASE
  x86/tsc: Change Fast TSC calibration failed from error to info
  x86/apic: Re-enable PCI_MSI support for non-SMP X86_32
  x86, mm: Change cachemode exports to non-gpl
  x86, tls: Interpret an all-zero struct user_desc as "no segment"
  ...

Conflicts:
	drivers/media/pci/cx23885/cx23885.h
2015-01-27 09:39:34 -02:00
Linus Torvalds
af469b3748 media fixes for v3.19-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUwkroAAoJEAhfPr2O5OEVYBYP/R8uGJ6nelba4qQ/S2K7UvOK
 +7eCIlO3K2ugU5Va4qhSgkhNKe1z/YqF2t443WyHFdBNt2IfFCugS4lulSJI8SXF
 UFO0HPqmvvc2QpcLC5HX3luk6Xqwanbxi88SO3ty6GaDidnoQHBga9LTLukfiXyE
 4buZ/NZReEDW/TDg+6o0Wa3Mpnzv2FKgKlbyOLmM3IHhNXm4Ejm7aWivfl+4LSIz
 yti8eoPgOgFGtmI0fAC5Bh3gPutsDnn/39OzxQVnOgqIDyJlIhJhGUDnCftNesqZ
 FvGCTHYW0iaXBPNxrdy5q2fY/vyITXCXLspI6pKhprtK5cQikvHlvzUNHKXBH36o
 1vLjELOMS9evA98vj8d4OzjaspsxhdPoMSUbNBL2COaOcxpYnwNY7Ya7QCeNi63P
 odqZUc1Vgj18iFiSlp47AEgmI5vZw9sQL/1rzwLUgezUw91hxhMEaH1iQPLmfcpV
 M4pRIp7xBur/7TaSRXN+Yw3p2yNFwY2G9rXj2Vg6rgbQsYpT0S2vqSxC/3/Bdxe+
 qEH/O+Hq561H1QuX8VyaC3W/x74TjQhGZhvYoTdSFUJw6gxhvCNx6vZmr4iFERph
 QAfKMtZBBNt8kq90JEUTw/3FO9TQbnGC7oFw8/sSVMZ2YiR0a6guAnximK4dpbdQ
 ks1MVaSnNaRIcCpwpbvY
 =yD+L
 -----END PGP SIGNATURE-----

Merge tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
  - fix some race conditions caused by a regression on videobuf2
  - fix a interrupt release bug on cx23885
  - fix support for Mygica T230 and HVR4400
  - fix compilation breakage when USB is not selected on tlg2300
  - fix capabilities report on ompa3isp, soc-camera, rcar_vin and
    pvrusb2

* tag 'media/v3.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] omap3isp: Correctly set QUERYCAP capabilities
  [media] cx23885: fix free interrupt bug
  [media] pvrusb2: fix missing device_caps in querycap
  [media] vb2: fix vb2_thread_stop race conditions
  [media] rcar_vin: Update device_caps and capabilities in querycap
  [media] soc-camera: fix device capabilities in multiple camera host drivers
  [media] Fix Mygica T230 support
  [media] cx23885: Split Hauppauge WinTV Starburst from HVR4400 card entry
  [media] tlg2300: Fix media dependencies
2015-01-24 14:34:54 -08:00
Hans Verkuil
8d4d9329cd [media] cx23885: fix free interrupt bug
First free the interrupt, then disable the PCI device. The other way
around will lead to this warning:

Jan 19 11:42:02 telek kernel: [ 1440.161234] WARNING: CPU: 0 PID: 2191 at kernel/irq/manage.c:1311 __free_irq+0x97/0x1f0()
Jan 19 11:42:02 telek kernel: [ 1440.161236] Trying to free already-free IRQ 0
Jan 19 11:42:02 telek kernel: [ 1440.161237] Modules linked in: tda8290 tda10048 cx25840 cx23885(-) altera_ci tda18271 altera_stapl videobuf2_dvb tveeprom cx2341x videobuf2_dma_sg dvb_core rc_core videobuf2_memops videobuf2_core v4l2_common videodev media nouveau x86_pkg_temp_thermal cfbfillrect cfbimgblt cfbcopyarea ttm drm_kms_helper processor button isci
Jan 19 11:42:02 telek kernel: [ 1440.161266] CPU: 0 PID: 2191 Comm: rmmod Tainted: G        W      3.19.0-rc1-telek #345
Jan 19 11:42:02 telek kernel: [ 1440.161268] Hardware name: ASUSTeK COMPUTER INC. Z9PE-D8 WS/Z9PE-D8 WS, BIOS 5404 02/10/2014
Jan 19 11:42:02 telek kernel: [ 1440.161270]  ffffffff81bf1fce ffff8808958b7cc8 ffffffff8194a97f 0000000000000000
Jan 19 11:42:02 telek kernel: [ 1440.161274]  ffff8808958b7d18 ffff8808958b7d08 ffffffff810c56b0 0000000000000286
Jan 19 11:42:02 telek kernel: [ 1440.161279]  0000000000000000 0000000000000000 ffff88089f808890 ffff88089f808800
Jan 19 11:42:02 telek kernel: [ 1440.161284] Call Trace:
Jan 19 11:42:02 telek kernel: [ 1440.161290]  [<ffffffff8194a97f>] dump_stack+0x4f/0x7b
Jan 19 11:42:02 telek kernel: [ 1440.161295]  [<ffffffff810c56b0>] warn_slowpath_common+0x80/0xc0
Jan 19 11:42:02 telek kernel: [ 1440.161299]  [<ffffffff810c5731>] warn_slowpath_fmt+0x41/0x50
Jan 19 11:42:02 telek kernel: [ 1440.161303]  [<ffffffff81955d36>] ? _raw_spin_lock_irqsave+0x56/0x70
Jan 19 11:42:02 telek kernel: [ 1440.161307]  [<ffffffff81114849>] ? __free_irq+0x49/0x1f0
Jan 19 11:42:02 telek kernel: [ 1440.161311]  [<ffffffff81114897>] __free_irq+0x97/0x1f0
Jan 19 11:42:02 telek kernel: [ 1440.161316]  [<ffffffff81114a88>] free_irq+0x48/0xd0
Jan 19 11:42:02 telek kernel: [ 1440.161323]  [<ffffffffa00e6deb>] cx23885_finidev+0x4b/0x90 [cx23885]
Jan 19 11:42:02 telek kernel: [ 1440.161329]  [<ffffffff814529fa>] pci_device_remove+0x3a/0xc0
Jan 19 11:42:02 telek kernel: [ 1440.161334]  [<ffffffff8153b4ea>] __device_release_driver+0x7a/0xf0
Jan 19 11:42:02 telek kernel: [ 1440.161338]  [<ffffffff8153bc98>] driver_detach+0xc8/0xd0
Jan 19 11:42:02 telek kernel: [ 1440.161341]  [<ffffffff8153b1de>] bus_remove_driver+0x4e/0xb0
Jan 19 11:42:02 telek kernel: [ 1440.161345]  [<ffffffff8153c2eb>] driver_unregister+0x2b/0x60
Jan 19 11:42:02 telek kernel: [ 1440.161349]  [<ffffffff814525c5>] pci_unregister_driver+0x25/0x70
Jan 19 11:42:02 telek kernel: [ 1440.161355]  [<ffffffffa00f6ddc>] cx23885_fini+0x10/0x12 [cx23885]
Jan 19 11:42:02 telek kernel: [ 1440.161360]  [<ffffffff81139a98>] SyS_delete_module+0x1a8/0x1f0
Jan 19 11:42:02 telek kernel: [ 1440.161364]  [<ffffffff819561a9>] system_call_fastpath+0x12/0x17
Jan 19 11:42:02 telek kernel: [ 1440.161367] ---[ end trace a9c07cb5f3357020 ]---

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-21 21:08:38 -02:00
Matthias Schwarzott
721f3223f2 [media] cx23885: Split Hauppauge WinTV Starburst from HVR4400 card entry
Unconditionally attaching Si2161/Si2165 demod driver
breaks Hauppauge WinTV Starburst.
So create own card entry for this.

Add card name comments to the subsystem ids.

This fixes a regression introduced in 3.17 by
36efec48e2 ([media] cx23885: Add si2165 support for HVR-5500)

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
CC: stable@vger.kernel.org # for 3.17 and upper
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-21 21:02:34 -02:00
Antti Palosaari
1fc77d013b [media] cx23885: Hauppauge WinTV-HVR5525
Add board profile for Hauppauge WinTV-HVR5525.

Device is build upon following main components:
Conexant CX23888
Montage M88RS6000
Allegro A8293
Silicon Labs Si2168-B40
Silicon Labs Si2157-A30

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-30 10:48:04 -02:00
Antti Palosaari
93009ca673 [media] cx23885: fix I2C scan printout
1) I2C slave addresses were printed so called 8-bit format. Use
standard 7-bit notation.

2) I2C slave address was printed with hex formatted without leading
zeros, which makes output one digit shorter in a case of address
fit to one hex digit. Use 4 char wide hex number with leading zeros
as usually used for I2C slave addresses.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-30 10:46:52 -02:00
Antti Palosaari
a593f2cfc1 [media] cx23885: correct some I2C client indentations
These comparisons fit single line.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-30 10:45:00 -02:00
Antti Palosaari
3b952436d4 [media] cx23885: do not unregister demod I2C client twice on error
Demod I2C client should be NULL after demod is unregistered on error
path, otherwise it will be unregistered again when driver is unload.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-30 10:44:24 -02:00
Hans Verkuil
d832672f20 [media] ivtv: fix sparse warning
Fix this warning:

drivers/media/pci/ivtv/ivtv-irq.c:418:9: warning: context imbalance in 'ivtv_dma_stream_dec_prepare' - different lock contexts for basic block

sparse didn't quite understand the locking scheme, so rewrite it to keep
sparse happy.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:40:59 -02:00
Hans Verkuil
65adb86d61 [media] budget-core: fix sparse warnings
Fixes these sparse warnings.

drivers/media/pci/ttpci/budget-core.c:250:17: warning: context imbalance in 'ttpci_budget_debiread' - different lock contexts for basic block
drivers/media/pci/ttpci/budget-core.c:289:17: warning: context imbalance in 'ttpci_budget_debiwrite' - different lock contexts for basic block

To be honest, the new code does look better than the old.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:40:01 -02:00
Hans Verkuil
e5b30145e5 [media] av7110: fix sparse warning
drivers/media/pci/ttpci/av7110.c:1226:15: warning: memset with byte count of 192512

Instead of memsetting this in one go, loop over each line and memset each line
separately.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:33:59 -02:00
Hans Verkuil
21a7e0596a [media] media: drivers shouldn't touch debug field in video_device
The debug field in struct video_device is for internal use only and
drivers should mix that with their own debug module options.

It is handled by the V4L2 core and users can set it using
/sys/class/video4linux/<devX>/debug.

It has been deprecated for some time now, so it is time to remove it
completely from the drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:29:04 -02:00
Andrey Utkin
e476f4e15d [media] solo6x10: just pass frame motion flag from hardware, drop additional handling as complicated and unstable
Dropping code (introduced in 316d9e84a7)
which intends to make raising of motion events more "smooth"(?).

It made motion event never appear in my installation.
That code is complicated, so I couldn't figure out quickly how to fix
it, so dropping it seems better to me.

Another justification is that anyway application would implement
"motion signal stabilization" if required, it is not necessarily kernel
driver's job.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:27:12 -02:00
Hans Verkuil
b6f21dc354 [media] cx25821: remove video output support
The video output functionality never worked for this driver. Now remove the
creation of the output video nodes as well to prevent users from thinking
that video output is available, when it isn't.

To correctly implement this the video output should use vb2 as well, and
that requires rewriting the output DMA setup. But without hardware to test
I am not able to do that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:22:00 -02:00
Hans Verkuil
11c8a2df2c [media] cx25821: add create_bufs support
Add support for the VIDIOC_CREATE_BUFS ioctl. This was missing in this
driver and in vb2 it's trivial to add.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:20:40 -02:00
Hans Verkuil
b671ae6bdc [media] cx25821: convert to vb2
This patch converts the cx25821 driver from the old videobuf framework to
the new vb2 framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:17:47 -02:00
Hans Verkuil
8d8e6d6005 [media] cx28521: drop videobuf abuse in cx25821-alsa
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-12-23 10:15:52 -02:00
Hans Verkuil
90ca8bef90 [media] btcx-risc: move to bt8xx
The btcx-risc module is no longer used by other drivers except for bttv.
So move it from common to bt8xx and make it part of the bttv driver instead
of as a separate module.

This module should never have been a common module since most of the code
has always been bttv specific.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 10:13:19 -02:00
Hans Verkuil
5ede94c705 [media] cx25821: remove bogus btcx_risc dependency
Those btcx_risc functions are meant for use with bttv, other drivers
should just allocate the memory themselves.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-23 09:35:35 -02:00
Hans Verkuil
215cedec37 [media] media: remove emacs editor variables
1) This is not allowed by the kernel coding style
2) Just configure your editor correctly
3) It's really ugly

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-22 17:52:20 -02:00
Linus Torvalds
0ec28c37c2 media updates for v3.19-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUksm/AAoJEAhfPr2O5OEV7GIP/1nm2rcf16+6Y7nhjWLgPmlU
 uG9fNUMm7qvFHryCr4RwmTBnCv63Nn/5BFRcXdpAA2gHOtADcHCDNJbtSX+GRN5F
 I0C5gbLbQVd7l/GFsiGTsBScInAQB+ZN0WNyPbF0OCGLuzzRlexadAYTZufnNiNN
 nYCINIBub0jUPJaIrbm/qDAbazS7fxTO9HAdMcJGtexPCO/Gj92+4s8NXI+N3hxk
 Cj87EPsk6i6GA1BM0oVmDWK0dQjgFm+ONMBc8vhFOyVzCXb7pjHg53n1zZ0e0TDt
 jm/h/oIJuWyH/isEuwcNPTBxf2E9EOv8g66V9mDN1i7zsTEf9Bs08fPigalfJ84x
 5S5GBaHEGIu8d2PgqaqxmFO1COyk+xoj9O0Iwx8uabYtyRtgUVaEtsfyHWU2ZiAh
 3wqmtHSK5mt835h9wzjxs18apnRhTwEhfQWzFdiCFxkDPz3vPmfWbm+8WHChtYJh
 j0oSJwzK9uAcYwG8WZi643WduIyrXiDqaglWyBg+7c2k3NhP76W5CpLhjZ+8PrYt
 I6Jf+gZL/Joq5bMQx6itajgE5IIhAfxmdyaYIBqmlXuQ/88zrw7JBwu6q22jSVbq
 +QaURaSJ6qOLYj6S/ip93KPVsUXmfdE1JttuLp4ie7r0Q8zOahr4dPQ/xAwATtY/
 Jeo+d7AI4tLWQcIDKIWi
 =1rPM
 -----END PGP SIGNATURE-----

Merge tag 'media/v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull second set of media updates from Mauro Carvalho Chehab:

 - Move drivers for really old legacy hardware to staging.  Those are
   using obsolete media kAPIs and are for hardware that nobody uses for
   years.  Simply not worth porting them to the new kAPIs.  Of course,
   if anyone pops up to fix, we can move them back from there

 - While not too late, do some API fixups at the new colorspace API,
   added for v3.19

 - Some improvements for rcar_vin driver

 - Some fixups at cx88 and vivid drivers

 - Some Documentation fixups

* tag 'media/v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] bq/c-qcam, w9966, pms: move to staging in preparation for removal
  [media] tlg2300: move to staging in preparation for removal
  [media] vino/saa7191: move to staging in preparation for removal
  [media] MAINTAINERS: vivi -> vivid
  [media] cx88: remove leftover start_video_dma() call
  [media] cx88: add missing alloc_ctx support
  [media] v4l2-ioctl: WARN_ON if querycap didn't fill device_caps
  [media] vivid: fix CROP_BOUNDS typo for video output
  [media] DocBook media: update version number and document changes
  [media] vivid.txt: document new controls
  [media] DocBook media: add missing ycbcr_enc and quantization fields
  [media] v4l2-mediabus.h: use two __u16 instead of two __u32
  [media] rcar_vin: Fix interrupt enable in progressive
  [media] rcar_vin: Enable VSYNC field toggle mode
  [media] rcar_vin: Add scaling support
  [media] rcar_vin: Add DT support for r8a7793 and r8a7794 SoCs
  [media] rcar_vin: Add YUYV capture format support
2014-12-18 20:14:49 -08:00
Hans Verkuil
389208e117 [media] cx88: remove leftover start_video_dma() call
The start_streaming op is responsible for starting the video dma,
so it shouldn't be called anymore from the buf_queue op.

Unfortunately, this call to start_video_dma() was added to the
start_streaming op, but was forgotten to be removed from the
buf_queue op, which is where it used to be before the vb2 conversion.

Calling this function twice causes very hard to find errors: sometimes
it works, sometimes it doesn't. It took me a whole friggin' day
to track this down, and in the end it was just luck that my eye suddenly
triggered on that line.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-16 23:21:40 -02:00
Hans Verkuil
165d00439f [media] cx88: add missing alloc_ctx support
The cx88 vb2 conversion and the vb2 dma_sg improvements were developed separately and
were merged separately. Unfortunately, the patch updating drivers to the dma_sg
improvements didn't take the updated cx88 driver into account. Basically two ships
passing in the night, unaware of one another even though both ships have the same
owner, i.e. me :-)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Chris Lee <updatelee@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-16 23:21:40 -02:00
Linus Torvalds
a7cb7bb664 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree update from Jiri Kosina:
 "Usual stuff: documentation updates, printk() fixes, etc"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
  intel_ips: fix a type in error message
  cpufreq: cpufreq-dt: Move newline to end of error message
  ps3rom: fix error return code
  treewide: fix typo in printk and Kconfig
  ARM: dts: bcm63138: change "interupts" to "interrupts"
  Replace mentions of "list_struct" to "list_head"
  kernel: trace: fix printk message
  scsi: mpt2sas: fix ioctl in comment
  zbud, zswap: change module author email
  clocksource: Fix 'clcoksource' typo in comment
  arm: fix wording of "Crotex" in CONFIG_ARCH_EXYNOS3 help
  gpio: msm-v1: make boolean argument more obvious
  usb: Fix typo in usb-serial-simple.c
  PCI: Fix comment typo 'COMFIG_PM_OPS'
  powerpc: Fix comment typo 'CONIFG_8xx'
  powerpc: Fix comment typos 'CONFiG_ALTIVEC'
  clk: st: Spelling s/stucture/structure/
  isci: Spelling s/stucture/structure/
  usb: gadget: zero: Spelling s/infrastucture/infrastructure/
  treewide: Fix company name in module descriptions
  ...
2014-12-12 10:08:06 -08:00
Linus Torvalds
bae41e45b7 sound updates for 3.19-rc1
This became a fairly large pull request.  In addition to the usual
 driver updates / fixes, there have been a high amount of cleanups in
 ASoC area, as well as control API helpers and kernel documentations
 fixes touching through the whole tree.
 
 In the driver side, the biggest changes are the support for new Intel
 SoC found on new x86 machines, and the updates of FireWire dice and
 oxfw drivers.
 
 Some remarkable items are below:
 
 * ALSA core
  - PCM mmap code cleanup, removal of arch-dependent codes
  - PCM xrun injection support
  - PCM hwptr tracepoint support
  - Refactoring of snd_pcm_action(), simplification of PCM locking
  - Robustified sequecner auto-load functionality
  - New control API helpers and lots of cleanups along with them
  - Lots of kerneldoc fixes and cleanups
 
 * USB-audio
  - The mixer resume code was largely rewritten, and the devices with
    quirks are resumed properly.
  - New hardware support: Focusrite Scarlett, Digidesign Mbox1,
    Denon/Marantz DACs, Zoom R16/24
 
 * FireWire
  - DICE driver updates with better duplex and sync support, including
    MIDI support
  - New OXFW driver for Oxford Semiconductor FW970/971 chipset,
    including the previous LaCie Speakers device.  Fullduplex and MIDI
    support included as well as DICE driver.
 
 * HD-audio
  - Refactoring the driver-caps quirk handling in snd-hda-intel
  - More consistent control names representing the topology better
  - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic
    fix, ASUS Z99He laptop EAPD
 
 * ASoC
  - Conversion of AC'97 drivers to use regmap, bringing us closer to
    the removal of the ASoC level I/O code
  - Clean up a lot of old drivers that were open coding things that
    have subsequently been implemented in the core
  - Some DAPM performance improvements
  - Removal of the now seldom used CODEC mutex
  - Lots of updates for the newer Intel SoC support, including support
    for the DSP and some Cherrytrail and Braswell machine drivers
  - Support for Samsung boards using rt5631 as the CODEC
  - Removal of the obsolete AFEB9260 machine driver
  - Driver support for the TI TS3A227E headset driver used in some
    Chrombeooks
 
 * Others
  - ASIHPI driver update and cleanups
  - Lots of dev_*() printk conversions
  - Lots of trivial cleanups for the codes spotted by Coccinelle
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUiYaqAAoJEGwxgFQ9KSmkeo0P/2aDx2w8iVi8n7Og/7VBubkm
 VZkk08IOpP3h1ojyQRsBQPI0H5AquqQTZN1TJUDcy+6PD9vckYYcag9JWhA+0RBr
 I+BfTMLB3E4umIkzOjxeoyOzheL7GoZ+eZYEm8DkAhaue+cFhjNJz+S6g8ENkxJ9
 lSjErXQxyiowc39I0v1WBZcuq6glX1psEsVup9U8m7KhNx6lexj28A2MkqicW4hs
 DZE6pYrk57W7y3+/NWxaBiglrItvScBAPpPqoyDm9zuDNTmAtGjf1uMRmRyHe30Z
 iunHXki8Fc2yBBapmfYrcLC2jyIyZykcxniF8Hd4nXUvddisFUEFFhNmB6v392d0
 4/NXSqTnsq48vm0Ezjia2LySWKZZVQtam8t9262BKHcosKYObxirekD6vijSoWO8
 ZWoXa+U1oWSFEoOAFDsu6GFqFHFRi5VhqBgIaPEIxrT2MQGHL3KU1bp8CJi/5CTU
 pNh0wC9SMtnSJJXBIP/nYH81WQxaik3c4eiHFPN4+0McBZQiIaIqMG6x+iiVNvPB
 MNLLVAzk0QiWeCmSo8OBdjOV0/T+pfQ7lrTCn2B1jdJi1CkAO8m2SwQrG4PpRx8k
 lUTBd4zTx5DYR+yPF69OyoCQg0XKjW9g62Qo5rmxrQreiidROZOBS1bljWzIPeft
 otupLmK5kz67n3eB2eto
 =sB6v
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This became a fairly large pull request.  In addition to the usual
  driver updates / fixes, there have been a high amount of cleanups in
  ASoC area, as well as control API helpers and kernel documentations
  fixes touching through the whole tree.

  In the driver side, the biggest changes are the support for new Intel
  SoC found on new x86 machines, and the updates of FireWire dice and
  oxfw drivers.

  Some remarkable items are below:

  ALSA core:
   - PCM mmap code cleanup, removal of arch-dependent codes
   - PCM xrun injection support
   - PCM hwptr tracepoint support
   - Refactoring of snd_pcm_action(), simplification of PCM locking
   - Robustified sequecner auto-load functionality
   - New control API helpers and lots of cleanups along with them
   - Lots of kerneldoc fixes and cleanups

  USB-audio:
   - The mixer resume code was largely rewritten, and the devices with
     quirks are resumed properly.
   - New hardware support: Focusrite Scarlett, Digidesign Mbox1,
     Denon/Marantz DACs, Zoom R16/24

  FireWire:
   - DICE driver updates with better duplex and sync support, including
     MIDI support
   - New OXFW driver for Oxford Semiconductor FW970/971 chipset,
     including the previous LaCie Speakers device.  Fullduplex and MIDI
     support included as well as DICE driver.

  HD-audio:
   - Refactoring the driver-caps quirk handling in snd-hda-intel
   - More consistent control names representing the topology better
   - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic
     fix, ASUS Z99He laptop EAPD

  ASoC:
   - Conversion of AC'97 drivers to use regmap, bringing us closer to
     the removal of the ASoC level I/O code
   - Clean up a lot of old drivers that were open coding things that
     have subsequently been implemented in the core
   - Some DAPM performance improvements
   - Removal of the now seldom used CODEC mutex
   - Lots of updates for the newer Intel SoC support, including support
     for the DSP and some Cherrytrail and Braswell machine drivers
   - Support for Samsung boards using rt5631 as the CODEC
   - Removal of the obsolete AFEB9260 machine driver
   - Driver support for the TI TS3A227E headset driver used in some
     Chrombeooks

  Others:
   - ASIHPI driver update and cleanups
   - Lots of dev_*() printk conversions
   - Lots of trivial cleanups for the codes spotted by Coccinelle"

* tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits)
  ALSA: pcxhr: NULL dereference on probe failure
  ALSA: lola: NULL dereference on probe failure
  ALSA: hda - Add "eapd" model string for AD1986A codec
  ALSA: hda - Add EAPD fixup for ASUS Z99He laptop
  ALSA: oxfw: Add hwdep interface
  ALSA: oxfw: Add support for capture/playback MIDI messages
  ALSA: oxfw: add support for capturing PCM samples
  ALSA: oxfw: Add support AMDTP in-stream
  ALSA: oxfw: Add support for Behringer/Mackie devices
  ALSA: oxfw: Change the way to start stream
  ALSA: oxfw: Add proc interface for debugging purpose
  ALSA: oxfw: Change the way to make PCM rules/constraints
  ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation
  ALSA: oxfw: Change the way to name card
  ALSA: dice: Add support for MIDI capture/playback
  ALSA: dice: Add support for capturing PCM samples
  ALSA: dice: Support for non SYT-Match sampling clock source mode
  ALSA: dice: Add support for duplex streams with synchronization
  ALSA: dice: Change the way to start stream
  ALSA: jack: Add dummy snd_jack_set_key() definition
  ...
2014-12-11 13:20:50 -08:00
Linus Torvalds
2183a58803 media updates for v3.19-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUhxhbAAoJEAhfPr2O5OEV4JwP/2I7D2KGz5tdNGDAh1H8+swR
 hoj3tX7HLhwBmF6XIUlMYbk5L/ClDace6kcjT6OjwJ9SktrrKks6ZSsYsBjCIyOC
 yS7xNQArUKzWk4vV+uJVAvtF8V57LLFul8dhHk0JJwAxrkWnPvDdfJNs4PhUAkgn
 1i0PPshNo5Ow/+4YMiOjEDR+q9TMSUUzaq5zkPF7AFCnykuJ1wUJwUE0qjTfGi+4
 gl1yMye0TEawTYSM8h/+Lh7wosNFZYcXg85r04A6a8h6GLgg0h6KSOJjyPITmQ+j
 hLdtyiYs8a6XT+Y8o416zxpbSozo7KXCUTtet/N5g+lgQMqZqSd9WxE52SOY+kfd
 UVeob0VfWR0xdDzaJp5rLQ/MQ16RTHaHppgUidFxxGe9D5f9JM/88I0OfwNzl4uO
 cv2cyeNktHH6bcjfOGqxSVmZWgAm6q6qU7MN07PoN+5TcUlYTAOi1WLE5K+7HGgw
 CxzOZ61oxi/OO1FapaVoipq6ycjltTql2kbcARvmrRrbge0ocAqHxHqFyUbDDhNw
 Wn/O6VzLfpW0vGTacC6+xcUSpIhwajJ80UJAOqJP8sw0Xtmian5Lcs6gVzxwkOdU
 36Po4RRGFqsG6Sq3HR+toNwKt/nHNEFkJwYcNFHdvBiXTEYYkMe6MccUxxb3i/iI
 KxB1s51zVy9t3PqjP+3J
 =i7gx
 -----END PGP SIGNATURE-----

Merge tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:
 - Two new dvb frontend drivers: mn88472 and mn88473
 - A new driver for some PCIe DVBSky cards
 - A new remote controller driver: meson-ir
 - One LIRC staging driver got rewritten and promoted to mainstream:
   igorplugusb
 - A new tuner driver (m88rs6000t)
 - The old omap2 media driver got removed from staging.  This driver
   uses an old DMA API and it is likely broken on recent kernels.
   Nobody cared enough to fix it
 - Media bus format moved to a separate header, as DRM will also use the
   definitions there
 - mem2mem_testdev were renamed to vim2m, in order to use the same
   naming convention taken by the other virtual test driver (vivid)
 - Added a new driver for coda SoC (coda-jpeg)
 - The cx88 driver got converted to use videobuf2 core
 - Make DMABUF export buffer to work with DMA Scatter/Gather and Vmalloc
   cores
 - Lots of other fixes, improvements and cleanups on the drivers.

* tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (384 commits)
  [media] mn88473: One function call less in mn88473_init() after error
  [media] mn88473: Remove uneeded check before release_firmware()
  [media] lirc_zilog: Deletion of unnecessary checks before vfree()
  [media] MAINTAINERS: Add myself as img-ir maintainer
  [media] img-ir: Don't set driver's module owner
  [media] img-ir: Depend on METAG or MIPS or COMPILE_TEST
  [media] img-ir/hw: Drop [un]register_decoder declarations
  [media] img-ir/hw: Fix potential deadlock stopping timer
  [media] img-ir/hw: Always read data to clear buffer
  [media] redrat3: ensure dma is setup properly
  [media] ddbridge: remove unneeded check before dvb_unregister_device()
  [media] si2157: One function call less in si2157_init() after error
  [media] tuners: remove uneeded checks before release_firmware()
  [media] arm: omap2: rx51-peripherals: fix build warning
  [media] stv090x: add an extra protetion against buffer overflow
  [media] stv090x: Remove an unreachable code
  [media] stv090x: Some whitespace cleanups
  [media] em28xx: checkpatch cleanup: whitespaces/new lines cleanups
  [media] si2168: add support for firmware files in new format
  [media] si2168: debug printout for firmware version
  ...
2014-12-11 11:49:23 -08:00
Linus Torvalds
cbfe0de303 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS changes from Al Viro:
 "First pile out of several (there _definitely_ will be more).  Stuff in
  this one:

   - unification of d_splice_alias()/d_materialize_unique()

   - iov_iter rewrite

   - killing a bunch of ->f_path.dentry users (and f_dentry macro).

     Getting that completed will make life much simpler for
     unionmount/overlayfs, since then we'll be able to limit the places
     sensitive to file _dentry_ to reasonably few.  Which allows to have
     file_inode(file) pointing to inode in a covered layer, with dentry
     pointing to (negative) dentry in union one.

     Still not complete, but much closer now.

   - crapectomy in lustre (dead code removal, mostly)

   - "let's make seq_printf return nothing" preparations

   - assorted cleanups and fixes

  There _definitely_ will be more piles"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (63 commits)
  copy_from_iter_nocache()
  new helper: iov_iter_kvec()
  csum_and_copy_..._iter()
  iov_iter.c: handle ITER_KVEC directly
  iov_iter.c: convert copy_to_iter() to iterate_and_advance
  iov_iter.c: convert copy_from_iter() to iterate_and_advance
  iov_iter.c: get rid of bvec_copy_page_{to,from}_iter()
  iov_iter.c: convert iov_iter_zero() to iterate_and_advance
  iov_iter.c: convert iov_iter_get_pages_alloc() to iterate_all_kinds
  iov_iter.c: convert iov_iter_get_pages() to iterate_all_kinds
  iov_iter.c: convert iov_iter_npages() to iterate_all_kinds
  iov_iter.c: iterate_and_advance
  iov_iter.c: macros for iterating over iov_iter
  kill f_dentry macro
  dcache: fix kmemcheck warning in switch_names
  new helper: audit_file()
  nfsd_vfs_write(): use file_inode()
  ncpfs: use file_inode()
  kill f_dentry uses
  lockd: get rid of ->f_path.dentry->d_sb
  ...
2014-12-10 16:10:49 -08:00
Al Viro
ba00410b81 Merge branch 'iov_iter' into for-next 2014-12-08 20:39:29 -05:00
Takashi Iwai
e5edba464c ASoC: Updates for v3.19
Lots and lots of changes this time around, the usual set of driver
 updates and a huge bulk of cleanups from Lars-Peter.  Probably the most
 interesting thing for most users is the Intel driver updates which will
 (with some more machine integration work) enable support for newer x86
 laptops.
 
  - Conversion of AC'97 drivers to use regmap, bringing us closer to the
    removal of the ASoC level I/O code.
  - Clean up a lot of old drivers that were open coding things that have
    subsequently been implemented in the core.
  - Some DAPM performance improvements.
  - Removal of the now seldom used CODEC mutex.
  - Lots of updates for the newer Intel SoC support, including support
    for the DSP and some Cherrytrail and Braswell machine drivers.
  - Support for Samsung boards using rt5631 as the CODEC.
  - Removal of the obsolete AFEB9260 machine driver.
  - Driver support for the TI TS3A227E headset driver used in some
    Chrombeooks.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUhajpAAoJECTWi3JdVIfQcOsH/00TMeXlkIjnYe+AC9VjEMYN
 IAYaXs1UcAfxB4CpS9ik4sb4LQnnxl9aqy5clUZOLHvDAgHmi6L1E8CteJUGFXZ6
 /jjpu9/mI975asgyiNP44QDLSNDjzXX6Z1eeXRGvyKMNZkpg4FLfVq9a6ONtf1dw
 N3Hl3LG+wvPhAdR/OSKg9eDVnV1iY7mWOWr/9/1q8UhYRpCTL8x70ytBz6tfeU2r
 4fQmFma+qefYXvyuqzuiwzSHJKt+46Z35EyNlkCBpVJVErZL2TGOv4H04PjZhg6+
 4CR+YGJMSURRhgMCvUCAh4j6a4c+oSXU/LEl9wMcjWMfa3UtZWKojqlK8lYMeoE=
 =Pv8r
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v3.19

Lots and lots of changes this time around, the usual set of driver
updates and a huge bulk of cleanups from Lars-Peter.  Probably the most
interesting thing for most users is the Intel driver updates which will
(with some more machine integration work) enable support for newer x86
laptops.

 - Conversion of AC'97 drivers to use regmap, bringing us closer to the
   removal of the ASoC level I/O code.
 - Clean up a lot of old drivers that were open coding things that have
   subsequently been implemented in the core.
 - Some DAPM performance improvements.
 - Removal of the now seldom used CODEC mutex.
 - Lots of updates for the newer Intel SoC support, including support
   for the DSP and some Cherrytrail and Braswell machine drivers.
 - Support for Samsung boards using rt5631 as the CODEC.
 - Removal of the obsolete AFEB9260 machine driver.
 - Driver support for the TI TS3A227E headset driver used in some
   Chrombeooks.
2014-12-08 15:04:02 +01:00
Markus Elfring
ddc0085e91 [media] ddbridge: remove unneeded check before dvb_unregister_device()
The dvb_unregister_device() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04 15:28:52 -02:00
Hans Verkuil
2eb3b1adcb [media] media/usb,pci: fix querycap
Querycap shouldn't set the version field (the core does that for you),
but it should set the device_caps field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-02 11:30:34 -02:00
Hans Verkuil
dfdf780b46 [media] cx18: add device_caps support
This was missing in this driver, so add this functionality.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-02 11:28:48 -02:00
Nibble Max
460c8a7c25 [media] smipcie: add DVBSky T9580 V3 support
v2:
- Update Kconfig file.

DVBSky T9580 V3 card is the dual tuner card, which supports S/S2 and T2/T/C.
1>DVB-S/S2 frontend: M88DS3103/M88TS2022
2>DVB-T2/T/C frontend: SI2168B40/SI2157A30
2>PCIe bridge: SMI PCIe

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 12:32:57 -02:00
Nibble Max
344e2e5ed7 [media] smipcie: use add_i2c_client and del_i2c_client functions
v2:
-no change, just resend with other patches.

"add_i2c_client" and "del_i2c_client" functions make code shorter and easy to maintain.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 12:32:56 -02:00
Hans Verkuil
d790b7eda9 [media] vb2-dma-sg: move dma_(un)map_sg here
This moves dma_(un)map_sg to the get_userptr/put_userptr and alloc/put
memops of videobuf2-dma-sg.c and adds dma_sync_sg_for_device/cpu to the
prepare/finish memops.

Now that vb2-dma-sg will sync the buffers for you in the prepare/finish
memops we can drop that from the drivers that use dma-sg.

For the solo6x10 driver that was a bit more involved because it needs to
copy JPEG or MPEG headers to the buffer before returning it to userspace,
and that cannot be done in the old place since the buffer there is still
setup for DMA access, not for CPU access. However, the buf_finish
op is the ideal place to do this. By the time buf_finish is called
the buffer is available for CPU access, so copying to the buffer is fine.

[mchehab@osg.samsung.com: Fix a compilation breakage:
 drivers/media/v4l2-core/videobuf2-dma-sg.c:150:19: error: 'struct vb2_dma_sg_buf' has no member named 'dma_sgt']

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 09:01:16 -02:00
Hans Verkuil
0c3a14c177 [media] vb2-dma-sg: add allocation context to dma-sg
Require that dma-sg also uses an allocation context. This is in preparation
for adding prepare/finish memops to sync the memory between DMA and CPU.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 08:55:32 -02:00
Hans Verkuil
872dfcfe82 [media] bttv/cx25821/cx88/ivtv: use sg_next instead of sg++
Never use sg++, always use sg = sg_next(sg). Scatterlist entries can
be combined if the memory is contiguous but sg++ won't know about that.

As far as I can tell cx88 and ivtv are really broken because of this,
and bttv and cx25821 are OK because vb1 doesn't combine scatterlist
entries.

But regardless, sg++ should never be used, only sg_next is safe.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 08:12:53 -02:00
Andreas Ruprecht
3f56d2b31d [media] media: pci: smipcie: Fix dependency for DVB_SMIPCIE
In smipcie.c, the function i2c_bit_add_bus() is called. This
function is defined by the I2C bit-banging interfaces enabled
with CONFIG_I2C_ALGOBIT.

As there was no dependency in Kconfig, CONFIG_I2C_ALGOBIT could
be set to "m" while CONFIG_DVB_SMIPCIE was set to "y", resulting
in a build error due to an undefined reference.

This patch adds the dependency on CONFIG_I2C_ALGOBIT in Kconfig
by selecting it when CONFIG_DVB_SMIPCIE is selected.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 16:44:25 -02:00
Hans Verkuil
7675fe99d2 [media] cx23885: use sg = sg_next(sg) instead of sg++
The cx23885 driver still used sg++ instead of sg = sg_next(sg). This worked with
vb1 since that filled in the sglist manually, page-by-page, but it fails with vb2
which uses core scatterlist code that can combine contiguous scatterlist entries
into one larger entry.

This bug led to the following crash as reported by Mariusz:

[20712.990258] BUG: Bad page state in process vb2-cx23885[0]  pfn:2ca34
[20712.990265] page:ffffea00009c3b60 count:-1 mapcount:0 mapping:          (null) index:0x0
[20712.990266] flags: 0x4000000000000000()
[20712.990268] page dumped because: nonzero _count
[20712.990269] Modules linked in: tun binfmt_misc nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables xt_mark xt_REDIRECT xt_limit xt_conntrack xt_nat xt_tcpudp iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables x_tables sit ip_tunnel nvidia(PO) stb6100 stv090x cx88_dvb videobuf_dvb cx88_vp3054_i2c tuner kvm_amd kvm cx8802 k10temp cx8800 cx88xx btcx_risc videobuf_dma_sg videobuf_core usb_storage ds2490 usbhid ftdi_sio cx23885 tveeprom cx2341x videobuf2_dvb videobuf2_core videobuf2_dma_sg videobuf2_memops asus_atk0110 snd_emu10k1 snd_hwdep snd_util_mem snd_ac97_codec ac97_bus snd_rawmidi snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd w1_therm wire ipv6
[20712.990301] CPU: 2 PID: 26942 Comm: vb2-cx23885[0] Tainted: P    B   W  O   3.18.0-rc5-00001-gb3652d1 #2
[20712.990303] Hardware name: System manufacturer System Product Name/M4A785TD-V EVO, BIOS 2105    07/23/2010
[20712.990305]  ffffffff81765734 ffff880137683a78 ffffffff815b6b32 0000000000000006
[20712.990307]  ffffea00009c3b60 ffff880137683aa8 ffffffff8108ec27 ffffffff81765712
[20712.990309]  ffffffff8189c840 0000000000000246 ffffea00009c3b60 ffff880137683b78
[20712.990312] Call Trace:
[20712.990317]  [<ffffffff815b6b32>] dump_stack+0x46/0x58
[20712.990321]  [<ffffffff8108ec27>] bad_page+0xe9/0x107
[20712.990323]  [<ffffffff810912ca>] get_page_from_freelist+0x3b2/0x505
[20712.990326]  [<ffffffff8109150a>] __alloc_pages_nodemask+0xed/0x65f
[20712.990330]  [<ffffffff81047a52>] ? ttwu_do_activate.constprop.78+0x57/0x5c
[20712.990332]  [<ffffffff81049ff3>] ? try_to_wake_up+0x21b/0x22d
[20712.990336]  [<ffffffff810070f4>] dma_generic_alloc_coherent+0x6e/0xf5
[20712.990339]  [<ffffffff810261a9>] gart_alloc_coherent+0x105/0x114
[20712.990341]  [<ffffffff81025963>] ? flush_gart+0x39/0x3d
[20712.990343]  [<ffffffff810260a4>] ? gart_map_sg+0x3a0/0x3a0
[20712.990349]  [<ffffffffa0141a1e>] cx23885_risc_databuffer+0xa7/0x133 [cx23885]
[20712.990354]  [<ffffffffa0142764>] cx23885_buf_prepare+0x121/0x134 [cx23885]
[20712.990359]  [<ffffffffa0144210>] buffer_prepare+0x14/0x16 [cx23885]
[20712.990363]  [<ffffffffa011f101>] __buf_prepare+0x190/0x279 [videobuf2_core]
[20712.990366]  [<ffffffffa011d906>] ? vb2_queue_or_prepare_buf+0xb8/0xc0 [videobuf2_core]
[20712.990369]  [<ffffffffa011f34b>] vb2_internal_qbuf+0x51/0x1e5 [videobuf2_core]
[20712.990372]  [<ffffffffa0120537>] vb2_thread+0x199/0x1f6 [videobuf2_core]
[20712.990376]  [<ffffffffa012039e>] ? vb2_fop_write+0xdf/0xdf [videobuf2_core]
[20712.990379]  [<ffffffff81043e61>] kthread+0xdf/0xe7
[20712.990381]  [<ffffffff81043d82>] ? kthread_create_on_node+0x16d/0x16d
[20712.990384]  [<ffffffff815bd46c>] ret_from_fork+0x7c/0xb0
[20712.990386]  [<ffffffff81043d82>] ? kthread_create_on_node+0x16d/0x16d

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Mariusz Bialonczyk <manio@skyboo.net>
Tested-by: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 15:46:58 -02:00
Krzysztof Hałasa
3c787b108f [media] solo6x10: fix a race in IRQ handler
The IRQs have to be acknowledged before they are serviced, otherwise some events
may be skipped. Also, acknowledging IRQs just before returning from the handler
doesn't leave enough time for the device to deassert the INTx line, and for
bridges to propagate this change. This resulted in twice the IRQ rate on ARMv6
dual core CPU.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Tested-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 15:45:35 -02:00
Takashi Iwai
a69862d8d0 Merge branch 'for-linus' into test/usb-resume 2014-11-20 21:46:04 +01:00
Masanari Iida
6774def642 treewide: fix typo in printk and Kconfig
This patch fix spelling typo in printk and Kconfig within
various part of kernel sources.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-11-20 14:56:11 +01:00
Andrey Utkin
3943f42c11 Replace mentions of "list_struct" to "list_head"
There's no such thing as "list_struct".

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-11-20 14:45:15 +01:00
Al Viro
a455589f18 assorted conversions to %p[dD]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19 13:01:20 -05:00
Nibble Max
c02ef64aab [media] cx23885: add DVBSky T982(Dual DVB-T2/T/C) support
DVBSky T982 DVB-T2/T/C dual PCIe card:
1>dvb frontend: SI2158A20(tuner),SI2168A30(demod)
2>PCIe bridge: CX23885(port b: parallel mode, port c: serial mode)
3>rc: cx23885 integrated.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 18:28:41 -02:00
Prabhakar Lad
7f56a4a710 [media] media: cx88: use vb2_start_streaming_called() helper
this patch adds support for using vb2_start_streaming_called()
for cx88-blackbird driver.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 18:18:41 -02:00
Boris BREZILLON
43ba464182 [media] pci: Make use of MEDIA_BUS_FMT definitions
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

Replace all references to the old definitions in pci drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 17:53:21 -02:00
nibble.max
c29d6a83b3 [media] cx23885: add DVBSky S952 support
DVBSky S952 dvb-s/s2 dual PCIe card:
1>dvb frontend: M88TS2022(tuner),M88DS3103(demod)
2>PCIe bridge: CX23885(port b: parallel mode, port c: serial mode)
3>rc: cx23885 integrated.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 09:19:43 -02:00
nibble.max
cba5480c1e [media] cx23885: add DVBSky S950 support
DVBSky S950 dvb-s/s2 PCIe card:
1>dvb frontend: M88TS2022(tuner),M88DS3103(demod)
2>PCIe bridge: cx23885
3>rc: cx23885 integrated.

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 09:18:55 -02:00
Hans Verkuil
065e1477d2 [media] saa7164: fix sparse warnings
Fix many sparse warnings:

drivers/media/pci/saa7164/saa7164-core.c:97:18: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-core.c:122:31: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-core.c:122:31: warning: incorrect type in initializer (different address spaces)
drivers/media/pci/saa7164/saa7164-core.c:122:31:    expected unsigned char [noderef] [usertype] <asn:2>*bufcpu
drivers/media/pci/saa7164/saa7164-core.c:122:31:    got unsigned char [usertype] *<noident>
drivers/media/pci/saa7164/saa7164-core.c:282:44: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-core.c:286:38: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-core.c:286:35: warning: incorrect type in assignment (different address spaces)
drivers/media/pci/saa7164/saa7164-core.c:286:35:    expected unsigned char [noderef] [usertype] <asn:2>*p
drivers/media/pci/saa7164/saa7164-core.c:286:35:    got unsigned char [usertype] *<noident>
drivers/media/pci/saa7164/saa7164-core.c:352:44: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-core.c:527:53: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-core.c:129:30: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:133:38: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:133:72: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:134:35: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:287:61: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:288:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:289:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:290:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:291:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:292:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:293:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-core.c:294:65: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-fw.c:548:52: warning: incorrect type in argument 5 (different address spaces)
drivers/media/pci/saa7164/saa7164-fw.c:548:52:    expected unsigned char [usertype] *dst
drivers/media/pci/saa7164/saa7164-fw.c:548:52:    got unsigned char [noderef] [usertype] <asn:2>*
drivers/media/pci/saa7164/saa7164-fw.c:579:44: warning: incorrect type in argument 5 (different address spaces)
drivers/media/pci/saa7164/saa7164-fw.c:579:44:    expected unsigned char [usertype] *dst
drivers/media/pci/saa7164/saa7164-fw.c:579:44:    got unsigned char [noderef] [usertype] <asn:2>*
drivers/media/pci/saa7164/saa7164-fw.c:597:44: warning: incorrect type in argument 5 (different address spaces)
drivers/media/pci/saa7164/saa7164-fw.c:597:44:    expected unsigned char [usertype] *dst
drivers/media/pci/saa7164/saa7164-fw.c:597:44:    got unsigned char [noderef] [usertype] <asn:2>*
drivers/media/pci/saa7164/saa7164-bus.c:36:36: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-bus.c:41:36: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-bus.c:151:19: warning: incorrect type in assignment (different base types)
drivers/media/pci/saa7164/saa7164-bus.c:151:19:    expected unsigned short [unsigned] [usertype] size
drivers/media/pci/saa7164/saa7164-bus.c:151:19:    got restricted __le16 [usertype] <noident>
drivers/media/pci/saa7164/saa7164-bus.c:152:22: warning: incorrect type in assignment (different base types)
drivers/media/pci/saa7164/saa7164-bus.c:152:22:    expected unsigned int [unsigned] [usertype] command
drivers/media/pci/saa7164/saa7164-bus.c:152:22:    got restricted __le32 [usertype] <noident>
drivers/media/pci/saa7164/saa7164-bus.c:153:30: warning: incorrect type in assignment (different base types)
drivers/media/pci/saa7164/saa7164-bus.c:153:30:    expected unsigned short [unsigned] [usertype] controlselector
drivers/media/pci/saa7164/saa7164-bus.c:153:30:    got restricted __le16 [usertype] <noident>
drivers/media/pci/saa7164/saa7164-bus.c:172:20: warning: cast to restricted __le32
drivers/media/pci/saa7164/saa7164-bus.c:173:20: warning: cast to restricted __le32
drivers/media/pci/saa7164/saa7164-bus.c:206:28: warning: cast to restricted __le32
drivers/media/pci/saa7164/saa7164-bus.c:287:9: warning: incorrect type in argument 1 (different base types)
drivers/media/pci/saa7164/saa7164-bus.c:287:9:    expected unsigned int [unsigned] val
drivers/media/pci/saa7164/saa7164-bus.c:287:9:    got restricted __le32 [usertype] <noident>
drivers/media/pci/saa7164/saa7164-bus.c:339:20: warning: cast to restricted __le32
drivers/media/pci/saa7164/saa7164-bus.c:340:20: warning: cast to restricted __le32
drivers/media/pci/saa7164/saa7164-bus.c:463:9: warning: incorrect type in argument 1 (different base types)
drivers/media/pci/saa7164/saa7164-bus.c:463:9:    expected unsigned int [unsigned] val
drivers/media/pci/saa7164/saa7164-bus.c:463:9:    got restricted __le32 [usertype] <noident>
drivers/media/pci/saa7164/saa7164-bus.c:466:21: warning: cast to restricted __le16
drivers/media/pci/saa7164/saa7164-bus.c:467:24: warning: cast to restricted __le32
drivers/media/pci/saa7164/saa7164-bus.c:468:32: warning: cast to restricted __le16
drivers/media/pci/saa7164/saa7164-buffer.c:122:18: warning: incorrect type in assignment (different address spaces)
drivers/media/pci/saa7164/saa7164-buffer.c:122:18:    expected unsigned long long [noderef] [usertype] <asn:2>*cpu
drivers/media/pci/saa7164/saa7164-buffer.c:122:18:    got void *
drivers/media/pci/saa7164/saa7164-buffer.c:127:21: warning: incorrect type in assignment (different address spaces)
drivers/media/pci/saa7164/saa7164-buffer.c:127:21:    expected unsigned long long [noderef] [usertype] <asn:2>*pt_cpu
drivers/media/pci/saa7164/saa7164-buffer.c:127:21:    got void *
drivers/media/pci/saa7164/saa7164-buffer.c:134:20: warning: cast removes address space of expression
drivers/media/pci/saa7164/saa7164-buffer.c:156:63: warning: incorrect type in argument 3 (different address spaces)
drivers/media/pci/saa7164/saa7164-buffer.c:156:63:    expected void *vaddr
drivers/media/pci/saa7164/saa7164-buffer.c:156:63:    got unsigned long long [noderef] [usertype] <asn:2>*cpu
drivers/media/pci/saa7164/saa7164-buffer.c:179:57: warning: incorrect type in argument 3 (different address spaces)
drivers/media/pci/saa7164/saa7164-buffer.c:179:57:    expected void *vaddr
drivers/media/pci/saa7164/saa7164-buffer.c:179:57:    got unsigned long long [noderef] [usertype] <asn:2>*cpu
drivers/media/pci/saa7164/saa7164-buffer.c:180:56: warning: incorrect type in argument 3 (different address spaces)
drivers/media/pci/saa7164/saa7164-buffer.c:180:56:    expected void *vaddr
drivers/media/pci/saa7164/saa7164-buffer.c:180:56:    got unsigned long long [noderef] [usertype] <asn:2>*pt_cpu
drivers/media/pci/saa7164/saa7164-buffer.c:84:17: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-buffer.c:147:31: warning: dereference of noderef expression
drivers/media/pci/saa7164/saa7164-buffer.c:148:17: warning: dereference of noderef expression

Most are caused by pointers marked as __iomem when they aren't or not marked as
__iomem when they should.

Also note that readl/writel already do endian conversion, so there is no need to
do it again.

saa7164_bus_set/get were a bit tricky: you have to make sure the msg endian
conversion is done at the right time, and that the code isn't using fields that
are still little endian instead of cpu-endianness.

The approach chosen is to convert just before writing to the ring buffer
and to convert it back right after reading from the ring buffer.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 09:03:40 -02:00
Andrey Utkin
6db47fa1f1 [media] solo6x10: don't turn off/on encoder interrupt in processing loop
It makes no sense to block the SOLO_IRQ_ENCODER interrupt from being sent while
processing an earlier interrupt. New interrupts will just kick the thread
again once it is done processing.

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
[hans.verkuil@cisco.com: fix commit description]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 08:46:54 -02:00
Andrey Utkin
670390c2dc [media] solo6x10: bind start & stop of encoded frames processing thread to device (de)init
Before, it was called from individual encoder (de)init procedures, which
lead to spare threads running (which were actually lost, leaked).
The current fix uses trivial approach, and the downside is that the
processing thread is working always, even when there's no consumer.

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 08:46:31 -02:00
Andrey Utkin
0cb2df380b [media] solo6x10: free DMA allocation when releasing encoder
Fixes this warning:

[  956.730136] ------------[ cut here ]------------
[  956.730143] WARNING: CPU: 1 PID: 10134 at lib/dma-debug.c:963 dma_debug_device_change+0x191/0x1f0()
[  956.730146] pci 0000:07:05.0: DMA-API: device driver has pending DMA allocations while released from device [count=8]
One of leaked entries details: [device address=0x00000000d3d57000] [size=512 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as coherent]
[  956.730147] Modules linked in: solo6x10(-) videobuf2_dma_contig videobuf2_dma_sg videobuf2_memops videobuf2_core ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat videobuf_vmalloc videobuf_core v4l2_common videodev rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 cfg80211 crc_ccitt usbkbd hid_a4tech hid_generic usbhid snd_hda_codec_hdmi snd_hda_codec_via snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm x86_pkg_temp_thermal snd_timer snd soundcore
[  956.730172] CPU: 1 PID: 10134 Comm: rmmod Not tainted 3.18.0-rc1-next-20141023-zver-dirty #24
[  956.730173] Hardware name: System manufacturer System Product Name/P8H77-V, BIOS 0501 02/28/2012
[  956.730175]  0000000000000009 ffff8801df9e3c58 ffffffff817ffe6b 0000000000000001
[  956.730177]  ffff8801df9e3ca8 ffff8801df9e3c98 ffffffff81091ec7 0000000000000046
[  956.730180]  ffff880215457e90 0000000000000008 ffffffff81cbb10f ffff880215570098
[  956.730183] Call Trace:
[  956.730188]  [<ffffffff817ffe6b>] dump_stack+0x4f/0x7c
[  956.730192]  [<ffffffff81091ec7>] warn_slowpath_common+0x87/0xb0
[  956.730194]  [<ffffffff81091f91>] warn_slowpath_fmt+0x41/0x50
[  956.730197]  [<ffffffff81412558>] ? dma_debug_device_change+0xb8/0x1f0
[  956.730199]  [<ffffffff81412631>] dma_debug_device_change+0x191/0x1f0
[  956.730203]  [<ffffffff810b14ad>] notifier_call_chain+0x4d/0x70
[  956.730205]  [<ffffffff810b15f9>] __blocking_notifier_call_chain+0x59/0x80
[  956.730207]  [<ffffffff810b1631>] blocking_notifier_call_chain+0x11/0x20
[  956.730211]  [<ffffffff815873af>] __device_release_driver+0xcf/0xf0
[  956.730213]  [<ffffffff81587ee8>] driver_detach+0xc8/0xd0
[  956.730215]  [<ffffffff81587147>] bus_remove_driver+0x57/0xd0
[  956.730218]  [<ffffffff815887e9>] driver_unregister+0x29/0x60
[  956.730221]  [<ffffffff81420131>] pci_unregister_driver+0x21/0x90
[  956.730225]  [<ffffffffa03219d7>] solo_pci_driver_exit+0x10/0x12 [solo6x10]
[  956.730228]  [<ffffffff81112ee0>] SyS_delete_module+0x170/0x1f0
[  956.730232]  [<ffffffff813eb76e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[  956.730234]  [<ffffffff8180abd2>] system_call_fastpath+0x12/0x17
[  956.730235] ---[ end trace e730af02713a6c53 ]---
[  956.730237] Mapped at:
[  956.730238]  [<ffffffff8141186c>] debug_dma_alloc_coherent+0x3c/0xb0
[  956.730240]  [<ffffffffa03203f6>] solo_enc_v4l2_init+0x706/0xba0 [solo6x10]
[  956.730243]  [<ffffffffa03165b3>] solo_pci_probe+0x503/0x700 [solo6x10]
[  956.730245]  [<ffffffff81420459>] local_pci_probe+0x49/0xa0
[  956.730248]  [<ffffffff814207a1>] pci_device_probe+0xd1/0x120

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 08:46:02 -02:00
Andrey Utkin
9ccd180964 [media] solo6x10: clean up properly in stop_streaming
This fixes warning from drivers/media/v4l2-core/videobuf2-core.c,
WARN_ON(atomic_read(&q->owned_by_drv_count)).

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 08:45:32 -02:00
Joe Perches
85273c382e [media] cx25840/cx18: Use standard ordering of mask and shift
Precedence of & and >> is not the same and is not left to right.
shift has higher precedence and should be done after the mask.

This use has a mask then shift which is not the normal style.

Move the shift before the mask to match nearly all the other
uses in kernel.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11 08:44:08 -02:00
Takashi Iwai
1fb8510cdb ALSA: pcm: Add snd_pcm_stop_xrun() helper
Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-09 18:20:40 +01:00
Hans Verkuil
358486c426 [media] smipcie: fix sparse warnings
smipcie.c:950:31: warning: Using plain integer as NULL pointer
smipcie.c:973:31: warning: Using plain integer as NULL pointer

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-05 09:08:13 -02:00
Hans Verkuil
cf38d4b92d [media] bttv: fix sparse warning
bttv-cards.c:3874:55: warning: incorrect type in initializer (different base types)

Also clean up the code a little by adding spaces.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-05 09:07:19 -02:00
nibble.max
5eedd8d3ad [media] smipcie: add DVBSky S952 V3 support
DVBSky S952 V3 card has a dual channels of dvb-s/s2.
1>Frontend: Integrated tuner and demod: M88RS6000
2>PCIe bridge: SMI PCIe

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04 18:22:04 -02:00
Mauro Carvalho Chehab
232228763b [media] smipcie: fix two small CodingStyle issues
Fix two small CodingStyle issues

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:13:33 -02:00
nibble.max
d32f9ff737 [media] smipcie: SMI pcie bridge driver for DVBSky S950 V3 dvb-s/s2 cards
There is a new PCIe bridge chip(from SMI) used in DVBSky V3 seris cards, include S950 V3 and S952 V3 cards.
SMI pcie bridge chip is PCIe 1.1 compliant, supports MSI feature.
Main interface blocks:
1>Two DVB transport stream input ports(ts0,ts1).
2>Two I2C master bus(i2c0, i2c1).
3>IR controller.
4>reset pins and other GPIOs.

DVBSky S950 V3 card has a single channel of dvb-s/s2.
1>Frontend: tuner: M88TS2022, demod: M88DS3103
2>PCIe bridge: SMI PCIe
The current driver does not support SMI IR function.

[mchehab@osg.samsung.com: fix Makefile to find m88ts2022.h]
Signed-off-by: Max nibble <nibble.max@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 18:06:45 -02:00
Mauro Carvalho Chehab
ed3da2bf2e [media] cx23885-dvb: Fix some issues at the DVB error handling
X-Patchwork-Delegate: m.chehab@samsung.com
As pointed by smatch:
	drivers/media/pci/cx23885/cx23885-dvb.c:1066 dvb_register() error: we previously assumed 'fe0->dvb.frontend' could be null (see line 1060)
	drivers/media/pci/cx23885/cx23885-dvb.c:1990 cx23885_dvb_register() error: we previously assumed 'fe0' could be null (see line 1975)

What happens is that the error handling logic when a frontend
register fails sometimes keep doing the work, as if it didn't
fail.

This could potentially cause an OOPS. So, simplify the logic
a little bit and return an error if frontend fails before
trying to setup VB2 queue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 16:21:29 -02:00
Olli Salonen
61b103e85a [media] cx23885: add support for TechnoTrend CT2-4500 CI
TechnoTrend CT2-4500 CI is a PCIe device with DVB-T2/C tuner. It is
similar to DVBSky T980C, just with different PCI ID and remote controller.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 16:19:29 -02:00
nibble.max
070e66611d [media] cx23885: add DVBSky S950C and T980C RC support
DVBSky s950ci dvb-s/s2 ci PCIe card:
1>dvb frontend: M88TS2022(tuner),M88DS3103(demod)
2>ci controller: CIMAX SP2 or its clone.
3>PCIe bridge: CX23885

The patchs are based on the following patchs.
Olli Salonen submit:
https://patchwork.linuxtv.org/patch/26180/
https://patchwork.linuxtv.org/patch/26183/
https://patchwork.linuxtv.org/patch/26324/
Nibble Max submit:
https://patchwork.linuxtv.org/patch/26207/

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 11:52:08 -02:00
nibble.max
0e6c7b0117 [media] cx23885: add DVBSky S950C dvb-s/s2 ci PCIe card support(no RC)
DVBSky s950ci dvb-s/s2 ci PCIe card:
1>dvb frontend: M88TS2022(tuner),M88DS3103(demod)
2>ci controller: CIMAX SP2 or its clone.
3>PCIe bridge: CX23885

The patchs are based on the following patchs.
Olli Salonen submit:
https://patchwork.linuxtv.org/patch/26180/
https://patchwork.linuxtv.org/patch/26183/
https://patchwork.linuxtv.org/patch/26324/
Nibble Max submit:
https://patchwork.linuxtv.org/patch/26207/

Signed-off-by: Nibble Max <nibble.max@gmail.com>
Reviewed-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 11:51:28 -02:00
Joe Perches
509cd82619 [media] media: earthsoft: logging neatening
Use dev_err instead of pt1_printk
o reduce object code size
o remove now unused pt1_printk macro

Neaten dev_<level> uses in pt3
o add missing newlines
o align arguments
o remove unnecessary OOM messages as there's a generic one
o typo fixes in messages

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 11:00:41 -02:00
Hans Verkuil
c0d5b5fbbe [media] cx88: fix VBI support
Now works with both NTSC and PAL. Tested with CC/XDS for NTSC and
teletext/WSS for PAL. The start lines were wrong, the WSS signal
wasn't captured and there was no difference between NTSC and PAL
w.r.t. the count[] values so NTSC returned way too many lines.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:36:40 -02:00
Hans Verkuil
98822de9ae [media] cx88: pci_disable_device comes after free_irq
Move pci_disable_device() down otherwise it will complain about an
unfreed irq.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:35:56 -02:00
Hans Verkuil
c39ba33032 [media] cx88: consistently use UNSET for absent tuner
Don't mix UNSET and TUNER_ABSENT: you have to pick one or the other. For
this driver selecting UNSET to represent an absent tuner resulting in
the fewest changes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:35:34 -02:00
Hans Verkuil
078859a323 [media] cx88: don't allow changes while vb2_is_busy
Make sure that changing the standard or format is not allowed while
one or more of the video, vbi or mpeg vb2 queues are busy.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:34:33 -02:00
Hans Verkuil
fb37ab3e78 [media] cx88: drop mpeg_active field
The vb2 framework knows if streaming is in progress, no need to use
a separate field for that.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:33:29 -02:00
Hans Verkuil
ccd6f1d488 [media] cx88: move width, height and field to core struct
The width, height and field values are core fields since both vbi, video
and blackbird use the same video input.

Move those fields to the correct struct.

Also fix the field checks in the try_fmt functions: add V4L2_FIELD_SEQ_BT/TB
support and map incorrect field values to a correct field value instead of
returning an error.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:32:36 -02:00
Hans Verkuil
d386259f8e [media] cx88: don't pollute the kernel log
There is no reason to dump the sram code to the kernel log when you
stop streaming. Remove those calls to cx88_sram_channel_dump.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:31:01 -02:00
Hans Verkuil
b8f884164b [media] cx88: increase API command timeout
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 08:30:26 -02:00
Hans Verkuil
5e7045e3fa [media] cx88: remove dependency on btcx-risc
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 08:29:51 -02:00
Hans Verkuil
999b3ceb84 [media] cx88: drop cx88_free_buffer
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 08:28:30 -02:00
Hans Verkuil
eddd326320 [media] cx88: return proper errors during fw load
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 08:27:36 -02:00
Hans Verkuil
c79a23f33d [media] cx88: fix sparse warning
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 08:26:59 -02:00
Hans Verkuil
0b6b6302d9 [media] cx88: convert to vb2
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 08:26:33 -02:00
Hans Verkuil
b2c75abde0 [media] cx88: drop videobuf abuse in cx88-alsa
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 08:21:55 -02:00
Hans Verkuil
6f11adc6a5 [media] cx88: drop the bogus 'queue' list in dmaqueue
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 08:21:24 -02:00
Hans Verkuil
637bc20796 [media] cx88: remove fmt from the buffer struct
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-11-03 08:20:45 -02:00
nibble.max
d11a383509 [media] cx23885: add IR for DVBSky T9580 Dual DVB-S2/T2/C PCIe card
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 16:54:26 -02:00
Olli Salonen
24e774092f [media] cx23855: add CI support for DVBSky T980C
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 11:50:49 -02:00
Olli Salonen
e450de45f4 [media] cx23885: add I2C client for CI into state and handle unregistering
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 11:48:39 -02:00
Olli Salonen
82c10276d4 [media] cx23855: add support for DVBSky T980C (no CI support)
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-30 11:46:04 -02:00
Hans Verkuil
f2d90e6479 [media] tw68: remove bogus I2C_ALGOBIT dependency
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 09:30:55 -02:00
Fabian Frederick
a4789e6fc2 [media] tw68: remove deprecated IRQF_DISABLED
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-24 09:29:53 -02:00
Olli Salonen
143800a577 [media] cx23885: initialize config structs for T9580
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-10-21 08:54:42 -02:00
Antti Palosaari
cf3167cf1e [media] pt3: fix DTV FE I2C driver load error paths
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-28 22:23:42 -03:00
Mauro Carvalho Chehab
339f06c5d3 [media] pci drivers: use %zu instead of %zd
size_t is unsigned.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26 06:51:00 -03:00
Mauro Carvalho Chehab
84babee8fe [media] cx88: remove return after BUG()
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 06:47:57 -03:00
Mauro Carvalho Chehab
e2392d347e [media] cx88: fix cards table CodingStyle
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 06:47:56 -03:00
Mauro Carvalho Chehab
5a9ff85dc1 [media] saa7164-core: declare symbols as static
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 06:47:54 -03:00
Mauro Carvalho Chehab
87f4ebcd06 [media] sta2x11_vip: fix address space casting
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-26 06:47:53 -03:00
Olli Salonen
2944226622 [media] cx23855: add support for DVBSky T9580 DVB-C/T2/S2 tuner
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 21:33:16 -03:00
Olli Salonen
5cd3b6b40d [media] cx23855: add frontend set voltage function into state
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 21:30:43 -03:00
Olli Salonen
b0b12e63f9 [media] cx23885: add i2c client handling into dvb_unregister and state
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 21:30:24 -03:00
Mauro Carvalho Chehab
49310ed0ab [media] pt3: make pt3_pm_ops() static
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 18:47:17 -03:00
Akihiro Tsukada
f5a98f37a5 [media] pt3: add support for Earthsoft PT3 ISDB-S/T receiver card
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 17:04:01 -03:00
Mauro Carvalho Chehab
8eb988f1be [media] saa7134: Remove unused status var
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 16:13:48 -03:00
Mauro Carvalho Chehab
23ea6ec078 [media] saa7134: Remove some casting warnings
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 16:13:47 -03:00
Mauro Carvalho Chehab
aff440fa61 [media] saa7134: Fix compilation breakage when go7007 is not selected
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 16:13:47 -03:00
Hans Verkuil
452015de2e [media] saa7134: add saa7134-go7007
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 16:13:46 -03:00
Hans Verkuil
033d008821 [media] saa7134: also capture the WSS signal for 50 Hz VBI capture
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-23 16:13:46 -03:00
Hans Verkuil
1c5eaa23d8 [media] cx23885: fix size helper functions
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 20:42:29 -03:00
Hans Verkuil
420b217619 [media] cx23885: fix VBI support
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-21 20:41:34 -03:00
Mauro Carvalho Chehab
3cf0c6bd68 Merge remote-tracking branch 'linus/master' into patchwork
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-21 16:40:04 -03:00
Hans Verkuil
91f96e8b72 [media] tw68: drop bogus cpu_to_le32() call
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 16:40:54 -03:00
Hans Verkuil
947b38bb11 [media] tw68: simplify tw68_buffer_count
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 16:40:16 -03:00
Hans Verkuil
f1b6a73532 [media] cx23885: Add busy checks before changing formats
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 10:01:01 -03:00
Hans Verkuil
4d63a25c45 [media] cx23885: remove btcx-risc dependency
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 10:01:00 -03:00
Hans Verkuil
96f233e975 [media] cx23885: fix field handling
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 10:01:00 -03:00
Hans Verkuil
453afdd9ce [media] cx23885: convert to vb2
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 10:00:59 -03:00
Mauro Carvalho Chehab
04da2daee3 [media] ngene: properly handle __user ptr
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-08 10:00:52 -03:00
Mauro Carvalho Chehab
ce9e1ac1b9 [media] tw68: make tw68_pci_tbl static and constify
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 11:31:58 -03:00
Hans Verkuil
e15d1c12c5 [media] tw68: refactor and cleanup the tw68 driver
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 11:30:53 -03:00
Hans Verkuil
5740f4e75f [media] tw68: add original tw68 code
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-04 11:25:01 -03:00
Mauro Carvalho Chehab
5b0eb8271d [media] saa7164: just return 0 instead of using a var
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 17:59:29 -03:00
Mauro Carvalho Chehab
a896dc7a1f [media] bt8xx: just return 0 instead of using a var
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 17:59:29 -03:00
Mauro Carvalho Chehab
1b21e2187a [media] lm3560: simplify a boolean test
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 17:59:24 -03:00
Mauro Carvalho Chehab
c3142a61e6 [media] bttv-driver: remove an uneeded semicolon
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 17:59:12 -03:00
Hans Verkuil
39fd44607a [media] cx18: fix sparse warnings
/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>
2014-09-03 10:34:32 -03:00
Hans Verkuil
3efb8ab6d4 [media] ivtv: fix sparse warnings
drivers/media/pci/ivtv/ivtv-irq.c:195:25: warning: incorrect type in argument 1 (different base types)
drivers/media/pci/ivtv/ivtv-irq.c:199:25: warning: incorrect type in argument 1 (different base types)
drivers/media/pci/ivtv/ivtv-irq.c:278:35: warning: restricted __le32 degrades to integer
drivers/media/pci/ivtv/ivtv-irq.c:281:51: warning: restricted __le32 degrades to integer

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 10:34:13 -03:00
Hans Verkuil
711c311920 [media] cx23885: fix sparse warning
drivers/media/pci/cx23885/cx23885-dvb.c:1494:72: warning: Using plain integer as NULL pointer

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 10:33:37 -03:00
Hans Verkuil
888bd5dcb6 [media] dm1105: fix sparse warning
drivers/media/pci/dm1105/dm1105.c:617:9: warning: incorrect type in argument 1 (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 10:32:59 -03:00
Hans Verkuil
38b2b8794d [media] cx25821: fix sparse warning
drivers/media/pci/cx25821/cx25821-video-upstream.c:334:25: warning: incorrect type in argument 2 (different address spaces)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 10:32:02 -03:00
Hans Verkuil
967a378305 [media] mantis: fix sparse warnings
drivers/media/pci/mantis/hopper_vp3028.c:37:23: warning: symbol 'hopper_vp3028_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp1033.c:38:4: warning: symbol 'lgtdqcs001f_inittab' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp1033.c:153:23: warning: symbol 'lgtdqcs001f_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp1034.c:39:23: warning: symbol 'vp1034_mb86a16_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp1041.c:266:23: warning: symbol 'vp1041_stb0899_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp1041.c:303:23: warning: symbol 'vp1041_stb6100_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp2033.c:40:24: warning: symbol 'vp2033_tda1002x_cu1216_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp2033.c:45:24: warning: symbol 'vp2033_tda10023_cu1216_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp2040.c:40:24: warning: symbol 'vp2040_tda1002x_cu1216_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp2040.c:45:24: warning: symbol 'vp2040_tda10023_cu1216_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp3030.c:38:23: warning: symbol 'mantis_vp3030_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_vp3030.c:42:23: warning: symbol 'env57h12d5_config' was not declared. Should it be static?
drivers/media/pci/mantis/mantis_dma.c:167:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/mantis/mantis_dma.c:172:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/mantis/mantis_dma.c:174:25: warning: incorrect type in assignment (different base types)
drivers/media/pci/mantis/mantis_dma.c:178:9: warning: incorrect type in assignment (different base types)
drivers/media/pci/mantis/mantis_dma.c:179:9: warning: incorrect type in assignment (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:38:44 -03:00
Hans Verkuil
c463c9797c [media] ngene: fix sparse warnings
drivers/media/pci/ngene/ngene-core.c:188:27: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:190:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:199:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:260:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:263:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:282:32: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:283:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:284:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:285:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:286:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:287:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:288:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:292:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:293:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:294:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:295:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:296:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:297:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:303:17: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:316:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:368:17: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:372:9: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1160:28: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1199:20: warning: incorrect type in assignment (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1213:30: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1214:30: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1223:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1225:24: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1227:31: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1296:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1297:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1298:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1299:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1300:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1301:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1302:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1363:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1365:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1376:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1391:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-core.c:1596:18: warning: Using plain integer as NULL pointer
drivers/media/pci/ngene/ngene-core.c:1615:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-cards.c:699:29: warning: Using plain integer as NULL pointer
drivers/media/pci/ngene/ngene-cards.c:699:32: warning: Using plain integer as NULL pointer
drivers/media/pci/ngene/ngene-cards.c:699:35: warning: Using plain integer as NULL pointer
drivers/media/pci/ngene/ngene-cards.c:699:38: warning: Using plain integer as NULL pointer
drivers/media/pci/ngene/ngene-dvb.c:84:59: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-dvb.c:93:20: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/pci/ngene/ngene-dvb.c:94:20: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/pci/ngene/ngene-dvb.c💯20: warning: Using plain integer as NULL pointer

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:35:32 -03:00
Hans Verkuil
b5c00cc5a5 [media] ddbridge: fix sparse warnings
drivers/media/pci/ddbridge/ddbridge-core.c:88:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:93:37: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:95:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:99:15: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:117:58: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:119:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:123:68: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:130:17: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:131:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:136:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:138:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:152:22: warning: symbol 'ddb_i2c_algo' was not declared. Should it be static?
drivers/media/pci/ddbridge/ddbridge-core.c:183:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:184:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:246:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:247:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:255:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:256:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:269:35: warning: Using plain integer as NULL pointer
drivers/media/pci/ddbridge/ddbridge-core.c:358:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:359:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:360:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:362:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:366:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:368:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:369:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:370:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:380:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:381:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:393:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:394:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:395:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:396:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:397:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:401:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:403:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:404:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:406:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:416:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:417:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:475:36: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:484:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:494:20: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:501:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:524:36: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:534:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:852:21: warning: Using plain integer as NULL pointer
drivers/media/pci/ddbridge/ddbridge-core.c:973:20: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/pci/ddbridge/ddbridge-core.c:974:20: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/pci/ddbridge/ddbridge-core.c:978:20: warning: Using plain integer as NULL pointer
drivers/media/pci/ddbridge/ddbridge-core.c:982:20: warning: Using plain integer as NULL pointer
drivers/media/pci/ddbridge/ddbridge-core.c:1003:23: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1006:23: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1009:30: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1015:25: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1017:39: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1035:24: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1041:20: warning: symbol 'cxd_cfg' was not declared. Should it be static?
drivers/media/pci/ddbridge/ddbridge-core.c:1130:44: warning: Using plain integer as NULL pointer
drivers/media/pci/ddbridge/ddbridge-core.c:1183:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1188:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1193:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1198:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1213:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1214:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1215:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1216:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1231:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1232:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1233:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1289:17: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1333:23: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1295:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1347:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1353:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1354:24: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1359:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1361:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1373:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1374:16: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1378:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1382:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1385:17: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1386:24: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1388:24: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1393:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1394:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1395:16: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1398:16: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1399:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1451:42: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1462:45: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1467:37: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1538:28: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1550:9: warning: incorrect type in argument 2 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1561:31: warning: Using plain integer as NULL pointer
drivers/media/pci/ddbridge/ddbridge-core.c:1585:19: warning: incorrect type in assignment (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1591:47: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1591:60: warning: incorrect type in argument 1 (different address spaces)
drivers/media/pci/ddbridge/ddbridge-core.c:1607:9: warning: too many warnings

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 09:35:03 -03:00
Hans Verkuil
c44b6484db [media] solo6x10: fix sparse warnings
drivers/media/pci/solo6x10/solo6x10-disp.c:184:24: warning: incorrect type in assignment (different base types)
drivers/media/pci/solo6x10/solo6x10-disp.c:223:32: warning: incorrect type in assignment (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 08:55:39 -03:00
Hans Verkuil
6a03dc92cc [media] cx18: fix kernel oops with tda8290 tuner
This was caused by an uninitialized setup.config field.

Based on a suggestion from Devin Heitmueller.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com>
Reported-by: Scott Robinson <scott.robinson55@gmail.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org      # for v3.10 and up
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 08:53:02 -03:00
Hans Verkuil
0310539723 [media] cx23885: remove FSF address as per checkpatch
These addresses are usually out-of-date and the top-level license will
always have the right address. So drop it from these sources.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 08:35:55 -03:00
Hans Verkuil
568f44a18e [media] cx23885: use video_drvdata to get cx23885_dev pointer
Use video_drvdata(file) instead of fh->dev to get the cx23885_dev
pointer. This prepares for the vb2 conversion where fh->dev (renamed
to fh->q_dev in this patch) will be removed completely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:57:38 -03:00
Hans Verkuil
9529a4b0cf [media] cx23885: drop videobuf abuse in cx23885-alsa
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 <m.chehab@samsung.com>
2014-09-03 07:56:36 -03:00
Hans Verkuil
91d2d67452 [media] cx23885: fmt, width and height are global, not per-fh
Move these fields from cx23885_fh to cx23885_dev.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:55:24 -03:00
Hans Verkuil
e749c6e64c [media] cx23885: drop unused clip fields from struct cx23885_fh
There is no overlay support, so drop these unused fields.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:53:52 -03:00
Hans Verkuil
1f159c77d0 [media] cx23885: drop type field from struct cx23885_fh
This information is available elsewhere as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:53:27 -03:00
Hans Verkuil
8696193320 [media] cx23885: drop radio-related dead code
Currently no radio device nodes are ever created, so remove the dead radio
code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:52:24 -03:00
Hans Verkuil
200e0841ee [media] cx23885: map invalid fields to a valid field
If field format is not valid, map it as V4L2_FIELD_INTERLACED,
instead of pretending to support an invalid format.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:51:40 -03:00
Hans Verkuil
1af2ddd8b3 [media] cx23885: fix format colorspace compliance error
Fix v4l2-compliance failure relating to formatting.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:50:18 -03:00
Hans Verkuil
5150392cd9 [media] cx23885: convert 417 to the control framework
Convert the -417 source to the control framework as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:49:31 -03:00
Hans Verkuil
da59a4deb2 [media] cx23885: convert to the control framework
This is part 1, converting the uncompressed video/vbi nodes to use
the control framework.

The next patch converts the compressed video node as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:48:55 -03:00
Hans Verkuil
24a8f7b564 [media] cx23885: use core locking, switch to unlocked_ioctl
Enable core locking which allows us to safely switch to unlocked_ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:47:21 -03:00
Hans Verkuil
86dd9831ae [media] cx23885: support v4l2_fh and g/s_priority
Add support for struct v4l2_fh and priority handling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:45:22 -03:00
Hans Verkuil
d43be757b9 [media] cx23885: fix audio input handling
Fix a bunch of v4l2-compliance errors relating to audio input handling.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:44:30 -03:00
Hans Verkuil
a7d3eabd77 [media] cx23885: fix querycap
Set device_caps to fix the v4l2-compliance QUERYCAP complaints.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03 07:42:12 -03:00
Mauro Carvalho Chehab
12bd88e62c [media] be sure that HAS_DMA is enabled for vb2-dma-contig
vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take
it into account at select.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:19 -03:00
Randy Dunlap
b250392f7b [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV
Fix build when CONFIG_INPUT_EVDEV=m and DVB_AV7110=y.
Only build av7110_ir.c when CONFIG_INPUT_EVDEV is compatible with
CONFIG_DVB_AV7110.

Fixes these build errors:

drivers/built-in.o: In function `input_sync':
av7110_ir.c:(.text+0x1223ac): undefined reference to `input_event'
drivers/built-in.o: In function `av7110_emit_key':
av7110_ir.c:(.text+0x12247c): undefined reference to `input_event'
av7110_ir.c:(.text+0x122495): undefined reference to `input_event'
av7110_ir.c:(.text+0x122569): undefined reference to `input_event'
av7110_ir.c:(.text+0x1225a7): undefined reference to `input_event'
drivers/built-in.o:av7110_ir.c:(.text+0x122629): more undefined
references to `input_event' follow
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x1227e4): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x12298f): undefined reference to `input_register_device'
drivers/built-in.o: In function `av7110_ir_init':
(.text+0x12299e): undefined reference to `input_free_device'
drivers/built-in.o: In function `av7110_ir_exit':
(.text+0x122a94): undefined reference to `input_unregister_device'

drivers/built-in.o: In function `av7110_detach':
av7110.c:(.text+0x228d4a): undefined reference to `av7110_ir_exit'
drivers/built-in.o: In function `arm_thread':
av7110.c:(.text+0x22a404): undefined reference to `av7110_check_ir_config'
av7110.c:(.text+0x22a626): undefined reference to `av7110_check_ir_config'
drivers/built-in.o: In function `av7110_attach':
av7110.c:(.text+0x22b08c): undefined reference to `av7110_ir_init'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Jim Davis <jim.epost@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:38 -05:00
Andreas Ruprecht
c8fa50549d [media] drivers: media: pci: Makefile: Remove duplicate subdirectory from obj-y
In the list of subdirectories compiled, b2c2/ appears twice.

This patch removes one of the appearances.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:33 -05:00
Geert Uytterhoeven
43e9d4ab0c [media] cx23885: Spelling s/compuations/computations/
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:33 -05:00
Joe Perches
6850aeabdd media: use pci_zalloc_consistent
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:28 -07:00
Hans Verkuil
0f3bf3dc1c [media] cx23885: fix UNSET/TUNER_ABSENT confusion
Sometimes dev->tuner_type is compared to UNSET, sometimes to TUNER_ABSENT,
but these defines have different values.

Standardize to TUNER_ABSENT.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-01 15:30:59 -03:00
Hans Verkuil
0a12830893 [media] solo6x10: fix potential null dereference
drivers/media/pci/solo6x10/solo6x10-disp.c:221 solo_set_motion_block() error: potential null dereference
'buf'.  (kzalloc returns null)

Also propagate this error up the chain.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-27 18:24:16 -03:00
Matthias Schwarzott
36efec48e2 [media] cx23885: Add si2165 support for HVR-5500
The same card entry is used for HVR-4400 and HVR-5500.
Only HVR-5500 has been tested.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-27 17:01:59 -03:00
Christopher Reimer
93961435d0 [media] ddbridge: Add IDs for several newer Digital Devices cards
This patch adds the necessary IDs for the following dvb cards:

Digital Devices Octopus Mini
Digital Devices Cine S2 V6.5
Digital Devices DVBCT V6.1
Digital Devices Octopus V3
Mystique SaTiX-S2 V3

All these changes are taken from the official driver package by Digital
Devices.
http://download.digital-devices.de/download/linux/

[m.chehab@samsung.com: Fixed whitespace mangling]
Signed-off-by: Christopher Reimer <mail@creimer.net>
Tested-by: "D. Herrendoerfer" <d.herrendoerfer@herrendoerfer.name>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 15:00:01 -03:00
Heinrich Schuchardt
40feb52fb6 [media] media: saa7134: remove if based on uninitialized variable
Variable b is not initialized.
Only with a small chance it has random value 0xFF.
Remove if statement based on this value.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 12:30:41 -03:00