openwrt/staging/blogic.git
12 years ago[media] au0828: tweak workaround for i2c clock stretching bug
Devin Heitmueller [Tue, 7 Aug 2012 01:47:10 +0000 (22:47 -0300)]
[media] au0828: tweak workaround for i2c clock stretching bug

The hack I put in a couple of years ago to avoid clock stretching issues
when talking to the xc5000 worked fine for writes, but intermittently
fails for register reads, because the xc5000 may stretch the clock for
longer between bytes (I was seeing cases of 21 us on the analyzer).

The problem manifested itself as the xc5000 firmware version and PLL
lock register intermittently showing garbage values.

Slow down the i2c bus from 30 KHz to 20 KHz to accommodate.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc5000: add support for firmware load check and init status
Devin Heitmueller [Tue, 7 Aug 2012 01:47:09 +0000 (22:47 -0300)]
[media] xc5000: add support for firmware load check and init status

The xc5000c and newer versions of the xc5000a firmware need minor revisions
to their initialization process.  Add support for validating the firmware
was properly loaded, as well as checking the init status after initialization.

Based on advice from CrestaTech support as well as xc5000 datasheet v2.3.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc5000: reset device if encountering PLL lock failure
Devin Heitmueller [Tue, 7 Aug 2012 01:47:08 +0000 (22:47 -0300)]
[media] xc5000: reset device if encountering PLL lock failure

It's possible for the xc5000 to enter an unknown state such that all
subsequent tuning requests fail.  The only way to recover is to reset the
tuner and reload the firmware.  This problem was detected after several days
straight of issuing tuning requests every five seconds.

Reset the firmware in the event that the PLL is in an unlocked state.  This
solution was provided by the engineer at CrestaTech (the company that acquired
Xceive).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: tune retry interval for i2c interaction
Devin Heitmueller [Tue, 7 Aug 2012 01:47:06 +0000 (22:47 -0300)]
[media] au0828: tune retry interval for i2c interaction

Adjust the retry timeout and number of retries to speed up xc5000
firmware download.  With this change it goes from 4.2 seconds to 2.9.
The net time waited is pretty much the same, but we just poll more
often.

Tested at 250 KHz as well as 30 KHz.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: remove control buffer from send_control_msg
Devin Heitmueller [Tue, 7 Aug 2012 01:47:05 +0000 (22:47 -0300)]
[media] au0828: remove control buffer from send_control_msg

There are no cases where a control message is ever sent to the au0828
with an actual buffer defined.  Remove the reference to dev->ctrlmsg,
which currently requires us to hold a mutex since it is shared with the
read function.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: speed up i2c clock when doing xc5000 firmware load
Devin Heitmueller [Tue, 7 Aug 2012 01:47:04 +0000 (22:47 -0300)]
[media] au0828: speed up i2c clock when doing xc5000 firmware load

Put a hack in place to speed up the firmware load in the case that the
xc5000 has just been reset.  The chip can safely do 400 KHz in this mode,
while in normal operation it can only do 100 KHz.

This reduces the firmware load time from 6.9 seconds to 4.2.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: fix case where STREAMOFF being called on stopped stream causes BUG()
Devin Heitmueller [Tue, 7 Aug 2012 01:47:03 +0000 (22:47 -0300)]
[media] au0828: fix case where STREAMOFF being called on stopped stream causes BUG()

We weren't checking whether the resource was in use before calling
res_free(), so applications which called STREAMOFF on a v4l2 device that
wasn't already streaming would cause a BUG() to be hit (MythTV).

Reported-by: Larry Finger <larry.finger@lwfinger.net>
Reported-by: Jay Harbeston <jharbestonus@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: prevent i2c gate from being kept open while in analog mode
Devin Heitmueller [Tue, 7 Aug 2012 01:47:02 +0000 (22:47 -0300)]
[media] au0828: prevent i2c gate from being kept open while in analog mode

The original implementation of the analog support would use an
i2c_gate_ctrl function when using the digital side of the au8522, but on
the analog side we would always just force the gate open and leave it
open all the time.

