History log of /drivers/media/video/tuner-core.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c6e8d86fffd8edf1bfccbd441b1812ee919fe3d5 12-Feb-2012 Axel Lin <axel.lin@gmail.com> [media] convert drivers/media/* to use module_i2c_driver()

This patch converts the drivers in drivers/media/* to use the
module_i2_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heungjun Kim <riverful.kim@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Johannes Obermaier <johannes.obermaier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
6fab81dfdc7b48c2e30ab05e9b30afb0c418bbbe 08-Feb-2012 Michael Krufky <mkrufky@kernellabs.com> [media] xc5000: drivers should specify chip revision rather than firmware

Specify chip revision at attach time rather than a firmware image.
This is a better way to ensure that the correct firmware is loaded
for the correct revision of the chip.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
f21cfaf6381e2330c4e2f619d4cedc72146a8cf7 07-Feb-2012 Michael Krufky <mkrufky@kernellabs.com> [media] tuner: add support for Xceive XC5000C

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
27b93d8a45bd549146ae39b60ba168f62413c959 13-Dec-2011 Miroslav Slugen <thunder.mmm@gmail.com> [media] cx88: Fix radio support for Leadtek DTV2000H J

Leadtek DTV2000H J has Philips a FMD1216MEX tuner,
and not a FMD1216ME.

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
8edeb6eb1ae113b8f25a79e5076c1a1ec93538d0 06-Jun-2011 istvan_v@mailbox.hu <istvan_v@mailbox.hu> [media] xc4000: removed card_type

Removed the use of 'card_type' from the tuner configuration structure, and
replaced it with separate parameters to set board-specific configuration.

Signed-off-by: Istvan Varga <istvan_v@mailbox.hu>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
8d009a0c41475a482aca17d2a9fc8e6965f2fdf9 24-Jun-2009 Davide Ferri <davidef1986@gmail.com> [media] dib0700: add initial code for PCTV 340e by Davide Ferri

This is initial code written by Davide Ferri for the PCTV 340e, including
a new xc4000 driver. I am checking in all the code unmodified, and making
no assertions about its quality (other than confirming it compiles).

[mchehab@redhat.com: rebased on the top of the current tree]
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Davide Ferri <davidef1986@gmail.com>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
a1ad5ec7f520c559becab2e989a397f1d6ac5eb0 13-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: fix a 2.6.39 regression with mt20xx

As Simon reported, digital TV broke with mt20xx tuner due to
commit ad020dc2fe9039628cf6cef42cd1b76531ee8411.

The mt20xx tuner passes V4L2_TUNER_DIGITAL_TV to tuner core. However, the
check_mode code now doesn't handle it well. Change the logic there to
avoid the breakage, and fix a test for analog-only at g_tuner.

Reported-by: Simon Arlott <simon@fire.lp0.eu>
Tested-by: Simon Arlott <simon@fire.lp0.eu>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
5ad339a29858db6544052f98973d235129f9f49c 26-Jun-2011 Hans Verkuil <hans.verkuil@cisco.com> [media] tuner-core.c: don't change type field in g_tuner or g_frequency

The tuner core should not silently change the type field in g_tuner and
g_frequency. If the tuner is in a different mode than the one that was
requested, then just fill in what you can and don't attempt to read afc,
signal or rxsubchans values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
d16625e788b8871163ad991851ffba5f64c06d43 25-Jun-2011 Hans Verkuil <hans.verkuil@cisco.com> [media] tuner-core: power up tuner when called with s_power(1)

Drivers must be able to rely on s_power to power up subdevices.

Note that at this moment no driver attempts to power up tuners. This probably
isn't surprising since s_power(1) was never implemented in tuner-core.c until
now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
487833018eb2b969f20457fcf1956b3c6dbfad51 13-Jun-2011 Hans Verkuil <hans.verkuil@cisco.com> [media] tuner-core: simplify the standard fixup

Get rid of a number of unnecessary tuner_dbg messages by simplifying
the std fixup function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
338e9e1ad541cbb2a3fa5839376ff6c138d40301 13-Jun-2011 Hans Verkuil <hans.verkuil@cisco.com> [media] tuner-core/v4l2-subdev: document that the type field has to be filled in

The tuner ops g_frequency, g_tuner and s_tuner require that the tuner type
field is filled in. Document this.

The tuner-core doc is based on a patch from Mauro Carvalho Chehab <mchehab@redhat.com>.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
9bf0ef060ebae452c07cf5b0616247780740bb50 13-Jun-2011 Hans Verkuil <hans.verkuil@cisco.com> [media] tuner-core: fix tuner_resume: use t->mode instead of t->type

set_mode is called with t->type, which is the tuner type. Instead, use
t->mode which is the actual tuner mode (i.e. radio vs tv).

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
4e4a31fb95d88518180517bae3098a23ebde9f9c 14-Jun-2011 Hans Verkuil <hans.verkuil@cisco.com> [media] tuner-core: fix s_std and s_tuner

Both s_std and s_tuner are broken because set_mode_freq is called before the
new std (for s_std) and audmode (for s_tuner) are set.

This patch splits set_mode_freq in a set_mode and a set_freq and in s_std/s_tuner
first calls set_mode, and if that returns 0 (i.e. the mode is supported)
then they set t->std/t->audmode and call set_freq.

This fixes a bug where changing std or audmode would actually change it to
the previous value.

Discovered while testing analog TV standards for cx18 with a tda18271 tuner.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
550df5a450928172e284cb0f857ae73e5e705305 15-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Don't touch at standby during tuner_lookup

It makes no sense that tuner_lookup would touch at the standby
state. Remove it.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
0eec66c0dfc1b066e6addbc6af755c779f65fd87 15-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Rearrange some functions to better document

Group a few functions together and add/fix comments for each
block of the driver.

This is just a cleanup patch meant to improve driver readability.
No functional changes in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
a2894e3f8ed691b4873c8122e66902fbf0e78e0b 15-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Improve function documentation

This driver is complex, and used by everyone. Better to have it
properly documented.

No functional changes are done in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
ad020dc2fe9039628cf6cef42cd1b76531ee8411 15-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: remove usage of DIGITAL_TV

tuner-core has no business to do with digital TV. So, don't use
T_DIGITAL_TV on it, as it has no code to distinguish between
them, and nobody fills T_DIGITAL_TV right.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
0ae79d993cd5ce425bedebcbd2f8c4fa310acfe6 15-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Fix a few comments on it

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
a34ec5f3743950cadb8f512c884b8c9dbaa9a7a5 15-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: dead code removal

Remove the now obsolete set_freq. Also merge set_addr and set_type_addr.

In the past, it used to have two different setup calls, one to set just
the tuner type to any tuner found, and another to set the type only if
the address matches. Those two internal calls were grouped together,
but the functions weren't merged, making the code uglier.

No functional changes are done in this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
900f734b3bafb4e111b9ec5d865c448a9911b2ab 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Don't use a static var for xc5000_cfg

A static var is evil, especially if a device has two boards with
xc5000. Instead, just like the other drivers, use stack to store
its config during setup.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
7d275bf840a8f390b8fd3d686545e09ef01f7915 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: CodingStyle cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
e2f63d9ba51efe8930bf1c952c66b971047d355d 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: do the right thing for suspend/resume

Power down tuners at suspend. At resume, if the tuner is in standby,
calls set_mode, that will turn it on and set the latest frequencies.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
cbde689823776d187ba1b307a171625dbc02dd4f 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Better implement standby mode

In the past, T_STANDBY were used on devices with a separate radio tuner to
mark a tuner that were disabled. With the time, it got newer meanings.

Also, due to a bug at the logic, the driver might incorrectly return
T_STANDBY to userspace.

So, instead of keeping the abuse, just use a boolean for storing
such information.

We can't remove T_STANDBY yet, as this is used on two other drivers. A
latter patch will address its usage outside tuner-core.

Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
e2d25a2474a8c0178bac4919729ab092783bd916 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Some cleanups at check_mode/set_mode

Properly document those functions and do some cleanups around that.
There's just one behavior change on this patchset: it will now restore
TV frequency when changing from radio to TV mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
9f3f71ef6d9a6179a16f82287f062cbf3f112ec6 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Reorganize the functions internally

This is a big patch with no functional changes. It just
rearranges everything inside the driver, and prepares to
break TV and Radio into two separate fops groups.

Currently, it has an heuristics logic to determine if the
call came from radio or video. However, the caller driver
knows for sure, so tuner-core shouldn't try to guess it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
b77bdb028807bb1f78b5b50127456e1f664bd501 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: move some messages to the proper place

Move the frequency set debug printk's to the code that actually
are changing it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
04f590e82bdd5fa6fc36d7abf806006d27ea9e5d 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: remove the legacy is_stereo() call

Nobody is using this legacy call. Just remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
5620094a2eaa6527d7f038ad3d65ce6a76c8272a 04-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tuner-core: Remove V4L1/V4L2 API switch

V4L1 was removed. So, the code there is just dead code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
e350d44fed8eb86a7192a579e3687fcd76a4645b 27-Sep-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] tda18271: allow restricting max out to 4 bytes

By default, tda18271 tries to optimize I2C bus by updating all registers
at the same time. Unfortunately, some devices doesn't support it.

The current logic has a problem when small_i2c is equal to 8, since there
are some transfers using 11 + 1 bytes.

Fix the problem by enforcing the max size at the right place, and allows
reducing it to max = 3 + 1.

Acked-by: Michael Krufky <mkrufky@kernellabs.com>
Acked-by: Sri Deevi <Srinivasa.Deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
9dfde5578d1111da96142d16fdfa2039d8992744 07-Jul-2010 Devin Heitmueller <dheitmueller@hauppauge.com> [media] Use smaller i2c transaction size with 18271 tuner

Configure the tda18271 to use a smaller transaction size by default, which
works around some sort of i2c bug in the Polaris driver (which needs to be
debugged).

This should be safe for other boards (being in tuner-core means it will be
enabled by default), although testing needs to be done.

Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
a644c072ea2a0ba9bd46430a4710cc3ac7cbdc21 15-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: saa7146/tuner: remove mxb hack

Remove a hack in the tuner code for the mxb board. This hack is no longer
needed since the tuner is now probed on its correct address as specified
by the mxb driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
02a2098adbe6c1053cbcd81ecb9422f4502da925 15-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: tuner: remove obsolete v4l2-i2c-drv.h header

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
a570fb6eec804e99c7fd3ac1db192842e9269bbb 06-Jan-2010 Jiri Slaby <jslaby@suse.cz> V4L/DVB (13964): tuner-core, fix memory leak

Stanse found a memory leak in tuner_probe. It is not freed/assigned
on all paths. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
d6eef4947858ebebaf05d79bce7b8be0d4c036ba 24-Oct-2009 Michael Krufky <mkrufky@kernellabs.com> V4L/DVB (13247): tuner-core: dont force every tuner to set frequency at startup

Setting the tuner frequency at the same time as initializing the other devices
on the i2c bus can cause problems on devices that require firmware download or
extensive calibration proceduces during initialization.

This change allows us to prevent the tune at startup for devices that perform
better without it.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
f14a2972e40dbfbe7077ec7ab21cc2729f7e7d6d 23-Oct-2009 Roel Kluin <roel.kluin@gmail.com> V4L/DVB (13241): Cleanup redundant tests on unsigned

The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
622b828ab795580903e79acb33fb44f5c9ce7b0f 05-Oct-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13238): v4l2_subdev: rename tuner s_standby operation to core s_power

Upcoming I2C v4l2_subdev drivers need a way to control the subdevice
power state from the core. This use case is already partially covered by
the tuner s_standby operation, but no way to explicitly come back from
the standby state is available.

Rename the tuner s_standby operation to core s_power, and fix tuner
drivers accordingly. The tuner core will call s_power(0) instead of
s_standby(). No explicit call to s_power(1) is required for tuners as
they are supposed to wake up from standby automatically.

[mchehab@redhat.com: CodingStyle fix]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
93463895ae0a87b689d71d65c44d5ccdcd950dc4 16-Sep-2009 Michael Krufky <mkrufky@kernellabs.com> V4L/DVB (12964): tuner-core: add support for NXP TDA18271 without TDA829X demod

Add support for NXP TDA18271 as a standalone tuner, allowing the use of
analog demodulators other than the Philips/NXP TDA829x.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
75b697f747b14b0c6afae48ee0f5e605abd2df4c 01-Aug-2009 Julia Lawall <julia@diku.dk> V4L/DVB (12483): Use DIV_ROUND_CLOSEST

The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

@depends on haskernel@
expression x,__divisor;
@@

- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
0f9fba3129541822b1d75330406e62e838bf4fc1 28-May-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11926): tuner-core: fix warning introduced when cleaning up xc5000 init routine

This patch removes some remaining dead code. Warning showed up in Hans
Verkuil's daily report after I committed hg changeset 7f2eea75118b.

Thanks to Michael Krufky for bringing the warning to my attention.

Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
ee7e63f599ae797c785281ee552c7da98b4efb7d 28-Apr-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11799): xc5000: don't load firmware until a tuning request is made

Defer loading of the xc5000 firmware until it is actually needed. This helps
on distros that have hald, which results in the device not being available
for use for around ten seconds in cases where the i2c bus is slow (such as
the HVR-950Q). Also, the firmware load isn't really useful since we
immediately put the device to sleep afterward, which means a firmware reload
will be required anyway.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
416a7aa88300601d6630736836f9798c4079bc16 02-May-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11670): tuner: remove tuner_i2c_address_check

Support for tuners with i2c addresses >= 0x65 is dropped since no tuners
with addresses in the range 0x65-0x6f have been found.

This patch removes addresses 0x65-0x6f from the list of tuner probe addresses,
it removes the kernel warning that warned if addresses in this range appeared,
and it removed a hack for the cx88 that is no longer needed now that the
tuner address range is reduced.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
acebc70d4a789df21270690c70928b8a836caad7 30-Mar-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11372): v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22

Originally the intention was to switch to the new style i2c API starting with
the introduction of the API in 2.6.22. However, the i2c_new_probed_device()
function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately,
it was only fixed in the stable series of 2.6.25 and 2.6.26.

Given the fact that the new i2c API also changed starting with 2.6.26 (the
addition of i2c_device_id), it is easiest to switch APIs starting with
2.6.26.

This patch updates all the legacy code accordingly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
0c84674353a8c344d169aabce4dc4d44daaa270d 30-Mar-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11371): v4l2: remove legacy fields in v4l2-i2c-drv.h.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
f41737ece472cd803ffb24ac9f5d6fdd1d871341 01-Apr-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11370): v4l2-subdev: move s_std from tuner to core.

s_std didn't belong in the tuner ops. Stricly speaking it should be part of
the video ops, but it is used by audio and tuner devices as well, so it is
more efficient to make it part of the core ops.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
7c9fc9d50f97c9a6733ff1a22b6e31bcd91778e2 01-Apr-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11368): v4l2-subdev: move s_standby from core to tuner.

s_standby is only used to put the tuner in powersaving mode, so move it
from core to tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
75b4c260fa93d99979a8b5bec5a621daff469398 01-Apr-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11364): tuner: remove i2c legacy code.

All drivers that use the tuner module now use v4l2_subdev, so we can remove the
legacy code from this module.

Note that TUNER_SET_CONFIG is still called by tuner-simple.c, so we have
to handle it via a .command callback. There must be a better way to do this,
but for now this will work.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
5eb35fd06397e42b49ff4d37587fa1bfbd136014 30-Mar-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11312): tuner: remove V4L1 code from this driver.

No i2c modules are called with the V4L1 API anymore, so this can be removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
bccfa449ae5bd4cc5b52160d25fbdb1fe8a27932 30-Mar-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11311): v4l: replace 'ioctl' references in v4l i2c drivers

Replace 'VIDIOC_' references in v4l i2c drivers by their new v4l2_subdev
callback names.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
e7ddcd98a179c441d54fe84d221cea4e5852b235 28-Mar-2009 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (11251): tuner: prevent invalid initialization of t->config in set_type

Drivers that don't set "config" directly in the set_type function will
end up with an invalid configuration value. Check that the value is sane,
otherwise initialize to 0.

Thanks to James Edward Geiger & Steven Toth for reporting this bug.

Cc: Steven Toth <stoth@linuxtv.org>
Cc: James Edward Geiger <james.e.geiger@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
ea2278633ab4728c41b4043f47df4d3e39131992 11-Mar-2009 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (11059): xc5000: fix bug for hybrid xc5000 devices with IF other than 5380

The xc5000 driver has a bug where the IF is always set to whatever the first
caller to dvb_attach() provides. This fails when the device requires an IF
other than 5380 and the analog driver is loaded first through tuner-core
(which always supplies the hard-coded value of 5380).

Thanks to Michael Krufky <mkrufky@linuxtv.org> and Steven Toth
<stoth@linuxtv.org> for providing sample hardware, engineering level support,
and testing.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
069b747931f13eda289c1d59a09ecc8162281a76 30-Dec-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.

Since internal to v4l2 the ioctl prototype is the same regardless of it
being called through .ioctl or .unlocked_ioctl, we need to convert it all
to the long return type of unlocked_ioctl.

Thanks to Jean-Francois Moine for posting an initial patch for this and
thus bringing it to our attention.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
035f8dc1e478c67ea2682fde8f26ee9d0982a2e7 18-Dec-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (9960): v4l2-subdev: ioctl ops should use unsigned for cmd arg.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
49dd1315fae94ef6161f72c7be961560d3309f17 19-Dec-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (9939): tuner: fix tuner_ioctl compile error if V4L1 ioctls are disabled.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
16a5e53d09227a080410b0385a7884bf7b84bc06 20-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9925): tuner-core: add debug msg's when asking tuner to sleep

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
e8a4a9e79b169317e698a0fdc469545d93ef304b 24-Nov-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (9829): tuner: convert to v4l2_subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
d7cba043d7ec840d67bd5143779d1febe7d83407 12-Sep-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
30650961907368b1077cade35455fe931b14da6b 06-Sep-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (8951): xc5000: dont pass devptr in xc5000_attach()

Dont pass devptr in xc5000_attach, dont store it in xc5000_priv.
This pointer is passed into the tuner_callback function, which always
expects a pointer to fe->dvb->priv or i2c_adapter->algo_data.

This prevents future possible bugs in new drivers, such as using a "devptr"
other that the standard fe->dvb->priv in a DVB driver.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
/drivers/media/video/tuner-core.c
35ea11ff84719b1bfab2909903a9640a86552fd1 20-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8430): videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.h

The functions in a header should not belong to another module. The prio functions
belong to v4l2-common.c, so move them to v4l2-common.h.

The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header
and move those functions to it.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
f87086e302300fdff1bd32049deb7a7f3e3de7da 18-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10

Also remove some blank lines that were used to split compat code at -devel
tree.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
427aad6fda607914945022e916827037d2d0db3d 12-May-2008 Marcin Slusarz <marcin.slusarz@gmail.com> V4L/DVB (7905): check_v4l2 should return -EINVAL on error

check_v4l2 always returns 0, so this change is an noop for now,
but a comment says it will return something else in the future

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4d3437df25325d517ee310d55989ce9630ff529e 26-May-2008 Marcin Slusarz <marcin.slusarz@gmail.com> V4L/DVB (7904): v4l/tuner-core: consistent handling of return values

change check_mode and set_mode to return negative errors and fix all callers

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
7271e60a950b3677f136a31e084bc4b0463c7018 26-May-2008 Michael Krufky <mkrufky@linuxtv.org> tuner: Do not alter i2c_client.name

The tuner driver used to change i2c_client.name for its own needs, but
it really shouldn't, as this field is used by i2c-core to do the
device/driver matching. So, create and use a separate field for the
tuner driver needs.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/media/video/tuner-core.c
af294867a52bf718df835a688e8c786d550bee26 18-May-2008 Jean Delvare <khali@linux-fr.org> i2c: Convert remaining new-style drivers to use module aliasing

Update all the remaining new-style i2c drivers to use standard module
aliasing instead of the old driver_name/type driver matching scheme.

Note that the tuner driver is a bit quirky at the moment, as it
overwrites i2c_client.name with arbitrary strings. We write "tuner"
back on remove, to make sure that driver cycling will work properly,
but there may still be troublesome corner cases.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
/drivers/media/video/tuner-core.c
48723543aff1f46091840222490ded5fe09c0e37 10-May-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7893): xc5000: bug-fix: allow multiple devices in a single system

The current code passes a context pointer in the xc5000_config struct.
This context pointer is used in the tuner_callback function, used to
reset the device after firmware download.

The xc5000_config struct is a static structure, whose .priv member was
being assigned before calling xc5000_attach(). If there are more than
one of the same device type installed on a single system, the last one
to assign xc5000_config.priv will "win", and all others will cease to
function properly.

This patch passes the context pointer in xc5000_attach() rather that
storing it within the static struct xc5000_config.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
b538d28c2e326ed226096408dce4d9469d7ffa39 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7804): tea5767: Fix error logic

As pointed by Andrew Morton, the error testing were wrong. After reviewing
tea5767, it were returning a positive value for errors.

So, the double errors were cancelling each other.

This patch fix it properly. It also considers any positive value as ok, on
tuner-core.


Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
09fee5f8211fc0a586187c4a0db7f5f42a4e333f 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7802): tuner: Failures at tuner_attach were producing OOPS

As reported by Mike Galbraith <efault@gmx.de>:

[ 13.666587] TUNER: Unable to find symbol tda829x_probe()
[ 13.674638] tuner' 1-004b: chip found @ 0x96 (saa7133[0])
[ 13.691175] DVB: Unable to find symbol tda9887_attach()
[ 13.698968] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[ 13.709509] IP: [<ffffffff80302934>] strlcpy+0x11/0x36
[ 13.711135] PGD be167067 PUD be140067 PMD 0
[ 13.711137] Oops: 0000 [1] SMP

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
a1355e530173021099d0401f3294414382189dbd 30-Apr-2008 Andrew Morton <akpm@linux-foundation.org> V4L/DVB (7800): tuner_symbol_probe(): don't do symbol_put() if symbol_request() failed

Because it goes BUG.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ff138171ec6f84f311fe8c0395ad7f9e6d04feec 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7789b): Fix merge conflicts

Some Kconfig names were changed. This patch reapplies the rename script,
fixing for those drivers merged after the patch that renamed those
items.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
2d5e3e8d28a7820de1eb7b18a7c15d645bb26992 29-Apr-2008 Linus Torvalds <torvalds@linux-foundation.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (28 commits)
V4L-DVB(7789a): cx18: fix symbol conflict with ivtv driver
V4L/DVB (7789): tuner: remove static dependencies on analog tuner sub-modules
V4L/DVB (7785): [2.6 patch] make mt9{m001,v022}_controls[] static
V4L/DVB (7786): cx18: new driver for the Conexant CX23418 MPEG encoder chip
V4L/DVB (7783): drivers/media/dvb/frontends/s5h1420.c: printk fix
V4L/DVB (7782): pvrusb2: Driver is no longer experimental
V4L/DVB (7781): pvrusb2-dvb: include dvb support by default and update Kconfig help text
V4L/DVB (7780): pvrusb2: always enable support for OnAir Creator / HDTV USB2
V4L/DVB (7779): pvrusb2-dvb: quiet down noise in kernel log for feed debug
Rename common tuner Kconfig names to use the same
Fix V4L/DVB core help messages
V4L/DVB (7769): Move other terrestrial tuners to common/tuners
V4L/DVB (7768): reorganize some DVB-S Kconfig items
V4L/DVB(7767): Move tuners to common/tuners
V4L/DVB (7766): saa7134: add another PCI ID for Beholder M6
V4L/DVB (7765): Add support for Beholder BeholdTV H6
V4L/DVB (7763): ivtv: add tuner support for the AverMedia M116
V4L/DVB (7762): ivtv: fix tuner detection for PAL-N/Nc
V4L/DVB (7761): ivtv: increase the DMA timeout from 100 to 300 ms
V4L/DVB (7759): ivtv: increase version number to 1.2.1
...
a07c8779fd212dcbad886a2824ef5f8b42cd5a06 29-Apr-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7789): tuner: remove static dependencies on analog tuner sub-modules

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
149ef72deeba57078216c9fa678baff392295853 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> Rename common tuner Kconfig names to use the same
namespace for all of them.
/drivers/media/video/tuner-core.c
397be5c4d66e6583ce3d38b0f99a56eb9818492b 26-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7752): tuner-core: add a missing \n after a debug printk

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
d2653e92732bd3911feff6bee5e23dbf959381db 29-Apr-2008 Jean Delvare <khali@linux-fr.org> i2c: Add support for device alias names

Based on earlier work by Jon Smirl and Jochen Friedrich.

This patch allows new-style i2c chip drivers to have alias names using
the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
point, the old i2c driver binding scheme (driver_name/type) is still
supported.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jochen Friedrich <jochen@scram.de>
Cc: Jon Smirl <jonsmirl@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
/drivers/media/video/tuner-core.c
b9ef6bbbbeaf65c6a452fe3c75c196f86e0d984d 26-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7748): tuner-core: some adjustments at tuner logs, if debug enabled

set_addr log were almost useless: discarded SET_TYPE_ADDR commands weren't
reported.

This patch changed set_addr printk to print a message only if set_addr is
wrong.

It also fix printk at set_type, since, if an attach were failing, nothing
were reported.

With the current code, working or not, a call to set_addr will produce a debug
printk.

also, set_type() were producing a false error message on tuner_xc2028, since
it were requesting for setting a frequency on a place where firmware name
weren't set yet.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
867e835f4db4eba6d49072382cc05fc210c4ed1c 23-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
17de9a4e53567912735105e189535f5d83e74a81 15-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7584): Fix build that occurs when CONFIG_VIDEO_PMS=y and VIDEO_V4L2_COMMON=m

This patch removes zoran checks for VIDEO_V4L2, since this API is always
present, when V4L is selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
b412ba781adcb484e8d9b19b30ae1d3a6b8c7d29 22-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7399): Removes video_dev from tuner-xc2028 config struct

The video_dev parameter, on tuner-xc2028 were used to pass i2c private data to
tuner_callback. Since the driver already have a pointer to i2c_adap->algo_data,
uses this instead.

This parameter were used also as a magic number to idenfity if two drivers are
trying to register the same xc3028 tuner. This occurs with boards with DVB
support, where both DVB and V4L drivers will share the same tuner.

Instead of using the algo_data as a private number, after this patch, the
driver will use i2c_adap->dev, with seems more consistent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
7bff4b4d3ad2b9ff42b4087f409076035af1d165 22-Apr-2008 Hartmut Hackmann <hartmut.hackmann@t-online.de> V4L/DVB (7393): tda827x: fixed support of tuners with LNA

Tuner refactoring broke support of tuners with LNA configurations 1 and 2
for both, analog TV and DVB-T.
Additionally, this patch initializes the saa713x gpios defined by the gpiomask
at driver init to avoid undefined stated at dvb.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
b65aa2605683d90966a16abc68112c1fd9e3f3d8 22-Apr-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7128): tuner: properly handle failed calls to simple_tuner_attach

If simple_tuner_attach fails, set t->type to TUNER_ABSENT,
set t->mode_mask to T_UNINITIALIZED, and exit the set_type function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
060a5bd764a1d798c20eceeaac5399c672334960 22-Apr-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7127): tuner: remove dependency of tuner-core on tuner-types

This patch fully removes the dependency of tuner-core on
tuner-types.

There is no longer any need to pass struct tunertype in attach-time
config structure - instead pass the tuner type ID.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
65e8d29f7a37faaf9c73c633447bebd4b31b2c89 22-Apr-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7126): tuner: move tuner type ID check to simple_tuner_attach

Move tuner type ID check from tuner-core::set_type to simple_tuner_attach.

Since tuner-core forwards all attach requests to tuner-simple as the
default case, unless a specific attach function is specified in
set_type, this change is an appropriate cleanup.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ff699e6bd02eb1c6d02c7c2b576c2ee6caab201c 22-Apr-2008 Douglas Schilling Landgraf <dougsland@gmail.com> V4L/DVB (7094): static memory

- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
c52c4d063eb163d2980c1884370da453662a1f31 29-Jan-2008 Adrian Bunk <bunk@kernel.org> V4L/DVB (7102): make tuner-core.c:tuner_list static

tuner_list can become static - and it's anyway a way too generic name
for a global variable - see commit b00ef4b8d8c29bfb5f6f92ee60bc04b604f36ef2
for a completely different global variable of the same name I just made
static...

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1641002bf56c1da265f2c49ea1c29baba997e63b 21-Jan-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7056): tuner: suppress obsolete tuner i2c address warning for XC5000 tuners

We already know that the XC5000 tuner can only be located at
i2c address 0x61, 0x62, 0x63 or 0x64

We shouldn't display this warning if the XC5000 tuner is present.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
73c993a8294077ae1b724286da8ac323c25d90db 05-Jan-2008 Steven Toth <stoth@hauppauge.com> V4L/DVB (7045): xc5000: Small amount of cleanup and commenting

xc5000: Small amount of cleanup and commenting, just for clarification.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
27c685a4b09b5e391023d769cddb97e4fcb3b9e1 05-Jan-2008 Steven Toth <stoth@hauppauge.com> V4L/DVB (7042): xc5000: Tuner analog support

From Zhang: This an updated patch that adds analog support for
the xc5000 tuner driver. it was tested on a Pinnacle PCTV HD 800i
card (patches to follow).

Patch commited as-is, cleanup to follow ... Steve.

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
e545d6e2760b51163da141caffd288572c2db08d 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6953): Fix radio set frequency logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
67d52e29032dd2f21d4080331f47a21205f337f6 24-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6920): tuner: fix backwards logic in check for set_config

tuner-core was checking if analog_ops->set_config is set. If set, it would
complain that it isn't. Fix this backwards logic to the proper behavior.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
bc3e5c7fc20d3c09667067878fb7a55dd9fc041d 21-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6881): include struct analog_demod_ops directly inside struct dvb_frontend

Rather than using a pointer, include struct analog_demod_ops directly
inside struct dvb_frontend. This will allow us to use dvb_attach in
the future, along with removing the need to check the ops structure
before having to check the pointer to the method being called.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
9ad89f0104314786138d580ab2c1119e7e470f56 21-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6880): kill tuner-driver.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
f7f427e4cc6078e23078dcd7f321676e0b0f544c 17-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6844): tuner: remove struct tuner from tuner-driver.h

struct tuner holds state for tuner-core, only -- move it into tuner-core.c

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8ca4083b50752d588f8b8b1e5e5776fb17d00304 17-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6842): tda9887: remove dependency on struct tuner

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
710401b837f8849dc9c28385eb5298746b811305 16-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6840): tuner: convert tda9887 to use TUNER_SET_CONFIG

Use TUNER_SET_CONFIG to set configuration in tda9887's private state
structure, rather than storing tda9887-specific configuration within
struct tuner.

Update handling of TUNER_SET_CONFIG by tuner-core, to call
&t->fe.ops.analog_demod_ops rather than &t->fe.ops.tuner_ops

analog_demod_ops.set_config passes the request to tuner_ops.set_config,
so this does not break other drivers.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
f1c9a281005f714fdc57c830a23f2b6bd6e2b714 16-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
864a6b813ab6cb69f3552553899ae443329ecfa9 09-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6787): tuner: bug-fix: default mode was set to bogus value

Fix type inconsistency in t->mode value, causing the following:

tuner' 1-0043: freq set: unknown mode: 0x0004!

(only visible with tuner debug enabled)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
a55db8cd7f8a107f3abcb4c803b1873b2be63663 09-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops

Store the analog demodulator name in fe.ops.analog_demod_ops.info.name

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ab1660503ac3af7febfcf987648509b484d4feda 09-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6785): tda8290: remove dependency on struct tuner

- remove dependency of tda8290 module on struct tuner
- move tuner_foo printk macros from tuner-driver.h into tuner-core.c
- clean up #includes of tuner-i2c.h / tuner-driver.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
c7919d520f4c9a064ae14bc4dd170c4c12ead2af 08-Dec-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6783): tuner: combine set_tv_freq and set_radio_freq into a single set_params method

We can tell whether we are tuning television or radio by testing for
struct analog_parameters *params->mode == V4L2_TUNER_RADIO

There is no longer any need for separate set_tv_freq and
set_radio_freq functions in the analog tuner demodulator modules.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
a37b4c9bc87a74ed5003c385eae264fc0acf6b35 16-Nov-2007 Michel Ludwig <michel.ludwig@gmail.com> V4L/DVB (6611): Change xc2028_attach method to make easier for DVB

Removes uneeded parameters and adds an structure for passing the parameters

This patch is co-authored by Mauro Carvalho Chehab.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
9dd659de9fbd1687c6175053c6453db5b932f152 04-Nov-2007 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (6556): tuner: convert to bus-based I2C API

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
92de1f16d15a30831d1685949aeb76c99032ef23 04-Nov-2007 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (6555): tuner: reorder functions to prepare for i2c conversion

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
159ffe77cd9b1cd7c80c416b5635bdad7e3d7d55 04-Nov-2007 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (6553): tuner: replace default_mode_mask

The default_mode_mask global is replaced by a list of tuner structs. The
tuner driver now walks that list to see which radio and/or tv tuner
devices are registered to a given i2c adapter.

The default_mode_mask global had to go since this is no longer supported
with the new bus-based I2C API.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
f1f32849d65ab1eacfedbabb624876ac06c1af9f 04-Nov-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6543): tda8290: enable probing of tda8295

Prevent the tda8295 from falsely being detected as a tda9887

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
241020d19ee9da29171d989ff876c657e4b938b5 30-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6492): tuner: improve tuner_foo printk macros consistency

Alter the tuner_foo printk macros to indicate which module is
generating the message.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4942744f93884cb462400c66258c0013bea65dcf 30-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6491): tuner: prevent repeated "type set" message unless debug is enabled

The tuner sub-module will usually log its type during its _attach() function,
then tuner-core reports which type was attached when control is returned.

In most cases, we expect to see the same message reported from both locations.
We only need to see this second message if debug is enabled.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
48aa336a842ad3bd4f031f14fb6d06b0274c38f9 29-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6473): Prevents double tuner registering

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
690c544cf849e627d3f40a71633d0caf5c33eafe 29-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6472): Re-inserts xc2028 attach code, fixing its parameters

I2C bus redesign changed i2c parameters. This patch re-adds tuner xc2028
attach function, replacing the parameters to the newer syntax.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1cba97d71dca1a3c22b4d7f97893249817036215 14-Sep-2007 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (6471): tuner: i2c_client cannot be part of the tuner struct

The bus-based I2C subsystem allocates the i2c_client struct. So if in order to
be able to convert the tuner to the bus-based I2C API the embedded i2c_client
struct must be removed from the tuner struct and replaced with a pointer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1a156045ab06b2cce8cf46e7bf53da26ab33b084 29-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6470): Avoid breaking compilation

The next patchset series will change i2c structs inside tuner. This patch
avoids breaking bissect, by commenting the still unused tuner xc2028.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
0b5f4a12e628893624b478523fb4e2708c605710 27-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6469): tuner: remove TUNER_PHILIPS_TDA8295

TUNER_PHILIPS_TDA8290 will autodetect a TDA8290 or a TDA8295,
so we don't need this separate entry anymore.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8c125f2ceb3ec1ba01e96fffd8558ef163b40fe8 27-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6468): tda8290: auto-detect tda8290 or tda8295

Consolidate tda8290_attach() and tda8295_attach() into a single function,
tda829x_attach(), which will detect chip combinations tda8290 or tda8295 with
tda8275, tda8275a or tda18271.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4524c1aba5449d3519d1545f8106811eb73fc72c 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6445): tuner-core: improve comments inside function fe_release()

Explain who is responsible for freeing analog_demod_priv

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
af3b0f3f01d299c46837a408e1b9510b8c304e43 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6444): tuner-core: remove excessive parenthesis

Convert all instances of "if ((ops) && (ops->foo))" to "if (ops && ops->foo)"

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
31c9584c0b071dfa7a75db6e21cc727f728f97b0 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6443): make tda9887 build selectable via Kconfig

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1b29cedab9e69a6e4c9bba5f1981437b62be7bea 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6441): tuner: clean up ops checking in tuner_status function

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4e9154b8a77d0f0f8f06857162823905612a50d7 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6440): tuner: convert analog tuner demod sub-modules to dvb_frontend interface

Convert tda9887 and tda8290/5 to dvb_frontend interface

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
16f291684c50497cc92e83f01d354fae187d1f18 21-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6438): tuner: move analog_demod_priv into struct dvb_frontend

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
e2be32ac8017d1bcb293f8c11c046ff654991385 21-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6437): tuner: clear analog_demod_ops on release

Clear analog_demod_ops on release.
Fix test for analog_demod_ops after tuner attach.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1dde7a4fa2b197d298c3f1b97a7f78fd1c3a1bda 21-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6436): tuner: move analog_tuner_ops into dvb_frontend_ops

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
5bea1cd3871351d70cc7624af138f8aa68b7be77 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6435): tda8290: add support for NXP TDA18271 tuner and TDA8295 analog demod

Add basic support for NXP TDA8295 analog demod and TDA18271 tuner silicon.

TDA8295 + TDA8275a not yet tested.
TDA8290 + TDA18271 not yet supported.

Digital mode of TDA18271 not yet tested & needs more work.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
746d9732dbd5b95c3ba36230e2814fa2c391a311 26-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6433): Move all tda8275/8275a tuning code from tda8290 module into tda827x module

Add analog tuning support to tda827x dvb_frontend tuner module.

Convert tda8290 module back to native tuner interface.

The tda8290 analog demodulator will be handled the same way as tda9887.
The tuner.ko module (tuner-core) will pass commands to tda8290 via the
tuner_operations interface. tda8290 will communicate with tda827x via
the dvb_frontend interface, while passing a pointer to a private data
structure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
215b95baf969c6f895969f0a4ae0479954fba7cd 23-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6430): Convert tuner-xc2028 driver to the newer hybrid approach

This changeset converts tuner-xc2028 to the newer hybrid approach. It also
prevents creating twice the xc3028 private struct by both DVB and V4L parts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
6cb45879dca84c667996d65a12880db6705a2b0e 02-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6423): Add tuner-xc2028 driver

Add support for Xceive XC2028/XC3028 tuner driver

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
7f1711234e6a21c153e892758d9d82c333ab37ac 19-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6384): Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG

Currently, the only tuner-specific device that allows special
configurations is tda9887. However, tea5767 also may require some
special configurations (for example, to specify a different Xtal freq).

This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl
(TUNER_SET_CONFIG). The newer one allows specifying what tuner is
appliable to a configuration set, and allows an arbitrary configuration
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
04d934ff84f97970fa59980b0c327422b08cda50 24-Oct-2007 Adrian Bunk <bunk@kernel.org> V4L/DVB (6432): tuner: fix CONFIG_TUNER_TEA5761=m

This patch fixes CONFIG_TUNER_TEA5761=m broken by
commit ca805d57cf5ea7482ed3da28653f30621249ee45.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1419683d85367df90079fb5535865ac0841ebbea 14-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6326): tuner-core.c: fe_has_signal() can return uninitialized value

Initialize strength to zero.

Thanks to Adrian Bunk, who spotted this with the Coverity checker.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
9bc37caadffe8327683980b2323371691fa182e3 08-Sep-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6196): cx23885: add support for DViCO FusionHDTV 5 Express

This patch adds digital ATSC / QAM support for the DViCO FusionHDTV5 Express.
Remote control is supported by ir-kbd-i2c, RTC is supported by rtc-isl1208.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
a1dec5160d6e536b409761c1914500f4a7cf08c2 24-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6180): tuner: don't probe 0x6b or 0x6f on cx88 boards

Ignore 0x6b and 0x6f on cx88 boards. Some FusionHDTV cards
have an ir receiver at 0x6b and an RTC at 0x6f which can
get corrupted if probed.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1f5ef19779df2c2f75870332b37dd3004c08a515 31-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6141): tuner: use get_rf_strength instead of get_status to determine signal strength

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4adad287de82703fd504fdab7aebe760196bb786 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6133): tuner-simple: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8d0936ed15f509c32e8f81849be3a1cee80e2225 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6132): tea5767: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
7ab10bf72add23f0badf98ead92f58e34e14d35a 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6131): tea5761: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
96c0b7cfa5de1d6be0a6f6d202a6a078f5577d8f 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6130): mt20xx: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
910bb3e3c5a5d8ed5028846728efc6a375d200eb 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6129): tda8290: convert from tuner sub-driver into dvb_frontend module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
e18f9444bda60a67e6feef00c354f8de0cdaeba7 21-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6128): hybrid tuner refactoring core changes, phase 1

Prepare tuner-core for conversion of tuner sub-drivers into
dvb_frontend modules

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
db8a695658cda21eacfa2a5e3b15e8964bfb93ef 21-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6127): tuner: kill i2c_client interface to tuner sub-drivers

To ease the conversion of the analog tuner sub-drivers into dvb_frontend
style tuner modules, we must remove the i2c_client interface.

dvb_frontend style tuner modules use i2c_transfer directly on the i2c_adapter.

This change only alters the interface between tuner.ko and the tuner
sub-drivers. The v4l2 / i2c_client interface to tuner.ko remains intact.

This patch adds inline functions tuner_i2c_xfer_send, and tuner_i2c_xfer_recv,
to replace i2c_master_send and i2c_master_recv inside the tuner sub-drivers.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
293197cd0f34eb6bfb5492a63a878575b69e9df4 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6126): tuner: add warning for obsolete i2c address range 0x64 thru 0x6f

The tuner module has a rather aggressive range of possible i2c addresses.

As per the specs available, it appears as if there are no 4-byte tuners that
actually use i2c addresses in the range 0x64 thru 0x6f, yet, tuner-core claims
the address range 0x60 thru 0x6f.

Allowing tuner.ko to probe these addresses can cause potential damage to
certain IR receivers, RTC chips or any other IC's that might otherwise reside
on the i2c bus using one of these addresses.

The plan is to remove these i2c addresses from the i2c address range of the
tuner module. If any devices are discovered that actually do have tuners at
one of these addresses, the newer i2c probing methods will be used to handle
those cases.

In order to collect this information and avoid any potential regressions,
the following warning has been added upon successful detection of a tuner
using an i2c address in the range 0x64 thru 0x6f:

====================== WARNING! ======================
Support for tuners in i2c address range 0x64 thru 0x6f
will soon be dropped. This message indicates that your
hardware has a {tuner name} tuner at i2c address {addr}.
To ensure continued support for your device, please
send a copy of this message, along with full dmesg
output to v4l-dvb-maintainer@linuxtv.org
Please use subject line: "obsolete tuner i2c address."
====================== WARNING! ======================

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
9c12224a607a4b22ab86784e3394b52810b9507c 21-Aug-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files

Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This
patch removes all occurences of moduleparm.h from drivers/media files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ffbb807c1362a2b64b473c0e093c496a4c7de4bb 21-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6075): tuner: kernel headers go above subsystem headers

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8218b0b2caecf4af55742e12e9986c15605bb197 26-Jun-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (5793): Tuner: remove hardware-specific info from public header

Move internal structures and debug macros to drivers/media/video/tuner-driver.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
7a91a80a0d1a0a83a94e773ec6245b31b7c4ceed 06-Jun-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (5753): Tuner: create struct tuner_operations

Move tuner callback function pointers out of struct tuner, into
struct tuner_operations.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
052c50d91642f10e10c3c10837c89a7355881e76 04-Jun-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (5743): Tuner: clean up kfree() after release

Although it is safe to kfree(NULL), We only need to kfree(priv)
if the release callback is undefined. As it stands now, there
is some redundancy in the operation of releasing the priv data
structures. This patch will call kfree(priv) and set priv to NULL,
if the release callback isnt defined. Otherwise, let the release
callback handle this itself.
Thanks to Mauro Carvalho Chehab for suggesting this.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
be2b85a13543bbaf1a141b3a54f84c1e3b059e69 04-Jun-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (5741): Tuner: add release callback

Individual tuner drivers are now allocating memory themselves for
their own private data structures. This changeset adds a release
callback to the tuner operations, so that newer drivers that may
require more complex data structures may release this private data
themselves.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
9ee476a56c3ee119a02b6823659f5698b1241f04 05-Jun-2007 Adrian Bunk <bunk@stusta.de> V4L/DVB (5740): Git-dvb: fix the tea5761 tuner support

Due to a typo the tea5761 tuner support was dead code.
This patch also fixes a bug in the no longer dead code:
A void function can't return anything.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
b208319993ceff7ebfcc6bb914fe94d29e48a891 30-May-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (5719): Tuner: Move device-specific private data out of tuner struct

Create private data struct for device specific private data.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8573a9e6a8ed724b7e3074dc8762d4117ed0b3aa 08-Apr-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (5563a): Add experimental support for tea5761 tuner

This driver were made based on tea5761 specs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
80f90fba3ed8c8826d968125004e4462d2de172e 27-Apr-2007 Hartmut Hackmann <hartmut.hackmann@t-online.de> V4L/DVB (5326): Allow to set tuner_config in attach inform

This patch move the assignment of the tuner config and the callback
before the check whether it is called in the attach inform.
This solves a module load order issue

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
cfeb88398f004a0e85ee011fd89a01f5d3bf3c81 27-Apr-2007 Hartmut Hackmann <hartmut.hackmann@t-online.de> V4L/DVB (5323): Updated support for tuner callbacks

This change supplies a more generic version of the tuner callback.
The tuner struct now has a function pointer
int (*tuner_callback) (void *dev, int command, int arg)
additionally to a int config parameter.
both can be set through the TUNER_SET_TYPE_ADDR client call.
Note that the meaning of the parameters depend on the tuner type.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
de956c1e0f89413a3837b642d592e2dff3e3eb78 27-Apr-2007 Hartmut Hackmann <hartmut.hackmann@t-online.de> V4L/DVB (5313): Added a config entry and a gpio function pointer to tuner struct

These entries mainly are to support configurations of the tda827x
silicon tuner with a preamplifier.
The values can be set throgh the attach inform or through
the extended TUNER_SET_TYPE_ADDR client call. The function pointer
will only be updated if the parameter is not NULL.
Since a typecast is necessary to set the pointer, i added a typedef for
this pointer (tuner_gpio_func_t) in tuner.h

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
21b48a70f7e26906d522c81b22228b375b450a8f 12-Mar-2007 Jean Delvare <khali@linux-fr.org> V4L/DVB (5421): Fix suspend/resume in msp3400 and tuner

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
cd354f1ae75e6466a7e31b727faede57a1f89ca5 14-Feb-2007 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] remove many unneeded #includes of sched.h

After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/media/video/tuner-core.c
e71ced1a5dfebfde57c0ed2c9bd3c7b4596071c1 11-Dec-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
c28089a65ca03890db120ee2bf6a7eb0cf603817 28-Nov-2006 Michael Hunold <hunold@linuxtv.org> V4L/DVB (4895): Accept tuners on saa7146 i2c bus only on address 0x60.

Signed-off-by: Michael Hunold <hunold@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
985bc96e27c729b8b686126ed26bba9fbaaf562d 23-Jul-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4343): Fix for compilation without V4L1 or V4L1_COMPAT

Removed usage of HAVE_V4L1
Including videodev.h will just include videodev2.h if V4L1 is not supported
V4L1 code at core drivers will honor CONFIG_V4L1_COMPAT stuff

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
d9cd2d9b61898354f5dbabdc490dd6ef309ebbd4 17-Jul-2006 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (4314): Set the Auxiliary Byte when tuning LG H06xF in analog mode

With the LG H06xF tuners, an auxiliary byte must be sent after the
standard four-byte i2c sequence. The code that does this is currently in
the wrong place, causing random bytes to be written to the tuner over
i2c in the set_type function.
This patch moves this code from set_type to default_set_tv_freq.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
00e158d52a8107ebcb0eaee6442267927f149b3b 29-Jun-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ba8fc39954bf3bc51f502e8a02f959d45edd096c 25-Jun-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4270): Add tda9887-specific tuner configuration

Many tda9887 settings depend on the chosen tuner. Expand the tuner parameters
to include these tda9887 settings.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
1b58841aa7011670d8a32f53554e21b3fae9c047 25-Jun-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4254): Remove obsoleted tuner_debug option.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4f725cb3fa46fabe7fd7c7175fa77e12616bfdb8 24-Jun-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4222): Always switch tuner mode when calling VIDIOC_S_FREQUENCY.

Fixes the weird and incorrect condition in VIDIOC_S_FREQUENCY.
The tuner should always be switched to the mode specified in the
v4l2_frequency struct. Much simpler and also corresponding to the
v4l2 specification.
The old condition made it impossible to switch from radio to
analog tv mode using VIDIOC_S_FREQUENCY. Instead the (tv) frequency would
be given to the radio tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
153962364dc6fa4a24571885fbe76506d8968610 23-Jun-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4205): Merge tda9887 module into tuner.

Most uses a tda988[5/6/7] IF demodulator as part of the device.
Having this as a separate stuff makes harder to configure it, since there
are some tda9887 options that are tuner-dependent and should be bound into
tuner-types structures.
This patch merges tda9887 module into tuner. More work is required to make
tuner-types to properly use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
9c26c8b169f4a7e2db9a3d5abd3ba74ea032dafd 27-Apr-2006 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (3919): V4l: rename TUNER_LG_TDVS_H062F to TUNER_LG_TDVS_H06XF

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ab4cecf9c4e4a69cf2161f8a2424be14984430f8 01-Apr-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3700): Remove obsolete commands from tvp5150.c

- Remove old DECODER_ commands from tvp5150.c, replacing them with newer
ones if appropriate.
- Small VIDIOC_G_TUNER fixes in msp3400 and tuner.
- Fix VIDIOC_S_TUNER support in em28xx.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
3bbe5a83996c0a669250d91421eef054f3a30595 01-Apr-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3697): More msp3400 and bttv fixes

- remove obsolete VIDIOC_S_INPUT i2c call in bttv
- translate VIDIOCSFREQ to VIDIOC_S_FREQUENCY in i2c call
- improve muting during carrier scan in msp3400
- don't start scan unless really needed.
- no longer reset chip for msp3400c/d.
- remove v4l2 check in tuner-core (radio stops after using the TV)
- add missing VIDIOC_INT_ strings in v4l2-common.c

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
4ae5c2e5e627ff22815fb9900161bf188ea2cc67 25-Mar-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3614): Fix compilation warning at powerpc platform

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8bf2f8e747700419cc5bbc56c4496774eb8f2f1f 19-Mar-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3577): Cleanup audio input handling

Cleanup audio input handling in bttv and tvaudio:
- inputs were specified that were never used
- mute was handled as a special input which led to confusing code
- confusing naming made it difficult to see if the setting was for
i2c or gpio.
The old audiochip.h input names moved to tvaudio.h. Currently this
is used both by tvaudio and msp3400 until the msp3400 implements the
new msp3400-specific inputs.
Detect in bttv the tvaudio and msp3400 i2c clients and use these
client pointers to set the inputs directly instead of broadcasting the
command.
Removed AUDC_SET_INPUT. Now replaced by VIDIOC_S_AUDIO. This will be
replaced again later by the new ROUTING commands.
Removed VIDIOC_G_AUDIO implementations in i2c drivers: this command is
a user level command and not to be used internally. It wasn't called at
all anyway.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
df8cf70683ba3109756e20c50e0fefe24736564f 03-Mar-2006 Hartmut Hackmann <hartmut.hackmann@t\-online.de> V4L/DVB (3395): Fixed Pinnacle 300i DVB-T support

- fixed tda9886 port 2 setting
- turned remote control receiver off via saa7134 GPIO to avoid i2c hangs
- modified tda9886 client calls to direct i2c access to allow proper return
to analog mode
- allow mode change to V4L2_TUNER_DIGITAL_TV in tuner VIDIOC_S_FREQUENCY
client call

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
dadaff2db46aae917ccdbceb2cd2ecac75767435 27-Feb-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3392a): XC3028 code removed from -git versions

- Current xc3028 support is still experimental, requiring more work to be
sent to mainstream. It will be kept only at mercurial tree on
http://linuxtv.org/hg until fixed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
cfcd718d492d401a7d8a7ee3a85e48164b56e2e2 27-Feb-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3332): XC3028 code marked with an special define option

- Current xc3028 support is still experimental, requiring more work to be
sent to mainstream. So, it was marked inside some defines, in order to be
removed by gentree.pl stript. Script also updated to remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
cce91e36d74be635abb99aa1dc74951e11be8aea 27-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3292): Fixed xc3028 firmware extractor, added terratec fw support

Fixed xc3028 firmware extractor for terratec's emBDA.sys firmware
Fixed delay in firmwareupload, now terratec's firmware also works

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
0004fd59d57a5875db8897966c414a88b5dad481 27-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3291): Added support for xc3028 analogue tuner (Hauppauge HVR900, Terratec Hybrid XS)

Added support for xc3028 to v4l which adds support for:
* Terratec Hybrid XS (analogue)
* Hauppauge HVR 900 (analogue)


Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
d97a11e091a0bf40f1cfb0bbf443ddd7b455b133 07-Feb-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3300): Add standard for South Korean NTSC-M using A2 audio.

South Korea uses NTSC-M but with A2 audio instead of BTSC. Several audio
chips need this information in order to set the correct audio processing
registers.

Acked-by: Mauro Carvalho Chehab <mauro_chehab@yahoo.com.br>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
257c645d3dc90ee8b7c0640da8d9ea1b2cbe95c4 23-Jan-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3434): changed comment in tuner-core.c

- changed comment in tuner-core.c

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
ac272ed7f1ae15084c64bdc4d3b4578ec2a0830b 23-Jan-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3429): Missing break statement on tuner-core

- default_tuner_init was called twice due to a missing break statement.

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Acked-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
8a4b275f9c192921797f45c2d4b5e4bc3875500a 23-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3427): audmode and rxsubchans fixes (VIDIOC_G/S_TUNER)


- Audmode and rxsubchans fixes in msp3400, tuner, tvaudio and cx25840.
- msp3400 cleanups

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
27487d44712aaa37710cc508d5bd6119f5e9f976 15-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3384): Separate tv & radio freqs, fix cb/freq transmit order for tuners that need this.

- Moved MSP_SET_MATRIX to v4l2-common.h
- Fix typos and integer overflows in tea5767.c
- Split old freq field into a tv_freq and a radio_freq. Prevents
that a radio tuner is initialized with a tv frequency or vice versa.
- When switching to radio mode initialize the tuner with the last
used radio frequency (this was already done for the TV mode).
As a result of these changes the tuner module now remembers the
last set radio and TV frequencies, which is what you would expect
to happen.
- Move out of range frequencies to the closest valid frequency as per
v4l2 API spec.
- Fix incorrect initial radio frequency (multiplier is 16000, not 16)
- Add boundary check for out of range frequencies.
- Use new flag to check if the order of the CB and freq. depends on
the last set frequency. That is needed for some tuners or you can
get static as a result. The flag is added for those tuners where I know
that the datasheet indicates that this is necessary.
- For this new check use the last set div value, not the last frequency
as radio frequencies are always much higher due to the 16000 multiplier.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
f9195ded25a4e8fba09c67aa24b42cd98a242d7d 11-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3347): Fixes some bad global variables

- Debug global var is already used inside kernel, so renamed
debug to tuner_debug for the tuner module

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
7408187d223f63d46a13b6a35b8f96b032c2f623 11-Jan-2006 Panagiotis Issaris <takis@issaris.org> V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc


Conversions from kmalloc+memset to k(z|c)alloc.

Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
/drivers/media/video/tuner-core.c
cab462f716cdd522edc71436482d8734e8258489 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3307): Some cleanups at I2C modules

- i2c names shorten
- removed obsoleted flags on newer modules
- small cleanups

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
/drivers/media/video/tuner-core.c
fac9e89999a12f378112fe93764b30196bc03f46 09-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3278): convert diagnostics over to the new v4l2-common.h macros.


- Convert diagnostics over to the new v4l2-common.h macros.
- deprecated tuner_debug option, the new option is debug.
- renamed cx25840_debug to debug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
/drivers/media/video/tuner-core.c
5e453dc757385ec892a818e4e3b5de027987ced9 09-Jan-2006 Michael Krufky <mkrufky@m1k.net> V4L/DVB (3269): ioctls cleanups.


- Now, all internal ioctls are at v4l2-common.h
- removed unused ioctl at saa6752hs.h
- all debug ioctl code moved to v4l2-common.c
- removed duplicated stuff from other cards

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
/drivers/media/video/tuner-core.c
7e57819169d4f9a1d7af55fb645ece3fb981e2e3 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3167): added ntsc parameter to tuner and more standardized debugs

- Debug message changed to be coherent with other modules
- added ntsc parameter
- parameters moved to the beginning at the file
- tuner_status moved to a better position.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
/drivers/media/video/tuner-core.c
39e8f40da20a803a17e16304e73fd31050b1871c 09-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3105): Remove AUDC_CONFIG_PINNACLE horror, fix mt20xx radio support.

- Remove AUDC_CONFIG_PINNACLE horror. This also fixes radio support
for mt20xx tuners.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
/drivers/media/video/tuner-core.c
cd43c3f60b73512744bb22fe27a266f611466827 09-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3103): Add VIDIOC_LOG_STATUS to tuner-core.c

- Mark tda9887.c status log values as hexadecimal (add 0x prefix).
Add VIDIOC_LOG_STATUS support to tuner-core.c.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
/drivers/media/video/tuner-core.c
2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 07-Dec-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed

Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers. This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jean Delvare <khali@linux-fr.org>
/drivers/media/video/tuner-core.c
604f28e2b8d34cbaf08f0351374645f161335a82 26-Nov-2005 Laurent Riffard <laurent.riffard@free.fr> [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11

We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.

This patch updates the drivers/media/video and usb/media drivers.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/media/video/tuner-core.c
cde7859bda0d1124392b44e50aa11df99707e1d9 26-Nov-2005 Jean Delvare <khali@linux-fr.org> [PATCH] i2c: Rework client usage count, 2 of 3

Make I2C_CLIENT_ALLOW_USE the default for all i2c clients. It doesn't
hurt if the usage count is actually never used for any given driver,
and allows for nice code simplifications in i2c-core.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/media/video/tuner-core.c
8a9947552d43b0d20d5fa23ac0ba435d526be454 26-Nov-2005 Jean Delvare <khali@linux-fr.org> [PATCH] i2c: Drop i2c_driver.flags, 2 of 3

Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we
can simply make it the default and drop the flag. If any driver really
doesn't want to be notified when i2c adapters are added, that driver
can simply omit to set .attach_adapter. This approach is also more
robust as it prevents accidental NULL pointer dereferences.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/media/video/tuner-core.c
800d3c6f90b61cc82b09db635b59c00b1c460728 14-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: (943) added secam l video standard

- Added SECAM L' video standard
- SECAM L' is a Secam variant that requires special config.

This patch adds support on V4L core. Requires aditional patches
on tuners to support.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
291d1d7356a2cf1da4934a06c4a4e3bca440fbc6 09-Nov-2005 Ricardo Cerqueira <v4l@cerqueira.org> [PATCH] v4l: 893: rollback recent i2c change to solve tuner detection breakage

- Rollback recent i2c change to solve tuner detection breakage

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
50c8640725453f2487da9267844a962108c8418e 09-Nov-2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> [PATCH] v4l: 874: quick and dirty fix for audc config pinnacle

- Quick and dirty fix for AUDC_CONFIG_PINNACLE.

Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
b228ede44c1cded7f3dadbb8bfaeaec97f7885e8 09-Nov-2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> [PATCH] v4l: 851: fixed broken api link and indentation

- Fixed broken API link and indentation.

Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
52c02fcd00cf6fb6f5b2c8beae3b283c63cf1210 09-Nov-2005 Sascha Sommer <saschasommer@freenet.de> [PATCH] v4l: 850: update em2800 scaler code and comments based on info from empiatech

- Update em2800 scaler code and comments based on info from empiatech

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
07345f5d6a92bc1184ca8b05069ec1cd3514fe11 09-Nov-2005 Hartmut Hackmann <hartmut.hackmann@t.online.de> [PATCH] v4l: 848: fixed tda8290 autodetection

- Fixed tda8290 autodetection

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
67678360c8b8b15b05d730eb8f1b02411891417f 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 830: rearranged print order to present a correct answer

- Rearranged print order to present a correct answer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
95736034df751631657140aebe677e67d7522867 09-Nov-2005 Hartmut Hackmann <hartmut.hackmann@t.online.de> [PATCH] v4l: 823: corrected probing code for tda8290

- Corrected probing code for tda8290

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
13dd38d0814f36fce3a7ec9cb29a5ce6b0fc2522 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 819: added autodetection code to tda8290 to avoid conflicts

- Added autodetection code to tda8290, to avoid conflicts with tda9887.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
de48eebce8b63dbae7272ee80f4fe0eaddb61278 09-Nov-2005 Hartmut Hackmann <hartmut.hackmann@t.online.de> [PATCH] v4l: 806: add support for tda8275a

- Add support for tda8275a

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
4ac97914c6c35f6bf132071c718e034d0846b9f5 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 800: whitespace cleanups

- Whitespace Cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
fd1c388125d713b403569d96d9845470142884a2 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 660: small fixes

- Small fixes on tuner debug message.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
93df3413f1b4c437b93c5b64562632f4f0e2b3ca 09-Nov-2005 Hartmut Hackmann <hartmut.hackmann@t.online.de> [PATCH] v4l: 655: added support for the philips td1316 tuner

- Added support for the Philips TD1316 tuner

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
9480e307cd88ef09ec9294c7d97ebec18e6d2221 28-Oct-2005 Russell King <rmk@arm.linux.org.uk> [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks

In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/media/video/tuner-core.c
21d4df375be2c9e5f1002800036fbfb793cf031f 09-Sep-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: print warning if pal= or secam= argument is unrecognized

- print warning if pal= or secam= argument is unrecognized

Signed-off-by: Philip Rowlands <phr@doc.ic.ac.uk>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
793cf9e6a54c698e109a599c8b8e303658fcaae6 09-Sep-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: common part Updates and tuner additions

- Remove $Id CVS logs for V4L files
- Included newer cards.
- Added a new NEC protocol for ir based on pulse distance.
- Enable ATSC support for DViCO FusionHDTV5 Gold.
- Added tuner LG NTSC (TALN mini series).
- Fixed tea5767 autodetection.
- Resolve more tuner types.
- Commented debug function removed from mainstream.
- Remove comments from mainstream. Still on development tree.
- linux/version dependencies removed.
- BTSC Lang1 now is set to auto_stereo mode.
- New tuner standby API.
- i2c-core.c uses hexadecimal for the i2c address, so it should stay consistent.

Signed-off-by: Uli Luckas <luckas@musoft.de>
Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Hermann Pitton <hermann.pitton@onlinehome.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
fae91e72b79ba9a21f0ce7551a1fd7e8984c85a6 15-Aug-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Drop I2C_DEVNAME and i2c_clientname

I2C_DEVNAME and i2c_clientname were introduced in 2.5.68 [1] to help
media/video driver authors who wanted their code to be compatible with
both Linux 2.4 and 2.6. The cause of the incompatibility has gone since
[2], so I think we can get rid of them, as they tend to make the code
harder to read and longer to preprocess/compile for no more benefit.

I'd hope nobody seriously attempts to keep media/video driver compatible
across Linux trees anymore, BTW.

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=104930186524598&w=2
[2] http://www.linuxhq.com/kernel/v2.6/0-test3/include/linux/i2c.h

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/media/video/tuner-core.c
829ca9a30a2ddb727981d80fabdbff2ea86bc9ea 04-Sep-2005 Pavel Machek <pavel@ucw.cz> [PATCH] swsusp: fix remaining u32 vs. pm_message_t confusion

Fix remaining bits of u32 vs. pm_message confusion. Should not break
anything.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
fd3113e84e188781aa2935fbc4351d64ccdd171b 01-Aug-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L: Miscellaneous fixes

- Fixed some bttv card numbers.

- BTTV and SAA7134 version numbers incremented to reflect changes.

- pci_dma_supported() is called after pci_set_dma_mask() which
already did check that for us. This patch removes the unneeded call to
pci_dma_supported() at bttv-driver.c

- Ensure a sufficient I2C bus idle time between 2 messages for
saa7134-i2c.c

- It is important to write at first to MO_GP3_IO for cx88-tvaudio.c

- Use try_to_freeze() instead of refrigerator at msp3400.c

- Recognizing the MFPE05-2 Tuner at tveeprom.c

- Add new parameter to help identify radio chipsets at tuner module:
show_i2c=1 will show 16 reading bytes from detected tuners.

- BTTV does generate some Unimplemented IOCTL log at tuner module:
0x40046d11(dir=1,tp=0x6d,nr=17,sz=4) means that it is sending
MSP3400 calls to non-msp3400 tuners. Warning eliminated.
VIDIOSAUDIO is also called, so debug messages updated. It is still
requiring IOCTL implementation.

- Added two more tuners.

- Add support for the SVideo input on the GDI Black Gold.

Signed-off-by: Peter Missel <peter.missel@onlinehome.de>
Signed-off-by: Graham Bevan <graham.bevan@ntlworld.com>
Signed-off-by: Torsten Seeboth <Torsten.Seeboth@t-online.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
c5287ba132ff742e595d42c28b66cbba19522c4e 15-Jul-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: bug fixes for tuner, cx88 and tea5767

- In CX88 code, some cards needs to have audio reprogramed after changing
video channel;

- Tuner autodetection code seems not to work on some cards. Now,
no_autodetect insmod option allows disabling autodetection code;

- Minor fixes in tea5767 to reduce integer trunc;

- There are some new Pixelview Ultra Pro cards that doesn't use TEA5767
for radio. As autodetection is capable of checking for tea, radio tuners
and addresses removed.

- CX88 version number incremented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
f7ce3cc67052de63a29bad90110640b687d12058 12-Jul-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: I2C Tuner

- Fixed a trouble on tuner-core that generates erros on computers with more
than one TV card.
- Rename tuner structures fields.
- Tail spaces removed.
- I2C cleanups and converged to a basic reference structure.
- Removed unused structures.
- Fix setting frequency on tda8290.
- Added code for TEA5767 autodetection.
- Standby mode support implemented. It is used to disable
a non used tuner. Currenlty implemented on tea5767.
- New macro: set_type disables other tuner when changing mode.
- Some cleanups.
- Use 50 kHz step when tunning radio for most tuners to improve precision.

Signed-off-by: Fabien Perrot <perrot1983@yahoo.fr>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
586b0cab2516640fec4dffc3049c4d8bca188f89 29-Jun-2005 Mauro Carvalho Chehab <maurochehab@gmail.com> [PATCH] v4l: tuner improvements

*tuner-core.c:
- some tuner_info msgs will be generated only if insmod opt
tuner_debug enabled.
- Implemented tuner-core support for VIDIO_S_TUNER to allow
changing mono/stereo mode
- Remove unneeded config options.
- I2C_CLIENT_MULTI option removed.
- support for Philips FMD12ME hybrid tuner
- allow to initialize with another tuner
- Move PHILIPS_FMD initialization code to set_type function,

* tda8290:

- Fix dumb error in tda8290 tunning.
- Radio tuner uses high-precision step instead of 62.5 KHz.

*tea5767.c:
- tuner_info msgs will be generated only if insmod tuner option
tuner_debug enabled.
- some cleanups for better reading.
- Radio tuner uses high-precision step instead of 62.5 KHz.
- Changing radio mode stereo/mono for tea5767 working.

*tuner-simple.c:
- TNF9533-D/IF UHF fixup.
- Radio tuners now uses high-precision step instead of 62.5 KHz.

*mt20xx.c:
- Radio tuner uses high-precision step instead of 62.5 KHz.

*tda9887.c:
- tab and blank spaces corrections.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
f5bec39639d386e1893dc440dd536761136ab36b 24-Jun-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: fix I2C detect after normal_i2c_range()

This patch is necessary to correct I2C detect after normal_i2c_range
removal in gregkh-i2c-i2c-address_range_removal.patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
56fc08ca375491b965cb76fad65bfb98973e80d8 24-Jun-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: update for tuner cards and some V4L chips

Tuner improvements and additions. TEA5767 FM tuner added. Several small
fixes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Nickolay V Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
391cd727eac2e10be7685efd739a3ea9de87393c 24-Jun-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] tuner-core.c improvments and Ymec Tvision TVF8533MF support

tuner-core.c, tuner.h:

- tuner-core changed to support multiple I2C devices used on some
adapters;

- Kconfig now has an option (CONFIG_TUNER_MULTI_I2C) to enable this new
behavor;

- By default, even enabling CONFIG_TUNER_MULTI_I2C, tuner-core emulates
the old behavor, using first I2C device for both FM and TV;

- There is a new i2c command (TUNER_SET_ADDR) to allow tuner clients to
select I2C address for FM or TV tuner;

- Tuner I2C dettach now generates a warning on syslog if failed.

tuner-simple.c:

- TVision TVF-8531MF and TVF-5533 MF tuner included. It uses, by
default, I2C on 0xC2 address for TV and on 0xC0 for Radio. Both TV and
FM Radio mode are working.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
b3d5496ea5915fa4848fe307af9f7097f312e932 02-Apr-2005 Jean Delvare <khali@linux-fr.org> [PATCH] I2C: Kill address ranges in non-sensors i2c chip drivers

Some months ago, you killed the address ranges mechanism from all
sensors i2c chip drivers (both the module parameters and the in-code
address lists). I think it was a very good move, as the ranges can
easily be replaced by individual addresses, and this allowed for
significant cleanups in the i2c core (let alone the impressive size
shrink for all these drivers).

Unfortunately you did not do the same for non-sensors i2c chip drivers.
These need the address ranges even less, so we could get rid of the
ranges here as well for another significant i2c core cleanup. Here comes
a patch which does just that. Since the process is exactly the same as
what you did for the other drivers set already, I did not split this one
in parts.

A documentation update is included.

The change saves 308 bytes in the i2c core, and an average 1382 bytes
for chip drivers which use I2C_CLIENT_INSMOD, 126 bytes for those which
do not.

This change is required if we want to merge the sensors and non-sensors
i2c code (and we want to do this).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Index: gregkh-2.6/Documentation/i2c/writing-clients
===================================================================
/drivers/media/video/tuner-core.c
c184ca3681ee9ae0bb63cb591e1e16f42536415c 07-May-2005 Jiri Benc <jbenc@suse.cz> [PATCH] video/tuner: add VIDEO_G_FREQUENCY and freq range to VIDIOC_G_TUNER

This patch adds a VIDIOC_G_FREQUENCY command to tuner-core.c and sets
lowest and highest tunable frequencies in v4l2_tuner structure returned by
VIDIOC_G_TUNER command.

Signed-off-by: Jiri Benc <jbenc@suse.cz>
Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
e99d3438e4db1ef9e4cae5ad3946c76f4ffd268d 07-May-2005 Jiri Benc <jbenc@suse.cz> [PATCH] video/tuner: fix tuner->freq updating

In VIDIOC_S_FREQUENCY command in tuner-core.c, t->freq is set to a new
value before calling set_freq(). This is not necessary, as set_freq() sets
t->freq itself. Moreover, it causes problems with Philips tuners, as they
need to take into consideration difference between previous and new
frequency.

Signed-off-by: Jiri Benc <jbenc@suse.cz>
Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
975e046cc06005bafe0c5ce81d55a1b1eb84f5a1 17-Apr-2005 Bert Wesarg <wesarg@informatik.uni-halle.de> [PATCH] fix module_param_string() calls

This patch fix 3 calls to module_param_string() in
driver/media/video/tuner-core.c and drivers/media/video/tda9887.c. In all
three places, the len and the perm parameter was switched.

Signed-off-by: Bert Wesarg <wesarg@informatik.uni-halle.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
a291068991c4d0cc4c2bd533094422bf417c86dd 17-Apr-2005 Pavel Machek <pavel@ucw.cz> [PATCH] fix u32 vs. pm_message_t in drivers/media

Here are fixes for drivers/media.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/media/video/tuner-core.c
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
/drivers/media/video/tuner-core.c