Commit graph

10740 commits

Author SHA1 Message Date
Hans de Goede 8b064ee19d [media] et61x251: remove wrongly claimed usb ids
The et61x251 driver claims a whole list of usb id's, but it only has
one sensor "module" which does sensor detection based on usb id and that
only supports devices with the 102c:6251 usb id. Remove the usb-ids for
other devices as for those the driver will fail with an unable to determine
sensor type message anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:45:01 -02:00
Hans de Goede 0d0ae15dde [media] gspca_main: wake wq on streamoff
We check for not streaming as a condition to abort waiting in dqbuf, so
when another thread does a streamoff we should wake the wq.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:45:00 -02:00
Hans de Goede ce5610bca7 [media] gspca_main: Allow switching from read to mmap / userptr mode
Some applications (xawtv, qv4l2) mix read and mmap calls. Allow switching
from read mode back to mmap mode (by doing a reqbufs).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:59 -02:00
Hans de Goede ee3629914b [media] gspca_main: Simplify read mode memory type checks
gspca_dev->memory == GSPCA_MEMORY_NO implies gspca_dev->nframes == 0,
so there is no need to check for both in dev_poll. The check in
dev_read also is more complex then needed, as dqbuf which dev_read
calls already does all necessary checks. Moreover dqbuf is holding
the proper locks while checking where as dev_read itself is not.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:58 -02:00
Hans de Goede d642de2ed4 [media] gspca_main: Set memory type to GSPCA_MEMORY_NO on buffer release
Before this patch we were not setting the memory type to GSPCA_MEMORY_NO
when the buffers were released by the app doing a reqbufs 0. Nor would
the memory type be set to GSPCA_MEMORY_NO on device close, as capture_file
already is NULL on device close because of the reqbufs 0. This caused the
following problem:
-app1 does reqbufs USERPTR for 4 buffers
-app1 does reqbufs USERPTR for 0 buffers
-app2 tries to do reqbufs MMAP for 4 buffers
 fails because gspca_dev->memory still is USERPTR

Fixing this also allows an app to switch memory type's by unrequesting
the buffers and re-requesting them of a different type.

This patch also moves the setting of gspca_dev->frsz and gscpa_dev->memory
to after alloc_frame succeeding, so that they are not changed when allocating
fails.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:57 -02:00
Hans de Goede 7f6eb118df [media] gspca_main: Remove no longer used users variable
Remove the no longer used / useful users variable, and with that gone
there also is no longer a need to take queue_lock in dev_open.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:56 -02:00
Hans de Goede 4a82bc60a9 [media] gspca_main: Update buffer flags even when user_copy fails
Before this patch dqbuf errors out on a failing user_copy (with user pointers)
before updating the buffer flags, causing a successsfully dequeued buffer
to still have the DONE flag, which means that it could no longer be
re-queueud (assuming the app somehow survives the segfault).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:55 -02:00
Hans de Goede 27074efa2e [media] gspca_main: Locking fixes 2
Before this patch vidioc_dqbuf is using its own read_lock, where as
other queue related functions use queue_lock. This means that dqbuf is
accessing several variables in a racy manor. The most important one
being fr_o, which may be changed from underneath dqbuf by vidioc_reqbufs
or vidioc_streamoff. Other variables which it accesses unprotected
are gspca_dev->memory, gspca_dev->streaming and gspca_dev->capt_file.

This patch fixes this by changing vidioc_dqbuf to also use the queue_lock.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:54 -02:00
Hans de Goede 4e770f7602 [media] gspca_main: Locking fixes 1
The gspca_dev->streaming boolean is protected against multiple access
through gspca_dev->queue_lock everywhere except for 2 places. This patch
fixes this by bringing it under the lock in vidioc_streamoff. And by
removing the check for gspca_dev->streaming in gspca_disconnect,
the destroy_urbs call may be called multiple times (and is protected
by the usb_lock) and calling wake_up_interruptible can also always be done
safely.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:53 -02:00
Antti Palosaari 82f4b5b67e [media] af9013: fix AF9013 TDA18271 IF config
IF freq	for DVB-T 7 MHz	and 8 MHz was set slightly wrong. Due to that it
didn't worked at all (?) for 7 MHz channels and most likely performance
was dropped for 8 MHz channels.

That bug was pointed by few people during last two months. Thank you.

Trivial fix. Compile tested only due to lack of proper HW and signal.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Romolo Manfredini <romoloman@hotmail.com>
Cc: Alireza Moini <alireza.moini@silverbrookresearch.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:44:52 -02:00
Hans Verkuil 424852f437 [media] radio-gemtek-pci: remove duplicate driver
The radio-gemtek-pci driver is for the same hardware as the radio-maxiradio
driver which uses the same GemTek PR103 and tea5757 combination and the two
drivers are identical. I chose the maxiradio over the gemtek-pci driver since
the maxiradio has support for mono/stereo detection.

Tested with my gemtek-pci card.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:23 -02:00
Hans Verkuil 90d873a7f9 [media] radio-maxiradio.c: use sensible frequency range
Use the standard USA/Europe frequency range of 87-108 MHz instead of the
arbitrary 50-150 MHz.

Copied from the radio-gemtek-pci driver which supports the same hardware.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:22 -02:00
Hans Verkuil 9bfaae24f9 [media] davinci: convert vpif_display to core-assisted locking
vpif_display now uses .unlocked_ioctl instead of .ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:21 -02:00
Hans Verkuil 46656afa8a [media] davinci: convert vpif_capture to core-assisted locking
Now uses .unlocked_ioctl instead of .ioctl.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:20 -02:00
Mats Randgaard 2c0ddd1774 [media] vpif_cap/disp: Cleanup, improved comments
Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Murali Karicheri <mkaricheri@gmail.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:19 -02:00
Mats Randgaard c027e165d2 [media] vpif_cap/disp: Added support for DV timings
Added functions to set and get custom DV timings.

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:17 -02:00
Mats Randgaard 40c8bcea6b [media] vpif_cap/disp: Add support for DV presets
- Added functions to set/get/query/enum DV presets for vpif_caputre and
  vpif_display.
- The format specification table is extended with all the DV formats
  supported by TVP7002.

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:16 -02:00
Mats Randgaard aa44440635 [media] vpif: Consolidate formats from capture and display
- The ch_params tables in vpif_capture.c and vpif_display.c are moved to a common
  table in vpif.c. Then it is easier to maintain the table.