This can have adverse effects on the xc5000 given the tuner is receiving
all the spurious i2c traffic (a problem which can be exaggerated due to
bugs in the au0828 i2c hardware implementation).

Rework the existing hack to only open/close the gate when actually
talking to the tuner.

This logic might need to be reworked a bit if anybody ever tries to add
support for a board that has the au0828/au8522 but doesn't have digital
support implemented (because the i2c_gate_ctrl callback is being set in
the DVB attach).  However given how few different models are in
circulation, this can be deferred until such a situation arises (if
ever).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc5000: don't invoke auto calibration unless we really did reset tuner
Devin Heitmueller [Tue, 7 Aug 2012 01:47:01 +0000 (22:47 -0300)]
[media] xc5000: don't invoke auto calibration unless we really did reset tuner

The current code invokes the auto calibration of the tuner whenever the
init routine is called (whenever the DVB frontend opens the device).
However we should really only be invoking the calibration if we actually
did reset the device and reload the firmware.

Rework the routine to only do calibration if reset and firmware load was
performed.  Also because the called function is now a no-op if the
firmware is already loaded, the caller no longer needs to invoke
is_firmware_loaded().

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au8522: fix regression in logging introduced by separation of modules
Devin Heitmueller [Tue, 7 Aug 2012 01:47:00 +0000 (22:47 -0300)]
[media] au8522: fix regression in logging introduced by separation of modules

The au8522 driver was broken into three modules (dig, decoder, common),
and as a result the debug modprobe option doesn't work for any of the
common functions.

Copy the module macros over to the common module so that the debug
option works again.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: make sure video standard is setup in tuner-core
Devin Heitmueller [Tue, 7 Aug 2012 01:46:59 +0000 (22:46 -0300)]
[media] au0828: make sure video standard is setup in tuner-core

If the user performs a tuning attempt without explicitly calling the
s_std ioctl(), a value of zero is sent from tuner-core to xc5000.  This
causes the xc5000 driver to leave the standard unchanged.  The problem
was masked by the fact that the xc5000 driver defaulted to NTSC, but if
you happened to perform an ATSC/ClearQAM tuning attempt and then do an
analog tune, the net effect is an analog tune with the standard still
set to DTV6.

Keep track of whether the standard has ever been sent to tuner-core.  We
don't make an s_std subdev call explicitly during probe because that
will cause a firmware load (which is very time consuming on the 950q).
With the logic in this patch, the s_std call will occur automatically on
the s_freq call if it hasn't already been set.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: fix race condition that causes xc5000 to not bind for digital
Devin Heitmueller [Tue, 7 Aug 2012 01:46:58 +0000 (22:46 -0300)]
[media] au0828: fix race condition that causes xc5000 to not bind for digital

In some cases users would see the xc5000_attach() call failing for the
digital side of the tuner on initialization.  This is because of udev
running v4l-id while the digital side of the board is still coming up.

This is the exact same race condition which was present in em28xx (not
surprising since I copied all the locking logic from that driver when I
added analog support).  Reproduce Mauro's fix from the em28xx driver in
au0828.

Reported-by: Rick Harding <rharding@mitechie.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc5000: properly report i2c write failures
Devin Heitmueller [Tue, 7 Aug 2012 01:46:57 +0000 (22:46 -0300)]
[media] xc5000: properly report i2c write failures

The logic as written would *never* actually return an error condition,
since the loop would run until the counter hit zero but the check was
for a value less than zero.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc5000: add support for showing the SNR and gain in the debug output
Devin Heitmueller [Tue, 7 Aug 2012 01:46:56 +0000 (22:46 -0300)]
[media] xc5000: add support for showing the SNR and gain in the debug output

When debugging is enabled, also show the analog SNR and the total gain
status values.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] xc5000: properly show quality register values
Devin Heitmueller [Tue, 7 Aug 2012 01:46:55 +0000 (22:46 -0300)]
[media] xc5000: properly show quality register values

