9 years agoV4L/DVB: ngene: Added Media-Pointer MP-S2/CineS2 DVB-S2 Twin Tuner
Matthias Benesch [Sat, 19 Dec 2009 15:48:22 +0000]
V4L/DVB: ngene: Added Media-Pointer MP-S2/CineS2 DVB-S2 Twin Tuner

Added support for nGene based Media-Pointer DVB-S2 twin tuner cards.

[mchehab@redhat.com: Fix compilation error: unknown field ‘ref_clk’]

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: ngene: Additional clean-up
Matthias Benesch [Sun, 20 Dec 2009 01:18:53 +0000]
V4L/DVB: ngene: Additional clean-up

Remove and disable unnecessary code. Disable define ONE_ADAPTER.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: ngene: Always use firmware loader
Oliver Endriss [Sat, 19 Dec 2009 09:38:05 +0000]
V4L/DVB: ngene: Always use firmware loader

Always use firmware loader.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: ngene: Driver compiles now
Oliver Endriss [Sat, 19 Dec 2009 07:54:44 +0000]
V4L/DVB: ngene: Driver compiles now

Remove LNBH21 routines, disable code which broke compilation.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: ngene: Initial check-in
Matthias Benesch [Sat, 19 Dec 2009 01:13:26 +0000]
V4L/DVB: ngene: Initial check-in

Add Micronas nGene PCIe bridge driver.

The source code was provided by Micronas / Ralph Metzler,
and has been reformatted to comply with Linux Codingstyle.

Signed-off-by: Matthias Benesch <twoof7@freenet.de>
Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: hdpvr: add new USB product id
Janne Grunau [Wed, 3 Feb 2010 14:51:23 +0000]
V4L/DVB: hdpvr: add new USB product id

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: hdpvr-video: cleanup signedness
Márton Németh [Sat, 23 Jan 2010 13:44:34 +0000]
V4L/DVB: hdpvr-video: cleanup signedness

The fifth parameter of usb_bulk_msg() is a pointer to signed
(see <linux/usb.h>) so also call this function with pointer to signed.

This will remove the following sparse warning (see "make C=1"):
 * warning: incorrect type in argument 5 (different signedness)
       expected int *actual_length
       got unsigned int *<noident>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: media: dvb/af9015, add hashes support
Jiri Slaby [Fri, 22 Jan 2010 15:10:55 +0000]
V4L/DVB: media: dvb/af9015, add hashes support

So as a final patch, add support for hash and one hash entry
for MSI digi vox mini II:
iManufacturer 1 Afatech
iProduct      2 DVB-T 2
iSerial       3 010101010600001

It is now handled with proper IR and key map tables.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: media: dvb/af9015, refactor remote setting
Jiri Slaby [Fri, 22 Jan 2010 15:10:54 +0000]
V4L/DVB: media: dvb/af9015, refactor remote setting

Add af9015_setup structure to hold (right now only remote) setup
of distinct receivers.

Add af9015_setup_match for matching ids against tables.

This is for easier matching different kind of ids against tables
to obtain setups. Currently module parameters and usb vendor ids
are switched into and matched against tables. Hashes will follow.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: media: dvb/af9015, factor out remote setting
Jiri Slaby [Fri, 22 Jan 2010 15:10:53 +0000]
V4L/DVB: media: dvb/af9015, factor out remote setting

This is just a code shuffle without functional changes. For easier
review of later changes, i.e. preparation.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: media: dvb/af9015, implement eeprom hashing
Jiri Slaby [Fri, 22 Jan 2010 15:10:52 +0000]
V4L/DVB: media: dvb/af9015, implement eeprom hashing

This will be useful for matching of IR tables later.

We read the eeprom anyway for dumping. Switch the dumping to
print_hex_dump_bytes and compute hash above that by
hash = 0;
for (u32 VAL) in (eeprom):
  hash *= GOLDEN_RATIO_PRIME_32
  hash += VAL; // while preserving endinaness

The computation is moved earlier to the flow, namely from
af9015_af9013_frontend_attach to af9015_read_config, so that
we can access the sum in af9015_read_config already.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx23885: Add support for LEADTEK WinFast PxTV1200
Kusanagi Kouichi [Fri, 22 Jan 2010 07:55:28 +0000]
V4L/DVB: cx23885: Add support for LEADTEK WinFast PxTV1200

I tested only tv and composite. Video works fine but no audio.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: hdpvr-core: make module parameters local
Márton Németh [Fri, 29 Jan 2010 20:30:53 +0000]
V4L/DVB: hdpvr-core: make module parameters local

The default_video_input and default_audio_input module parameters are
only used inside the hdpvr-core.c file so make them static.

This will remove the following sparse warnings (see "make C=1"):
 * warning: symbol 'default_video_input' was not declared. Should it be static?
 * warning: symbol 'default_audio_input' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: radio: add support for SAA7706H Car Radio DSP