- The field "fps" is removed from the struct vpif_channel_config_params because it
  is not used.

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by : Murali Karicheri <mkaricheri@gmail.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:15 -02:00
Mats Randgaard 7036d6a73c [media] vpif_cap/disp: Add debug functionality
The following functions are added to the drivers:
    - vpif_g_chip_ident
    - vpif_dbg_g_register
    - vpif_dbg_s_register
    - vpif_log_status

Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:14 -02:00
Hans Verkuil d2db8fee0d [media] cpia2: convert .ioctl to .unlocked_ioctl
Implement core-assisted locking in cpia2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:12 -02:00
Hans Verkuil 9af39713fe [media] saa7146: Convert from .ioctl to .unlocked_ioctl
Convert saa7146 to use core-assisted locking.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:10 -02:00
Hans Verkuil b219ab9cfb [media] bttv: remove obsolete 'no_tda9875' field
Since tda9875 is part of tvaudio this field no longer makes sense. Remove it.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:09 -02:00
Hans Verkuil f037484337 [media] tda9875: remove duplicate driver
In commit 411674fd18 the tda9875 support was
added to tvaudio. This means that tda9875 is no longer used since mid-2009.

If there are out-of-tree users of this driver, then they can switch to tvaudio
instead.

The original commit message read as follows:

    This change allows bttv to use tvaudio for this device. Since this device
    has the same i2c address as the tda9874 we need to support both in the same
    tvaudio driver. This makes it possible for tvaudio to detect which chip is
    used. Originally the tda9875 was only available in the dedicated tda9875
    driver, but that makes life very hard for bttv since loading tvaudio might
    misdetect a tda9875 as a tda9874.

So there were good reasons for moving the tda9875 code into tvaudio.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-19 11:28:08 -02:00
Linus Torvalds d73b388459 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM: Report wakeup events before resuming devices
  PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events
  PCI: sysfs: Update ROM to include default owner write access
  x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL
  x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available
  PCI/ACPI: Request _OSC control once for each root bridge (v3)
  PCI: enable pci=bfsort by default on future Dell systems
  PCI/PCIe: Clear Root PME Status bits early during system resume
  PCI: pci-stub: ignore zero-length id parameters
  x86/PCI: irq and pci_ids patch for Intel Patsburg
  PCI: Skip id checking if no id is passed
  PCI: fix __pci_device_probe kernel-doc warning
  PCI: make pci_restore_state return void
  PCI: Disable ASPM if BIOS asks us to
  PCI: Add mask bit definition for MSI-X table
  PCI: MSI: Move MSI-X entry definition to pci_regs.h

Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the
meantime been converted to not use legacy PCI power management, and thus
no longer use pci_restore_state() at all (and that caused trivial
conflicts with the "make pci_restore_state return void" patch)
2011-01-14 09:29:05 -08:00
Linus Torvalds 008d23e485 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  Documentation/trace/events.txt: Remove obsolete sched_signal_send.
  writeback: fix global_dirty_limits comment runtime -> real-time
  ppc: fix comment typo singal -> signal
  drivers: fix comment typo diable -> disable.
  m68k: fix comment typo diable -> disable.
  wireless: comment typo fix diable -> disable.
  media: comment typo fix diable -> disable.
  remove doc for obsolete dynamic-printk kernel-parameter
  remove extraneous 'is' from Documentation/iostats.txt
  Fix spelling milisec -> ms in snd_ps3 module parameter description
  Fix spelling mistakes in comments
  Revert conflicting V4L changes
  i7core_edac: fix typos in comments
  mm/rmap.c: fix comment
  sound, ca0106: Fix assignment to 'channel'.
  hrtimer: fix a typo in comment
  init/Kconfig: fix typo
  anon_inodes: fix wrong function name in comment
  fix comment typos concerning "consistent"
  poll: fix a typo in comment
  ...

Fix up trivial conflicts in:
 - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
 - fs/ext4/ext4.h

Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
2011-01-13 10:05:56 -08:00
Linus Torvalds 23d69b09b7 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
  usb: don't use flush_scheduled_work()
  speedtch: don't abuse struct delayed_work
  media/video: don't use flush_scheduled_work()
  media/video: explicitly flush request_module work
  ioc4: use static work_struct for ioc4_load_modules()
  init: don't call flush_scheduled_work() from do_initcalls()
  s390: don't use flush_scheduled_work()
  rtc: don't use flush_scheduled_work()
  mmc: update workqueue usages
  mfd: update workqueue usages
  dvb: don't use flush_scheduled_work()
  leds-wm8350: don't use flush_scheduled_work()
  mISDN: don't use flush_scheduled_work()
  macintosh/ams: don't use flush_scheduled_work()
  vmwgfx: don't use flush_scheduled_work()
  tpm: don't use flush_scheduled_work()
  sonypi: don't use flush_scheduled_work()
  hvsi: don't use flush_scheduled_work()
  xen: don't use flush_scheduled_work()
  gdrom: don't use flush_scheduled_work()
  ...

Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
2011-01-07 16:58:04 -08:00
Linus Torvalds 3e5b08cbbf Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits)
  USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004)
  USB: serial: ftdi_sio: add support for TIOCSERGETLSR
  USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport
  USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
  usb: ehci-omap: fix tll channel enable mask
  usb: ohci-omap3: fix trivial typo
  USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096
  USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's
  USB: gadget: update ci13xxx to work with g_ether
  USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers
  Revert "USB: musb: pm: don't rely fully on clock support"
  Revert "USB: musb: blackfin: pm: make it work"
  USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
  USB: uas: Ensure we only bind to a UAS interface
  USB: uas: Rename sense pipe and sense urb to status pipe and status urb
  USB: uas: Use kzalloc instead of kmalloc
  USB: uas: Fix up the Sense IU
  usb: musb: core: kill unneeded #include's
  DA8xx: assign name to MUSB IRQ resource
  usb: gadget: g_ncm added
  ...

Manually fix up trivial conflicts in USB Kconfig changes in:
	arch/arm/mach-omap2/Kconfig
	arch/sh/Kconfig
	drivers/usb/Kconfig
	drivers/usb/host/ehci-hcd.c
and annoying chip clock data conflicts in:
	arch/arm/mach-omap2/clock3xxx_data.c
	arch/arm/mach-omap2/clock44xx_data.c
2011-01-07 13:16:28 -08:00
Linus Torvalds 9e9bc97367 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (255 commits)
  [media] radio-aimslab.c: Fix gcc 4.5+ bug
  [media] cx25821: Fix compilation breakage due to BKL dependency
  [media] v4l2-compat-ioctl32: fix compile warning
  [media] zoran: fix compiler warning
  [media] tda18218: fix compile warning
  [media] ngene: fix compile warning
  [media] DVB: IR support for TechnoTrend CT-3650
  [media] cx23885, cimax2.c: Fix case of two CAM insertion irq
  [media] ir-nec-decoder: fix repeat key issue
  [media] staging: se401 depends on USB
  [media] staging: usbvideo/vicam depends on USB
  [media] soc_camera: Add the ability to bind regulators to soc_camedra devices
  [media] V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV2640 sensor
  [media] v4l: soc-camera: switch to .unlocked_ioctl
  [media] v4l: ov772x: simplify pointer dereference
  [media] ov9640: fix OmniVision OV9640 sensor driver's priv data retrieving
  [media] ov9640: use macro to request OmniVision OV9640 sensor private data
  [media] ivtv-i2c: Fix two warnings
  [media] staging/lirc: Update lirc TODO files
  [media] cx88: Remove the obsolete i2c_adapter.id field
  ...