The quality register only has relevant data in bits 2-0, so discard the
other bits (which results in a value being printed that is consistent
with the expected 0-7 range).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: Make the s_reg and g_reg advanced debug calls work against the bridge
Devin Heitmueller [Tue, 7 Aug 2012 01:46:54 +0000 (22:46 -0300)]
[media] au0828: Make the s_reg and g_reg advanced debug calls work against the bridge

The g_reg and s_reg calls worked properly if acting on subdev registers
(such as the au8522), but didn't work against the au0828 itself.  Copy
the logic over from em28xx.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au8522: properly recover from the au8522 delivering misaligned TS streams
Devin Heitmueller [Tue, 7 Aug 2012 01:46:53 +0000 (22:46 -0300)]
[media] au8522: properly recover from the au8522 delivering misaligned TS streams

There is an apparent bug in the au8522 TS clocking which can result in
it delivering a TS payload to the au0828 that is shifted by some number
of bits. For example, the device will announce a packet containing "FA
38 FF F8" which if you shift left one bit is "1F 47 1F FF F0..."

This presents itself as no TS stream being delivered from the kernel to
userland, since the kernel demux will drop every packet.

In the event that this condition occurs, restart the DVB stream.

Also, this patch includes a couple of lines of cleanup to not change the
FIFO configuration while the FIFO is running (which can screw up the
state machine), and dequeue the buffers before turning off the FIFO.
This puts the logic in sync with the Windows driver.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au8522: Fix off-by-one in SNR table for QAM256
Devin Heitmueller [Tue, 7 Aug 2012 01:46:52 +0000 (22:46 -0300)]
[media] au8522: Fix off-by-one in SNR table for QAM256

The table of valid SNR values for QAM 256 is off by one, and as a result
if the SNR is oscillating between 40.0 and 39.9 dB, tools like azap show
it going back and forth between 40.0 and 0 (misleading some people,
including myself, to think signal lock is being lost or there is a
problem with register reads).

Fix the table so that 40.0 dB is properly represented.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au8522: fix intermittent lockup of analog video decoder
Devin Heitmueller [Tue, 7 Aug 2012 01:46:51 +0000 (22:46 -0300)]
[media] au8522: fix intermittent lockup of analog video decoder

It turns up the autodetection for the video standard in the au8522 is
prone to hanging the chip until a reset is performed.  This condition is
trivial to reproduce simply by tuning to a station and then rapidly
unplugging/ replugging the coax feed.

Because we've never claimed to support anything other than NTSC-M, just
disable the video-standard autodetection logic and force it to always be
NTSC-M.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-dev: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Tue, 31 Jul 2012 07:02:25 +0000 (04:02 -0300)]
[media] v4l2-dev: remove V4L2_FL_LOCK_ALL_FOPS

All drivers that needed V4L2_FL_LOCK_ALL_FOPS have been converted,
so remove this flag altogether.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mem2mem_testdev: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Tue, 31 Jul 2012 06:51:25 +0000 (03:51 -0300)]
[media] mem2mem_testdev: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vpif_capture: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Tue, 31 Jul 2012 06:48:31 +0000 (03:48 -0300)]
[media] vpif_capture: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vpif_display: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Tue, 31 Jul 2012 06:47:07 +0000 (03:47 -0300)]
[media] vpif_display: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-mfc: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 10:13:33 +0000 (07:13 -0300)]
[media] s5p-mfc: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-tv: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 10:02:01 +0000 (07:02 -0300)]
[media] s5p-tv: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-g2d: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:58:28 +0000 (06:58 -0300)]
[media] s5p-g2d: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p-jpeg: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:54:18 +0000 (06:54 -0300)]
[media] s5p-jpeg: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] soc_camera: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:49:09 +0000 (06:49 -0300)]
[media] soc_camera: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx231xx: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:43:02 +0000 (06:43 -0300)]
[media] cx231xx: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bfin_capture: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:36:49 +0000 (06:36 -0300)]
[media] bfin_capture: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] sh_vou: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:33:26 +0000 (06:33 -0300)]
[media] sh_vou: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mx2_emmaprp: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:29:33 +0000 (06:29 -0300)]
[media] mx2_emmaprp: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] vpbe_display: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:16:44 +0000 (06:16 -0300)]
[media] vpbe_display: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s2255drv: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 09:10:32 +0000 (06:10 -0300)]
[media] s2255drv: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] fsl-viu: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 11:46:43 +0000 (08:46 -0300)]
[media] fsl-viu: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] wl128x: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 11:40:07 +0000 (08:40 -0300)]
[media] wl128x: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dt3155v4l: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 11:33:25 +0000 (08:33 -0300)]
[media] dt3155v4l: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tm6000: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 10:26:46 +0000 (07:26 -0300)]
[media] tm6000: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] em28xx: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 11:12:47 +0000 (08:12 -0300)]
[media] em28xx: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] usbvision: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 11:03:50 +0000 (08:03 -0300)]
[media] usbvision: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cpia2: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 10:56:21 +0000 (07:56 -0300)]
[media] cpia2: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] saa7146: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sat, 23 Jun 2012 10:47:14 +0000 (07:47 -0300)]
[media] saa7146: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