Richard Röjfors [Tue, 2 Feb 2010 22:40:49 +0000]
V4L/DVB: radio: add support for SAA7706H Car Radio DSP

Initial support for the SAA7706H Car Radio DSP.

It is a I2C device and currently the mute control is supported.

When the device is unmuted it is brought out of reset and initiated using
the proposed intialisation sequence.

When muted the DSP is brought into reset state.

[akpm@linux-foundation.org: include delay.h]

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Cc: Douglas Schilling Landgraf <dougsland@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: drivers/media/dvb/frontends/stv090x.c: fix use-uninitlalised
Andrew Morton [Tue, 2 Feb 2010 22:40:51 +0000]
V4L/DVB: drivers/media/dvb/frontends/stv090x.c: fix use-uninitlalised

Mad guess.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: drivers/media/dvb/frontends/stv090x.c: fix use-uninitialised
Andrew Morton [Tue, 2 Feb 2010 22:40:50 +0000]
V4L/DVB: drivers/media/dvb/frontends/stv090x.c: fix use-uninitialised

drivers/media/dvb/frontends/stv090x.c: In function 'stv090x_blind_search':
drivers/media/dvb/frontends/stv090x.c:1967: warning: 'coarse_fail' may be used uninitialized in this function

Cc: Manu Abraham <manu@linuxtv.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: drivers/media/video/cx18/cx18-alsa-pcm.c: fix printk warning
Andrew Morton [Tue, 2 Feb 2010 22:40:49 +0000]
V4L/DVB: drivers/media/video/cx18/cx18-alsa-pcm.c: fix printk warning

drivers/media/video/cx18/cx18-alsa-pcm.c: In function 'cx18_alsa_announce_pcm_data':
drivers/media/video/cx18/cx18-alsa-pcm.c:82: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

Cc: Andy Walls <awalls@radix.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init()
Roel Kluin [Tue, 2 Feb 2010 14:29:46 +0000]
V4L/DVB: dvb: return -ENOMEM if kzalloc failed in dvb_usb_device_init()

If in a cold state and the download succeeded ret is zero, but we
should return -ENOMEM.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: em28xx: fix for "Leadtek winfast tv usbii deluxe"
Magnus Alm [Fri, 13 Nov 2009 08:48:24 +0000]
V4L/DVB: em28xx: fix for "Leadtek winfast tv usbii deluxe"

fix Video/Sound support "Leadtek winfast tv usbii deluxe".

Now, it is working Stereo, IR, Radio, TV, Svideo and Composite.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: smsir: make local variables static
Márton Németh [Fri, 29 Jan 2010 20:42:17 +0000]
V4L/DVB: smsir: make local variables static

Make the file local parameters static.

This will remove the following sparse warnings (see "make C=1"):
 * warning: symbol 'ir_pos' was not declared. Should it be static?
 * warning: symbol 'ir_word' was not declared. Should it be static?
 * warning: symbol 'ir_toggle' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: m920x: Add support for Pinnacle PCTV310e card
Massimo Del Fedele [Sat, 24 Oct 2009 16:12:37 +0000]
V4L/DVB: m920x: Add support for Pinnacle PCTV310e card

Adds support to Pinnacle PCTV310e hybrid tuner card, for DVB-T and
remote control, still no analog video.

[mchehab@redhat.com: fix CodingStyle issues]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cafe_ccic: Fix lock imbalances
Alexander Strakh [Fri, 11 Sep 2009 18:13:21 +0000]
V4L/DVB: cafe_ccic: Fix lock imbalances

Fix lock imbalances in function device_authorization.

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: stv0900: dereference of state->internal in fe_stv0900_error stv0900_init_int...
Roel Kluin [Sat, 29 Aug 2009 18:31:49 +0000]
V4L/DVB: stv0900: dereference of state->internal in fe_stv0900_error stv0900_init_internal()

state->internal allocation may fail as well as the allocation of
stv0900_first_inode or new_node->next_inode in append_internal().

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: Add missing serialization locks to cx18-dvb
Andy Walls [Sat, 30 Jan 2010 19:20:27 +0000]
V4L/DVB: cx18: Add missing serialization locks to cx18-dvb

Operations that manipulates the state of the encoder or global instance flags
and variables should be serialized.  This adds some serialization locks that
have been missing from cx18-dvb.  Since the DVB part of the CX23418 doesn't
affect the encoder, no one would likely have ever noticed a race in changing
card instance variables.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: Increment driver version for the addition of cx18-alsa and fixes
Andy Walls [Sat, 30 Jan 2010 18:57:32 +0000]
V4L/DVB: cx18: Increment driver version for the addition of cx18-alsa and fixes

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: Fix memory leak in cx18-alsa starting of PCM captures
Andy Walls [Sat, 30 Jan 2010 18:50:51 +0000]
V4L/DVB: cx18: Fix memory leak in cx18-alsa starting of PCM captures

