]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
12 years ago[media] gspca_sonixb: Fix exposure control min/max value for coarse expo sensors
Hans de Goede [Fri, 30 Dec 2011 13:58:44 +0000 (10:58 -0300)]
[media] gspca_sonixb: Fix exposure control min/max value for coarse expo sensors

This got broken by some gscpa core fixes, this patch restores the proper
min/max values for these controls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca: Add jl2005bcd sub driver
Theodore Kilgore [Tue, 13 Dec 2011 21:09:15 +0000 (18:09 -0300)]
[media] gspca: Add jl2005bcd sub driver

Written by Theodore Kilgore

With minor changes by Hans de Goede:
-Code style fixes
-Correct the verbose level on various PDEBUG messages
-Make error messages use pr_err instead of PDEBUG
-Document the jl20 pixel format

Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMerge tag 'v3.2' into staging/for_v3.3
Mauro Carvalho Chehab [Fri, 6 Jan 2012 12:18:43 +0000 (10:18 -0200)]
Merge tag 'v3.2' into staging/for_v3.3

* tag 'v3.2': (83 commits)
  Linux 3.2
  minixfs: misplaced checks lead to dentry leak
  ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach
  ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race
  Revert "rtc: Expire alarms after the time is set."
  [CIFS] default ntlmv2 for cifs mount delayed to 3.3
  cifs: fix bad buffer length check in coalesce_t2
  Revert "rtc: Disable the alarm in the hardware"
  hung_task: fix false positive during vfork
  security: Fix security_old_inode_init_security() when CONFIG_SECURITY is not set
  fix CAN MAINTAINERS SCM tree type
  mwifiex: fix crash during simultaneous scan and connect
  b43: fix regression in PIO case
  ath9k: Fix kernel panic in AR2427 in AP mode
  CAN MAINTAINERS update
  net: fsl: fec: fix build for mx23-only kernel
  sch_qfq: fix overflow in qfq_update_start()
  drm/radeon/kms/atom: fix possible segfault in pm setup
  gspca: Fix falling back to lower isoc alt settings
  futex: Fix uninterruptible loop due to gate_area
  ...

12 years ago[media] davinci vpbe: add VENC block changes to enable dm365 and dm355
Manjunath Hadli [Sat, 10 Sep 2011 05:19:55 +0000 (02:19 -0300)]
[media] davinci vpbe: add VENC block changes to enable dm365 and dm355

This patch implements necessary changes for enabling  dm365 and
dm355 hardware for vpbe. The patch contains additional HD mode
support for dm365 (720p60, 1080i30) and appropriate register
modifications based on version numbers.

VPBE_VERSION_2 = dm365 specific
VPBE_VERSION_3 = dm355 specific

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] davinci vpbe: add dm365 and dm355 specific OSD changes
Manjunath Hadli [Sat, 30 Apr 2011 06:03:42 +0000 (03:03 -0300)]
[media] davinci vpbe: add dm365 and dm355 specific OSD changes

Add OSD block changes to enable dm365 and dm355 for vpbe driver.
Changes are based on version number of OSD, which have incremental
changes over 644x OSD hardware interms of few registers.

VPBE_VERSION_2 = dm365 specific
VPBE_VERSION_3 = dm355 specific

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] davinci vpbe: add dm365 VPBE display driver changes
Manjunath Hadli [Sat, 30 Apr 2011 06:01:40 +0000 (03:01 -0300)]
[media] davinci vpbe: add dm365 VPBE display driver changes

This patch implements the core additions to the display driver,
mainly controlling the VENC and other encoders for dm365.
This patch also includes addition of amplifier subdevice to the
vpbe driver and interfacing with venc subdevice.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gscpa - sn9c20x: Add sd_isoc_init ensuring enough bw when i420 fmt
Hans de Goede [Sun, 1 Jan 2012 19:03:37 +0000 (16:03 -0300)]
[media] gscpa - sn9c20x: Add sd_isoc_init ensuring enough bw when i420 fmt

When using the SN9C20X_I420 fmt the sn9c20x needs more bandwidth
than our regular bandwidth calculations reserve.

This patch adds a sd_isoc_init function, which forces the use of a specific
altsetting when using the SN9C20X_I420 fmt.

This fixes the bottom 10-30% of the image getting corrupted when using
the SN9C20X_I420 fmt (which is the default fmt).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca: Add a need_max_bandwidth flag to sd_desc
Hans de Goede [Sun, 1 Jan 2012 19:35:01 +0000 (16:35 -0300)]
[media] gspca: Add a need_max_bandwidth flag to sd_desc

Some cameras will pretty much entirely fill all the image buffers all the
time even though they are using compression.

This patch adds a flag to sd_desc, which drivers for such cameras can set.

When this flag is set the bandwidth calculation code will no longer
assume that the image buffer size is a worst case and less bandwidth than
imagebufsize * fps will be used on average.