I also removed some dead code in the form of the saa7146_devices list and
saa7146_devices_lock mutex: these were used once but that was a long time
ago.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ivtv: remove V4L2_FL_LOCK_ALL_FOPS
Hans Verkuil [Sun, 24 Jun 2012 10:26:10 +0000 (07:26 -0300)]
[media] ivtv: remove V4L2_FL_LOCK_ALL_FOPS

Add proper locking to the file operations, allowing for the removal
of the V4L2_FL_LOCK_ALL_FOPS flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: Update copyright
Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:35:02 +0000 (09:35 -0300)]
[media] az6007: Update copyright

Update copyright comments after dvb-usb-v2 conversion.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: handle CI during suspend/resume
Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:25:34 +0000 (09:25 -0300)]
[media] az6007: handle CI during suspend/resume

The dvb-usb-v2 core doesn't know anything about CI. So, the
driver needs to handle it by hand. This patch stops CI just
before stopping URB's/RC, and restarts it before URB/RC start.

It should be noticed that suspend/resume is not yet working properly,
as the PM model requires the implementation of reset_resume:
dvb_usb_az6007 1-6:1.0: no reset_resume for driver dvb_usb_az6007?
But this is not implemented there at dvb-usb-v2 yet.

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: make all functions static
Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:23:17 +0000 (09:23 -0300)]
[media] az6007: make all functions static

There's no reason why those functions shouldn't be static.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: rename "st" to "state" at az6007_power_ctrl()
Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:22:23 +0000 (09:22 -0300)]
[media] az6007: rename "st" to "state" at az6007_power_ctrl()

On all other parts, this var is called state. So, use the same
name here, to be consistent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: Fix the number of parameters for QAM setup
Mauro Carvalho Chehab [Sun, 5 Aug 2012 03:10:13 +0000 (00:10 -0300)]
[media] az6007: Fix the number of parameters for QAM setup

Remove those warning messages:
[  121.696758] drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params:
[  121.703401] drxk: 02 00 00 00 10 00 07 00 03 02                    ..........
[  121.703587] drxk: Warning -22 on QAMDemodulatorCommand

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: fix the I2C W+R logic
Mauro Carvalho Chehab [Sun, 5 Aug 2012 00:39:41 +0000 (21:39 -0300)]
[media] az6007: fix the I2C W+R logic

The test for I2C W+R will never be true. Fix it.

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] az6007: convert it to use dvb-usb-v2
Mauro Carvalho Chehab [Sat, 4 Aug 2012 19:05:34 +0000 (16:05 -0300)]
[media] az6007: convert it to use dvb-usb-v2

Change it to use dvb-usb-v2. The driver should be working as before.
The only functional changes should be at the driver debug logs.

This driver needs the cypress firmware load, so, auto-selects it.

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-usb-v2: Don't ask user to select Cypress firmware module
Mauro Carvalho Chehab [Sat, 4 Aug 2012 19:05:13 +0000 (16:05 -0300)]
[media] dvb-usb-v2: Don't ask user to select Cypress firmware module