The cx18_open_id is normally dynamically allocated and stored in the
filp->private_data for v4l2 file operations.  The cx18-alsa routines should
not dynamically allocate a cx18_open_id because they never store it anywhere
and never free it.  This change fixes that and plugs a memory leak.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: Add missing serialization locking to cx18-alsa
Andy Walls [Sat, 30 Jan 2010 18:28:22 +0000]
V4L/DVB: cx18: Add missing serialization locking to cx18-alsa

File operations that manipulate the state of the encoder, or video or audio
subdevices or some of the stream flags need to be serialized.  Add the
serilization locks to cx18-alsa in a manner consistent with the locking for
the v4l2 file operations.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: Rename snd_cx18_mixer_lock to snd_cx18_lock and increase visibility
Andy Walls [Sat, 30 Jan 2010 17:27:29 +0000]
V4L/DVB: cx18: Rename snd_cx18_mixer_lock to snd_cx18_lock and increase visibility

Rename snd_cx18_mixer_lock() to snd_cx18_lock() in anticpation of using it
in the cx18-alsa-pcm.c file routines.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx25840: Fix composite detection
Kusanagi Kouichi [Fri, 22 Jan 2010 07:54:46 +0000]
V4L/DVB: cx25840: Fix composite detection

If CX25840_VIN1_CH1 and the like is used, input is not detected as composite.
Their value is 0x800000XX and CX25840_COMPONENT_ON is 0x80000200. So

   739 else if ((vid_input & CX25840_COMPONENT_ON) == 0)

this condition never be true.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Reviewed-by: Andy Walls <awalls@radix.net>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - main: Change version to 2.9.0.
Jean-François Moine [Sat, 30 Jan 2010 19:03:02 +0000]
V4L/DVB: gspca - main: Change version to 2.9.0.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - t613: Support for LT168G sensor.
Nicolau Werneck [Sat, 30 Jan 2010 19:00:15 +0000]
V4L/DVB: gspca - t613: Support for LT168G sensor.

Signed-off-by: Nicolau Werneck <nwerneck@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - pac7302: Change latin1 text to utf-8.
Jean-Francois Moine [Thu, 28 Jan 2010 19:35:40 +0000]
V4L/DVB: gspca - pac7302: Change latin1 text to utf-8.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - pac7302: Add support for camera button.
Márton Németh [Thu, 28 Jan 2010 19:33:38 +0000]
V4L/DVB: gspca - pac7302: Add support for camera button.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - main: Add input support for interrupt endpoints.
Márton Németh [Thu, 28 Jan 2010 09:39:49 +0000]
V4L/DVB: gspca - main: Add input support for interrupt endpoints.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dvb/bt8xx: Clean-up init and exit functions
Jean Delvare [Tue, 26 Jan 2010 19:46:58 +0000]
V4L/DVB: dvb/bt8xx: Clean-up init and exit functions

The init and exit functions are needlessly complex. Remove the bloat:
* Drop irrelevant/outdated comments.
* Remove useless bt878_pci_driver_registered global variable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: Fix VIDIOC_QBUF compat ioctl32
Arnaud Patard [Mon, 25 Jan 2010 15:02:31 +0000]
V4L/DVB: Fix VIDIOC_QBUF compat ioctl32

When using VIDIOC_QBUF with memory type set to V4L2_MEMORY_MMAP, the
v4l2_buffer buffer gets unmodified on drivers like uvc (well, only
bytesused field is modified). Then some apps like gstreamer are reusing
the same buffer later to call munmap (eg passing the buffer "length"
field as 2nd parameter of munmap).

It's working fine on full 32bits but on 32bits systems with 64bit
kernel, the get_v4l2_buffer32() doesn't copy length/m.offset values and
then copy garbage to userspace in put_v4l2_buffer32().

This has for consequence things like that in the libv4l2 logs:

libv4l2: v4l2 unknown munmap 0x2e2b0000, -2145144908
libv4l2: v4l2 unknown munmap 0x2e530000, -2145144908

The buffer are not unmap'ed and then if the application close and open
again the device, it won't work and logs will show something like:

libv4l2: error setting pixformat: Device or resource busy

The easy solution is to read length and m.offset in get_v4l2_buffer32().

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: zoran: remove variable shadowing
Márton Németh [Sat, 23 Jan 2010 13:44:14 +0000]
V4L/DVB: zoran: remove variable shadowing

The loop counter j is declared twice in function error_handler().
Remove the redundant declaration.

This will remove the following sparse warning (see "make C=1"):
 * symbol 'j' shadows an earlier one

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: zoran: match parameter signedness of g_input_status
Márton Németh [Sat, 23 Jan 2010 06:58:20 +0000]
V4L/DVB: zoran: match parameter signedness of g_input_status

The second parameter of g_input_status operation in <media/v4l2-subdev.h>
is unsigned so also call it with unsigned paramter.