This patch sets this new flag for 3 drivers:
* For spca561 (for rev12a cameras) and nw80x cams as these simply don't work
  when given less bandwidth than imagebufsize * fps.
* For sn9c20x cameras, because these show severy jpeg artifacts when
  given less bandwidth than imagebufsize * fps and since these are usb2
  cameras there is plenty bandwidth anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - main: isoc mode devices are never low speed
Hans de Goede [Sun, 1 Jan 2012 16:34:58 +0000 (13:34 -0300)]
[media] gspca - main: isoc mode devices are never low speed

Quoting from the official usb 20 spec:
"5.6.4 Isochronous Transfer Bus Access Constraints

Isochronous transfers can only be used by full-speed and high-speed devices."

This means that for code paths which are isoc mode only, we don't need to
check for the device being low speed, simplifying the code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - main: Avoid clobbering all bandwidth when mic in webcam
Hans de Goede [Fri, 30 Dec 2011 21:26:53 +0000 (18:26 -0300)]
[media] gspca - main: Avoid clobbering all bandwidth when mic in webcam

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca: Check dev->actconfig rather than dev->config
Hans de Goede [Sun, 1 Jan 2012 20:20:14 +0000 (17:20 -0300)]
[media] gspca: Check dev->actconfig rather than dev->config

Check dev->actconfig rather than dev->config when checking various
configuration things. dev->config points to the array of configs for the
device so dev->config->foo boils down to dev->config[0].foo and the first
config is not necessarily always the active config.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - main: Take numerator into account in fps calculations
Hans de Goede [Fri, 30 Dec 2011 12:13:07 +0000 (09:13 -0300)]
[media] gspca - main: Take numerator into account in fps calculations

In case we ever get sub drivers which do 7.5 fps and express this as
15 / 2 fps.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - main: Correct use of interval in bandwidth calculation
Hans de Goede [Fri, 30 Dec 2011 11:20:50 +0000 (08:20 -0300)]
[media] gspca - main: Correct use of interval in bandwidth calculation

The calculated bandwidth should not be multiplied by the interval, but be
divided by it. Also bInterbval should be interpreted as a power of 2
for isochronous endpoints.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - main: rename build_ep_tb to build_isoc_ep_tb
Hans de Goede [Fri, 30 Dec 2011 10:58:10 +0000 (07:58 -0300)]
[media] gspca - main: rename build_ep_tb to build_isoc_ep_tb

After the "gspca: Fix bulk mode cameras no longer working (regression fix)"
patch build_ep_tb is no longer being called for bulk endpoints.

This patch renames build_ep_tb to build_isoc_ep_tb to make clear it should
only be called for isoc mode cameras.

This patch also:
- drops the no longer needed xfer parameter
- removes a check for bulk mode from the build_isoc_ep_tb code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - main: Change the bandwidth estimation of isochronous transfer
Jean-François Moine [Wed, 4 Jan 2012 16:44:02 +0000 (13:44 -0300)]
[media] gspca - main: Change the bandwidth estimation of isochronous transfer

Having:
- a mean image size of 0.375 time the max compressed image size and
- a frame rate of 30 fps for small images or with USB 2.0/3.0
seems more realistic and gives less image freezes.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] gspca - ov534_9: New sensor ov5621 and webcam 05a9:1550
Jose Alberto Reguero [Thu, 15 Dec 2011 18:54:35 +0000 (15:54 -0300)]
[media] gspca - ov534_9: New sensor ov5621 and webcam 05a9:1550

This path add support to "OmniVision Technologies, Inc. VEHO Filmscanner".

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Add AC97 8384:7650 for some versions of EMP202
Gareth Williams [Tue, 20 Dec 2011 20:45:18 +0000 (17:45 -0300)]
[media] Add AC97 8384:7650 for some versions of EMP202

Fix detection of EMP202 audio chip. Some versions have an id of
0x83847650 instead of 0xffffffff

Honestech Vidbox NW03 has a EMP202 audio chip with a different Vendor ID.

Apparently, it is the same with the Gadmei ITV380:
http://linuxtv.org/wiki/index.php/Gadmei_USB_TVBox_UTV380

Signed-off-by: Gareth Williams <gareth@garethwilliams.me.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x add support for IT9135 9006 devices
Malcolm Priestley [Mon, 12 Dec 2011 18:53:00 +0000 (15:53 -0300)]
[media] it913x add support for IT9135 9006 devices

Support for IT1935 9006 devices.

9006 have version 2 type chip.

9006 devices should use dvb-usb-it9135-02.fw firmware.

On the device tested the tuner id was set to 0 which meant
the driver used tuner id 0x38. The device functioned normally.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk_hard: fix locking issues when changing the delsys
Mauro Carvalho Chehab [Thu, 5 Jan 2012 11:26:40 +0000 (09:26 -0200)]
[media] drxk_hard: fix locking issues when changing the delsys

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: create only one frontend for both DVB-C and DVB-T
Mauro Carvalho Chehab [Thu, 5 Jan 2012 10:07:32 +0000 (08:07 -0200)]
[media] drxk: create only one frontend for both DVB-C and DVB-T