The dvb-usb-v2 cypress firmware module is not optional, as drivers
won't work without it. So, instead of opening a menu for the user to
manually select, let the drivers that need it to select, hiding this
option from the Kconfig menu.

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-usb-v2: Fix cypress firmware compilation
Mauro Carvalho Chehab [Sat, 4 Aug 2012 19:03:04 +0000 (16:03 -0300)]
[media] dvb-usb-v2: Fix cypress firmware compilation

ERROR: "usbv2_cypress_load_firmware" [drivers/media/dvb/dvb-usb-v2/dvb-usb-az6007.ko] undefined!

Cypress fimware will never be compiled properly, as the Makefile rule
is wrong.

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: i.MX27: Fix mx2_emmaprp mem2mem driver clocks
Javier Martin [Mon, 30 Jul 2012 07:37:30 +0000 (04:37 -0300)]
[media] media: i.MX27: Fix mx2_emmaprp mem2mem driver clocks

This driver wasn't converted to the new clock framework
(e038ed50a4a767add205094c035b6943e7b30140).

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] i.MX27: Visstrim_M10: Add support for deinterlacing driver
Javier Martin [Thu, 26 Jul 2012 08:57:30 +0000 (05:57 -0300)]
[media] i.MX27: Visstrim_M10: Add support for deinterlacing driver

Visstrim_M10 have a tvp5150 whose video output must be deinterlaced.
The new mem2mem deinterlacing driver is very useful for that purpose.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m2m-deinterlace: fix two warnings
Mauro Carvalho Chehab [Mon, 6 Aug 2012 12:06:34 +0000 (09:06 -0300)]
[media] m2m-deinterlace: fix two warnings

drivers/media/video/m2m-deinterlace.c: In function â€˜deinterlace_issue_dma’:
drivers/media/video/m2m-deinterlace.c:363:3: warning: format â€˜%x’ expects argument of type â€˜unsigned int’, but argument 4 has type â€˜dma_addr_t’ [-Wformat]
drivers/media/video/m2m-deinterlace.c:363:3: warning: format â€˜%x’ expects argument of type â€˜unsigned int’, but argument 5 has type â€˜dma_addr_t’ [-Wformat]

Cc: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: Add mem2mem deinterlacing driver
Javier Martin [Thu, 26 Jul 2012 08:55:18 +0000 (05:55 -0300)]
[media] media: Add mem2mem deinterlacing driver

Some video decoders such as tvp5150 provide separate
video fields (V4L2_FIELD_SEQ_TB/BT). This driver uses
dmaengine to convert this format to V4L2_FIELD_INTERLACED_TB/BT
(weaving) or V4L2_FIELD_NONE (line doubling) so that the
image can be displayed or processed.

Of course there will be combing effect in the image but this
can be accepted for some low quality applications.

Currently only YUV420 and YUYV formats are supported but
it can be extended later.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Visstrim M10: Add support for Coda
Javier Martin [Thu, 26 Jul 2012 08:54:19 +0000 (05:54 -0300)]
[media] Visstrim M10: Add support for Coda

Support the codadx6 that is included in
the i.MX27 SoC.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: coda: Add driver for Coda video codec
Javier Martin [Thu, 26 Jul 2012 08:53:35 +0000 (05:53 -0300)]
[media] media: coda: Add driver for Coda video codec

Coda is a range of video codecs from Chips&Media that
support H.264, H.263, MPEG4 and other video standards.

Currently only support for the codadx6 included in the
i.MX27 SoC is added. H.264 and MPEG4 video encoding
are the only supported capabilities by now.

[mchehab@redhat.com: Add missing include linux/of.h]
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Reviewed-by: Philipp Zabel<p.zabel@pengutronix.de>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] i.MX: coda: Add platform support for coda in i.MX27
Javier Martin [Thu, 26 Jul 2012 08:45:32 +0000 (05:45 -0300)]
[media] i.MX: coda: Add platform support for coda in i.MX27