This will remove the following sparse warning (see "make C=1"):
 * incorrect type in argument 2 (different signedness)
       expected unsigned int [usertype] *status
       got int *<noident>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx23885: Wrong command printed in cmd_to_str()
Roel Kluin [Wed, 20 Jan 2010 00:47:30 +0000]
V4L/DVB: cx23885: Wrong command printed in cmd_to_str()

The wrong command was printed for case CX2341X_ENC_SET_DNR_FILTER_MODE,
and a typo in case CX2341X_ENC_SET_PCR_ID.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-By: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: firedtv: reduce memset()s
Stefan Richter [Wed, 18 Nov 2009 19:03:31 +0000]
V4L/DVB: firedtv: reduce memset()s

Before each FCP transdaction, the entire 512 bytes of the FCP frame were
cleared, then values filled in.

Clear only the bytes between filled-in bytes and end of the
  - request frame, or
  - response frame if data from a larger response will be needed, or
  - whole frame if data from a variable length response will be taken.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: firedtv: remove check for interrupting signal
Stefan Richter [Wed, 18 Nov 2009 19:03:03 +0000]
V4L/DVB: firedtv: remove check for interrupting signal

FCP transactions as well as CMP transactions were serialized with
mutex_lock_interruptible.  It is extremely unlikly though that a signal
will arrive while a concurrent process holds the mutex.  And even if one
does, the duration of a transaction is reasonably short (1.2 seconds if
all retries time out, usually much shorter).

Hence simplify the code to plain mutex_lock.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: firedtv: do not DMA-map stack addresses
Stefan Richter [Wed, 18 Nov 2009 19:02:01 +0000]
V4L/DVB: firedtv: do not DMA-map stack addresses

This is a portability fix and reduces stack usage.

The DMA mapping API cannot map on-stack addresses, as explained in
Documentation/DMA-mapping.txt.  Convert the two cases of on-stack packet
payload buffers in firedtv (payload of write requests in avc_write and
of lock requests in cmp_lock) to slab-allocated memory.

We use the 512 bytes sized FCP frame buffer in struct firedtv for this
purpose.  Previously it held only incoming FCP responses, now it holds
pending FCP requests and is then overwriten by an FCP response from the
tuner subunit.  Ditto for CMP lock requests and responses.  Accesses to
the payload buffer are serialized by fdtv->avc_mutex.

As a welcome side effect, stack usage of the AV/C transaction functions
is reduced by 512 bytes.

Alas, avc_register_remote_control() is a special case:  It previously
did not wait for a response.  To fit better in with the other FCP
transactions, let it wait for an interim response.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoFix the __init/__exit annotations
Mauro Carvalho Chehab [Thu, 28 Jan 2010 02:28:58 +0000]
Fix the __init/__exit annotations

WARNING: drivers/media/video/cx18/cx18-alsa.o(.text+0x4de): Section
mismatch in reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.

WARNING: drivers/media/video/cx18/built-in.o(.text+0x1c022): Section
mismatch in reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.

WARNING: drivers/media/video/built-in.o(.text+0x28cc56): Section
mismatch in reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.

WARNING: drivers/media/built-in.o(.text+0x2d2432): Section mismatch in
reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agocx18: Fix compilation when CONFIG_MODULE is disabled
Mauro Carvalho Chehab [Thu, 28 Jan 2010 02:19:00 +0000]
cx18: Fix compilation when CONFIG_MODULE is disabled

drivers/media/video/cx18/cx18-driver.c:252: warning: ‘request_modules’ used but never defined

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - sq905c: Fix a compilation warning
Jean-Francois Moine [Sun, 17 Jan 2010 06:58:51 +0000]
V4L/DVB: gspca - sq905c: Fix a compilation warning

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - ov534: Fix end of frame handling
Antonio Ospite [Sun, 17 Jan 2010 06:42:14 +0000]
V4L/DVB: gspca - ov534: Fix end of frame handling

Fix a regression, introduced in the driver split, which made
the ov534 driver unusable.
Plus, the debug message should reflect that we discard also packets
beyond the expected frame size.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - ov534: Allow enumerating supported framerates
Antonio Ospite [Sun, 17 Jan 2010 06:27:04 +0000]
V4L/DVB: gspca - ov534: Allow enumerating supported framerates

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - ov534_9: Propagate USB errors to higher level
Jean-Francois Moine [Wed, 13 Jan 2010 18:40:36 +0000]
V4L/DVB: gspca - ov534_9: Propagate USB errors to higher level

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - main: Clear any previous USB error when starting the transfer
Jean-Francois Moine [Wed, 13 Jan 2010 18:34:27 +0000]
V4L/DVB: gspca - main: Clear any previous USB error when starting the transfer

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - pac7311: Use usb_err to propagate USB errors
Jean-Francois Moine [Wed, 13 Jan 2010 18:28:22 +0000]
V4L/DVB: gspca - pac7311: Use usb_err to propagate USB errors

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - pac7302: Use usb_err to propagate USB errors
Jean-Francois Moine [Wed, 13 Jan 2010 18:09:14 +0000]
V4L/DVB: gspca - pac7302: Use usb_err to propagate USB errors

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - pac7302/pac7311: Remove the unused page loading
Jean-Francois Moine [Wed, 13 Jan 2010 11:30:30 +0000]
V4L/DVB: gspca - pac7302/pac7311: Remove the unused page loading