2011-01-06 18:32:12 -08:00
Mauro Carvalho Chehab e3c9221519 [media] radio-aimslab.c: Fix gcc 4.5+ bug
gcc 4.5+ doesn't properly evaluate some inlined expressions.
A previous patch were proposed by Andrew Morton using noinline.
However, the entire inlined function is bogus, so let's just
remove it and be happy.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-06 08:26:02 -02:00
Hans Verkuil 36f54ff67b [media] v4l2-compat-ioctl32: fix compile warning
drivers/media/video/v4l2-compat-ioctl32.c: In function 'get_v4l2_format32':
drivers/media/video/v4l2-compat-ioctl32.c:169:2: warning: case value '0' not in enumerated type 'enum v4l2_buf_type'
drivers/media/video/v4l2-compat-ioctl32.c: In function 'put_v4l2_format32':
drivers/media/video/v4l2-compat-ioctl32.c:200:2: warning: case value '0' not in enumerated type 'enum v4l2_buf_type'

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-04 16:47:50 -02:00
Hans Verkuil 1a5e5af0d2 [media] zoran: fix compiler warning
drivers/media/video/zoran/zoran_driver.c: In function 'zoran_dqbuf':
drivers/media/video/zoran/zoran_driver.c:2197:21: warning: 'bs.frame' may be used uninitialized in this function

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-04 16:47:49 -02:00
Hans Verkuil 0c8fc77e48 [media] tda18218: fix compile warning
drivers/media/common/tuners/tda18218.c: In function 'tda18218_wr_regs':
drivers/media/common/tuners/tda18218.c:58:5: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-04 16:47:45 -02:00
Hans Verkuil 4f77b86c66 [media] ngene: fix compile warning
drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_start':
drivers/media/dvb/ngene/ngene-core.c:1308:16: warning: unused variable 'flags'

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-04 16:47:43 -02:00
Justin P. Mattock eb78bd7d8a media: comment typo fix diable -> disable.
The below patch fixes a typo "diable" to "disable".

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-03 16:03:38 +01:00
Hans Verkuil 8fd0bda511 [media] em28xx: radio_fops should also use unlocked_ioctl
em28xx uses core assisted locking, so it shouldn't use .ioctl.
The .ioctl callback was replaced by .unlocked_ioctl for video nodes,
but not for radio nodes. This is now corrected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-03 09:52:25 -02:00
Mauro Carvalho Chehab 46e67acd5d [media] wm8775: Revert changeset fcb9757333 to avoid a regression
It seems that cx88 and ivtv use wm8775 on some different modes. The
patch that added support for a board with wm8775 broke ivtv boards with
this device. As we're too close to release 2.6.37, let's just revert
it.

Reported-by: Andy Walls <awalls@md.metrocast.net>
Reported-by: Eric Sharkey <eric@lisaneric.org>
Reported-by: Auric <auric@aanet.com.au>
Reported by: David Gesswein <djg@pdp8online.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-03 09:09:56 -02:00
Andy Walls f23b7952d3 [media] cx25840: Prevent device probe failure due to volume control ERANGE error
This patch fixes a regression that crept into 2.6.36.

The volume control scale in the cx25840 driver has an unusual mapping
from register values to v4l2 volume control values.  Enforce the mapping
limits, so that the default volume control setting does not fall out of
bounds to prevent the cx25840 module device probe from failing.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-01-03 09:08:16 -02:00
David Henningsson 9d1da730ee [media] DVB: IR support for TechnoTrend CT-3650
Based on Waling Dijkstra's discovery that the IR works the same as
on the TT-1500, this patch has been rewritten to fit with the
rc_core infrastructure.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-31 13:46:21 -02:00
Igor M. Liplianin ebce9a3331 [media] cx23885, cimax2.c: Fix case of two CAM insertion irq
For example  boot up with two CAM inserted.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-31 13:46:20 -02:00
Mariusz Białończyk 21d3301410 [media] ir-nec-decoder: fix repeat key issue
Fixing the problem with NEC protocol and repeating keys under the following
circumstances. The problem occurs when there is a repeat code without
properly decoded scancode. This leads to repeat the wrong (last decoded)
scancode.

An example from real life:
I am pressing volume down, then several minutes later i am pressing
volume up, but the real scancode is wrongly decoded and only a repeat
event is emitted, so as a result volume is going down while i am holding
volume up button.

The patch fixes above problem using rc_keyup timeout (as pointed by Mauro).
It just prevents key repeats if they appear after rc_keyup.

Signed-off-by: Mariusz Białończyk <manio@skyboo.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-31 13:46:01 -02:00
Alberto Panizzo 96e442c1b2 [media] soc_camera: Add the ability to bind regulators to soc_camedra devices
In certain machines, camera devices are supplied directly
by a number of regulators. This patch add the ability to drive
these regulators directly by the soc_camera driver.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 22:29:37 -02:00
Alberto Panizzo 3153ac9c62 [media] V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV2640 sensor
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 22:29:34 -02:00
Guennadi Liakhovetski b6a633c18b [media] v4l: soc-camera: switch to .unlocked_ioctl
Use the V4L mutex infrastructure in soc-camera core and drivers and switch to
.unlocked_ioctl.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 22:29:26 -02:00
Guennadi Liakhovetski c85bb69af0 [media] v4l: ov772x: simplify pointer dereference
Use a more direct way to obtain a pointer to struct ov772x_priv, where the
subdevice is available.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 22:29:23 -02:00
David Cohen 63c9718c1a [media] ov9640: fix OmniVision OV9640 sensor driver's priv data retrieving
OmniVision OV9640 driver wasn't requesting properly its private data
on I2C remove and video_probe functions. It was retrieving the V4L2
subdev struct address instead of priv struct's one. This patch fixes
such problem.

Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 22:29:21 -02:00
David Cohen f7b74f76a3 [media] ov9640: use macro to request OmniVision OV9640 sensor private data
This cleanup patch creates macro to request OmniVision OV9640 private
data, which increases readability.

Signed-off-by: David Cohen <dacohen@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 22:29:20 -02:00
Mauro Carvalho Chehab 9804ed9e84 [media] ivtv-i2c: Fix two warnings
Fix two gcc warnings:

drivers/media/video/ivtv/ivtv-i2c.c:170: warning: cast from pointer to integer of different size
drivers/media/video/ivtv/ivtv-i2c.c:171: warning: cast from pointer to integer of different size
$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