Instead of creating two DVB frontend entries for the same device,
create just one entry, and fill the delivery_system according with
the supported standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: remove ops.info.frequency_stepsize from DVB-C
Mauro Carvalho Chehab [Thu, 5 Jan 2012 09:12:46 +0000 (07:12 -0200)]
[media] drxk: remove ops.info.frequency_stepsize from DVB-C

ops.info.frequency_stepsize is used only for DVB-T & friends. For
DVB-C, the step size is calculated using the symbol rate.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: improve documentation on set_delivery_system()
Mauro Carvalho Chehab [Thu, 5 Jan 2012 16:39:05 +0000 (14:39 -0200)]
[media] dvb_frontend: improve documentation on set_delivery_system()

While this patch change some things, the updated fields there are
used just on printk, so it shouldn't cause any functional changes.

Yet, this routine is a little complex, so explain a little more
how it works.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: Update the dynamic info->type
Mauro Carvalho Chehab [Thu, 5 Jan 2012 14:28:20 +0000 (12:28 -0200)]
[media] dvb_frontend: Update the dynamic info->type

Instead of changing the ops.info.type struct, updates only
the data that will be returned to userspace.

Also add some debug messages to help tracking such issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: regression fix: add a missing inc inside the loop
Mauro Carvalho Chehab [Thu, 5 Jan 2012 13:24:41 +0000 (11:24 -0200)]
[media] dvb_frontend: regression fix: add a missing inc inside the loop

without it, the loop will run forever!

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: fix get_if_frequency call
Stefan Ringel [Sat, 17 Dec 2011 19:57:15 +0000 (16:57 -0300)]
[media] mt2063: fix get_if_frequency call

[mchehab@redhat.com: patch rebased to apply]
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25840: Fix compilation for i386 architecture
Mauro Carvalho Chehab [Thu, 5 Jan 2012 13:02:47 +0000 (11:02 -0200)]
[media] cx25840: Fix compilation for i386 architecture

WARNING: "__udivdi3" [/home/v4l/new_build/v4l/cx25840.ko] undefined!

64 bits division need to call do_div & friends, in order to allow
it to compile with 32 bits kernels

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25840: Added g_std support to the video decoder driver
Steven Toth [Thu, 5 Jan 2012 00:16:15 +0000 (21:16 -0300)]
[media] cx25840: Added g_std support to the video decoder driver

Making the detected video standard available to the core driver
and for user query.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25840: Hauppauge HVR1850 Analog driver support
Steven Toth [Thu, 5 Jan 2012 00:15:18 +0000 (21:15 -0300)]
[media] cx25840: Hauppauge HVR1850 Analog driver support

Adding support for the CX23888 DIF.
Changes regression tested against the HVR1700 and HVR1800.

Split out much of the set and init handling of the cx23885 based
cards into their own functions. Added the DIF initialization code
for each supported IF.

Updated the cx23885 code to correctly initialize cx23888 based
video/audio decoders.

Enabled Closed Caption support for CX23885 based cards during
initialization.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Bugfix /sys/class/video4linux/videoX/name truncation
Steven Toth [Thu, 5 Jan 2012 00:13:26 +0000 (21:13 -0300)]
[media] cx23885: Bugfix /sys/class/video4linux/videoX/name truncation