There is only one page to load (page 3 for pac7302 and page 4 for pac7311).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: gspca - zc3xx: Change the resolutions of some sensors
Hans de Goede [Wed, 13 Jan 2010 10:12:28 +0000]
V4L/DVB: gspca - zc3xx: Change the resolutions of some sensors

The sensors adcm2700, mc501cb and ov7620 cannot have the full height
permitted by the zc3xx bridges. This change removes 8 pixels at the
bottom of the images.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: using vmalloc requires include of linux/vmalloc.h
Stephen Rothwell [Wed, 27 Jan 2010 06:53:39 +0000]
V4L/DVB: using vmalloc requires include of linux/vmalloc.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: [Mantis] remove duplicated #include
Huang Weiyi [Tue, 19 Jan 2010 22:43:44 +0000]
V4L/DVB: [Mantis] remove duplicated #include

Remove duplicated #include('s) in
  drivers/media/dvb/mantis/mantis_hif.c
  drivers/media/dvb/mantis/mantis_pci.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dib0090: cleanup dib0090_dcc_freq()
Márton Németh [Sat, 16 Jan 2010 17:35:03 +0000]
V4L/DVB: dib0090: cleanup dib0090_dcc_freq()

'extern' is not needed at function definition.

This will remove the following sparse warning (see "make C=1"):
 * function 'dib0090_dcc_freq' with external linkage has definition

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: bt819: cleanup v4l2_subdev_notify() parameters
Márton Németh [Sat, 16 Jan 2010 17:08:39 +0000]
V4L/DVB: bt819: cleanup v4l2_subdev_notify() parameters

The 3rd parameter v4l2_subdev_notify() is passed to the notify() callback
which is a pointer, see <media/v4l2-subdev.h> and <media/v4l2-device.h>.

This will remove the following sparse warning (see "make C=1"):
 * Using plain integer as NULL pointer

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: stv0900: make more local functions static
Márton Németh [Sat, 16 Jan 2010 16:41:43 +0000]
V4L/DVB: stv0900: make more local functions static

Some functions are only used locally so mark them static.

This will remove the following sparse warnings (see "make C=1"):
 * symbol 'extract_mask_pos' was not declared. Should it be static?
 * symbol 'stv0900_initialize' was not declared. Should it be static?
 * symbol 'stv0900_get_mclk_freq' was not declared. Should it be static?
 * symbol 'stv0900_set_mclk' was not declared. Should it be static?
 * symbol 'stv0900_get_err_count' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: stv0900: make local functions static
Márton Németh [Sat, 16 Jan 2010 16:35:36 +0000]
V4L/DVB: stv0900: make local functions static

The functions stv0900_sw_algo() and stv0900_set_dvbs1_track_car_loop() are only used
locally so mark them static.

This will remove the following sparse warnings (see "make C=1"):
 * symbol 'stv0900_sw_algo' was not declared. Should it be static?
 * symbol 'stv0900_set_dvbs1_track_car_loop' was not declared. Should it be static?

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx231xx: cleanup dvb_attach() return value handling
Márton Németh [Sat, 16 Jan 2010 16:21:59 +0000]
V4L/DVB: cx231xx: cleanup dvb_attach() return value handling

Remove the following sparse error (see "make C=1"):
 * error: incompatible types for operation (<)
       left side has type struct dvb_frontend *
       right side has type int

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dvb-core: remove unnecessary casting of kmalloc
Thiago Farina [Sat, 16 Jan 2010 13:25:38 +0000]
V4L/DVB: dvb-core: remove unnecessary casting of kmalloc

drivers/media/dvb/dvb-core/dvb_frontend.c |    6 ++----

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: zoran: cleanup pointer condition
Márton Németh [Sat, 16 Jan 2010 08:11:07 +0000]
V4L/DVB: zoran: cleanup pointer condition

Remove the following sparse warning (see "make C=1"):
 * warning: Using plain integer as NULL pointer

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dabusb: declare MODULE_FIRMWARE
Ben Hutchings [Wed, 13 Jan 2010 23:43:58 +0000]
V4L/DVB: dabusb: declare MODULE_FIRMWARE

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: vpfe-capture: converting ccdc drivers to platform-drivers
Muralidharan Karicheri [Wed, 13 Jan 2010 23:27:08 +0000]
V4L/DVB: vpfe-capture: converting ccdc drivers to platform-drivers

This adds platform code for ccdc driver on DM355 and DM6446.