They seem bogus, but, as the original code also has problems with
LE/BE, just change its implementation to be clear.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 13:06:35 -02:00
Mauro Carvalho Chehab 6a23a520c0 [media] cx88: Remove the obsolete i2c_adapter.id field
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:19 -02:00
Andy Walls a9cd591e29 [media] ir-kbd-i2c: Add HD PVR IR Rx support to ir-kbd-i2c
Add HD PVR IR Rx support to ir-kbd-i2c

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:16 -02:00
Andy Walls ea6c06033f [media] hdpvr: Add I2C and ir-kdb-i2c registration of the Zilog Z8 IR chip
Adds I2C registration of the Zilog Z8F0811 IR microcontroller for either
lirc_zilog or ir-kbd-i2c to use.  This is a required step in removing
lirc_zilog's use of the deprecated struct i2c_adapter.id field.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:14 -02:00
Mauro Carvalho Chehab 8a6334fc91 [media] ivtv-i2c: Don't use IR legacy mode for Zilog IR
The Zilog IR entries are already handled by IR new code. So,
remove its usage from the legacy IR support.

Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:10 -02:00
Mauro Carvalho Chehab e1e2c57565 [media] ivtv: Add Adaptec Remote Controller
lirc-i2c implements a get key logic for the Adaptec Remote
Controller, at address 0x6b. The only driver that seems to have
an Adaptec device is ivtv:

$ git grep -i adaptec drivers/media
drivers/media/video/cs53l32a.c: * cs53l32a (Adaptec AVC-2010 and AVC-2410) i2c ivtv driver.
drivers/media/video/cs53l32a.c: * Audio source switching for Adaptec AVC-2410 added by Trev Jackson
drivers/media/video/cs53l32a.c:   /* Set cs53l32a internal register for Adaptec 2010/2410 setup */
drivers/media/video/ivtv/ivtv-cards.c:/* Adaptec VideOh! AVC-2410 card */
drivers/media/video/ivtv/ivtv-cards.c:    { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0093 },
drivers/media/video/ivtv/ivtv-cards.c:    .name = "Adaptec VideOh! AVC-2410",
drivers/media/video/ivtv/ivtv-cards.c:/* Adaptec VideOh! AVC-2010 card */
drivers/media/video/ivtv/ivtv-cards.c:    { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_ADAPTEC, 0x0092 },
drivers/media/video/ivtv/ivtv-cards.c:    .name = "Adaptec VideOh! AVC-2010",
drivers/media/video/ivtv/ivtv-cards.h:#define IVTV_CARD_AVC2410         7 /* Adaptec AVC-2410 */
drivers/media/video/ivtv/ivtv-cards.h:#define IVTV_CARD_AVC2010         8 /* Adaptec AVD-2010 (No Tuner) */
drivers/media/video/ivtv/ivtv-cards.h:#define IVTV_PCI_ID_ADAPTEC                 0x9005
drivers/media/video/ivtv/ivtv-driver.c:            "\t\t\t 8 = Adaptec AVC-2410\n"
drivers/media/video/ivtv/ivtv-driver.c:            "\t\t\t 9 = Adaptec AVC-2010\n"
drivers/media/video/ivtv/ivtv-i2c.c:              0x6b,   /* Adaptec IR */

There are two Adaptec cards defined there, but AVC-2010 doesn't have a
remote controller. So, the logic at lirc_i2c seems to be for Adaptec AVC-2410.

As we'll remove lirc_i2c from kernel, move the getkey code to ivtv driver, and
use it for AVC-2410.

Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:08 -02:00
Mauro Carvalho Chehab 1c0eb0ffb0 [media] cx88: Add RC logic for Leadtek PVR 2000
Currently, lirc-i2c has a decoding logic for Leadtek Remote
Control. Move it to cx88, as we intend to remove lirc-i2c.

For now, initialize LIRC remote keytable with RC_MAP_EMPTY, as
we don't know its keymap yet. It would be nice to later check
if is there any file on LIRC userspace with that keytable.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:06 -02:00
Mauro Carvalho Chehab b22374544b [media] bttv-input: Add a note about PV951 RC
When comparing lirc-i2c and ir-kbd-i2c/bttv-input logic, a difference
was noticed. As lirc-i2c will be removed soon, store the difference on
a comment inside ir-kbd-i2c, in order to preserve the knowledge we
have about that remote controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 12:17:05 -02:00
Hans Verkuil 61ea3aa5bf [media] timblogiw: fix compile warning
Fix 64-bit compile warning:

drivers/media/video/timblogiw.c: In function ‘timblogiw_dma_filter_fn’:
drivers/media/video/timblogiw.c:151: warning: cast from pointer to integer of different size
drivers/media/video/timblogiw.c: In function ‘timblogiw_open’:
drivers/media/video/timblogiw.c:670: warning: cast to pointer from integer of different size

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Richard Rojförs <richard.rojfors@pelagicore.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:35 -02:00
Hans Verkuil 657f227105 [media] v4l: fix handling of v4l2_input.capabilities
The v4l core sets the v4l2_input.capabilities field based on the supplied
v4l2_ioctl_ops. However, several drivers do a memset or memcpy of the v4l2_input
struct, thus overwriting that field incorrectly.

Either remove the memset (which is already done by the v4l core), or add the
proper capabilities field in case of a memcpy.

The same is also true for v4l2_output, but that only affected the ivtv driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:29 -02:00
Hans Verkuil 3ea2b673a5 [media] em28xx: fix incorrect s_ctrl error code and wrong call to res_free
Calling subdevs to handle s_ctrl returned a non-zero return code even if
everything went fine.

Calling STREAMOFF if no STREAMON happened earlier would hit a BUG_ON
in res_free.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:23 -02:00
Hans Verkuil 02ac04805e [media] v4l2-ctrls: only check def for menu, integer and boolean controls
The 'def' field is only valid for menus, integers and booleans.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:18 -02:00
Hans Verkuil 513521eaee [media] v4l2-ctrls: use const char * const * for the menu arrays
This prevents checkpatch warnings generated when defining
'static const char *foo[]' arrays. It makes sense to use
const char * const * anyway since the pointers in the array
are indeed const.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:14 -02:00
Hans Verkuil 6d6a48e51f [media] usbvision: coding style
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:09 -02:00
Hans Verkuil 52cb0bf275 [media] usbvision: convert // to /* */
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:02:02 -02:00
Hans Verkuil 5490a7cbe6 [media] usbvision: get rid of camelCase
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:01:56 -02:00
Hans Verkuil c627b9d1f5 [media] usbvision: convert to unlocked_ioctl
Convert driver to use core-assisted locking.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-30 08:01:45 -02:00
Jean-François Moine aa777a88b2 [media] gspca - sonixj: Bad clock for om6802 in 640x480
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:21 -02:00
Jean-François Moine 71e84ea7f0 [media] gspca - stv06xx/st6422: Use the new video control mechanism
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:21 -02:00
Jean-François Moine 7e5f9059a8 [media] gspca - vc032x: Cleanup source
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:20 -02:00
Jean-François Moine 7fbee99aa2 [media] gspca - zc3xx: The sensor of the VF0250 is a GC0303
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:20 -02:00
Jean-François Moine 49fb5e60f7 [media] gspca - zc3xx: Use the new video control mechanism
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:20 -02:00
Jean-François Moine 7d55a84b0a [media] gspca - zc3xx: Keep sorted the device table
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:20 -02:00
Jean-François Moine 2bbf53bd17 [media] gspca: Bad comment
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:19 -02:00
Jean-François Moine 0aeb5ec74b [media] gspca - pac7302/pac7311: Fix some warnings
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:19 -02:00
Jean-François Moine d85185902f [media] gspca - main: Fix some warnings
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:19 -02:00
Hans Verkuil b9218f2f15 [media] saa6588: rename rds.h to saa6588.h
The naming of the media/rds.h header suggested that it was a generic
RDS header, when in fact it is just a saa6588 module API that is
internal to the kernel.