i.MX27 SoC include a codadx6 codec that is able to encode
and decode H.264, H.263 and MPEG4.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] move dvb-usb-ids.h to dvb-core
Mauro Carvalho Chehab [Sun, 5 Aug 2012 22:50:15 +0000 (19:50 -0300)]
[media] move dvb-usb-ids.h to dvb-core

While this header were meant to be used just by dvb-usb driver, it
is now being used also by dvb-usb-v2 and cx231xx. So, move it to a
better place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usbv2: rename dvb_usb_firmware to cypress_firmware
Antti Palosaari [Thu, 2 Aug 2012 00:38:46 +0000 (21:38 -0300)]
[media] dvb_usbv2: rename dvb_usb_firmware to cypress_firmware

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9015: remote controller fixes
Antti Palosaari [Wed, 25 Jul 2012 00:21:04 +0000 (21:21 -0300)]
[media] af9015: remote controller fixes

1)
AF9015 remote controller query will fail rarely due to register
access failures and dvb_usb_v2 will stop rc polling when error
returned. Add logic to allow errors until two consecutive errors
occurs.

2)
Remote controller key map was not loaded in case of key map was set as
a device property. Fix it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: move from dvb-usb to dvb-usb-v2
Antti Palosaari [Mon, 9 Jul 2012 17:59:28 +0000 (14:59 -0300)]
[media] dvb_usb_v2: move from dvb-usb to dvb-usb-v2

Move to own directory.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gl861: convert to new DVB USB
Antti Palosaari [Tue, 26 Jun 2012 21:25:51 +0000 (18:25 -0300)]
[media] gl861: convert to new DVB USB

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl111sf: convert to new DVB USB
Antti Palosaari [Tue, 26 Jun 2012 03:17:04 +0000 (00:17 -0300)]
[media] mxl111sf: convert to new DVB USB

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: register device even no remote keymap defined
Antti Palosaari [Thu, 5 Jul 2012 22:57:07 +0000 (19:57 -0300)]
[media] dvb_usb_v2: register device even no remote keymap defined

It failed to register device when remote keymap was not set.
Fix it to register device even keymap is NULL. In that case
just skip remote registration.

Driver should set RC_MAP_EMPTY to enable remote in case of
there is remote receiver but default keymap is unknown.

Reported-by: pierigno <pierigno@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: remove usb_clear_halt() from stream
Antti Palosaari [Wed, 27 Jun 2012 02:01:31 +0000 (23:01 -0300)]
[media] dvb_usb_v2: remove usb_clear_halt() from stream

It works no longer as it was designed since we can change streaming
configuration during device operation.

Maybe it should be performed conditionally on cases when streaming
endpoint is changed. Anyhow, let it out now and add later if needed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: do not try to remove non-existent adapter
Antti Palosaari [Wed, 27 Jun 2012 01:49:19 +0000 (22:49 -0300)]
[media] dvb_usb_v2: do not try to remove non-existent adapter

Check that adapter exists before trying to remove it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: use dev_* logging macros
Antti Palosaari [Wed, 27 Jun 2012 01:44:00 +0000 (22:44 -0300)]
[media] dvb_usb_v2: use dev_* logging macros

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: change streaming control callback parameter
Antti Palosaari [Tue, 26 Jun 2012 03:04:33 +0000 (00:04 -0300)]
[media] dvb_usb_v2: change streaming control callback parameter

Pass frontend instead of adapter as some drivers need to make
decisions based frontend.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: fix power_ctrl() callback error handling
Antti Palosaari [Thu, 21 Jun 2012 05:57:34 +0000 (02:57 -0300)]
[media] dvb_usb_v2: fix power_ctrl() callback error handling

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: update copyrights
Antti Palosaari [Thu, 21 Jun 2012 02:09:41 +0000 (23:09 -0300)]
[media] dvb_usb_v2: update copyrights

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: remove unused variable
Antti Palosaari [Thu, 21 Jun 2012 01:47:15 +0000 (22:47 -0300)]
[media] dvb_usb_v2: remove unused variable