The card names are being truncated in the video4linux sys class name file.
Prior to this patch they were shown as:
cx23885[0] mpeg (Hauppauge WinT
cx23885[0] video (Hauppauge WinT
cx23885[0] vbi (Hauppauge WinT

After this patch they are shown as:
Hauppauge WinTV-HVR1850 (video)
Hauppauge WinTV-HVR1850 (mpeg)
Hauppauge WinTV-HVR1850 (vbi)

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Control cleanup on the MPEG Encoder
Steven Toth [Thu, 5 Jan 2012 00:11:55 +0000 (21:11 -0300)]
[media] cx23885: Control cleanup on the MPEG Encoder

Added three new control calls (g_std, querystd and g_ctrl) to
the -417 driver. Also routed other controls through the main
cx23885 driver meaning that the controls for the 417 and the
raw video device all enter the driver code and are handled
in a single place.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Hauppauge HVR1850 Analog driver support
Steven Toth [Thu, 5 Jan 2012 00:08:35 +0000 (21:08 -0300)]
[media] cx23885: Hauppauge HVR1850 Analog driver support

First in a series of patches that adds support to the cx23885 driver
for CX23888 analog video handling. Raw and MPEG video support is
being added for the HVR1850 driver in the patch, and the following
series of patches.

Some basic cx23885 driver cleanup. Partly to add HVR1850 support
and partly to allow -417.c V4L2 calls to be routed through thr
driver core and handled in a single place.

Make a number of core driver functions available to the -417.c
driver to streamline the driver.

Add the analog tuner ops definition so we can reach/tune the
hardware when we need to. Added the tff field so 888 based cards
(which have a weird field ordering issue) can be accomodated
and worked around in the driver.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25840: Add a flag to enable the CX23888 DIF to be enabled or not
Steven Toth [Thu, 5 Jan 2012 00:06:13 +0000 (21:06 -0300)]
[media] cx25840: Add a flag to enable the CX23888 DIF to be enabled or not

The CX23888 (HVR1850 and other new cards) contain a DIF which is responsible
for demodulating the audio and video. It's built directly into the CX23888
PCIe bridge. It needs to be enabled and disabled on a per-card and per-input
basis. We pass this flag from the cx23885 core driver to the sub-device
when we need the cx25840 driver to enable/disable with the DIF correctly.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Don't test for ops->info.type inside drivers
Mauro Carvalho Chehab [Thu, 5 Jan 2012 01:10:19 +0000 (23:10 -0200)]
[media] Don't test for ops->info.type inside drivers

Now, ops->info.type is handled inside the dvb_frontend
core, only for DVBv3 calls, and according with the
delivery system. So, drivers should not care or use it,
otherwise, it may have issues with DVBv5 calls.

The drivers that were still using it were detected via
this small temporary hack:

--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -29,13 +29,16 @@
 #include <linux/types.h>

 typedef enum fe_type {
+#if defined(__DVB_CORE__) || !defined (__KERNEL__)
        FE_QPSK,
        FE_QAM,
        FE_OFDM,
        FE_ATSC
+#else
+FE_FOOO
+#endif
 } fe_type_t;

-
 typedef enum fe_caps {
        FE_IS_STUPID                    = 0,
        FE_CAN_INVERSION_AUTO           = 0x1,

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: Add support for parallel mode and prints mpeg mode
Mauro Carvalho Chehab [Sun, 24 Jul 2011 17:59:20 +0000 (14:59 -0300)]
[media] drxk: Add support for parallel mode and prints mpeg mode

While the driver has support for both serial and parallel mode,
There's was way to select serial mode via configuration. Add
a config option for that, while keeping the default in serial mode.

Also, at debug mode, it will now print a message when mpeg is
enabled/disabled, and showing if parallel or serial mode were
selected, helping developers to double-check if the DRX-K is at
the right mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] drxk: Improve a few debug messages
Mauro Carvalho Chehab [Fri, 22 Jul 2011 15:34:41 +0000 (12:34 -0300)]
[media] drxk: Improve a few debug messages

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Add it to the building system
Mauro Carvalho Chehab [Thu, 21 Jul 2011 00:24:53 +0000 (21:24 -0300)]
[media] mt2063: Add it to the building system

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Add support for get_if_frequency()
Mauro Carvalho Chehab [Sat, 23 Jul 2011 17:28:14 +0000 (14:28 -0300)]
[media] mt2063: Add support for get_if_frequency()

get_if_frequency() is needed, in order to work with DRX-K.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: add some useful info for the dvb callback calls
Mauro Carvalho Chehab [Sat, 23 Jul 2011 15:16:26 +0000 (12:16 -0300)]
[media] mt2063: add some useful info for the dvb callback calls

The per-delivery system tables are confusing.
Add an extra table that explains them, and some
dprintk calls, that allows to check if mt2063 driver
is working as expected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: print the detected version
Mauro Carvalho Chehab [Sat, 23 Jul 2011 14:55:57 +0000 (11:55 -0300)]
[media] mt2063: print the detected version

Instead of printing it just for debug purposes, outputs the detected
version at the logs. This may be useful if someone wants to report
a problem.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Fix i2c read message
Mauro Carvalho Chehab [Sat, 23 Jul 2011 12:48:08 +0000 (09:48 -0300)]
[media] mt2063: Fix i2c read message

While here, improve a few debug messages that helped to track the
issue and may be useful in the future.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Print a message about the detected mt2063 type
Mauro Carvalho Chehab [Sat, 23 Jul 2011 00:24:33 +0000 (21:24 -0300)]
[media] mt2063: Print a message about the detected mt2063 type

This also helps to identify when a device is not initialized,
if the bridge doesn't return an error for a I2C failed transfer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: don't crash if device is not initialized
Mauro Carvalho Chehab [Sat, 23 Jul 2011 00:22:29 +0000 (21:22 -0300)]
[media] mt2063: don't crash if device is not initialized

Instead of crash, return -ENODEV, if the device is not poperly
initialized.

Also, give a second chance for it to initialize, at set_params
calls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove two unused temporary vars
Mauro Carvalho Chehab [Fri, 22 Jul 2011 20:07:17 +0000 (17:07 -0300)]
[media] mt2063: Remove two unused temporary vars

mt2063.c:1531:12: warning: variable 'ofout' set but not used [-Wunused-but-set-variable]
mt2063.c:1531:6: warning: variable 'ofin' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Rewrite tuning logic
Mauro Carvalho Chehab [Fri, 22 Jul 2011 20:05:15 +0000 (17:05 -0300)]
[media] mt2063: Rewrite tuning logic

Several vars at set_parms functions were set, but unused.
 Remove them and change the logic to return -EINVAL if the
analog set_param is used for digital mode.

At the analog side, cleans the logic that sets the several
analog standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Add some debug printk's
Mauro Carvalho Chehab [Fri, 22 Jul 2011 19:54:05 +0000 (16:54 -0300)]
[media] mt2063: Add some debug printk's

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Convert it to the DVBv5 way for set_params()
Mauro Carvalho Chehab [Thu, 5 Jan 2012 00:29:32 +0000 (22:29 -0200)]
[media] mt2063: Convert it to the DVBv5 way for set_params()

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Properly document the author of the original driver
Mauro Carvalho Chehab [Thu, 21 Jul 2011 20:36:20 +0000 (17:36 -0300)]
[media] mt2063: Properly document the author of the original driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Rearrange the delivery system functions
Mauro Carvalho Chehab [Thu, 21 Jul 2011 20:20:49 +0000 (17:20 -0300)]
[media] mt2063: Rearrange the delivery system functions

No functional changes on this patch. Better organize the delivery
system information and data types, putting everything together,
to improve readability.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Fix comments
Mauro Carvalho Chehab [Thu, 21 Jul 2011 19:40:03 +0000 (16:40 -0300)]
[media] mt2063: Fix comments

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Fix analog/digital set params logic
Mauro Carvalho Chehab [Thu, 21 Jul 2011 18:46:49 +0000 (15:46 -0300)]
[media] mt2063: Fix analog/digital set params logic

The driver were using a hacky way of setting analog and digital
frequencies. Remove the hack and properly add the tuner logic for
each supported type of standard.

I was tempted to add more standards there, like SECAM and to fix
radio (as stepping seems broken), but I opted to keep it as-is,
as tests would be needed to add additional standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: make checkpatch.pl happy
Mauro Carvalho Chehab [Thu, 21 Jul 2011 17:12:04 +0000 (14:12 -0300)]
[media] mt2063: make checkpatch.pl happy

Fix everything but 80 columns and two msleep warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Cleanup some function prototypes
Mauro Carvalho Chehab [Thu, 21 Jul 2011 16:41:29 +0000 (13:41 -0300)]
[media] mt2063: Cleanup some function prototypes

No functional changes here.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Reorder the code to avoid function prototypes
Mauro Carvalho Chehab [Thu, 21 Jul 2011 16:33:32 +0000 (13:33 -0300)]
[media] mt2063: Reorder the code to avoid function prototypes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove setParm/getParm abstraction layer
Mauro Carvalho Chehab [Thu, 21 Jul 2011 14:23:59 +0000 (11:23 -0300)]
[media] mt2063: Remove setParm/getParm abstraction layer

This layer just increases the code size for no good reason,
and makes harder to debug.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Rework on the publicly-exported functions
Mauro Carvalho Chehab [Thu, 21 Jul 2011 14:00:59 +0000 (11:00 -0300)]
[media] mt2063: Rework on the publicly-exported functions

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Simplify mt2063_setTune logic
Mauro Carvalho Chehab [Thu, 21 Jul 2011 13:35:30 +0000 (10:35 -0300)]
[media] mt2063: Simplify mt2063_setTune logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: simplify lockstatus logic
Mauro Carvalho Chehab [Thu, 21 Jul 2011 13:30:11 +0000 (10:30 -0300)]
[media] mt2063: simplify lockstatus logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove several unused parameters
Mauro Carvalho Chehab [Thu, 21 Jul 2011 06:57:10 +0000 (03:57 -0300)]
[media] mt2063: Remove several unused parameters

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Use linux default max function
Mauro Carvalho Chehab [Thu, 21 Jul 2011 06:30:57 +0000 (03:30 -0300)]
[media] mt2063: Use linux default max function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Don't violate the DVB API
Mauro Carvalho Chehab [Thu, 21 Jul 2011 06:29:06 +0000 (03:29 -0300)]
[media] mt2063: Don't violate the DVB API

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Simplify device init logic
Mauro Carvalho Chehab [Thu, 21 Jul 2011 06:20:43 +0000 (03:20 -0300)]
[media] mt2063: Simplify device init logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Simplify some functions
Mauro Carvalho Chehab [Thu, 21 Jul 2011 06:02:16 +0000 (03:02 -0300)]
[media] mt2063: Simplify some functions

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Rewrite read/write logic at the driver
Mauro Carvalho Chehab [Thu, 21 Jul 2011 05:46:49 +0000 (02:46 -0300)]
[media] mt2063: Rewrite read/write logic at the driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove the code for more than one adjacent mt2063 tuners
Mauro Carvalho Chehab [Thu, 21 Jul 2011 05:30:19 +0000 (02:30 -0300)]
[media] mt2063: Remove the code for more than one adjacent mt2063 tuners

Such code is disabled via ifdef's. Also, they're ugly and rely
on some static structures. Just remove. If ever needed, the git
log can be used to recover it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Use state for the state structure
Mauro Carvalho Chehab [Thu, 21 Jul 2011 05:25:39 +0000 (02:25 -0300)]
[media] mt2063: Use state for the state structure

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Merge the two state structures into one
Mauro Carvalho Chehab [Thu, 21 Jul 2011 05:24:18 +0000 (02:24 -0300)]
[media] mt2063: Merge the two state structures into one

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove unused data structures
Mauro Carvalho Chehab [Thu, 21 Jul 2011 02:44:10 +0000 (23:44 -0300)]
[media] mt2063: Remove unused data structures

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Use Unix standard error handling
Mauro Carvalho Chehab [Thu, 21 Jul 2011 01:55:25 +0000 (22:55 -0300)]
[media] mt2063: Use Unix standard error handling

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove internal version checks
Mauro Carvalho Chehab [Thu, 21 Jul 2011 01:45:06 +0000 (22:45 -0300)]
[media] mt2063: Remove internal version checks

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Move data structures to the driver
Mauro Carvalho Chehab [Thu, 21 Jul 2011 01:21:26 +0000 (22:21 -0300)]
[media] mt2063: Move data structures to the driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: get rid of compilation warnings
Mauro Carvalho Chehab [Thu, 21 Jul 2011 01:00:30 +0000 (22:00 -0300)]
[media] mt2063: get rid of compilation warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove unused stuff
Mauro Carvalho Chehab [Thu, 21 Jul 2011 00:51:42 +0000 (21:51 -0300)]
[media] mt2063: Remove unused stuff

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Re-define functions as static
Mauro Carvalho Chehab [Thu, 21 Jul 2011 00:43:30 +0000 (21:43 -0300)]
[media] mt2063: Re-define functions as static

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Remove most of the #if's
Mauro Carvalho Chehab [Thu, 21 Jul 2011 00:19:08 +0000 (21:19 -0300)]
[media] mt2063: Remove most of the #if's

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Use standard Linux types, instead of redefining them
Mauro Carvalho Chehab [Thu, 21 Jul 2011 00:01:48 +0000 (21:01 -0300)]
[media] mt2063: Use standard Linux types, instead of redefining them

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Fix the driver to make it compile
Mauro Carvalho Chehab [Wed, 20 Jul 2011 23:58:25 +0000 (20:58 -0300)]
[media] mt2063: Fix the driver to make it compile

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Move code from mt2063_cfg.h
Mauro Carvalho Chehab [Wed, 20 Jul 2011 23:21:42 +0000 (20:21 -0300)]
[media] mt2063: Move code from mt2063_cfg.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: Fix some Coding styles at mt2063.h
Mauro Carvalho Chehab [Wed, 20 Jul 2011 23:15:01 +0000 (20:15 -0300)]
[media] mt2063: Fix some Coding styles at mt2063.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mt2063: CodingStyle fixes
Mauro Carvalho Chehab [Wed, 20 Jul 2011 22:52:49 +0000 (19:52 -0300)]
[media] mt2063: CodingStyle fixes

convert to Unix eol, run Lindent and remove bad whitespaces

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] add driver for mt2063
Mauro Carvalho Chehab [Wed, 20 Jul 2011 22:48:59 +0000 (19:48 -0300)]
[media] add driver for mt2063

Those files are marked as licensed with GPL, so, it is ok to
merge. They came from Terratec site:

http://linux.terratec.de/files/TERRATEC_H7/20110323_TERRATEC_H7_Linux.tar.gz

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoLinux 3.2
Linus Torvalds [Wed, 4 Jan 2012 23:55:44 +0000 (15:55 -0800)]
Linux 3.2

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 4 Jan 2012 23:03:49 +0000 (15:03 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  fix CAN MAINTAINERS SCM tree type
  mwifiex: fix crash during simultaneous scan and connect
  b43: fix regression in PIO case
  ath9k: Fix kernel panic in AR2427 in AP mode
  CAN MAINTAINERS update
  net: fsl: fec: fix build for mx23-only kernel
  sch_qfq: fix overflow in qfq_update_start()
  Revert "Bluetooth: Increase HCI reset timeout in hci_dev_do_close"

12 years agominixfs: misplaced checks lead to dentry leak
Al Viro [Wed, 4 Jan 2012 10:51:03 +0000 (10:51 +0000)]
minixfs: misplaced checks lead to dentry leak

bitmap size sanity checks should be done *before* allocating ->s_root;
there their cleanup on failure would be correct.  As it is, we do iput()
on root inode, but leak the root dentry...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach
Oleg Nesterov [Wed, 4 Jan 2012 16:29:20 +0000 (17:29 +0100)]
ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach

This is the temporary simple fix for 3.2, we need more changes in this
area.

1. do_signal_stop() assumes that the running untraced thread in the
   stopped thread group is not possible. This was our goal but it is
   not yet achieved: a stopped-but-resumed tracee can clone the running
   thread which can initiate another group-stop.

   Remove WARN_ON_ONCE(!current->ptrace).

2. A new thread always starts with ->jobctl = 0. If it is auto-attached
   and this group is stopped, __ptrace_unlink() sets JOBCTL_STOP_PENDING
   but JOBCTL_STOP_SIGMASK part is zero, this triggers WANR_ON(!signr)
   in do_jobctl_trap() if another debugger attaches.

   Change __ptrace_unlink() to set the artificial SIGSTOP for report.

   Alternatively we could change ptrace_init_task() to copy signr from
   current, but this means we can copy it for no reason and hide the
   possible similar problems.

Acked-by: Tejun Heo <tj@kernel.org>
Cc: <stable@kernel.org> [3.1]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race
Oleg Nesterov [Wed, 4 Jan 2012 16:29:02 +0000 (17:29 +0100)]
ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race

Test-case:

int main(void)
{
int pid, status;

pid = fork();
if (!pid) {
for (;;) {
if (!fork())
return 0;
if (waitpid(-1, &status, 0) < 0) {
printf("ERR!! wait: %m\n");
return 0;
}
}
}

assert(ptrace(PTRACE_ATTACH, pid, 0,0) == 0);
assert(waitpid(-1, NULL, 0) == pid);

assert(ptrace(PTRACE_SETOPTIONS, pid, 0,
PTRACE_O_TRACEFORK) == 0);

do {
ptrace(PTRACE_CONT, pid, 0, 0);
pid = waitpid(-1, NULL, 0);
} while (pid > 0);

return 1;
}

It fails because ->real_parent sees its child in EXIT_DEAD state
while the tracer is going to change the state back to EXIT_ZOMBIE
in wait_task_zombie().

The offending commit is 823b018e which moved the EXIT_DEAD check,
but in fact we should not blame it. The original code was not
correct as well because it didn't take ptrace_reparented() into
account and because we can't really trust ->ptrace.

This patch adds the additional check to close this particular
race but it doesn't solve the whole problem. We simply can't
rely on ->ptrace in this case, it can be cleared if the tracer
is multithreaded by the exiting ->parent.

I think we should kill EXIT_DEAD altogether, we should always
remove the soon-to-be-reaped child from ->children or at least
we should never do the DEAD->ZOMBIE transition. But this is too
complex for 3.2.

Reported-and-tested-by: Denys Vlasenko <vda.linux@googlemail.com>
Tested-by: Lukasz Michalik <lmi@ift.uni.wroc.pl>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: <stable@kernel.org> [3.0+]
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Wed, 4 Jan 2012 22:57:55 +0000 (14:57 -0800)]
Merge git://git.samba.org/sfrench/cifs-2.6

* git://git.samba.org/sfrench/cifs-2.6:
  [CIFS] default ntlmv2 for cifs mount delayed to 3.3
  cifs: fix bad buffer length check in coalesce_t2

12 years ago[media] cx23885: Configure the MPEG encoder early to avoid jerky video
Steven Toth [Wed, 4 Jan 2012 13:56:14 +0000 (10:56 -0300)]
[media] cx23885: Configure the MPEG encoder early to avoid jerky video

Found an odd bug while implementing support for the HVR1850 that
lead to jerky video during the first capture, if the encoder was
not initialized early. I've modied the driver to configure the
encoder early, and this avoids the issue - a reasonable workaround.

Regression tested against the HVR1800 and soon to be added HVR1850

[mchehab@redhat.com: Fix this compilation issue:  drivers/media/video/cx23885/cx23885-417.c:1351:2: error: too few arguments to function ‘cx23885_initialize_codec’]
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Ensure the MPEG encoder height is configured from the norm
Steven Toth [Wed, 4 Jan 2012 13:54:32 +0000 (10:54 -0300)]
[media] cx23885: Ensure the MPEG encoder height is configured from the norm

Bugfix: The height was not always correctly configured if switching between
different video standards. Change the encode height based on the standard.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx23885: Cleanup MPEG encoder GPIO handling
Steven Toth [Wed, 4 Jan 2012 13:52:26 +0000 (10:52 -0300)]
[media] cx23885: Cleanup MPEG encoder GPIO handling

During initialization the prior GPIO's were not being preserved
and restore correctly. Small cleanups to configure the GPIO's
for the HVR1700, HVR1800 and HVR1850.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] cx25840 / cx23885: Fixing audio/volume regression
Steven Toth [Wed, 4 Jan 2012 13:47:57 +0000 (10:47 -0300)]
[media] cx25840 / cx23885: Fixing audio/volume regression

Since the conversion to subdev in Oct 2010 the audio controls have
not functioned correctly in the cx23885 driver. Passing values of
0-3f did not translate into meaningfull register writes. I've
converted the cx23885 driver to match the cx25840 volume control
definition and now audio is working reliably again.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tm6000: dvb doesn't work on usb1.1
matthieu castet [Fri, 16 Dec 2011 18:34:12 +0000 (15:34 -0300)]
[media] tm6000: dvb doesn't work on usb1.1

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tm6000: improve loading speed on hauppauge 900H
matthieu castet [Fri, 16 Dec 2011 17:15:07 +0000 (14:15 -0300)]
[media] tm6000: improve loading speed on hauppauge 900H

- enable fast usb quirk
- use usleep_range instead on msleep for short sleep
- merge i2c out and usb delay
- do like the windows driver that upload the tuner firmware
  with 80 bytes packets

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
CC: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb: Remove ops->info.type from frontends
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:18 +0000 (16:11 -0300)]
[media] dvb: Remove ops->info.type from frontends