Rename the header and the struct and defines in it to make this clear.

Also removed the header include in radio-si470x.h (not used anymore)
and from ioctl-number.txt (it's internal to the kernel and never called
from userspace).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:18 -02:00
Vasiliy Kulikov a519d70e0c [media] media: video: pvrusb2: fix memory leak
Use put_device() instead of kfree() because of device name leak.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:18 -02:00
Alexey Chernov 9028f58f5d [media] support of GoTView PCI-E X5 3D Hybrid in cx23885
Some comments:
1. Everything initialize properly except radio.
2. All analog inputs (TV, composite, S-Video) are tested by myself in several
TV norms (SECAM-D, PAL, NTSC), everything work fine.

So the patch adds general support/detection of the card with working analog
part, DVB part is not supported for now.

Signed-off-by: Alexey Chernov <4ernov@gmail.com>
Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:18 -02:00
Dan Carpenter 5f63306d82 [media] cx231xx: use bitwise negate instead of logical
Bitwise negate was intended here.  INPUT_SEL_MASK is 0x30.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:18 -02:00
Mauro Carvalho Chehab a3fa904ec7 [media] em28xx: Fix audio input for Terratec Grabby
The audio input line was wrong. Fix it.

Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:17 -02:00
Ramiro Morales b7a0f2e793 [media] saa7134: Add support for Compro VideoMate Vista M1F
Signed-off-by: Pavel Osnova <pvosnova@gmail.com>
Signed-off-by: Ramiro Morales <ramiro@rmorales.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:17 -02:00
Ang Way Chuang 44c6e2a7c2 [media] cx88-dvb.c: DVB net latency using Hauppauge HVR4000
A Hauppauge HVR 4000 is used on a School On Internet Asia (SOI Asia)
project in order to carry IP traffic over ULE. However, there is an
issue with high latency jitter.

My boss, Husni, identified the problem and provided a patch for it.

The default buffer size of 32 TS frames on cx88 causes the high latency,
so our deployment changes that to 6 TS frames. This patch made the
buffer size tunable, while keeping the default buffer size of 32 TS
frames unchanged.

Signed-off-by: Achmad Husni Thamrin <husni@ai3.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:17 -02:00
Dan Carpenter fe04164647 [media] cx231xxx: fix typo in saddr_len check
The original code compared "saddr_len" with zero twice in a nonsensical
way.  I asked the list, and Andy Walls and Sri Deevi say that the second
check should be if "saddr_len == 1".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Srinivasa Deevi <Srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:16 -02:00
Anatolij Gustschin 50155c25bf [media] fsl_viu: add VIDIOC_QUERYSTD and VIDIOC_G_STD support
VIDIOC_QUERYSTD and VIDIOC_G_STD ioctls are currently not
supported in the FSL VIU driver. The decoder subdevice
driver saa7115 extended by previous patch supports QUERYSTD
for saa711x, so we add the appropriate ioctls to the VIU
driver to be able to determine the video input's standard.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:16 -02:00
Anatolij Gustschin f9d7d78784 [media] saa7115: allow input standard autodetection for more chips
Autodetect input's standard using field frequency detection
feature (FIDT in status byte at 0x1F) of the chips saa7111/
saa7111a/saa7113/saa7114/saa7118.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:16 -02:00
David Henningsson db9285f79b [media] MEDIA: RC: Provide full scancodes for TT-1500 remote control
Add 0x15 prefix to scancodes for TT-1500 remote control.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:15 -02:00
David Henningsson 730726a6f9 [media] DVB: Set scanmask for Budget/SAA7146 cards
These devices do not return the full command+address, so set
scanmask accordingly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:15 -02:00
Mauro Carvalho Chehab 2d5ca76f2b [media] dabusb: Move it to staging to be deprecated
dabusb driver were conceived as an experimental driver for a test
device. The driver never supported any shipped product, and, while
there were some updates on it in 2003, for an ancient product,
those changes were never submitted upstream.

Also, there's no DocBook for its API, nor any upstream discussion.

So, better to remove it, on .39. If later needed, we may rescue it
from git logs. For now, let's move it to staging.

Acked-by: Deti Fliegl <deti@fliegl.de>
Cc: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:15 -02:00
Mauro Carvalho Chehab 0170f6bcb2 [media] streamzap: Fix a compilation warning when compiled builtin
drivers/media/rc/streamzap.c: In function ‘streamzap_probe’:
drivers/media/rc/streamzap.c:460:2: warning: statement with no effect

Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:14 -02:00
Mauro Carvalho Chehab 465a9e3a2f [media] af9013: Fix a compilation warning
drivers/media/dvb/frontends/af9013.c: In function ‘af9013_update_signal_strength.clone.0’:
drivers/media/dvb/frontends/af9013.c:967:6: warning: ‘ret’ may be used uninitialized in this function

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:14 -02:00
Mauro Carvalho Chehab 187e7d3b9b [media] stv090x: Fix some compilation warnings
A few typos at the driver are causing the following warnings:

drivers/media/dvb/frontends/stv090x.c: In function ‘stv090x_start_search’:
drivers/media/dvb/frontends/stv090x.c:1486:27: warning: comparison between ‘enum stv090x_search’ and ‘enum stv090x_delsys’
drivers/media/dvb/frontends/stv090x.c:1487:24: warning: comparison between ‘enum stv090x_search’ and ‘enum stv090x_delsys’
drivers/media/dvb/frontends/stv090x.c: In function ‘stv090x_optimize_track’:
drivers/media/dvb/frontends/stv090x.c:2943:2: warning: case value ‘4’ not in enumerated type ‘enum stv090x_delsys’

The first two are due to the lack of using the delsys types
	STV090x_DVBS1/STV090x_DSS