It was left from the legacy remote controller we do not support.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: update header dvb_usb.h comments
Antti Palosaari [Thu, 21 Jun 2012 01:22:14 +0000 (22:22 -0300)]
[media] dvb_usb_v2: update header dvb_usb.h comments

Comment briefly all used structures and variables.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: refactor dvb_usbv2_generic_rw()
Antti Palosaari [Wed, 20 Jun 2012 23:27:42 +0000 (20:27 -0300)]
[media] dvb_usb_v2: refactor dvb_usbv2_generic_rw()

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: multiple small tweaks around the code
Antti Palosaari [Wed, 20 Jun 2012 03:32:53 +0000 (00:32 -0300)]
[media] dvb_usb_v2: multiple small tweaks around the code

Naming, small code changes, debug writings, etc.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: move dvb_usbv2_generic_rw() debugs behind define
Antti Palosaari [Wed, 20 Jun 2012 01:31:04 +0000 (22:31 -0300)]
[media] dvb_usb_v2: move dvb_usbv2_generic_rw() debugs behind define

It is nice to have this debug, but as it generates very huge amount
of traffic, better to make it conditional. Use define macro to disable
it as I did not find out how to use dynamic debugs to dump variable
length buffers like that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: merge files dvb_usb_init.c and dvb_usb_dvb.c
Antti Palosaari [Wed, 20 Jun 2012 01:21:34 +0000 (22:21 -0300)]
[media] dvb_usb_v2: merge files dvb_usb_init.c and dvb_usb_dvb.c

Merge files dvb_usb_init.c and dvb_usb_dvb.c to dvb_usb_core.c.
It is still under 1000 lines of code after all the optimization
so put it one file.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: refactor dvb_usb_ctrl_feed() logic
Antti Palosaari [Wed, 20 Jun 2012 00:47:42 +0000 (21:47 -0300)]
[media] dvb_usb_v2: refactor dvb_usb_ctrl_feed() logic

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: remove num_adapters_initialized variable
Antti Palosaari [Tue, 19 Jun 2012 23:03:02 +0000 (20:03 -0300)]
[media] dvb_usb_v2: remove num_adapters_initialized variable

We can live easily without it so remove it, make code and binary
few bytes smaller.

>From struct dvb_usb_device variable int num_adapters_initialized.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: use identify_state() to resolve firmware name
Antti Palosaari [Tue, 19 Jun 2012 02:42:53 +0000 (23:42 -0300)]
[media] dvb_usb_v2: use identify_state() to resolve firmware name

Merge get_firmware_name() to identify_state().

It is wise to resolve firmware name in that routine as it does
decision wether or not to load firmware at all. It is one very
rarely needed callback less.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: merge get_ts_config() to get_usb_stream_config()
Antti Palosaari [Tue, 19 Jun 2012 01:54:16 +0000 (22:54 -0300)]
[media] dvb_usb_v2: merge get_ts_config() to get_usb_stream_config()

Piggypag TS type callback to USB stream callback and change
callback name slightly to fit better.
Both of those are rather rare callback and has a relation. Transport
Stream, TS, is input stream and USB stream is output stream of
DVB USB bridge.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: use container_of() for adapter to device
Antti Palosaari [Mon, 18 Jun 2012 23:09:07 +0000 (20:09 -0300)]
[media] dvb_usb_v2: use container_of() for adapter to device

We dont need that pointer as we can use container_of() macro thus
remove it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ec168: use DVB UDB macros
Antti Palosaari [Mon, 18 Jun 2012 22:58:44 +0000 (19:58 -0300)]
[media] ec168: use DVB UDB macros

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ce6230: use DVB USB macros
Antti Palosaari [Mon, 18 Jun 2012 22:50:16 +0000 (19:50 -0300)]
[media] ce6230: use DVB USB macros

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au6610: use DVB USB macros
Antti Palosaari [Mon, 18 Jun 2012 22:44:08 +0000 (19:44 -0300)]
[media] au6610: use DVB USB macros

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] anysee: use DVB USB macros
Antti Palosaari [Mon, 18 Jun 2012 22:39:02 +0000 (19:39 -0300)]
[media] anysee: use DVB USB macros

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: git rid of dvb_usb_adapter state variable
Antti Palosaari [Mon, 18 Jun 2012 02:42:11 +0000 (23:42 -0300)]
[media] dvb_usb_v2: git rid of dvb_usb_adapter state variable