1) new ccdc platform devices added
2) added clock aliases master and slave for CCDC clocks
3) added dm355_ccdc_setup_pinmux() pin-mux setup hook in dm355 ccdc driver platform data

Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: vpfe-capture: converting dm644x ccdc driver to a platform driver
Muralidharan Karicheri [Wed, 13 Jan 2010 23:27:07 +0000]
V4L/DVB: vpfe-capture: converting dm644x ccdc driver to a platform driver

1) clocks are configured using generic clock names
2) converting the driver to a platform driver
3) cleanup - consolidate all static variables inside a structure, ccdc_cfg

The ccdc driver now uses generic names for clocks - master and slave. On individual platforms
these clocks will inherit from the platform specific clock. This will allow re-use of
the driver for the same IP across different SoCs.

Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: vpfe-capture - converting dm355 ccdc driver to a platform driver
Muralidharan Karicheri [Wed, 13 Jan 2010 23:27:06 +0000]
V4L/DVB: vpfe-capture - converting dm355 ccdc driver to a platform driver

1) clocks are configured using generic clock names;
2) converts the driver to a platform driver;
3) cleanup - consolidate all static variables inside a structure, ccdc_cfg;

The ccdc now uses a generic name for clocks. "master" and "slave". On individual platforms
these clocks will inherit from the platform specific clock. This will allow re-use of
the driver for the same IP across different SoCs.

Updated based on Kevin's comments on clock configuration and error code (v3, v4).

Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: vpfe_capture: remove clock and platform code
Muralidharan Karicheri [Wed, 13 Jan 2010 23:27:05 +0000]
V4L/DVB: vpfe_capture: remove clock and platform code

1) removed the platform code and clk configuration. They are now
   part of ccdc driver (part of the ccdc patches and platform patches 2-4);

2) Added proper error codes for ccdc register function.

Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: s2250: Fix write_reg i2c address
Pete Eberlein [Wed, 13 Jan 2010 22:15:48 +0000]
V4L/DVB: s2250: Fix write_reg i2c address

The kernel i2c model uses right-aligned 7-bit i2c addresses, but the
2250 firmware uses an 8-bit address in the usb vendor request.  A
previous patch by Jean Delvare shifted the i2c addresses 1 bit to the
right, and this patch fixes the write_reg function to shift it back
before sending the vendor request.

To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.
Devin Heitmueller [Thu, 7 Jan 2010 03:56:14 +0000]
V4L/DVB: cx18-alsa: Fix the rates definition and move some buffer freeing code.