instead of
	STV090x_SEARCH_DVBS1/STV090x_SEARCH_DSS

The second one is due to the usage of STV090x_UNKNOWN (enum stv090x_modulation)
instead of STV090x_ERROR (enum stv090x_delsys).

Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:14 -02:00
Mauro Carvalho Chehab 95f18be2e4 [media] gspca: Fix a warning for using len before filling it
The check for status errors is now before the check for len. That's
ok. However, the error printk's for the status error prints the URB
length. This generates this error:

drivers/media/video/gspca/gspca.c: In function ‘fill_frame’:
drivers/media/video/gspca/gspca.c:305:9: warning: ‘len’ may be used uninitialized in this function

The fix is as simple as moving the len init to happen before the checks.

Cc: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:14 -02:00
Mauro Carvalho Chehab 2e94b53c55 [media] dib7000m/dib7000p: Add support for TRANSMISSION_MODE_4K
Fixes several warnings:

drivers/media/dvb/frontends/dib7000m.c: In function ‘dib7000m_set_channel’:
drivers/media/dvb/frontends/dib7000m.c:808:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:869:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c: In function ‘dib7000m_tune’:
drivers/media/dvb/frontends/dib7000m.c:1023:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:1033:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:1043:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_set_channel’:
drivers/media/dvb/frontends/dib7000p.c:720:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:773:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_tune’:
drivers/media/dvb/frontends/dib7000p.c:997:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:1007:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:1017:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’

The drivers were prepared to support 4K carriers, but as the define were added
later, they were using a "magic" value of 255.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:13 -02:00
Mauro Carvalho Chehab fce50ac80e [media] radio-wl1273: Fix two warnings
drivers/media/radio/radio-wl1273.c: In function ‘wl1273_fm_upload_firmware_patch’:
drivers/media/radio/radio-wl1273.c:675:2: warning: ‘n’ may be used uninitialized in this function
drivers/media/radio/radio-wl1273.c:675:2: warning: ‘i’ may be used uninitialized in this function

Those vars are never initialized, and the debug message makes no sense, as it
will show just two random values.

Cc: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:13 -02:00
Mauro Carvalho Chehab 9ae2ae35f8 [media] dmxdev: Fix a compilation warning due to a bad type
drivers/media/dvb/dvb-core/dmxdev.c: In function ‘dvb_dmxdev_start_feed’:
drivers/media/dvb/dvb-core/dmxdev.c:583:13: warning: comparison between ‘enum dmx_ts_pes’ and ‘enum <anonymous>’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:13 -02:00
Mauro Carvalho Chehab 22efe50770 [media] omap_vout: Remove an obsolete comment
This comment mentions a field that doesn't exist, and talks about
videodev.h that got removed. So, it doesn't make any sense to keep
it.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:12 -02:00
Mauro Carvalho Chehab 88ae7624a6 [media] V4L1 removal: Remove linux/videodev.h
There's no sense on keeping it on 2.6.38, as nobody is using it
anymore, at the kernel tree, and installing it at the userspace
API.

As two deprecated drivers still need it, move it to their internal
directories.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:11 -02:00
Mauro Carvalho Chehab 58c66df3e3 [media] Remove VIDEO_V4L1 Kconfig option
There's no sense on keeping VIDEO_V4L1 Kconfig option just because of
two deprecated drivers moved to staging scheduled to die on 2.6.39.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:11 -02:00
Andy Walls ddda424999 [media] ivtv: Return EFAULT when copy_from_user() fails in ivtv_write_vbi_from_user()
If write() on a VBI device node fails due to a bad buffer pointer from
userspace, we should notify the application properly with EFAULT, per the
V4L2 API spec.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:10 -02:00
Andy Walls b0c45686c8 [media] ivtv: ivtv_write_vbi() should use copy_from_user() for user data buffers
ivtv_write_vbi() is used for both VBI data that came from the
driver internally and VBI data that came from the user.  However,
it did not use copy_from_user() for reading the VBI data from the
user buffers.

This change adds a new version of the function,
ivtv_write_vbi_from_user(), that uses copy_from_user() to read the VBI
data provided via user buffers.

This should resolve a sparse build warning reported by Dave Gilbert.

Reported-by: Dr. David Alan Gilbert <linux at treblig.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:10 -02:00
Andy Walls 754f9969c3 [media] cx18: Only allocate a struct cx18_dvb for the DVB TS stream
The cx18_stream struct contained a struct cx18_dvb for
every stream object, most of which were for analog capture.
Now we only allocate the cx18_dvb object for the DTV TS stream.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:10 -02:00
Andy Walls fa98447f09 [media] ivtv, cx18: Make ioremap failure messages more useful for users
The error messages these drivers emitted for ioremap() failures
were misleading and not helpful for users.  Reworded those messages
to help the user take action to resolve vmalloc address space
exhaustion.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:09 -02:00
Hans Verkuil 0a58d71306 [media] stk-webcam: remove V4L1 compatibility code, replace with V4L2 controls
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:09 -02:00
Hans Verkuil 71bb2876a3 [media] se401: deprecate driver, move to staging
The se401 driver is deprecated and is moved to staging. If no one will
convert this driver to V4L2, then it will be removed in 2.6.39.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:08 -02:00
Hans Verkuil 745da4280f [media] usbvideo: deprecate the vicam driver
Move usbvideo to staging and mark it deprecated.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:08 -02:00
Hans Verkuil 5772dcaa79 [media] usbvideo: remove deprecated drivers
Remove ibmcam, konicawc and ultracam drivers. There are replaced by
gspca drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:08 -02:00
Hans Verkuil 41d9931c5a [media] videobuf-dma-sg: remove obsolete comments
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:07 -02:00
Hans Verkuil ad1ecf8639 [media] zoran: remove V4L1 compat code and zoran custom ioctls
All the functionality is now handled through V4L2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:07 -02:00
Hans Verkuil 08af245de0 [media] V4L: remove V4L1 compatibility mode
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:07 -02:00
Jean-François Moine b69a219e0e [media] gspca - ov534_9: Remove an useless instruction
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:06 -02:00
Jean-François Moine 7a5a414ccb [media] gspca - ov519: Bad detection of some ov7670 sensors
Tested-by: jim smyth <jsmyth1969@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:06 -02:00
Jean-François Moine 668f44a603 [media] gspca: Use the global error status for get/set streamparm
Also, in ov534, don't check the parm type.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:06 -02:00
Jean-François Moine 76ebc16b87 [media] gspca - main: Check the isoc packet status before its length
When an error is set for an isochronous packet, the length of the packet
may be null. In this case, the error was not detected and the image
was not discarded as it should be.