We can live without it easily.

Also USB data stream complete callback checks for feedcount
seems to be quite redundant so remove those also.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9035: convert to new DVB USB
Antti Palosaari [Mon, 18 Jun 2012 02:15:03 +0000 (23:15 -0300)]
[media] af9035: convert to new DVB USB

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: use lock to sync feed and frontend control
Antti Palosaari [Sun, 17 Jun 2012 03:27:00 +0000 (00:27 -0300)]
[media] dvb_usb_v2: use lock to sync feed and frontend control

There was synchronization problem when streaming was stopped.
Frontend was ran down before stream which causes problems.
Use mutex to synchronization. Now it looks like that:
LOCK
start frontend
UNLOCK
LOCK
start streaming
[...]
stop streaming
UNLOCK
LOCK
stop frontend
UNLOCK

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9015: use helper macros for some pointers
Antti Palosaari [Sat, 16 Jun 2012 21:13:06 +0000 (18:13 -0300)]
[media] af9015: use helper macros for some pointers

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: helper macros for device/adapter/frontend pointers
Antti Palosaari [Sat, 16 Jun 2012 20:58:53 +0000 (17:58 -0300)]
[media] dvb_usb_v2: helper macros for device/adapter/frontend pointers

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] af9015: update USB streaming configuration logic
Antti Palosaari [Sat, 16 Jun 2012 19:25:22 +0000 (16:25 -0300)]
[media] af9015: update USB streaming configuration logic

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: change USB stream config logic
Antti Palosaari [Sat, 16 Jun 2012 19:02:57 +0000 (16:02 -0300)]
[media] dvb_usb_v2: change USB stream config logic

Initial / default USB stream configuration is now set always as a
dvb_usb_device_properties. Dynamic configuration is done top of
that if callback .get_usb_stream_config() exists. Default values
are set when callback is called so callback needs only change
values that are different than default.

In addition of that define two macros DVB_USB_STREAM_BULK() and
DVB_USB_STREAM_ISOC() for filling struct usb_data_stream_properties

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: add macros to fill USB stream properties
Antti Palosaari [Sat, 16 Jun 2012 16:56:37 +0000 (13:56 -0300)]
[media] dvb_usb_v2: add macros to fill USB stream properties

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: .read_mac_address() callback changes
Antti Palosaari [Sat, 16 Jun 2012 00:17:04 +0000 (21:17 -0300)]
[media] dvb_usb_v2: .read_mac_address() callback changes

Give DVB adapter as a parameter for callback. MAC address is
adapter property and it could be (at least in theory) there
is devices having multiple adapters and all has own MAC.

Also add error handling. If callback fails error is returned
which leads device unregister.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: remove num_frontends_initialized from dvb_usb_adapter
Antti Palosaari [Fri, 15 Jun 2012 23:46:44 +0000 (20:46 -0300)]
[media] dvb_usb_v2: remove num_frontends_initialized from dvb_usb_adapter

We can live easily without that variable.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: move fe_ioctl_override() callback
Antti Palosaari [Fri, 15 Jun 2012 05:10:50 +0000 (02:10 -0300)]
[media] dvb_usb_v2: move fe_ioctl_override() callback

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: get rid of dvb_usb_device state
Antti Palosaari [Fri, 15 Jun 2012 04:38:28 +0000 (01:38 -0300)]
[media] dvb_usb_v2: get rid of dvb_usb_device state

Remove state from struct dvb_usb_device as we can live without.
Add some debug logs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_usb_v2: simplify remote init/exit logic
Antti Palosaari [Fri, 15 Jun 2012 03:52:42 +0000 (00:52 -0300)]
[media] dvb_usb_v2: simplify remote init/exit logic

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>