Clarify the rates available for the device, and move the freeing of the buffer
to the free routine instead of the close (per Takashi's suggestion).

Thanks to Takashi Iwai for reviewing and providing feedback.

This work was sponsored by ONELAN Limited.

Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: address possible passing of NULL to snd_card_free
Devin Heitmueller [Thu, 7 Jan 2010 03:52:39 +0000]
V4L/DVB: cx18: address possible passing of NULL to snd_card_free

Eliminate the possibility of passing NULL to snd_card_free().

Thanks to Takashi Iwai for reviewing and pointing this out.

This work was sponsored by ONELAN Limited.

Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: codingstyle cleanup
Devin Heitmueller [Mon, 21 Dec 2009 02:53:46 +0000]
V4L/DVB: cx18-alsa: codingstyle cleanup

Move the cx18_alsa_announce_pcm_data() function further up in the file, since
apparently "make checkpatch" has never heard of a forward declaration.  Note
that despite the hg diff showing everything else as having been deleted/added,
in reality it was only that one function that got moved (and the forward
declaration was removed from the top of the file).

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: codingstyle cleanup
Devin Heitmueller [Mon, 21 Dec 2009 02:50:02 +0000]
V4L/DVB: cx18-alsa: codingstyle cleanup

Remove some dead code and make a PCM specific module debug parameter to avoid
an extern reference.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: codingstyle fixes
Devin Heitmueller [Mon, 21 Dec 2009 02:29:02 +0000]
V4L/DVB: cx18: codingstyle fixes

Codingstyle fixes, some introduced as a result of the ALSA work, some
pre-existing.  This patch is a whitespace change only.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: codingstyle fixes
Devin Heitmueller [Mon, 21 Dec 2009 02:15:58 +0000]
V4L/DVB: cx18-alsa: codingstyle fixes

Fix codingstyle issues, and make the minimum version for cx18-alsa required
to be 2.6.17, so that we don't need all the #ifdefs related to the changes
to ALSA structures.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: fix codingstyle issue
Devin Heitmueller [Mon, 21 Dec 2009 02:01:46 +0000]
V4L/DVB: cx18-alsa: fix codingstyle issue

Address coding style issue with cx18-alsa-main.c

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: fix memory leak in error condition
Devin Heitmueller [Sat, 12 Dec 2009 20:38:53 +0000]
V4L/DVB: cx18-alsa: fix memory leak in error condition

If the stream is already in use, make sure we free up the memory allocated
earlier.

Thanks to Andy Wall for reviewing and pointing this out.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: remove a couple of warnings
Devin Heitmueller [Mon, 23 Nov 2009 02:42:33 +0000]
V4L/DVB: cx18-alsa: remove a couple of warnings

Remove a couple of warnings from dead code during driver development.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: name alsa device after the actual card
Devin Heitmueller [Fri, 20 Nov 2009 05:15:20 +0000]
V4L/DVB: cx18-alsa: name alsa device after the actual card

Use the cx18 board name in the ALSA description, to make it easier for users
who run "arecord -l" to see which device they should be looking for.

Also, use strlcpy() instead of strcpy().

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: cleanup cx18-alsa debug logging
Devin Heitmueller [Fri, 20 Nov 2009 04:24:57 +0000]
V4L/DVB: cx18: cleanup cx18-alsa debug logging

Fix the debug macro so that it is dependent on the modprobe parameter.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading
Devin Heitmueller [Fri, 20 Nov 2009 04:15:54 +0000]
V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading

Restructure the way the module gets loaded so that it gets loaded automatically
when cx18 is loaded, and make it work properly if there are multiple cards
present (since the old code would only take one opportunity to connect to cx18
instances when the module first loaded).

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: remove unneeded debug line
Devin Heitmueller [Fri, 20 Nov 2009 02:35:36 +0000]
V4L/DVB: cx18-alsa: remove unneeded debug line

Remove an unneeded debug line, which was preventing the cx18-alsa module from
loading.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: export more symbols required by cx18-alsa
Devin Heitmueller [Fri, 20 Nov 2009 02:23:57 +0000]
V4L/DVB: cx18: export more symbols required by cx18-alsa

Export a couple of more symbols required by the cx18-alsa module.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: add cx18-alsa module to Makefile
Devin Heitmueller [Fri, 20 Nov 2009 02:17:40 +0000]
V4L/DVB: cx18: add cx18-alsa module to Makefile

Add cx18-alsa to the Makefile and Kconfig

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: overhaul ALSA PCM device handling so it works
Devin Heitmueller [Tue, 19 Jan 2010 00:29:51 +0000]
V4L/DVB: cx18: overhaul ALSA PCM device handling so it works

Add code so that the PCM ALSA device actually works, and update the
cx18-streams mechanism so that it passes the data off to the cx18-alsa module.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa
Devin Heitmueller [Fri, 20 Nov 2009 01:52:30 +0000]
V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa

Expose a couple of symbols in the cx18 module so that locking of the PCM
stream can be shared with the cx18-alsa module.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: make it so cx18-alsa-main.c compiles
Devin Heitmueller [Fri, 20 Nov 2009 01:46:10 +0000]
V4L/DVB: cx18: make it so cx18-alsa-main.c compiles

Fix some basic compilation issues with Andy's original code.  In particular,
temporarily #ifdef out the mixer code, add some additional exception handling,
fix a couple of typos, and add a copyright line.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18: rename cx18-alsa.c
Devin Heitmueller [Fri, 20 Nov 2009 01:40:41 +0000]
V4L/DVB: cx18: rename cx18-alsa.c

Rename cx18-alsa.c to cx18-alsa-main.c so that we can call the final .ko file
cx18-alsa.ko

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss
Andy Walls [Wed, 24 Jun 2009 10:26:45 +0000]
V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx18-alsa: Initial non-working cx18-alsa files
Andy Walls [Tue, 26 May 2009 00:40:25 +0000]
V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files

Initial cx18-alsa module files check-in to avoid losing work.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dm1105: use macro for read/write registers
Igor M. Liplianin [Sun, 17 Jan 2010 15:23:04 +0000]
V4L/DVB: dm1105: use macro for read/write registers

This is for better readability and smaller size of code lines.
Also it is for future improvements like GPIO handling.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dm1105: use dm1105_dev & dev instead of dm1105dvb
Igor M. Liplianin [Sun, 17 Jan 2010 15:11:00 +0000]
V4L/DVB: dm1105: use dm1105_dev & dev instead of dm1105dvb

This is for better readability and smaller size of code.
Also it is similar to other drivers.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: dm1105: connect splitted else-if statements
Igor M. Liplianin [Sun, 17 Jan 2010 14:15:06 +0000]
V4L/DVB: dm1105: connect splitted else-if statements

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: Compro S350 GPIO change
JD Louw [Sun, 17 Jan 2010 12:57:46 +0000]
V4L/DVB: Compro S350 GPIO change

This patch enables LNB power on newer revision d1 Compro S350 and S300 DVB-S cards.

Signed-off-by: JD Louw <jd.louw@mweb.co.za>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card
Igor M. Liplianin [Sun, 17 Jan 2010 13:32:26 +0000]
V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card

The PCI card contains dm1105 PCI bridge and ds3000 demod.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang
Andy Walls [Mon, 18 Jan 2010 00:12:24 +0000]
V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang

Martin Dauskardt <martin.dauskardt@gmx.de> has done extensive testing on what
values can be used and and concluded that only 300 ms total is required to
avoid bad video effects such as occasional black screen and short sync
disturbances.  Furthermore he determined how this 300 ms was split between
the two msleep()s did matter very much, so he suggested 150ms/150ms as one
acceptable alternative that is implemented here.

Many thanks go to Martin.

Tested-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio
Andy Walls [Thu, 24 Dec 2009 16:06:08 +0000]
V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio

This change attempts to fix the ivtv tinny audio problem by keeping digitizer
to encoder audio clocks running, while disabling the video clocks as needed to
avoid unpredictable PCI bus hangs.

To accomplish this, for the cx25840 module enabling of audio streaming had
to be separated from enabling video streaming, requiring an additional
v4l2_subdev_audio_op and calls to this new op in the pvrusb2 and ivtv drivers.

The cx231xx and cx23885 driver use the cx25840 module for affecting only
video on s_stream calls, so those drivers needed no change.

The CX23418 hardware does not exhibit either the tinny audio problem nor the PCI
bus hang, so the cx18 driver did not need corresponding changes.

CX2341[56] based cards that are not using the CX2584x family of chips
do not seem to be affected by the tinny audio problem, and this change should
not affect how they are configured. It will delay their first capture by
starting by another 300 msec though.

Many thanks go to Argus <pthorn-ivtvd@styx2002.no-ip.org> and
Martin Dauskardt <martin.dauskardt@gmx.de> whose persistent testing and
investigation of this problem will hopefully fix this problem once and for all
for many ivtv users.

Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Reported-by: Argus <pthorn-ivtvd@styx2002.no-ip.org>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: ivtv: Fix race condition for queued udma transfers
Ian Armstrong [Tue, 22 Dec 2009 01:59:26 +0000]
V4L/DVB: ivtv: Fix race condition for queued udma transfers

There are several DMA related interrupts which wake up the dma_waitq. The udma
routines use this queue while they wait for their transfer to complete. When
woken, the udma routine will check the IVTV_F_I_UDMA_PENDING & IVTV_F_I_UDMA
flags to see if the transfer is still queued or has finished. However, a small
window exists between the IVTV_F_I_UDMA_PENDING flag being cleared and the
IVTV_F_I_UDMA flag being set. Given that the completion of an unrelated DMA
transfer may wake up the udma routine, it's possible for this check to fail
and the udma routine will start unmapping pages when the transfer has only
just started. The result of this is unpredictable.

This fix simply delays the clearing of the IVTV_F_I_UDMA_PENDING flag until
after IVTV_F_I_UDMA has been set.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled...
Abylay Ospan [Fri, 22 Jan 2010 19:01:44 +0000]
V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod

22-kHz tone can be driven in two ways:
1. LNBH24 can produce 22kHz continuous tone when TEN=1 ( 22 KHz tone output is
always activated ).
2. LNBH24 can reproduce 22kHz tone timings from DSQIN or EXTM pin's when TEN=0.
From LNBH24 datasheet:
"In order to improve design flexibility an external tone input pin is
available (EXTM). The EXTM is a Logic input pin which activates the 22 kHz
tone output, on the VoTX pin, by using the LNBH24 integrated tone generator
(similar to the DSQIN pin function). In fact, the output tone waveform
characteristics will always be internally controlled by the LNBH24 tone
generator and the EXTM signal will be used as a timing control for DiSEqC tone
data encoding on the VoTX output."

In NetUP Dual DVB-S2-CI card 22kHz tone timings on EXTM pin produced by
STV0900 demod:
.set_tone  = stv0900_set_tone

redefine to "set_tone = lnbp21_set_tone" is not correct for "NetUP Dual
DVB-S2-CI card".

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB (14005): media/video Kconfig: Mark gspca superceeded drivers as deprecated
Hans de Goede [Thu, 14 Jan 2010 13:00:31 +0000]
V4L/DVB (14005): media/video Kconfig: Mark gspca superceeded drivers as deprecated

We have some duplicate functionality between the zc0301 and gspca-zc3xx,
the sn9c102 and gspca-sonixb + gspca-sonix, and et61x251 and gscpa-etoms
drivers.

The non gspca versions of these drivers not only show a lot of code
duplicty (amongsth each other), as they all copy the same generic usb
webcam code instead of using some sort of framework. They also have not
seen any updates for more then 2 years, where as the gspca drivers are
actively maintained.

So it is time for the non gspca versions of these drivers to go away,
marking them as deprecated is the first step in this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

9 years agoV4L/DVB (14004): drivers/media/video/Kconfig: Turn deprecated drivers off by default
Hans de Goede [Thu, 14 Jan 2010 12:40:37 +0000]
V4L/DVB (14004): drivers/media/video/Kconfig: Turn deprecated drivers off by default

drivers/media/video/Kconfig: Turn deprecated drivers off by default

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>