Now that this field is deprecated, and core generates it for
DVBv3 calls, remove it from the drivers.

It also adds .delsys on the few drivers where this were missed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb: deprecate the usage of ops->info.type
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:17 +0000 (16:11 -0300)]
[media] dvb: deprecate the usage of ops->info.type

Mark info.type as deprecated inside the header, recommending
the usage of DTV_ENUM_DELSYS DVBv5 command instead.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb: get rid of fepriv->parameters_in
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:16 +0000 (16:11 -0300)]
[media] dvb: get rid of fepriv->parameters_in

This var were used during DVBv3 times, in order to keep a copy
of the parameters used by the events. This is not needed anymore,
as the parameters are now dynamically generated from the DVBv5
structure.

So, just get rid of it. That means that a DVBv5 pure call won't
use anymore any DVBv3 parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb-core: Fix ISDB-T defaults
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:15 +0000 (16:11 -0300)]
[media] dvb-core: Fix ISDB-T defaults

using -1 for ISDB-T parameters do the wrong thing. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: Fix DVBv3 emulation
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:14 +0000 (16:11 -0300)]
[media] dvb_frontend: Fix DVBv3 emulation

For frontends with ISDB-T, DVB-T2, CMDBTH, etc, some code is
needed, in order to provide emulation. Add such code, and check
if the desired delivery system is supported by the frontend.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: Don't use ops->info.type anymore
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:13 +0000 (16:11 -0300)]
[media] dvb_frontend: Don't use ops->info.type anymore