Reported-by: Franck Bourdonnec <fbourdonnec@chez.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:06 -02:00
Jean-François Moine f2c5d92ecd [media] gspca - sq930x: Fix a bad comment
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:05 -02:00
Jean-François Moine efd3769269 [media] gspca - sq930x: Some detected sensors are not handled yet
These are OmniVision's OV7660 and OV9630.
Don't register the webcam when they are found.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:05 -02:00
Jean-François Moine 3ebd179464 [media] gspca - sq930x: Don't register a webcam when there are USB errors
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:05 -02:00
Theodore Kilgore 634b477053 [media] gspca - sq905c: Adds the Lego Bionicle
This patch adds the Vendor:Product number of the Lego Bionicle camera to
the existing gspca/sq905c.c and also a line for the camera in gspca.txt.
The camera works "out of the box" with these small changes. So this is
just in time for Christmas. Think of the children.

Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:05 -02:00
Pete Eberlein a19a5cd7b3 [media] s2255drv: remove BKL
Remove BKL ioctl and use unlocked_ioctl with core-assisted locking instead.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:04 -02:00
Marek Szyprowski 07e80305ba [media] v4l: mem2mem_testdev: remove BKL usage
Remove usage of BKL by usign per-device mutex.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:04 -02:00
Dan Carpenter dcd745b723 [media] timblogiw: too large value for strncpy()
This is a copy and paste error.  It should be using sizeof(cap->driver)
instead of sizeof(cap->card).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Richard Rojförs <richard.rojfors@pelagicore.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:04 -02:00
Jesper Juhl ef330dc2e7 [media] saa7164: Remove pointless conditional and save a few bytes in saa7164_downloadfirmware()
Hi,

release_firmware() just does nothing if passed a NULL pointer. So there's
no reason to test before the call in
saa7164-fw.c::saa7164_downloadfirmware().

Removing the pointless conditional also saves a few bytes.
before:
   text    data     bss     dec     hex filename
   7943     112    2144   10199    27d7 drivers/media/video/saa7164/saa7164-fw.o
after:
   text    data     bss     dec     hex filename
   7931     112    2136   10179    27c3 drivers/media/video/saa7164/saa7164-fw.o

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:04 -02:00
Sam Doshi 10304ca65f [media] drivers:media:dvb: add USB PIDs for Elgato EyeTV Sat
Adds USB PIDs for the Elgato EyeTV Sat device.
This device is a clone of the Terratec S7.