Get rid of using ops->info.type defined on DVB drivers,
as it doesn't apply anymore.

Currently, one driver (cxd2820) supports more than one different
info.type, as it can be used for DVB-T/T2 and DVB-C. There are more
drivers like that to come. So, the same frontend will have

different DVBv3 types, depending on the current delivery system.

This breaks the existing logic at dvb_frontend, that assumes that
just one delivery system DVBv3 type is supported by all delsys.

In order to easy the DVBv3->DVBv5 conversion, an ancillary function
that maps DVBv3 delivery systems into DVBv5 were added.

Also, on all places, except for the event logic, the DVBv5 cache
will be used to check parameters, instead of the DVBv5 copy.

This patch simplifies the cache sync logic, and warrants that the
cache will be in a clear state at DVB frontend register. This way,
ops->info.type will be filled to reflect the first delivery system,
providing backward compatibility support for it.

For example, in the cases like cxd2820, where the delivery systems
are defined as:
        .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },

A pure DVBv3 will be able to use both DVB-T and DVB-T2, as, at
DVB cache clear, the ops->info.type will be equal to FE_OFDM.

However, DVB-C won't be visible. A quick workaround would be to
do a DVBv5 call to set the delivery system to SYS_DVBC_ANNEX_A.

After such call, ops->info.type will be equal to FE_QAM, and a
DVBv3 application will see the frontend as a DVB-C one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb: move dvb_set_frontend logic into a separate routine
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:12 +0000 (16:11 -0300)]
[media] dvb: move dvb_set_frontend logic into a separate routine

This change is there in order to prepare the code to avoid calling
 dvb_frontend_ioctl_legacy() from FE_SET_PROPERTY.

A call to dvb_frontend_ioctl_legacy() would require to update the
DVBv3 cache without need, mangling calls for newer delivery system
without any reason.

No functional changes here.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] dvb_frontend: Handle all possible DVBv3 values for bandwidth
Mauro Carvalho Chehab [Sun, 1 Jan 2012 19:11:11 +0000 (16:11 -0300)]
[media] dvb_frontend: Handle all possible DVBv3 values for bandwidth

Due to DVB-T2, several new possible values for bandwidth were added.
As the DVBv3 struct were updated to handle them, the core needs to
handle all of them, as a DVBv3 application might try to use it.

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