Signed-off-by: Sam Doshi <sam@metal-fish.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:03 -02:00
Anatolij Gustschin c335333050 [media] media: fsl-viu: fix support for streaming with mmap method
Streaming using mmap didn't work in the VIU driver. We need to
start/stop DMA in streamon/streamoff and free the buffers on
release. Add appropriate driver extension now.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:03 -02:00
Dan Carpenter 2a72b39e51 [media] zoran: bit-wise vs logical and
zr->frame_num is a counter and && was intended here instead of &.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:03 -02:00
Malcolm Priestley 75aecc3af2 [media] DM04/QQBOX Frontend attach change
On Fri, 2010-12-03 at 09:32 -0200, Mauro Carvalho Chehab wrote:
> Em 27-11-2010 11:13, Malcolm Priestley escreveu:
> > Driver Version v1.73 - Frontend attach change.
> > To stop double rc registration in multi tuner environment or firmware change.
> >
> > Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
> >
> >
> > +static int lme_name(struct dvb_usb_adapter *adap)
> > +{
> > +	struct lme2510_state *st = adap->dev->priv;
> > +	const char *desc = adap->dev->desc->name;
> > +	char *fe_name[] = {"", " LG TDQY-P001F", " SHARP:BS2F7HZ7395"};
> > +	char *name = adap->fe->ops.info.name;
> > +
> > +	strcpy(name, desc);
> > +	strcat(name, fe_name[st->tuner_config]);
>
> Please use, instead, strlcpy/strlcat, to avoid writing outside the buffer size.
>

Driver Version v1.74
Amended patch with change to strlcpy/strlcat.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:03 -02:00
Randy Dunlap c59a9bfabf [media] media: fix em28xx build, needs hardirq.h
Fix em28xx build by adding hardirq.h header file:

drivers/media/video/em28xx/em28xx-vbi.c:49: error: implicit declaration of function 'in_interrupt'

Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:02 -02:00
Vasiliy Kulikov 4c8b869805 [media] rc: ir-lirc-codec: fix potential integer overflow
'n' may be bigger than MAX_INT*sizeof(int), if so checking of truncated
(int)(n/sizeof(int)) for LIRCBUF_SIZE overflow and then using nontruncated 'count'
doesn't make sense.  Also n may be up to sizeof(int)-1 bytes bigger than expected,
so check value of (n % sizeof(int)) too.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:02 -02:00
Matti Aaltonen 87d1a50ce4 [media] V4L2: WL1273 FM Radio: TI WL1273 FM radio driver
This module implements V4L2 controls for the Texas Instruments
WL1273 FM Radio and handles the communication with the chip.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:02 -02:00
Hans de Goede 00765f16f1 [media] gspca_sonixb: Add support for 0c45:602a
Add support for cameras with the HV7131D sensor, such as the 0c45:602a

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:01 -02:00
Hans de Goede 2b3e284a89 [media] gspca_sonixb: Rewrite start of frame detection
Our old start of frame detection code wrongly assumes that the sof
marker always lives at the beginning of the frame. At least for the
0c45:602a camera this is not the case. This patch also improves
the framerate from 28 fps to 30 fps with the 0c45:6005 and 0c45:6007

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:01 -02:00
Hans de Goede d6746d55da [media] gspca_sonixb: Make sonixb handle 0c45:6007 instead of sn9c102
I've a 0c45:6007 camera and it works fine with the gspca_sonixb driver,
so make that handle it instead of the deprecated sn9c102 driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:01 -02:00
Mauro Carvalho Chehab 788e5d4dc8 [media] cx231xx: Fix IR keymap for Pixelview SBTVD Hybrid
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:01 -02:00
Mauro Carvalho Chehab 12007419b7 [media] Add a keymap for Pixelview 002-T remote
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:00 -02:00
Mauro Carvalho Chehab e330289ed4 [media] cx231xx: Fix inverted bits for RC on PV Hybrid
At Pixelview SBTVD Hybrid, the bits sent by the IR are inverted. Due to that,
the existing keytables produce wrong codes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:00 -02:00
Stephen Rothwell 49aefd2bcd [media] timblogiw: const and __devinitdata do not mix
This fixes the following error in PowerPC builds:

drivers/media/video/timblogiw.c: In function 'timblogiw_probe':
drivers/media/video/timblogiw.c:749: error: timblogiw_ioctl_ops causes a section type conflict

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:00 -02:00
Mauro Carvalho Chehab d162e7aac2 [media] gspca/sn9c20x: Fix support for mt9m001 (mi1300) sensor
Support for mt9m001 (mi1300) is broken:
	- Table is incomplete;
	- Only one resolution is currently supported by the driver;
	- Resolution is incomplete;
	- it complains about broken JPEG headers.

Use the same init found on em28xx driver, and properly report the
output format as 8-bits GRAY.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:00 -02:00
Mauro Carvalho Chehab d4b416f262 [media] gspca core: Fix regressions gspca breaking devices with audio
Changeset 35680ba broke several devices:
	- Sony Playstation Eye (1415:2000);
	- Gigaware model 25-234 (0c45:628f);
	- Logitech Messenger Plus (046d:08f6).

Probably more devices were broken by this change.

What happens is that several devices don't need to save some bandwidth
for audio.

Also, as pointed by Hans de Goede <hdegoede@redhat.com>, the logic
that implements the bandwidth reservation for audio is broken, since
it will reduce the alt number twice, on devices with audio.

So, let's just revert the broken logic, and think on a better solution
for usb 1.1 devices with audio that can't use the maximum packetsize.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:59 -02:00
Mauro Carvalho Chehab 86701c1d6a [media] gspca/sn9c20x: Get rid of scale "magic" numbers
Use macros for the supported scales, instead of using magic numbers
from 0 to 3.

Code become cleaner by using macros for it.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:59 -02:00
Mauro Carvalho Chehab e78567d227 [media] gspca/sn9c20x: Test if sensor is a OV sensor
Instead of just assuming a ov9650 sensor based on USB ID,
double-check it, by reading the sensor ID.

Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:59 -02:00
Richard Zidlicky dd89aec473 [media] keycodes for DSR-0112 remote bundled with Haupauge MiniStick
Add kycodes for DSR-0112 remote that comes together with
Haupauge MiniStick
  http://lirc.sourceforge.net/remotes/hauppauge/DSR-0112.jpg

[mchehab@redhat.com: Fix KEY_PREVIOUS to match the definition for the other model]
Signed-off-by: Richard Zidlicky <rz@linux-m68k.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:59 -02:00
Joe Perches 8350e1551c [media] media: Remove unnecessary casts of usb_get_intfdata
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:58 -02:00
Philippe Bourdin 9124544320 [media] Terratec Cinergy Hybrid T USB XS
I found that the problems people have reported with the USB-TV-stick
"Terratec Cinergy Hybrid T USB XS" (USB-ID: 0ccd:0042)
are coming from a wrong header file in the v4l-sources.

Attached is a diff, which fixes the problem (tested successfully here).
Obviously the USB-ID has been associated with a wrong chip: EM2880
instead of EM2882, which would be correct.

Reported-by: Philippe Bourdin <richel@AngieBecker.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:58 -02:00
Vasiliy Kulikov b395cbac36 [media] media: rc: lirc_dev: check kobject_set_name() result
kobject_set_name() may fail with -ENOMEM, check for it.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:58 -02:00
David Härdeman 801c73c04a [media] rc-core: add loopback driver
This patch adds a loopback driver to rc-core which I've found useful for
running scripted tests of different parts of rc-core without having to
fiddle with real hardware.

Basically it emulates hardware with a learning and a non-learning
receiver and two transmitters (which correspond to the two
receivers). TX data that is sent is fed back as input on the
corresponding receiver, which allows for debugging of IR decoders,
keymaps, etc.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:58 -02:00
Mauro Carvalho Chehab dea8a39fb5 [media] rc-core: Initialize return value to zero
At ir_setkeycode, if INPUT_KEYMAP_BY_INDEX is used, the routine may return
an invalid value if not error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:58 -02:00
Mauro Carvalho Chehab b7c7a4bed8 [media] bttv: remove custom_irq and gpioq from bttv struct
The RC5 old decoder used custom_irq to indicate the need of handling
the IRQ on a different way. Instead of doing it, let the core just call the
bttv input IRQ handler, and add the code there to call the legacy decoder.

While here, remove the gpioq waitqueue, as this is not used anywhere, and
add a debug msg to help removing the legacy RC5 code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:57 -02:00
Dan Carpenter 5ae094cea1 [media] cx231xx: stray unlock on error path
The lock isn't held here and doesn't need to be unlocked.  The code has
been like this since the driver was merged.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:57 -02:00
Paul Bender 5ad1a55542 [media] rc: fix sysfs entry for mceusb and streamzap
When trying to create persistent device names for mceusb and streamzap
devices, I noticed that their respective drivers are not creating the rc
device as a child of the USB device. Rather it creates it as virtual
device. As a result, udev cannot use the USB device information to
create persistent device names for event and lirc devices associated
with the rc device. Not having persistent device names makes it more

difficult to make use of the devices in userspace as their names can
change.

Forward-ported to media_tree staging/for_v2.6.38 and tested with
both streamzap and mceusb devices:
$ ll /dev/input/by-id/
...
lrwxrwxrwx. 1 root root 9 Nov 17 17:06 usb-Streamzap__Inc._Streamzap_Remote_Control-event-if00 -> ../event6
lrwxrwxrwx. 1 root root 9 Nov 17 17:05 usb-Topseed_Technology_Corp._eHome_Infrared_Transceiver_TS000BzY-event-if00 -> ../event5
Previously, nada.

Signed-off-by: Paul Bender <pebender@gmail.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:57 -02:00
Nicolas Kaiser 5df465df7b [media] drivers/media: nuvoton: fix chip id probe v2
Make sure we have a matching chip id high and one or the other
of the chip id low values.
Print the values if the probe fails.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:57 -02:00
Joe Perches ecfc95eb74 [media] ngene-core.c: Remove unnecessary casts of pci_get_drvdata
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:56 -02:00
Joe Perches b1dc614a81 [media] drivers/media/video: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:56 -02:00
Alexey Chernov a363436396 [media] Patch for cx18 module with added support of GoTView PCI DVD3 Hybrid tuner
I've got code which adds support of GoTView PCI DVD3 Hybrid tuner in
cx18 module and Andy Walls in ivtv mailing-list gave me some advice on
making a patch and sending it here. So here's the patch against
staging/2.6.37-rc1 branch (the tutorial recommends to include it as
plain text but if it's the case I can surely send as an attachment):

Several comments on the patch:

1. Both users on the official Gotview forum and support said that PCI
DVD3 is very similar to Yuan MPC718 card so the main part of code is
taken from Yuan configuration. Some users reported it to work properly.

2. Everything is being initialized correctly including analog, dvb,
radio and alsa parts. Analogue part and alsa virtual card is tested by
myself using original Gotview card.

[mchehab@redhat.com: Whitespace cleanups]
Signed-off-by: Alexey Chernov <4ernov@gmail.com>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:56 -02:00
Mauro Carvalho Chehab 97108cf682 [media] Fix parameter description for disable_ir
It seems that a wrong cut-and-paste error were done here.

Reported-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:16:55 -02:00