• Home
  • History
  • Annotate
  • only in /drivers/media/video/em28xx/
History log of /drivers/media/video/em28xx/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
795cb41c88f7817352f07ef2dc367b062beb10f2 20-Mar-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] partially reverts changeset fa5527c

This patch is applying some hunks that are already at changeset
c247d7b, causing a compilation breakage.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
fa5527cd3f428845d7950e6b2bab6babcbcd907b 20-Mar-2012 Ivan Kalvachev <ikalvachev@gmail.com> [media] em28xx: support for 2304:0242 PCTV QuatroStick (510e)

It is mostly copy/paste of the 520e code with setting GPIO7 removed
(no LED light).

I've worked on just released vanilla linux-3.3.0 kernel, so there may
be 1/2 lines offset to the internal working source, but most of the
code should apply cleanly.

I was able to get the DVB-C working (tuned and watched TV). Haven't
tested DVB-T (no signal atm).

Special thanks to everybody who worked on the code and to Antti
Palosaari and Devin Heitmueller who provided essential support on irc.

Hardware is based of:
Empia EM2884
Micronas DRX 3926K
NXP TDA18271HDC2
AVF4910 (not used atm)

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
c247d7b107c6654bb73d539485df649db5c0796f 19-Mar-2012 Antti Palosaari <crope@iki.fi> [media] em28xx: support for 2013:0251 PCTV QuatroStick nano (520e)

Hardware is based of:
Empia EM2884
Micronas DRX 3926K
NXP TDA18271HDC2

... + analog parts.
Analog is not supported currently. Only DVB-T and DVB-C.

There seems to be still problems for locking DVB-C channels which have
strong signal. Attenuator helps. I think it is demodulator IF/RF AGC
issue. Lets fix it later. Patches are welcome.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
3553085cb47b10762e77ca783683dbf8142f9762 18-Mar-2012 Antti Palosaari <crope@iki.fi> [media] em28xx: support for 1b80:e425 MaxMedia UB425-TC

Hardware is based of:
Empia EM2874B
Micronas DRX 3913KA2
NXP TDA18271HDC2

Only DVB-C supported currently since missing firmware.
According to my tests, DRX 3913KA2 demodulator requires firmware
in order to support DVB-T mode.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
7e4964fa167709befde3ba3a7044080d7ca391d0 16-Mar-2012 Ezequiel García <elezegarcia@gmail.com> [media] em28xx: Unused macro cleanup

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-i2c.c
401a582f869d64a4a5c3fb03926ffa54920a168d 13-Mar-2012 Ezequiel García <elezegarcia@gmail.com> [media] media: em28xx: Paranoic stack save

This patch saves 255 bytes of stack on usb_probe() by removing
a char array. In some platforms this is represents a substantial save.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
2321acf2962514088c2230b6d54f7a56368576c5 10-Mar-2012 Ezequiel García <elezegarcia@gmail.com> [media] media: em28xx: Remove unused urb arrays from device struct

These arrays were embedded in the struct itself, but they weren't
used by anyone, since urbs are now dinamically allocated
at em28xx_usb_isoc_ctl struct.
Tested by compilation only.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx.h
86d38d1e0e0f66ec3973b718d35a590e04fb32fa 13-Feb-2012 Gianluca Gennari <gennarone@gmail.com> [media] em28xx: pre-allocate DVB isoc transfer buffers

On MIPS/ARM set-top-boxes, as well as old x86 PCs, memory allocation failures
in the em28xx driver are common, due to memory fragmentation over time, that
makes impossible to allocate large chunks of coherent memory.
A typical system with 256/512 MB of RAM fails after just 1 day of uptime (see
the old thread for detailed reports and crashlogs).

In fact, the em28xx driver allocates memory for USB isoc transfers at runtime,
as opposite to the dvb-usb drivers that allocates the USB buffers when the
device is initialized, and frees them when the device is disconnected.

Moreover, in digital mode the USB isoc transfer buffers are freed, allocated
and cleared every time the user selects a new channel, wasting time and
resources.

This patch solves both problems by allocating DVB isoc transfer buffers in
em28xx_usb_probe(), and freeing them in em28xx_usb_disconnect().
In fact, the buffers size and number depend only on the max USB packet size
that is parsed from the USB descriptors in em28xx_usb_probe(), so it can
never change for a given device.

This approach makes no sense in analog mode (as the buffer size depends on
the alternate mode selected at runtime), the patch creates two separate sets
of buffers for digital and analog modes.

For digital-only devices, USB buffers are created when the device is probed
and freed when the device is disconnected.
For analog-only devices, nothing changes: isoc buffers are created at runtime.
For hybrid devices, two sets of buffers are maintained: the digital-mode
buffers are created when the device is probed, and freed when the device is
disconnected; analog-mode buffers are created/destroyed at runtime as before.
So, in analog mode, digital and analog buffers coexists at the same time: this
can be justified by the fact that digital mode is by far more commonly used
nowadays, so it makes sense to optimize the driver for this use case scenario.

The patch has been tested in the last few days on a x86 PC and a MIPS
set-top-box, with the PCTV 290e (digital only) and the Terratec Hybrid XS
(hybrid device). With the latter, I switched several times between analog and
digital mode (Kaffeine/TvTime) with no issue at all.
I unplugged/plugged the devices several times with no problem.
Also, after over 3 days of normal usage in the MPIS set-top-box, the PCTV 290e
was still up and running.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-video.c
m28xx.h
59b30294e14fa6a370fdd2bc2921cca1f977ef16 23-Jan-2012 Mauro Carvalho Chehab <mchehab@redhat.com> Merge branch 'v4l_for_linus' into staging/for_v3.4

* v4l_for_linus:
[media] cxd2820r: sleep on DVB-T/T2 delivery system switch
[media] anysee: fix CI init
[media] cxd2820r: remove unused parameter from cxd2820r_attach
[media] cxd2820r: fix dvb_frontend_ops
c2bbbe7b5e79974c5ed1c828690731f6f5106bee 19-Jan-2012 Antti Palosaari <crope@iki.fi> [media] cxd2820r: remove unused parameter from cxd2820r_attach

Fix bug introduced by multi-frontend to single-frontend change.
This parameter is no longer used after multi-frontend to single-frontend change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
122804ecb59493fbb4d31b3ba9ac59faaf45276f 15-Jan-2012 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (655 commits)
[media] revert patch: HDIC HD29L2 DMB-TH USB2.0 reference design driver
mb86a20s: Add a few more register settings at the init seq
mb86a20s: Group registers into the same line
[media] [PATCH] don't reset the delivery system on DTV_CLEAR
[media] [BUG] it913x-fe fix typo error making SNR levels unstable
[media] cx23885: Query the CX25840 during enum_input for status
[media] cx25840: Add support for g_input_status
[media] rc-videomate-m1f.c Rename to match remote controler name
[media] drivers: media: au0828: Fix dependency for VIDEO_AU0828
[media] convert drivers/media/* to use module_platform_driver()
[media] drivers: video: cx231xx: Fix dependency for VIDEO_CX231XX_DVB
[media] Exynos4 JPEG codec v4l2 driver
[media] doc: v4l: selection: choose pixels as units for selection rectangles
[media] v4l: s5p-tv: mixer: fix setup of VP scaling
[media] v4l: s5p-tv: mixer: add support for selection API
[media] v4l: emulate old crop API using extended crop/compose API
[media] doc: v4l: add documentation for selection API
[media] doc: v4l: add binary images for selection API
[media] v4l: add support for selection api
[media] hd29l2: fix review findings
...
53b667eb12edd1bb33beca73ab14dbdf4d536c37 08-Jan-2012 Sascha Sommer <saschasommer@freenet.de> [media] em28xx: Fix tuner_type for Terratec Cinergy 200 USB

The card definition of the Terratec Cinergy 200 USB uses the
wrong tuner type. Therefore some channels are currently missing.
Attached patch fixes this problem.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
1020d13d50d0a5bfcfc8a0a6826ed221cdf8a775 08-Jan-2012 Sascha Sommer <saschasommer@freenet.de> [media] em28xx: increase maxwidth for em2800

The MaxPacketSize for em2800 based devices is too small to capture at full resolution.
Therefore scale down when the maximum frame size is selected.
The previous workaround that simply reduced the X resolution cannot be used
because it crops a part of the input as
the em2800 can only scale down with a factor of 0.5.

reverts commits 1ca31892e and fb3de0398ab.

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
m28xx.h
ca80cf60489508792e97a7703ed35756f4d62943 08-Jan-2012 Sascha Sommer <saschasommer@freenet.de> [media] em28xx: Do not modify EM28XX_R06_I2C_CLK for em2800

writing the EM28XX_R06_I2C_CLK register leads to the problem that the
i2c bus on the Terratec Cinergy 200 USB is no longer usable when the
system is rebooted.

The device needs to be unplugged in order to bring it back to life.
Attached patch conditionally disables the write in
em28xx_pre_card_setup() like it is already done in em28xx_card_setup().

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
0903bb540e5bb99a9e58d583a596a30620f65702 08-Jan-2012 Sascha Sommer <saschasommer@freenet.de> [media] em28xx: Fix: I2C_CLK write error message checks wrong return code

It looks like the return value check that is done after setting the I2C
speed checks the wrong return code.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
622c2fc1f2613bef953d2af908e7b83f4de4b994 07-Jan-2012 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [media] em28xx: simplify argument passing to em28xx_init_dev()

The 'struct em28xx *' pointer was passed by reference to the
em28xx_init_dev() function, for no reason. Instead, just pass it by
value, which is much more logical and simple.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
2f78604a433a12571ec3e54054fbfacc7525b307 06-Jan-2012 Mario Ceresa <mrceresa@gmail.com> [media] Added model Sveon STV40

Signed-off-by: Mario Ceresa <mrceresa@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
74e07f3e309599864656fb4560c498478d22d43c 02-Jan-2012 Don Kramer <dgkramer@comcast.net> [media] [resend] em28xx: Add Plextor ConvertX PX-AV100U to em28xx-cards.c

Adds support for the Plextor ConvertX PX-AV100U, which uses the
eMPIA EM2820 chip. The device has a device_id of '0x093b, 0xa003'. I
am using the existing EM2820_BOARD_PINNACLE_DVC_90 board profile, as
the Pinnacle Dazzle DVC 90/100/101/107, Kaiser Baas Video to DVD
maker, and Kworld DVD Maker 2 were already mapped to it. Some more
background on the device and my testing can be found at
http://www.donkramer.net/plextor_122710.pdf

Signed-off-by: Don Kramer <dgkramer@comcast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
8ab3362665a699bd54fc489ff7fb6372678b94c1 28-Dec-2011 Holger Nelson <hnelson@hnelson.de> [media] em28xx: Reworked probe code to get rid of some hacks

Reworked device probing to get rid of hacks to guess the maximum size of
dvb iso transfer packets. The new code also selects the first alternate
config which supports the largest possible iso transfers for dvb.

[mchehab@redhat.com: Fix a few checkpatch.pl CodingStyle compliants]
Signed-off-by: Holger Nelson <hnelson@hnelson.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-reg.h
m28xx.h
4d28d3d9978b84326a4608c25bda484973bba0a6 24-Dec-2011 Gareth Williams <gareth@garethwilliams.me.uk> [media] Added USB Id & configuration array for Honestech Vidbox NW03

Adds support for the Honestech Vidbox NW03 USB capture device.

Signed-off-by: Gareth Williams <gareth@garethwilliams.me.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
6c3b906cc9f73144ceb4ebbb193bebc596063d38 24-Dec-2011 Holger Nelson <hnelson@hnelson.de> [media] em28xx: Add Terratec Cinergy HTC USB XS to em28xx-cards.c

This adds support for the Terratec Cinergy HTC USB XS which is similar to
the Terratec H5 by adding the USB-ids to the table. According to
http://linux.terratec.de it uses the same ICs and DVB-C works for me
using the firmware of the H5.

Signed-off-by: Holger Nelson <hnelson@hnelson.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
2a5fc873d6a1976b7ed47f074fc46abb9f822e32 20-Dec-2011 Gareth Williams <gareth@garethwilliams.me.uk> [media] Add AC97 8384:7650 for some versions of EMP202

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

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

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

Signed-off-by: Gareth Williams <gareth@garethwilliams.me.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
fa4b2a171d42ffc512b3a86922ad68e1355eb17a 05-Jan-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] drxk: create only one frontend for both DVB-C and DVB-T

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

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
aac865f7c92990f2db17cfe9e9ef89a8706253f7 26-Dec-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-dvb: don't initialize drx-d non-used fields with zero

There's no need to initialize unused fields with zero, as Kernel does
it automatically.

Removing the initialization makes the code cleaner.

This also allows the removal of the unused pll_set callback.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
1985f6fb8965a813aabd53a6b64ec54dd23bfdfb 11-Dec-2011 Aivar Päkk <aivar11@gmail.com> [media] KWorld 355U and 380U support

This patch adds Kworld 355U and 380U support

Signed-off-by: Aivar Päkk <aivar11@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
7e7b8287af32400daea1e231057b4b75934af347 10-Dec-2011 Manu Abraham <abraham.manu@gmail.com> [media] PCTV290E: Attach a single frontend

PCTV290E: Attach a single frontend, rather than a frontend each per
delivery system, whereby a multistandard frontend can advertise all
associated delivery systems.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
48763e2c6e76fbaa64229219593c1a456fd32c67 09-Dec-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] drxk: Switch the delivery system on FE_SET_PROPERTY

The DRX-K doesn't change the delivery system at set_properties,
but do it at frontend init. This causes problems on programs like
w_scan that, by default, opens both frontends.

Instead, explicitly set the format when set_parameters callback is
called.

Tested-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
a1ed02e9f1a0fa34e5b5e978209204033bb9cf4f 16-Nov-2011 Andreas Oberritter <obi@linuxtv.org> [media] em28xx: Add Terratec Cinergy HTC Stick

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
fda23faaff3b28a987c22da5f3a17b9f3d4acef8 13-Nov-2011 Antti Palosaari <crope@iki.fi> [media] cxd2820r: switch to .get_if_frequency()

All tuners used with cxd2820r offers IF frequency so switch that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
8503232f2e9604d844d8f52ddea2e55ccc6c38f6 24-Nov-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix a few warnings due to HVR-930C addition

drivers/media/video/em28xx/em28xx-cards.c:339:30: warning: ‘hauppauge_930c_gpio’ defined but not used [-Wunused-variable]
drivers/media/video/em28xx/em28xx-dvb.c: In function ‘em28xx_dvb_init’:
drivers/media/video/em28xx/em28xx-dvb.c:886:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
dfbbf5da6c2266580df8b8aab0b43595bed55e48 20-Nov-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Add IR support for HVR-930C

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
20ae9742eba1bbd1f9d6658d1a1a72bc77fc741d 20-Nov-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Add IR support for em2884

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
de72405f6fc1aaedc0412f88cf681ed33519c49a 20-Nov-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix CodingStyle issues introduced by changeset 82e7dbb

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
82e7dbbd4a16274b0a7038978734fc11bbf9f4b6 19-Nov-2011 Eddi De Pieri <eddi@depieri.net> [media] em28xx: initial support for HAUPPAUGE HVR-930C again

With this patch I try again to add initial support for HVR930C.

Tested only DVB-T, since in Italy Analog service is stopped.

Actually "scan -a0 -f1", find only about 50 channel while 400 should
be available.

[mchehab@redhat.com: Tested with DVB-C and fixed a few whitespace issues]
Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
ecb3b2b35db49778b6d89e3ffd0c400776c20735 18-Nov-2011 Greg Kroah-Hartman <gregkh@suse.de> USB: convert drivers/media/* to use module_usb_driver()

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

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Frank Zago <frank@zago.net>
Cc: Olivier Lorin <o.lorin@laposte.net>
Cc: Erik Andren <erik.andren@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Brian Johnson <brijohn@gmail.com>
Cc: Leandro Costantino <lcostantino@gmail.com>
Cc: Antoine Jacquet <royale@zerezo.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Florian Mickler <florian@mickler.org>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Michael Krufky <mkrufky@kernellabs.com>
Cc: "David Härdeman" <david@hardeman.nu>
Cc: Florent Audebert <florent.audebert@anevia.com>
Cc: Sam Doshi <sam@metal-fish.co.uk>
Cc: Manu Abraham <manu@linuxtv.org>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Cc: "Igor M. Liplianin" <liplianin@me.by>
Cc: Derek Kelly <user.vdr@gmail.com>
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Cc: "André Weidemann" <Andre.Weidemann@web.de>
Cc: Martin Wilks <m.wilks@technisat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jose Alberto Reguero <jareguero@telefonica.net>
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Rafi Rubin <rafi@seas.upenn.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Paul Bender <pebender@gmail.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: "Márcio A Alves" <froooozen@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Chris Rankin <rankincj@yahoo.com>
Cc: Lee Jones <lee.jones@canonical.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Dean Anderson <linux-dev@sensoray.com>
Cc: Pete Eberlein <pete@sensoray.com>
Cc: Arvydas Sidorenko <asido4@gmail.com>
Cc: Andrea Anacleto <andreaanacleto@libero.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
m28xx-cards.c
4e145349a1fe16ba8689553f0ffa5b223fba5327 16-Nov-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix some Terratec entries (H5 and XS)

As reported by Andreas Oberritter <obi@linuxtv.org>, changeset
33ba28eebc3e1758e6adc1fcec9e1e3151bac453 did the wrong thing.

Fix it to properly reflect the entries for Terratec H5 revs 1 and 2,
and restore Terratec XS entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
efabaaf38a6cac929650943151e679f2b5cdae8b 14-Oct-2011 Teka <teka101@gmail.com> [media] Support for Terratec G1

Hi,

This is a little patch to support Terratec G1 (based on Terratec Grabby).

It works perfectly on my pc (Ubuntu 11.04 / Kernel 2.6.38).

Best regards,

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
1c5c50685a04668a4a4431534bca804969fac3c6 16-Oct-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES

Pidgin uses gstreamer (and libv4l) to work. Without implementing this ioctl,
it won't detect properly the size range, and driver will fail.

So, this patch is required, in order to use an em27xx webcam, like
Silvercrest.

The pigdin/gstreamer/libv4l needs to be fixed, as it shouldn't assume
that all drivers will implement this optional ioctl, but, at least now,
devices with em28xx have a better chance of working with pidgin.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
d56ae6fbf33ddeb7ab2ffac896229ca473a7457f 04-Oct-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Add VIDIOC_QUERYSTD support

Allow subdevs to return the detected standards

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
778f295080b62cbce1af402e1704566531e01233 25-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: replug locking cleanup

Simplifies the locking by moving the em28xx_init_extension() call until
em28xx_usb_probe() has finished with the dev->lock mutex. It therefore
makes the second and subsequent "plugging" events logically identical to
the first "plugging" event when the em28xx-dvb and em28xx-alsa modules
must be loaded (i.e. registered).

Basically, em28xx_usb_probe() requests that em28xx-dvb be loaded and
also triggers udev to initialise the V4L2 devices. These two events are
serialised by the dev->lock mutex but the order that they happen in is
undefined. But this has always been the case anyway.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f055815fd0e4dd22ffd523f0e5117132c0a49e3d 25-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: remove unused prototypes

This patch just removes the prototypes for the two functions that I've already
deleted in my previous patches.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx.h
b868a537b675eed2ba84bbeca4c8557ebf9e0156 24-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: fix deadlock when unplugging and replugging a DVB adapter

This fixes the deadlock that occurs with either multiple PCTV 290e adapters or when a single PCTV 290e adapter is replugged.

For DVB devices, the device lock must now *not* be held when adding/removing either a device or an extension to the respective lists. (Because em28xx_init_dvb() will want to take the lock instead).

Conversely, for Audio-Only devices, the device lock *must* be held when adding/removing either a device or an extension to the respective lists.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
d7222e7d6fb06ca3e7aa7a1ab07f8e6c6adb1d22 24-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: fix race on disconnect

This patch closes the race on the device and extension lists at USB disconnect
time. Previously, the device was removed from the device list during
em28xx_release_resources(), and then passed to the em28xx_close_extension()
function so that all extensions could run their fini() operations. However, this
left a (brief, theoretical, highly unlikely ;-)) window between these two calls
during which a new module could call em28xx_register_extension(). The result
would have been that the em28xx_usb_disconnect() function would also have passed
the device to the new extension's fini() function, despite never having called
the extension's init() function.

This patch also restores em28xx_close_extension()'s symmetry with
em28xx_init_extension(), and establishes the property that every device in the
device list must have been initialised for every extension in the extension list.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
9da9f356dc73c2ae65a15a1c1d6e53142706e96b 04-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: Fix em28xx_devused cleanup logic on error

On 04/09/11 00:49, Mauro Carvalho Chehab wrote:
> This is an automatic generated email to let you know that the following patch were queued at the
> http://git.linuxtv.org/media_tree.git tree:
>
> Subject: [media] em28xx: use atomic bit operations for devices-in-use mask
> Author: Chris Rankin<rankincj@yahoo.com>
> Date: Sat Aug 20 08:21:03 2011 -0300
>
> Use atomic bit operations for the em28xx_devused mask, to prevent an
> unlikely race condition should two adapters be plugged in
> simultaneously. The operations also clearer than explicit bit
> manipulation anyway.
>
> Signed-off-by: Chris Rankin<rankincj@yahoo.com>
> Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com>
>
> drivers/media/video/em28xx/em28xx-cards.c | 33 ++++++++++++++---------------

I think you missed this line in the merge.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f6c226b550292e8b3ae3426868957e63e77b506b 13-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: ERROR: "em28xx_add_into_devlist" [drivers/media/video/em28xx/em28xx.ko] undefined!

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
36588715fc0ed3ff0ffb025dc841652cb3b2b667 01-Aug-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: add support for PCTV DVB-S2 Stick 460e [2013:024f]

It is based of...
* Empia EM28174
* NXP TDA10071 & Conexant CX24118A combo
* Allegro A8293

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx-cards.c
m28xx-dvb.c
m28xx.h
16e3d2f4fab6e001a79705fa273418afc10188f8 04-Sep-2011 Chris Rankin <rankincj@yahoo.com> [media] EM28xx - Fix memory leak on disconnect or error

Release the dev->alt_max_pkt_size buffer in all cases.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-video.c
0b8bd83cf393832f1d00096b866d888b75b374c3 20-Aug-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: don't sleep on disconnect

The DVB framework will try to power-down an adapter that no-one is using
any more, but this assumes that the adapter is still connected to the
machine. That's not always true for a USB adapter, so disable the sleep
operations when the adapter has been physically unplugged.

This prevents I2C write failures with error -19 from appearing
occasionally in the dmesg log.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
76424a0a50982e4026c7d1d5a0cddc92eecc5969 20-Aug-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: move printk lines outside mutex lock

There's no reason to still be holding the device list mutex for either of these
printk statements.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
6c03e38b34dcfcdfa2f10cf984995a48f030f039 20-Aug-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: clean up resources should init fail

This patch ensures that the em28xx_init_dev() function cleans up after itself,
in the event that it fails. This isimportant because the struct em28xx will be
deallocated if em28xx_init_dev() returns an error.

[mchehab@redhat.com: Fix merge conflicts and simplify the goto labels]
Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
38b61eb2dac06fdc42815b004e9824d8196cfcfb 20-Aug-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: use atomic bit operations for devices-in-use mask

Use atomic bit operations for the em28xx_devused mask, to prevent an
unlikely race condition should two adapters be plugged in
simultaneously. The operations also clearer than explicit bit
manipulation anyway.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f38f33395232db1a03d21b992af1714cbffbdec4 20-Aug-2011 Chris Rankin <rankincj@yahoo.com> [media] em28xx: pass correct buffer size to snprintf

snprintf()'s size parameter includes space for the terminating '\0' character.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
3f5c14d3d3d7a3f508f2fffa62731f13f8efdfba 15-Aug-2011 Arnaud Lacombe <lacombar@gmail.com> [media] drivers/media: do not use EXTRA_CFLAGS

Usage of these flags has been deprecated for nearly 4 years by:

commit f77bf01425b11947eeb3b5b54685212c302741b8
Author: Sam Ravnborg <sam@neptun.(none)>
Date: Mon Oct 15 22:25:06 2007 +0200

kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
akefile
0db4bf42baae95ddd457b0c4911e851c9169750e 09-Aug-2011 Steve Kerrison <steve@stevekerrison.com> [media] CXD2820R: Replace i2c message translation with repeater gate control

This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert
Schlabbach for identifying the register address and field to set.

The old i2c intercept code that prefixed messages with a passthrough byte has
been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been
updated appropriately.

Tested for DVB-T2 use; I would appreciate it if somebody with DVB-C capabilities
could test it as well - from inspection I cannot see any problems.

This is patch v2. It fixes some schoolboy style errors and removes superfluous
i2c entries in cxd2820r.h.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
f2d0c1c625bc79aa524b52eea2de4262a9be1d90 15-Jul-2011 Jarod Wilson <jarod@redhat.com> [media] em28xx: add em28xx_ prefix to functions

Makes it more straight-forward to follow stack traces if the functions
don't have generic names. Using this as a crutch while trying to better
understand the lockdep warnings I get when loading the em28xx driver.

CC: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
e36454376a8f4637c0767daa78cf1d96d162d71a 28-Jul-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: use MFE lock for PCTV nanoStick T2 290e

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
6d51477470728074cea396a0127d73c5590dd441 29-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix IR unregister logic

The input stop() callback already calls the em28xx_ir_stop method.
Calling it again causes an oops.

Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
f7acc4bb86594d78aa41c07b7670df3e03738b18 28-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix DVB-C maxsize for em2884

The logic at em28xx_isoc_dvb_max_packetsize() sucks, at least for newer
the needed packet size. Yet, it is better than nothing.

Rewrite the code in order to change the default to 752 for em2884 and
newer chips and provide a better way to handle per-chipset specifics.

For em2874, the current default should be enough, as the only em2874
board is currently a 1-seg ISDB-T board, so, it needs only a limited
amount of bandwidth.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-dvb.c
c4c3a3d32a2eac18dba04683bb5b7357402405c7 15-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Remove the double symbol increment hack from drxk_hard

Both ngene and ddbrige calls dvb_attach once for drxk_attach.
The logic used there, and by tda18271c2dd driver is different
from similar logic on other frontends.

The right fix is to change them to use the same logic, but,
while we don't do that, we need to patch em28xx-dvb in order
to do cope with ngene/ddbridge magic.

While here, document why drxk_t_release should do nothing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
33ba28eebc3e1758e6adc1fcec9e1e3151bac453 15-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Add other Terratec H5 USB ID's

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
8b9456ae04b1cb7adcaa57735324f7b518eae07d 11-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Change firmware name for Terratec H5 DRX-K

Use a name convention for the firmware file that matches on the
current firmware namespacing. Also, add it to the firmware
download script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
f1fe1b75d64046b693075045fe9fc5cafed9c981 10-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] drxk: Allow to disable I2C Bridge control switch

On em28xx, tda18271C2 is accessible when the i2c port
is not touched. Touching on it breaks the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
bbc70e647b04dc3df1c879089a4f6b633c1952c9 10-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-i2c: Add a read after I2C write

All I2C logs we got for em28xx does that. With Terratec H5, at
400MHz speed, it seems that this is required, to avoid having
troubles at the I2C bus.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-i2c.c
e4f4f8758b4c3702761e46f24ee99e34823a0f28 09-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] drxk: Add a parameter for the microcode name

The microcode firmware provided on Terratec H5 seems to be
different. Add a parameter to allow specifying a different
firmware per-device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
fec528b77f9be3e7ebb8d7c25888b0cf9fb8e8d6 04-Jul-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Add initial support for Terratec H5

Not working yet. There are some fixes at the DRX-K that are needed
for it to work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-i2c.c
m28xx-reg.h
m28xx.h
1990d50b58bef127a647005fdcada6d07081d3ef 24-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Stop using linux/version.h on most video drivers

All the modified drivers didn't have any version increment since
Jan, 1 2011. Several of them didn't have any version increment
for a long time, even having new features and important bug fixes
happening.

As we're now filling the QUERYCAP version with the current Kernel
Release, we don't need to maintain a per-driver version control
anymore. So, let's just use the default.

In order to preserve the Kernel module version history, a
KERNEL_VERSION() macro were added to all modified drivers, and
the extraver number were incremented.

I opted to preserve the per-driver version control to a few
pwc, pvrusb2, s2255, s5p-fimc and sh_vou.

A few drivers are still using the legacy way to handle ioctl's.
So, we can't do such change on them, otherwise, they'll break.
Those are: uvc, et61x251 and sn9c102.

The rationale is that the per-driver version control seems to be
actively maintained on those.

Yet, I think that the better for them would be to just use the
default version numbering, instead of doing that by themselves.

While here, removed a few uneeded include linux/version.h

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
0db15d525d2d342de8e983c218198d5708a32004 18-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Mark Kworld 305 as validated

This board were used for testing the em28xx-alsa using a separate interface.
So, it is obviously validated ;)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
4f83e7b3ef938eb9a01eadf81a0f3b2c67d3afb6 17-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Add support for devices with a separate audio interface

Some devices use a separate interface for the vendor audio class.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-cards.c
m28xx-core.c
m28xx.h
dff0f8c279e34089128e9687d77bfc72dbb471bd 19-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-audio: Some Alsa API fixes

Mark the alsa stream with SNDRV_PCM_INFO_BATCH,
as the timing to get audio streams can vary.

Also, add SNDRV_PCM_TRIGGER for pause/release.

while here, fix the stop indicator, to be sure that audio
will be properly released at the stop events.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
debb7241498001a0da10ee01b72f9ec1f9b1edc8 19-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-audio: Properly report failures to start stream

If the audio stream fails for any reason, it should:
1) Report an error via dmesg;
2) Mark internally that the stream didn't started.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
66cb6957d338383157d4fdafef7c85e488e9e535 18-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-audio: add debug info for the volume control

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
71d7d83edc5129509a2cba1cf9848579cf9619e5 19-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-audio: volumes are inverted

While here, fix volume mask to 5 bits

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
43131a2ca6afbd8dcc940d5ad4b4b1c3d89a658b 19-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-audio: add support for mute controls

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
850d24a5a861238f583f59cd39de4dfe5142a4c9 19-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-alsa: add mixer support for AC97 volume controls

Export ac97 volume controls via mixer.

Pulseaudio will probably handle it very badly, as it has
no idea about how volumes are wired, and how are they
associated with each TV input. Those wirings are
card model dependent, and we don't have the wiring mappings
for each supported device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-core.c
5b89ecf98998911f397fa913b06ee2304a373e54 18-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Allow to compile it without RC/input support

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
akefile
m28xx.h
0f8a61fc42a618e25c61549590c35c66c63e2ca7 18-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix a wrong enum at the ac97 control tables

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
00d2e7ad9dd4e88224d091e454371d8a9a80719f 18-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Don't initialize a var if won't be using it

Fixes most cases of initializing a var but not using it.

There are still 3 cases at em28xx-alsa, were those vars should
probably be used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
ebaefdb7651383645f17d2d32398914175d1bcdd 01-Jun-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: use the proper prefix for board names

All boards use EM28xxx_BOARD, to identify that the macro
refers to a card entry. So:

EM2874_LEADERSHIP_ISDBT -> EM2874_BOARD_LEADERSHIP_ISDBT

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
460312ec5aff5e4c12b2e50a2965ed1ee832682a 25-May-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: correct PCTV nanoStick T2 290e device name

PCTV Systems nanoStick T2 290e => PCTV nanoStick T2 290e

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
ff7b929f04b8e9f2e5d8929e14b10f913021a00c 25-May-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: add remote for PCTV nanoStick T2 290e

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
a24ec44801708e67585fa31dd0cc5802010dab31 25-May-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: EM28174 remote support

For some reason it repeats rather slowly, around 800ms intervals,
two RC5 remotes tested.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
2892bd0d95f8b0312db6f630e3a79eefb6981fcb 02-May-2011 Steve Kerrison <steve@stevekerrison.com> [media] em28xx: Disable audio for EM28174

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
d6a5f921fb8cbd418b298e5bbe83e5c8c8e1da16 07-Apr-2011 Antti Palosaari <crope@iki.fi> [media] Add support for PCTV nanoStick T2 290e [2013:024f]

Supports DVB-T/T2/C, USB ID: 2013:024f.
Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx-cards.c
m28xx-dvb.c
m28xx.h
bc022694d7da1c848e395f18eaf856abc9dd0b09 07-Apr-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: add support for EM28174 chip

EM28174 is very similar as already supported EM2874.
I am not sure what are differences, but it could be analog support.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-reg.h
f71095be6645aee0828623701e35e7e7d52910d8 07-Apr-2011 Antti Palosaari <crope@iki.fi> [media] em28xx: Multi Frontend (MFE) support

Register multiple FEs for same adapter. After that it is
possible to register two FEs for same adapter. For example
one for DVB-T and one for DVB-C.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
9b316d6b42572f857161232d82b54e7ab2d33fbe 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] em28xx: add remote control support for PCTV 330e

Add support for the PCTV 330e remote control

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
5c4da36401810da6f881f9531380fdc13edd8f2b 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] em28xx: remove "not validated" flag for PCTV 330e

Remove the flag indicating the 330e board is not validated, based on the half
dozen users who have reported today that everything is working.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
ad9b4bb265cecbfc9b0c495741e331ce199964e0 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] em28xx: add digital support for PCTV 330e

Add the calls necessary to use the new drx-d driver for the PCTV 330e

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
09bc1942c031686bfcf897746b6baf9d42c92ed5 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] em28xx: include model number for PCTV 330e

Given how PCTV has multiple products with the same model name, include the
model number in the description and #define to make it a little more clear.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
7030f52bbee5edafd408f985696516a0dc735ca7 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] em28xx: fix GPIO problem with HVR-900R2 getting out of sync with drx-d

The em28xx bridge strobes the reset pin on the drx-d on every ts_ctrl call.
This results in the state of the chip getting out of the sync with the
state of the driver (and hence all tuning requests after the first one fail).

Make sure the drx-d is not being held in reset, but don't actually perform a
hardware reset on the chip.

The GPIO block has been split out from the other HVR-9x0 variants to reduce
the risk of regression, although in theory they would not have any issues
since none of those cases have the frontend driver managing any internal
state.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
6b142b3c81e6e532dfad7256fcc7e75fded49245 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] drxd: provide ability to disable the i2c gate control function

If the tuner is not actually behind an i2c gate, using the i2c gate control
function can wedge the i2c bus. Provide the ability to control on a per-board
basis whether it should be used.

Problem was noticed on the HVR-900 R2, where it resulted in the first tuning
attempt succeeding, and then all subsequent attempts to access the xc3028
being treated as failures (including the call to sleep the tuner).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
3e5659067892d94d859f8ae4c1129a84fe4d5244 24-Mar-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: auto-select drx-k if CUSTOMISE is not set

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
75e2b8694f0b1f8faea1851a39cb7ba07640aa7d 13-Mar-2011 Devin Heitmueller <dheitmueller@kernellabs.com> [media] em28xx: enable support for the drx-d on the HVR-900 R2

Add the required board initialization required for the drx-d to work with
the 900R2.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
m28xx-video.c
af86ce79f020a31e4a30661e41471d31face9985 24-Jan-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map

The rc-hauppauge-new map is a messy thing, as it bundles 3

different remote controllers as if they were just one,
discarding the address byte. Also, some key maps are wrong.

With the conversion to the new rc-core, it is likely that
most of the devices won't be working properly, as the i2c
driver and the raw decoders are now providing 16 bits for
the remote, instead of just 8.

delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
m28xx-cards.c
15195d3a83b59f0ca3bed52cbe5524042ce13fd6 24-Jan-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge

There are two "hauppauge-new" keymaps, one with protocol
unknown, and the other with the protocol marked accordingly.
However, both tables are miss-named.

Also, the old rc-hauppauge-new is broken, as it mixes
three different controllers as if they were just one.

This patch solves half of the problem by renaming the
correct keycode table as just rc-hauppauge. This table
contains the codes for the four different types of
remote controllers found on Hauppauge cards, properly
mapped with their different addresses.

create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
[Jarod: fix up RC_MAP_HAUPPAUGE defines]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
m28xx-cards.c
fb8decfabdf841a199b297076ff9f890dee55e53 22-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: properly handle subdev controls

Subdev controls return codes are evil, as they return -EINVAL to mean
both unsupported and invalid arguments. Due to that, we need to use a
trick to identify what controls are supported by a subdev.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
78e51566f0c56daa58f7bbe2591336b7d478c148 22-Feb-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix return value for s_ctrl

On some cases, driver returns 1. This should be OK, but qv4l2 is too
strict about return values.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
3c7c9370fb645f4713e0fbbe69425d8db9b47a13 08-Jan-2011 Hans Verkuil <hverkuil@xs4all.nl> [media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg()

The core.s_config op was meant for legacy drivers that needed to work with old
pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was
incorrectly called from several drivers.

Replace those occurences with proper i2c_board_info structs and call
v4l2_i2c_new_subdev_board.

After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove
that function as well.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
5a85025f7dabc5b039335a7d1fb5f9002efa9488 12-Jan-2011 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix IR support for WinTV USB2

Due to a lack of a break inside the switch, it were getting the
wrong keytable and get_key function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
23d69b09b78c4876e134f104a3814c30747c53f1 08-Jan-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
usb: don't use flush_scheduled_work()
speedtch: don't abuse struct delayed_work
media/video: don't use flush_scheduled_work()
media/video: explicitly flush request_module work
ioc4: use static work_struct for ioc4_load_modules()
init: don't call flush_scheduled_work() from do_initcalls()
s390: don't use flush_scheduled_work()
rtc: don't use flush_scheduled_work()
mmc: update workqueue usages
mfd: update workqueue usages
dvb: don't use flush_scheduled_work()
leds-wm8350: don't use flush_scheduled_work()
mISDN: don't use flush_scheduled_work()
macintosh/ams: don't use flush_scheduled_work()
vmwgfx: don't use flush_scheduled_work()
tpm: don't use flush_scheduled_work()
sonypi: don't use flush_scheduled_work()
hvsi: don't use flush_scheduled_work()
xen: don't use flush_scheduled_work()
gdrom: don't use flush_scheduled_work()
...

Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
9e9bc9736756f25d6c47b4eba0ebf25b20a6f153 07-Jan-2011 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (255 commits)
[media] radio-aimslab.c: Fix gcc 4.5+ bug
[media] cx25821: Fix compilation breakage due to BKL dependency
[media] v4l2-compat-ioctl32: fix compile warning
[media] zoran: fix compiler warning
[media] tda18218: fix compile warning
[media] ngene: fix compile warning
[media] DVB: IR support for TechnoTrend CT-3650
[media] cx23885, cimax2.c: Fix case of two CAM insertion irq
[media] ir-nec-decoder: fix repeat key issue
[media] staging: se401 depends on USB
[media] staging: usbvideo/vicam depends on USB
[media] soc_camera: Add the ability to bind regulators to soc_camedra devices
[media] V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV2640 sensor
[media] v4l: soc-camera: switch to .unlocked_ioctl
[media] v4l: ov772x: simplify pointer dereference
[media] ov9640: fix OmniVision OV9640 sensor driver's priv data retrieving
[media] ov9640: use macro to request OmniVision OV9640 sensor private data
[media] ivtv-i2c: Fix two warnings
[media] staging/lirc: Update lirc TODO files
[media] cx88: Remove the obsolete i2c_adapter.id field
...
8fd0bda511406ef0e9dcce9be055d7ab931e92ba 18-Dec-2010 Hans Verkuil <hverkuil@xs4all.nl> [media] em28xx: radio_fops should also use unlocked_ioctl

em28xx uses core assisted locking, so it shouldn't use .ioctl.
The .ioctl callback was replaced by .unlocked_ioctl for video nodes,
but not for radio nodes. This is now corrected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
3ea2b673a55cee528f83653e711d09425ed4d8b6 29-Dec-2010 Hans Verkuil <hverkuil@xs4all.nl> [media] em28xx: fix incorrect s_ctrl error code and wrong call to res_free

Calling subdevs to handle s_ctrl returned a non-zero return code even if
everything went fine.

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

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
a3fa904ec79b94f0db7faed010ff94d42f7d1d47 25-Oct-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Fix audio input for Terratec Grabby

The audio input line was wrong. Fix it.

Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
08af245de0cf6ab5f4ed008ee2bb99273774fce0 24-Dec-2010 Hans Verkuil <hverkuil@xs4all.nl> [media] V4L: remove V4L1 compatibility mode

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
c59a9bfabfc2a6359f046652c6bfa0a82fb17a05 07-Dec-2010 Randy Dunlap <randy.dunlap@oracle.com> [media] media: fix em28xx build, needs hardirq.h

Fix em28xx build by adding hardirq.h header file:

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

Reported-by: Zimny Lech <napohybelskurwysynom2010@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-vbi.c
9124544320bd36d5aa21769d17a5781ba729aebf 31-Oct-2010 Philippe Bourdin <richel@AngieBecker.ch> [media] Terratec Cinergy Hybrid T USB XS

I found that the problems people have reported with the USB-TV-stick
"Terratec Cinergy Hybrid T USB XS" (USB-ID: 0ccd:0042)
are coming from a wrong header file in the v4l-sources.

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

Reported-by: Philippe Bourdin <richel@AngieBecker.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
b1dc614a81258eb7ff482892e7bc894f1089c144 15-Nov-2010 Joe Perches <joe@perches.com> [media] drivers/media/video: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
52b661449aecc47e652a164c0d8078b31e10aca0 17-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rc: Rename remote controller type to rc_type instead of ir_type

for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,IR_TYPE,RC_TYPE,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_type,rc_type,g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
ca86674b8a93ea11c4bb6f4dd0113b1adf1fa841 17-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Rename all public generic RC functions from ir_ to rc_

Those functions are not InfraRed specific. So, rename them to properly
reflect it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
6bda96447cef24fbf97a798b1ea664224d5fdc25 17-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rc: rename the remaining things to rc_core

The Remote Controller subsystem is meant to be used not only by Infra Red
but also for similar types of Remote Controllers. The core is not specific
to Infra Red. As such, rename:
- ir-core.h to rc-core.h
- IR_CORE to RC_CORE
- namespace inside rc-core.c/rc-core.h

To be consistent with the other changes.

No functional change on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx.h
d8b4b5822f51e2142b731b42c81e3f03eec475b2 29-Oct-2010 David Härdeman <david@hardeman.nu> [media] ir-core: make struct rc_dev the primary interface

This patch merges the ir_input_dev and ir_dev_props structs into a single
struct called rc_dev. The drivers and various functions in rc-core used
by the drivers are also changed to use rc_dev as the primary interface
when dealing with rc-core.

This means that the input_dev is abstracted away from the drivers which
is necessary if we ever want to support multiple input devs per rc device.

The new API is similar to what the input subsystem uses, i.e:
rc_device_alloc()
rc_device_free()
rc_device_register()
rc_device_unregister()

[mchehab@redhat.com: Fix compilation on mceusb and cx231xx, due to merge conflicts]
Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Tested-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
3ffea4988be3f3fa65f2104ba31eff2b5e0e82a0 29-Oct-2010 David Härdeman <david@hardeman.nu> [media] ir-core: more cleanups of ir-functions.c

cx88 only depends on VIDEO_IR because it needs ir_extract_bits().
Move that function to ir-core.h and make it inline.

Lots of drivers had dependencies on VIDEO_IR when they really
wanted IR_CORE.

The only remaining drivers to depend on VIDEO_IR are bt8xx and
saa7134 (ir_rc5_timer_end is the only function exported by
ir-functions).

Rename VIDEO_IR -> IR_LEGACY to give a hint to anyone writing or
converting drivers to IR_CORE that they do not want a dependency
on IR_LEGACY.

Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
ca3dfd6a6f8364c1d51e548adb4564702f1141e9 10-Sep-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx: Add support for Leadership ISDB-T

This device uses an em2874B + Sharp 921 One Seg frontend.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx-cards.c
m28xx-dvb.c
m28xx.h
707bcf326bd50c875d82bd2e7c31dcfb92b7e813 24-Dec-2010 Tejun Heo <tj@kernel.org> media/video: explicitly flush request_module work

Video drivers request submodules using a work during probe and calls
flush_scheduled_work() on exit to make sure the work is complete
before being unloaded. This patch makes these drivers flush the work
directly instead of using flush_scheduled_work().

While at it, relocate request_submodules() call in saa7134_initdev()
right right before successful return as in other drivers to avoid
failing after the work is scheduled and returning failure without the
work still active.

This is in preparation for the deprecation of flush_scheduled_work().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
afe2c511fb2d75f1515081ff1be15bd79cfe722d 14-Dec-2010 Tejun Heo <tj@kernel.org> workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync()

cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync() quite some time ago. Convert all the
in-kernel users. The conversions are completely equivalent and
trivial.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: netdev@vger.kernel.org
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Alex Elder <aelder@sgi.com>
Cc: xfs-masters@oss.sgi.com
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netfilter-devel@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
m28xx-input.c
9a1f8b34aa539000da17a06235e4bec254d0bfb5 24-Sep-2010 Laurent Pinchart <laurent.pinchart@ideasonboard.com> [media] v4l: Remove module_name argument to the v4l2_i2c_new_subdev* functions

The argument isn't used anymore by the functions, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
1532a07042289d420f040f3bd4370cc106860003 24-Sep-2010 Laurent Pinchart <laurent.pinchart@ideasonboard.com> [media] v4l: Remove hardcoded module names passed to v4l2_i2c_new_subdev*

With the v4l2_i2c_new_subdev* functions now supporting loading modules
based on modaliases, replace the hardcoded module name passed to those
functions by NULL.

All corresponding I2C modules have been checked, and all of them include
a module aliases table with names corresponding to what the drivers
modified here use.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
8298f2f810b988dccfa0ab51cd874e107514c036 20-Oct-2010 Adrian Taylor <adrian.taylor@realvnc.com> [media] Support for Elgato Video Capture

This patch allows this device successfully to show video, at least from
its composite input.

I have no information about the true hardware contents of this device and so
this patch is based solely on fiddling with things until it worked. The
chip appears to be em2860, and the closest device with equivalent inputs
is the Typhoon DVD Maker. Copying the settings for that device appears
to do the trick. That's what this patch does.

[mchehab@redhat.com: update CARDLIST.em28xx accordingly, via script]
Signed-off-by: Adrian Taylor <adrian.taylor@realvnc.com>
Reviewed-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
cec4e6c113d490c227819da98d541e6156ed6ce2 16-Oct-2010 Michel Garnier <catimimi@orange.fr> [media] em28xx: Add dvb support for Terratec Cinergy Hybrid T USB XS FR

Signed-off-by: Michel Garnier <catimimi@orange.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
39a96b4cf592e79aefd1b4f2b136c20ec7bf10a7 09-Oct-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] em28xx-audio: fix some locking issues

Those locking issues affect tvtime, causing a kernel oops/panic, due to
a race condition.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx.h
401e5f8d38f539765cf550fa76b684d10975840c 30-Sep-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: em28xx: fix a compilation warning

drivers/media/video/em28xx/em28xx-video.c: In function ‘vidioc_s_register’:
drivers/media/video/em28xx/em28xx-video.c:1617: warning: unused variable ‘rc’

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
d5906dd6564bbf59a27bf1be87743b8794b5468e 26-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: em28xx: the default std was not passed on to the subdevs

The initial em28xx std (PAL) was not passed on to the subdevs. This led to
these tvp5150 kernel log errors when running v4l2-ctl --all:

tvp5150 0-005c: VBI can't be configured without knowing number of lines

The reason was that tvp5150 was still using its own internal default: STD_ALL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
0499a5aa777f8e56e46df362f0bb9d9d116186f9 26-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: em28xx: remove BKL

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
08bff03ed697a583612b62a6ac566bd5bce98012 20-Sep-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: videobuf: add ext_lock argument to the queue init functions

Add an ext_lock argument to the videobuf init functions. This allows
drivers to pass the vdev->lock pointer (or any other externally held lock)
to videobuf. For now all drivers just pass NULL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
6b81bef8cde141d8d8172a35633af27e17cf487a 27-Aug-2010 Julia Lawall <julia@diku.dk> V4L/DVB: drivers/media/video/em28xx: Remove potential NULL dereference

If the NULL test is necessary, the initialization involving a dereference of
the tested value should be moved after the NULL test.

The sematic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
... when != E
when != i
if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
1547ac893acbf87738ded0b470e2735fdfba6947 13-Aug-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
V4L/DVB: v4l2-ctrls.c: needs to include slab.h
V4L/DVB: fix Kconfig to depends on VIDEO_IR
V4L/DVB: Fix IR_CORE dependencies
361be7b1d099b671e01ca56b59b1e8b8e9ce4771 09-Aug-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: fix Kconfig to depends on VIDEO_IR

warning: (VIDEO_BT848 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_DEV && PCI && I2C && VIDEO_V4L2 && INPUT || VIDEO_SAA7134 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && VIDEO_DEV && PCI && I2C && INPUT || VIDEO_CX88 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && VIDEO_DEV && PCI && I2C && INPUT || VIDEO_IVTV && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && PCI && I2C && INPUT || VIDEO_CX18 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && DVB_CORE && PCI && I2C && EXPERIMENTAL && INPUT || VIDEO_EM28XX && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && V4L_USB_DRIVERS && USB && VIDEO_DEV && I2C && INPUT || VIDEO_TLG2300 && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && V4L_USB_DRIVERS && USB && VIDEO_DEV && I2C && INPUT && SND && DVB_CORE || VIDEO_CX231XX && MEDIA_SUPPORT && VIDEO_CAPTURE_DRIVERS && VIDEO_V4L2 && V4L_USB_DRIVERS && USB && VIDEO_DEV && I2C && INPUT || DVB_BUDGET_CI && MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && DVB_BUDGET_CORE && I2C && INPUT || DVB_DM1105 && MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && PCI && I2C && INPUT || VIDEO_GO7007 && STAGING && !STAGING_EXCLUDE_BUILD && VIDEO_DEV && PCI && I2C && INPUT && SND || VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT) selects VIDEO_IR which has unmet direct dependencies (IR_CORE)

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
9a94241afcc9a481691a9c29b7460217925b59b8 11-Aug-2010 Jean Delvare <khali@linux-fr.org> i2c: Add support for custom probe function

The probe method used by i2c_new_probed_device() may not be suitable
for all cases. Let the caller provide its own, optional probe
function.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
7e48b30af033076c85ab48a8306b5588faf5fb4b 07-Mar-2010 Jarod Wilson <jarod@redhat.com> V4L/DVB: dvb: add support for kworld 340u and ub435-q to em28xx-dvb

This adds support for the KWorld PlusTV 340U and KWorld UB345-Q ATSC
sticks, which are really the same device. The sticks have an eMPIA
em2870 usb bridge chipset, an LG Electronics LGDT3304 ATSC/QAM
demodulator and an NXP TDA18271HD tuner -- early versions of the 340U
have a a TDA18271HD/C1, later models and the UB435-Q have a C2.

The stick has been tested succesfully with both VSB_8 and QAM_256 signals.
Its using lgdt3304 support added to the lgdt3305 driver by a prior patch,
rather than the current lgdt3304 driver, as its severely lacking in
functionality by comparison (see said patch for details).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
603044d883d610acdb44daecf94b0fca48880b5c 27-Jun-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: em28xx-input: Don't generate one debug message for every get_key read

Instead of generating one printk for every IR read, prints it only when
count is different from the last count.

While here, as this code is called on every 100ms during the runtime
lifetime, do some performance optimization, assuming that, under normal
circumstances, it is unlikely that the driver would get a new key/key
repeat on every poll.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
a469585b1cd41e6efd5c2746a655feb840525e5c 07-Jun-2010 David Härdeman <david@hardeman.nu> V4L/DVB: ir-core: convert em28xx to not use ir-functions.c

Convert drivers/media/video/em28xx/em28xx-input.c to not use ir-functions.c

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
m28xx.h
2584bc4337855382d23b4abfc2e2492df6fdeb41 13-Jun-2010 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB: Fix case where fields were not at the correct start location

This patch address an arithmetic error for the case where the only remaining
content in the USB packet was the "225Axxxx" start of active video. In cases
where that happened to be at the end of the frame, we would inject it into the
videobuf (which is incorrect). This caused fields to be intermittently
rendered off by two pixels.

Thanks to Eugeniy Meshcheryakov for bringing this issue to my attention

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
517521e4651ac106fc2a4f7638c284f60de92bb8 22-May-2010 Dan Carpenter <error27@gmail.com> V4L/DVB: em28xx: remove unneeded null checks

The "dev" variable is used as a list cursor in a list_for_each_entry()
loop and can never be null here so I removed the check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
7a9b149212f3716c598afe973b6261fd58453b7a 21-May-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
usb: musb: update gfp/slab.h includes
USB: ftdi_sio: fix legacy SIO-device header
USB: kl5usb105: reimplement using generic framework
USB: kl5usb105: minor clean ups
USB: kl5usb105: fix memory leak
USB: io_ti: use kfifo to implement write buffering
USB: io_ti: remove unsused private counter
USB: ti_usb: use kfifo to implement write buffering
USB: ir-usb: fix incorrect write-buffer length
USB: aircable: fix incorrect write-buffer length
USB: safe_serial: straighten out read processing
USB: safe_serial: reimplement read using generic framework
USB: safe_serial: reimplement write using generic framework
usb-storage: always print quirks
USB: usb-storage: trivial debug improvements
USB: oti6858: use port write fifo
USB: oti6858: use kfifo to implement write buffering
USB: cypress_m8: use kfifo to implement write buffering
USB: cypress_m8: remove unused drain define
...

Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c
997ea58eb92f9970b8af7aae48800d0ef43b9423 12-Apr-2010 Daniel Mack <daniel@caiaq.de> USB: rename usb_buffer_alloc() and usb_buffer_free() users

For more clearance what the functions actually do,

usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()

They should only be used in code which really needs DMA coherency.

All call sites have been changed accordingly, except for staging
drivers.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
m28xx-core.c
0eed42e48a6292ebc96606c6a7105c69b37666d0 01-May-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: em28xx: g_tuner must set type field

The 'type' field was undefined but should be set to ANALOG_TV.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
4a61ecbd344c2349ec3b7a8db0db128135285dd7 14-Mar-2010 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB: em28xx: switch to new vbi subdev ops

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
5013318ca4fd22e30fd891f234b60daa3ca2f62d 07-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: em28xx: fix locks during dvb init sequence

Serialize DVB initialization, to avoid it to happen while analog
initialization is still happening.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-dvb.c
c373cabfbbb7631526003f17d470c0d1e5915a4c 08-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: em28xx: fix a regression caused by the rc-map changes

The patch that adds the rc-map changes didn't take into account that an
a table with IR_TYPE_UNKNOWN would make change_protocol to return -EINVAL.

As this function is fundamental to initialize some data, including a
callback to the getkey function, this caused the driver to stop working,
hanging the machine most of the times.

The fix were simply to add a handler for the IR type, but, to avoid further
issues, explicitly call change_protocol and handle the error before
initializing the IR. Also, let input_dev to start/stop IR handling,
after the opening of the input device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
02858eedcb78a664215b918d98cdb753ce432ce6 03-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir-core: Make use of the new IR keymap modules

Instead of using the ugly keymap sequences, use the new rc-*.ko keymap
files. For now, it is still needed to have one keymap loaded, for the
RC code to work. Later patches will remove this depenency.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
m28xx.h
b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa 02-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir: prepare IR code for a parameter change at register function

A latter patch will reuse the ir_input_register with a different meaning.
Before it, change all occurrences to a temporary name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
d705d2ab7596b4661a2f13172f4f93ad11bd761f 02-Apr-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir: use IR_KEYTABLE where an IR table is needed

Replaces most of the occurences of IR keytables on V4L drivers by a macro
that evaluates to provide the name of the exported symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
4a3eaee4d0d2724d86cbb18ad4b0088ce0b7f8a2 23-Mar-2010 Dan Carpenter <error27@gmail.com> V4L/DVB: em28xx: "Empia Em28xx Audio" too long

card->driver is 15 characters and a NULL. The original code
goes past the end of the array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
443fed9fa42bbeacdb8d336b8a5002a262cac15c 20-Mar-2010 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB: em28xx: add em286x/tvp5150 reference design

Add support for design which has an em2863/tvp5150 and uses the standard
empia USB ID. In Sander's case, it was branded as an "Eminent model EM3705"

Thanks to Sander Van Ginkel for testing and help debugging the support.

[mchehab@redhat.com: move it to a vague card number slot (card=29)]
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
5fee334039550bdd5efed9e69af7860a66a9de37 22-Jan-2010 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB: em28xx: rework buffer pointer tracking for offset to start of video

Rework the logic for tracking the amount of data copied to the VBI buffer, to
address problem found where the video lines are several bytes shifted to the
right (and the leading pixels in the first line rendered are garbage). This
would occur because the copy function would advance the pointer when detecting
headers, but the caller would not adjust the length actually copied.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
1744feab9a2241f2adf03be5ef8ecbd279f5944b 22-Jan-2010 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB: em28xx: reduce cropping for VBI area

It turns up we can reduce the starting line for the active area, which results
in more data being captured when under PAL (while the full VBI capture window
still stays properly encoded).

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
33c02facb5a3123212587295cc1c241ee7e03adb 22-Jan-2010 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB: em28xx: adjust number of packets per URB

Increase the packets per URB count from 40 to 64. I suspect that whoever was
looking at the usbsnoop captures saw "0x40" packets and mistook it for "40".

As a result of this change, I can see a 25% reduction in the number of
interrupts generated via powertop.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx.h
727e625cc2c114e449a78f851b0c12edac897a83 13-Mar-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB: ir-core: export driver name used by IR via uevent

Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
811fab623f435932f2a26aa64b40ec6102618cc6 05-Mar-2010 Antonio Larrosa <larrosa@kde.org> V4L/DVB: em28xx: Support for Kworld VS-DVB-T 323UR

This patch adapts the changes submitted by Dainius Ridzevicius to the
linux-media mailing list on 8/14/09, to the current sources in order
to make the Kworld VS-DVB-T 323UR usb device work.

I also removed the "not validated" flag since I own the device and validated
that it works fine after the patch is applied.

Thanks to Devin Heitmueller for his guidance with the code.

Signed-off-by: Antonio Larrosa <larrosa@kde.org>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-input.c
m28xx-vbi.c
m28xx-video.c
656380118d1a1c0176e58e4e3e46d736d0dd2000 18-Feb-2010 Catimimi <catimimi@orange.fr> V4L/DVB: em28xx : Terratec Cinergy Hybrid T USB XS FR is working

I succeeded in running Cinergy Hybrid T USB XS FR in both modes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
9a0a75a5abb2806969a599e10b0fb287befcb3a7 13-Feb-2010 Franklin Meng <fmeng2002@yahoo.com> V4L/DVB: Add an entry for Kworld 315U remote

Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
7ca7ef6011e92b52a365ddc78f6668e01793c572 09-Feb-2010 Andrea.Amorosi76@gmail.com <Andrea.Amorosi76@gmail.com> V4L/DVB: em28xx: add Dikom DK300 hybrid USB tuner

Adds digital and analogue tv support for Dikom DK300 hybrid usb card.

Not working: remote controller

To be done: it seems that with the proposed patch the digital demodulator
remains activated if the tuner is switched from digital to analogue mode.

Workaround is to unplug and replug the device when switching from digital to
analogue. If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
0a71102f105870a4a245edd1b291fa723a8f3a48 05-Feb-2010 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB: Fix logic for Leadtek winfast tv usbii deluxe

As pointed by Magnus Alm <magnus.alm@gmail.com>, commit 99dbd128bb applied
a hunk at the wrong place. This patch moves the code to the right place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
ca39d84d438b609af127f2eb161cd9029afbc9a7 13-Nov-2009 Magnus Alm <magnus.alm@gmail.com> V4L/DVB: em28xx: fix for "Leadtek winfast tv usbii deluxe"

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

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

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
m28xx.h
19f48cb105b7fa18d0dcab435919a3a29b7a7c4c 31-Dec-2009 Francesco Lavra <francescolavra@interfree.it> V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()

this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
66d9cbad5330d6df30c82f10ee18b62b096b84ef 25-Nov-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (13932): em28xx: add PAL support for VBI

Make the VBI support work for PAL standards in addition to NTSC.

This work was sponsored by EyeMagnet Limited.

Thanks go out to Andy Walls for providing a CD containing test PAL/VBI captures
and to Steven Toth for providing a PVR-350 to do signal generation with.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-vbi.c
m28xx-video.c
m28xx.h
5599678c703e369fd50105aa60d112bcfd8f186f 11-Jan-2010 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13915): em28xx: fix a typo on RC6 modes

Thanks to: Devin Heitmueller <dheitmueller@kernellabs.com> for double
checking it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-reg.h
971e8298dee4835fc2dfbd207a9786702aa01666 14-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13680): ir: use unsigned long instead of enum

When preparing the linux-next patches, I got those errors:

include/media/ir-core.h:29: warning: left shift count >= width of type
In file included from include/media/ir-common.h:29,
from drivers/media/video/ir-kbd-i2c.c:50:
drivers/media/video/ir-kbd-i2c.c: In function ‘ir_probe’:
drivers/media/video/ir-kbd-i2c.c:324: warning: left shift count >= width of type

Unfortunately, enum is 32 bits on i386. As we define IR_TYPE_OTHER as 1<<63,
it won't work on non 64 bits arch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
3f831107ed8efc32960e0cd172799bb82f6c81c9 14-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13641): Properly update the driver representation for the protocol

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
950b0f5a0bf764663a6aa4397d105ad571c64a83 14-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13637): em28xx: allow changing keycode table protocol

Experimental patch to allow changing the IR protocol. Currently, it support
changing between RC-5 and NEC protocols.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
e93854da880d6dc357c00625d8371b6a926fd19b 14-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13634): ir-core: allow passing IR device parameters to ir-core

Adds an structure to ir_input_register to contain IR device characteristics,
like supported protocols and a callback to handle protocol event changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
579e7d60ba0035228aadad69eb2ffeb138c51311 11-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13617): ir: move input_register_device() to happen inside ir_input_register()

We'll need to register a sysfs class for the IR devices. As such, the better
is to have the input_register_device()/input_unregister_device() inside
the ir register/unregister functions.

Also, solves a naming problem with V4L ir_input_init() function, that were,
in fact, registering a device.

While here, do a few cleanups at budget-ci IR logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
38ef6aa884e3fd389f7d444b8dd36c16832e36b4 11-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13616): IR: rename ir_input_free as ir_input_unregister

Now, ir_input_free does more than just freeing the keytab. Better to
rename it as ir_input_unregister.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
b779974bdfcaec2a0eb13e44405baca07e0e92a3 06-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13575): em28xx: Use the complete address/command RC5 code for WinTV USB2

This device uses an i2c chip to retrieve the keycode from a RC5 remote.
Instead of just getting 6 bits, improve the routine to get 11 bits.

This means that the complete RC5 table for Hauppauge Grey IR can be used
with this device.

Unfortunately, it seems that this IR receiver is not capable of getting
the full 14 (or 13 bits) from the RC5 protocol.

At lest now, with the new code, it is possible to replace this IR table
by another RC5 table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
46b21094cee16bc7e531d7d6cd66fb5ea05065d4 10-Dec-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments

Now that the video_device registration is tested using
video_is_registered(), drivers don't need to initialize the
video_device::minor field to -1 anymore.

Remove those unneeded assignments.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
50462eb065e12f45851a9959a90d46b758944552 10-Dec-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13555): v4l: Use video_device_node_name() instead of the minor number

Instead of using the minor number in kernel log messages, use the device
node name as returned by the video_device_node_name() function. This
makes debug, informational and error messages easier to understand for
end users.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
63b0d5ad20365edf8baf96cdbb8e7faf62501286 10-Dec-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers

Fix all device drivers to use the video_drvdata function instead of
maintaining a local list of minor to private data mappings. Call
video_set_drvdata to register the driver private pointer when not
already done.

Where applicable, the local list of mappings is completely removed when
it becomes unused.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
f0813b4c9f7ffbeaddcba1c08a1812f7ff30e1b7 27-Nov-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13553): v4l: Use the video_is_registered function in device drivers

Fix all device drivers to use the video_is_registered function instead
of checking video_device::minor.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
38c7c036036c6260606a2a833aaad3794ca22499 27-Nov-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> V4L/DVB (13550): v4l: Use the new video_device_node_name function

Fix all device drivers to use the new video_device_node_name function.

This also strips kernel log messages from the "/dev/" prefix, has the device
node location is a userspace policy decision unknown to the kernel.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-video.c
1bad429e81f9a9ffa01c4158e6d1b1a3e06d9886 05-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13545): em28xx: properly select IR protocol based on the IR table

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-input.c
m28xx.h
055cd55601f948675006ca90362fc2bfaae90a86 29-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation

Currently, the IR table is initialized by calling ir_input_init(). However,
this function doesn't return any error code, nor has a function to be called
when de-initializing the IR's.

Change the return argment to integer and make sure that each driver will
handle the error code. Also adds a function to free any resources that may
be allocating there: ir_input_free().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
0278155c84af42d78785731263b69fb49f945ea7 28-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13536): em28xx: Use the full RC5 code on HVR-950 Remote Controller

Modifies the IR table for HVR-950 to use the newer Hauppauge RC5 table,
and adds the RC5 address to the functions that get the scancode for this
device.

It is easy to add support for all other RC5 IR's on em2880 boards, but
the scancode table needs to be re-generated. So, keep using the old
7bits tables while we don't have all tables converted.

Also, the 7bits tables are still used on other drivers, so this small
patch needs to be ported to all drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
8573b74af25c279de3e309beddcba984bee9ec15 28-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13533): ir: use dynamic tables, instead of static ones

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
694a101e6acb865f5405a95c358eea43c813cf24 27-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13528): em28xx: add support for em2800 VC211A card

Adds support to VC211A em2800 card. As this board doesn't have eeprom,
and uses a common set of i2c address, it has no way to add any
autodetection for it.

The patch were tested by me and by Raimundo on his board. Thanks to
those tests, several bugs related to em2800 support were corrected.

for producing the usbsnoop dump, used to get the gpio's and allowing me
to remotelly access his machine and to the needed tests.

Thanks-to: Raimundo Eduvirgnes de Oliveira <eduvirgens@yahoo.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
fb3de0398ab1bf270bc55f66945f82e61e50f6b6 27-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> em28xx: don't reduce scale to half size for em2800

Since em2800 can't support 720x480 / 720x576, the driver used to reduce
the scale to half the size on those chips. As the proper fix were
applied, reducing the maximum horizontal resolution to 640, this hack
can be removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
0731160aca15df5882387e07d61671e6746c658f 27-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> em28xx: don't load audio modules when AC97 is mis-detected

With em2800 hardware, AC97 hardware can be detected even when it doesn't
exist. If, after probing for AC97, the driver won't find a companion
chip, simply prevents the load of the audio modules.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
1ca31892e3af05ad3a72769e3c922cca3cde4f9d 27-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> em28xx: em2800 chips support max width of 640

Due to hardware limitation, em2800 chips can't work at resolutions
higher than 640x576, since the URB packet size is not enough.

The effect is that the image looses packages and shows a distortion
along the vertical axes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx.h
f57b17c3956f2e1e70f63dd2ed8088b582f3915e 12-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13328): em28xx: Add chip ID for em2800

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
fc099f0e0e52a349a3fe92bfb8d3fb6ec5378174 07-Nov-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13327): em28xx: fix alt modprobe parameter

It seems that some patch broke alt modprobe parameter. Fix it to allow
changing alternate interfaces during module load and at runtime.

If changed during runtime, you'll need to stop a and restart stream for
the parameter to be used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
480be1851aebcb0b9c5b0fb9acefe5da97cc702a 04-Nov-2009 Filipe Rosset <rosset.filipe@gmail.com> V4L/DVB (13290): em28xx-dvb: Convert printks to em28xx_err and em28xx_info

Convert printks to em28xx_err and em28xx_info

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
0bc23083cfa0e4bee3a89254c0af7dc6a16513bb 04-Nov-2009 Filipe Rosset <rosset.filipe@gmail.com> V4L/DVB (13289): em28xx-audio: Convert printks to em28xx_err

Convert printks to em28xx_err.

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.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>
m28xx-cards.c
m28xx-video.c
43e16ea241cab1f4d4206307b2f6eacbaf4dc335 02-Oct-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (13233): i2c_board_info can be local

Recent fixes to the em28xx and saa7134 drivers have been overzealous.
While the ir-kbd-i2c platform data indeed needs to be persistent, the
struct i2c_board_info doesn't, as it is only used by i2c_new_device().

So revert a part of the original fixes, to save some memory.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
2e3c4723d5c2d6b4fa705c3dcd062b5004ab9b2f 01-Oct-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (13082): em28xx: remove "not validated" status from Terratec Cinergy T XS (005e)

The board support has been validated by the user, so get rid of the warning
that shows up on board load.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
ec994d0505fc3dde5f46203602c76b527e2ac69d 01-Oct-2009 Uroš Vampl <mobile.leecher@gmail.com> V4L/DVB (13078): em28xx: fix support for Terratec Cinergy T XS (005e)

Make analog audio, dvb and the remote work on a Terratec Cinergy Hybrid
XS (em2882).

Note by djh: Thanks go out fo Andrej Suligoi for his contribution in providing
and testing pretty much the exact same patch as provided by Uros. Between
the two of them, they got all the core functionality working for the device.

Cc: Andrej Suligoi <suligoi@gmail.com>
Signed-off-by: Uroš Vampl <mobile.leecher@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
f91cb65b94114f30cf43738ff923f272e4f2ae13 01-Oct-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (13077): em28xx: Add support for new variant of KWorld 2800d

Seems that the reference design used for the KWorld 2800d switched from the
em2860 to em2862, so we need to add the new USB id (and the i2c hash remains
so all we need is the default em2862 id.

Thanks to Ian Young for reporting the issue and testing the fix.

Cc: Ian Young <ian@duffrecords.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
28f4ddd1e8e341907d8f4f4b9ebf9f441f30420a 04-Oct-2009 Antti Palosaari <crope@iki.fi> V4L/DVB (13366): em28xx: fix Reddo DVB-C USB TV Box GPIO

Set device GPIOs only once. There is no need for .dvb_gpio to select
between analog and digital because device is digital only.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
96fbf771d86a90ff006bc62ca4d4de6474b3de31 15-Oct-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming

Because the counters were not reset when starting up streaming, they would
be reused from the previous run. This can result in cases such that when the
second instance of streaming starts up, the "cnt" variable in
em28xx_audio_isocirq() can end up being negative, resulting in attempting to
write to memory before the start of runtime->dma_area (as well as having a
negative number of bytes to copy).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
53dacb15705901e14b03dcba27e40364fedd9d09 10-Aug-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (12540): v4l: simplify v4l2_i2c_new_subdev and friends

Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.

This simplifies this API substantially.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
285eb1a40242adb3feaf9c73d352cbfeee1bea1c 15-Sep-2009 Antti Palosaari <crope@iki.fi> V4L/DVB (12951): em28xx: add Reddo DVB-C USB TV Box

Support for Reddo DVB-C USB TV Box device. Remote is not working yet.
Thanks to Benjamin Larsson <banan@ludd.ltu.se>

Cc: Benjamin Larsson <banan@ludd.ltu.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx-cards.c
m28xx-dvb.c
m28xx.h
0e12e1536c1b8aaef9baeed09a8f81da393fcba6 15-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12882): em28xx: remove text editor tags from em28xx-vbi.c

Remove some emacs tags from em28xx-vbi.c, which were copied from cx88-vbi.c,
per Mauro Carvalho Chehab's request.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-vbi.c
e3ba4d34d031985366f7ea06395fa9772ff77ce6 15-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12881): em28xx: fix codingstyle issues in em28xx-video.c

Fix some codingstyle issues introduced during the addition of em28xx VBI
support. The patch makes no functional changes other than converting a few
debug printk() statements to em28xx_isocdbg.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
cb0409ffb7fa83a9ab561fe7e551ba8f817ca148 15-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12880): em28xx: fix codingstyle issues introduced with VBI support

Fix a few codingstyle issues introduced when I was adding the VBI support to
the em28xx driver.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-vbi.c
891114a413f2ff8722ef4397bb6a902aab006414 11-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12750): em28xx: fix unused variable warning

Remove unused variable from when I introduced the g_std() function.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
10e01255026fb6a68b5aaa29427488ba2b35fc64 11-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12749): em28xx: remove unneeded code that set VINCTRL register

Remove redundant call to set the vinctrl register. This eliminates any
ambiguity as to how the register is configured (since it is now always set in
em28xx_set_outfmt).

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
19bf00384a6d5bbe5d7b8afbcc25772e3675d423 11-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12748): em28xx: implement g_std v4l call

We need to implement the g_std call, or else the default norm always gets
returned, which breaks VBI capturing if you had changed the standard to NTSC
using s_std.

I had temporarily changed the default norm to NTSC so that zvbi-ntsc-cc
wouldn't choke, so now that we are returning the correct value, switch it back
to PAL as the default.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
0414614aab32d84da2bb092eb83b5e456946022d 11-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12747): em28xx: only advertise VBI capability if supported

Change the code so we only claim to support VBI if the underlying chipset
actually has the support.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
290c0cfac9050fa2442e93f35f47e4faa4227e85 11-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12746): em28xx: do not create /dev/vbiX device if VBI not supported

Do not create the VBI device in cases where VBI is not supported on the target
em28xx chip.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
365adee851ae8312e6d9e0ba6fdc6a98599e2778 03-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12745): em28xx: remove unreferenced variable

Remove an unreferenced variable introduced during the VBI introduction.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-vbi.c
8c873d31af868b4e340defc7053945636c8bd0e1 03-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12744): em28xx: restructure fh/dev locking to handle both video and vbi

The current locking infrastructure didn't support having multiple fds accessing
the device (such as video and vbi). Rework the locking infrastructure,
borrowing the design from cx88.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
m28xx.h
91f6dcec929b37a4568ddf55ef84e007d8fccc34 03-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12743): em28xx: fix mmap_mapper with vbi

When adding support for both video and VBI, I missed the mmap ioctl. Add
the missing call.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
28abf083d356bc4ec459ded7a95b6a22a20f6c3d 01-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12742): em28xx: add raw VBI support for NTSC

Add support for raw VBI capture for the em28xx bridge, currently only for
NTSC. Support for PAL capture to follow shortly (including the removal of
numerous hard-coded NTSC-specific sizes for capture buffers, etc).

Note that the code currently changes the default current norm from PAL to
NTSC (so that zvbi-ntsc-cc works properly). The default norm really should
be moved into a board-level parameter.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
akefile
m28xx-cards.c
m28xx-core.c
m28xx-vbi.c
m28xx-video.c
m28xx.h
da52a55cff643b8e0b346b9894adf5b93946040d 01-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12741): em28xx: make video isoc stream work when VBI is enabled

Add code enabling the VBI registers for variants of the em28xx chip that
support VBI, and make sure the isoc streaming code continues to work for
the video component of the stream (note the video and vbi data arrive
intermixed on the same isoc pipe).

Note that this version just drops the actual VBI data onto the floor as
opposed to processing it. The "#ifdef 0" tags are for the videobuf code that
appears in the next patch in this series.

We created a separate version of the isoc_copy version for parsing the version
of the stream that includes VBI data. In theory, they might be able to be
merged at some point in the future, but the initial goal is to ensure that we
do not cause any regressions with devices that do not have VBI support.

This work was sponsored by EyeMagnet Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-reg.h
m28xx-video.c
m28xx.h
206313db83641022c5ee213ac5f619973a9b427b 01-Sep-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12740): em28xx: better describe vinctrl registers

Properly document the video input control register, in preparation for the
addition of VBI support. Note this patch makes no functional changes.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
ea47689e74a1637fac4f5fc44890f3662c976849 06-Sep-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (12720): em28xx-cards: Add vendor/product id for Kworld DVD Maker 2

Added Kworld DVD Maker 2
Thanks to C Western <l@c-m-w.me.uk> for reporting this board.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
7e8e16ca39801279697c6cb6195710ba7653bfc2 08-Sep-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12713): em28xx: Cleanups at ir_i2c handler

There are some extra parenthesis at the clauses, and some switch() tests
for boards that don't have i2c ir. Remove those extra code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
ac07bb73fe226ae2088f060c63829afddb3f2403 08-Sep-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12712): em28xx: properly load ir-kbd-i2c when needed

Currently, the logic to load ir i2c ancillary module is broken. It is
associated to Hauppauge devices with IR flag on their eeprom, no matter
if the device uses i2c or em28xx direct IR support. That's wrong.

Instead, add a flag to the boards that use i2c IR chips and load the
module only for those devices and if ir is not disabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
d2ebd0f806fdb6104903365e355675934eec22b2 07-Sep-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs a persistent object

ir-kbd-i2c's ir_probe() function can be called much later (i.e. at
ir-kbd-i2c module load), than the lifetime of a struct IR_i2c_init_data
allocated off of the stack in cx18_i2c_new_ir() at registration time.
Make sure we pass a pointer to a persistent IR_i2c_init_data object at
i2c registration time.

Thanks to Brian Rogers, Dustin Mitchell, Andy Walls and Jean Delvare to
rise this question.

Before this patch, if ir-kbd-i2c were probed after em28xx, trash data
were used. After the patch, no matter what order, it is properly
reported as tested by me:

input: i2c IR (i2c IR (EM2840 Hauppaug as /class/input/input10
ir-kbd-i2c: i2c IR (i2c IR (EM2840 Hauppaug detected at i2c-4/4-0030/ir0 [em28xx #0]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
715a223323c8c8bcbe7739e20f6c619f7343b595 29-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12595): common/ir: use a struct for keycode tables

Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:

1) It requires that the scancode to be at the range 00-7f;

2) keycodes should be masked on 7 bits in order for it to work;

3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;

4) it is different than what is done with dvb-usb approach;

5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.

This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
u16 scancode;
u32 keycode;
};

This is very close to what dvb does. So, a further integration with DVB
code will be easy.

While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.

The only notable effect is the redution of about 35% of the ir-common
module size:

text data bss dec hex filename
6721 29208 4 35933 8c5d old/ir-common.ko
5756 18040 4 23800 5cf8 new/ir-common.ko

In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.

This patch itself shouldn't be doing any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
6d888a66be1c50c2f5193c53d6ea556e01dd60e3 30-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12591): em28xx: Add entry for GADMEI UTV330+ and related IR keymap

[mchehab@redhat.com: Fix a few wrong IR keymaps]
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
8cd9aaefad5968f8f5aff3852a67870550ce941d 04-Aug-2009 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (12444): em28xx: add support for Terratec Cinergy Hybrid T USB XS remote control

Add support for the remote control that comes with the Cinergy Hybrid T USB XS

Thanks to Jelle de Jong for providing sample hardware to test with.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
a35c87c7084f3f4972f3ce5f23cfcb34f95341b1 06-Aug-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (12434): em28xx: fix empire auto-detect

Fixed eeprom hash table

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
4efa2d75d4a3b86c2d47c422237c848d1f04ba58 10-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12408): em28xx: Implement g/s_register via address match

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
6c428b578b15a1dbf40832d3aeed43761940b81f 05-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12376): em28xx: fix V4L2 API compliance: don't expose audio inputs for devices without it

V4L2 API (chapter 1.5) states that:

Drivers must implement all input ioctls when the device has one
or more inputs, all output ioctls when the device has one or more outputs.
When the device has any audio inputs or outputs the driver must set the
V4L2_CAP_AUDIO flag in the struct v4l2_capability returned by the
VIDIOC_QUERYCAP ioctl.

So, devices without audio input should return -EINVAL.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
73c6f462d1d07f276e279467f311a96a2a43d9c5 29-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12345): em28xx: fix audio VIDIOC_S_CTRL adjustments on devices without ac97

Even devices without ac97 needs to call analog audio setup function, to
properly set xclk and mute/unmute.

Thanks to Angelo Cano <acano@fastmail.fm> for reporting and testing it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
e81516c58ef84663ee05a43760a53a416d529de7 19-Jun-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (12343): Stop defining I2C adapter IDs nobody uses

There is no point in defining I2C adapter IDs when no code is using
them. As this field might go away in the future, stop using it when
we don't need to.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-i2c.c
a98f6af96ec5b22453054b36eaa325ebf20ea429 19-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12274): em28xx-video: better implement ac97 control ioctls

In the past, some devices with saa711x had their parameters controlled
directly inside em28xx driver, instead of using their proper module for
it.

Due to that, the ac97 controls were mixed with saa711x ones.

Older patches removed all saa711x controls, but we still need to control
ac97 devices on em28xx, since we don't have a separate v4l2 device for
it.

The proper way to address is to create a separate ac97 v4l2 device.
While we don't have it, we should clean up the code to allow having a
better view of what is part of em28xx core code and what's due to ac97
control inside it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
ed10daaeb3512165505eda8bb311edabea5cb485 19-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12273): em28xx-video: rename ac97 audio controls to better document it

As em28xx chip has nothing to do with volume/mute controls, rename those
controls to properly indicate that they control the companion AC97 chip
that it is inside the boards with this chip.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
7c8b56795fdf59761ee3475b6add2fd4b635d2b6 05-Jul-2009 Zhenyu Wang <zhen78@gmail.com> V4L/DVB (12190): em28xx: Add support for Gadmei UTV330+

em28xx: Add support for Gadmei UTV330+

Signed-off-by: Zhenyu Wang <zhen78@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f4c5e80faba8ae420d7dc5d9237cc1e0262d7386 21-Aug-2009 Shine Liu <shinel@foxmail.com> V4L/DVB (12495): em28xx: Don't call em28xx_ir_init when disable_ir is true

We should call em28xx_ir_init(dev) only when disable_ir is true.

Signed-off-by: Shine Liu <shinel@foxmail.com>
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f2e26ae7c8c077d001c77b330130f98e42ccad70 13-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12449): adds webcam for Micron device MT9M111 0x143A to em28xx

[mchehab@redhat.com: fix merge conflict and a few CodingStyle issues]
Signed-off-by: Steve Gotthardt <gotthardt@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
01a5fd6ff3fbae9a599d3334a8cca0f00865e360 07-Aug-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12432): em28xx: fix regression in Empire DualTV digital tuning

Restore support for digital tuning caused by regression during introduction
of disable_i2c_gate parameter to zl10353 driver.

Thanks to user "Xwang" for reporting the problem and testing the fix

Cc: Xwang <xwang1976@email.it>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
d7612c86d099939503c2f849a523dbca753d1935 07-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12405): em28xx-cards: move register 0x13 setting to the proper place

Register 0x13 seems to be a sort of image control, maybe gamma, white
level or black level. Lower values produce better images, while higher
values increases the contrast and shifts colors to green. 0xff produces
a black image. This register is not Silvercrest-specific, so its code
should be moved to a better place.

If this register is left alone, a random value can be found at the
register, producing weird results.

While here, let's remove register 0x0d, as it had no noticed effect at
the image.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
3d3215c4e4cfca74e5805a8506d50a6752172e81 10-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12411): em28xx: Fix artifacts with Silvercrest webcam

Silvercrest mt9v011 sensor produces a 640x480 image. However,
previously, the code were getting only half of the lines and merging two
consecutive frames to "produce" a 640x480 image.

With the addition of progressive mode, now em28xx is working with a full
image. However, when the number of lines is bigger than 240, the
beginning of some odd lines are filled with blank.

After lots of testing, and physically checking the device for a Xtal, it
was noticed experimentally that mt9v011 is using em28xx XCLK as its
clock. Due to that, changing XCLK value changes the maximum speed of the
stream.

At the tests, it were possible to produce up to 32 fps, using a 30 MHz
XCLK. However, at that rate, the artifacts happen even at 320x240. Lower
values of XCLK produces artifacts only at 640x480.

At some values of xclk (for example XCLKK = 6 MHz, 640x480), it is
possible to see an invalid sucession of artifacts with this pattern:

.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
..xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
....xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

(where the dots represent the blanked pixels)

So, it seems that a waveform in the format of a ramp is interferring at
the image.

The cause of this interference is currently unknown. Some possibilities
are:
- electrical interference (maybe this device is broken?);
- some issue at mt9v011 programming;
- some bug at em28xx chip.

So, for now, let's be conservative and use a value of XCLK that we know
for sure that it won't cause artifacts.

As I'm waiting for more of such devices with different em28xx chipset
revisions, I'll have the opportunity to double check the issue with
other pieces of hardware.

Later patches can vary XCLK depending on the vertical resolutions, if a
proper fix is not discovered.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
fcd20e3c369caf7a3fec300c9c183b25a06e21b2 10-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12410): em28xx: Move the non-board dependent part to be outside em28xx_pre_card_setup()

em28xx_pre_card_setup() is meant to contain board-specific initialization. Also,
as autodetection sometimes occur only after having i2c bus enabled, this
function may need to be called later.

Moving those setups to happen outside the function avoids calling it twice without
need and without duplicating output lines at dmesg.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
970cff36c0850e8193ac1162e42c7c11001b872d 08-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12407): em28xx: Adjust Silvercrest xtal frequency

We don't know the xtal frequency of Silvercrest, but we need to have
some value in order to allow controlling the frame rate frequency. The
value is probably still wrong, since the manufacturer announces this
device as being capable of 30fps, but the maximum we can get is
13.5 fps.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
c2a6b54a9cf08d4ffeb75d70603c4a5d03ac97ad 08-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12406): em28xx: fix: don't do image interlacing on webcams

Due to historical reasons, em28xx driver gets two consecutive frames and
fold them into an unique framing, doing interlacing. While this works
fine for TV images, this produces two bad effects with webcams:

1) webcam images are progressive. Merging two consecutive images produce
interlacing artifacts on the image;

2) since the driver needs to get two frames, it reduces the maximum
frame rate by two.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
d594317bdc716ccd8c8cf711e3827f9b6e0b766b 07-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12403): em28xx: properly reports some em2710 chips

As reported by hermann pitton <hermann-pitton@arcor.de>, some devices
has a different chip id for em2710 (likely the older ones):

em28xx: New device @ 480 Mbps (eb1a:2710, interface 0, class 0)
em28xx #0: Identified as EM2710/EM2750/EM2751 webcam grabber (card=22)
em28xx #0: em28xx chip ID = 17

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
9b4e845c6cbca2bcbfdb87e4d005260604226f45 07-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12402): em28xx: fix: some em2710 chips use a different vendor ID

Thanks to hermann pitton <hermann-pitton@arcor.de> for pointing this new
variation.

Tested-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
d96ecda63f41350dc93c17ccb72ea24511f207a9 07-Aug-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12400): em28xx: Allow changing fps on webcams

em28xx doesn't have temporal scaling. However, on webcams, sensors are
capable of changing the output rate. So, VIDIOC_[G|S]_PARM ioctls should
be passed to the sensor for it to properly set frame rate.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
0a6e44d1beb30813f62ad376a31694e637858328 29-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12344): em28xx: fix support for Plextor ConvertX PX-TV100U

This device uses msp34xx and uses 2.048 MHz frequency for I2S
communication.

Thanks to Angelo Cano <acano@fastmail.fm> for pointing the issues with
this device and proposing an approach for fixing the issue.

Tested-by: Angelo Cano <acano@fastmail.fm>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
296544e15a7126373851abd40acc526b79b91432 27-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12340): mtv9v011: Add a missing chip version to the driver

Some mt9v011 webcams report 0x8332 chip version, instead of 0x8243. From
the revision history at the mt9v011 datasheet, it seems that the chip
version has changed from the first release of the chip.

Thanks-to hermann pitton <hermann-pitton@arcor.de> for pointing this to
me, on his tests with a Silvercrest webcam.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
a84f79aed688a94197387830df3a2f2068f49dc0 12-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12265): em28xx: fix tuning problem in HVR-900 (R1)

When the change was introduced in the zl10353 for the i2c gate behavior, this
broke the HVR-900 which was not behind a gate. Use a version of the zl10353
config profile that indicates the tuner is not behind such a gate.

Without this patch the first tune succeeds, but subsequent tuning attempts
will fail.

The change also renames the terratec zl10353 profile I wrote to be more
generic, since it is shared by the non-terratec device.

Thanks to Michael Krufky for providing a HVR-900 and DVB-T environment to test
with.

Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
e16e5a3739cfd208de00d49def10fcfa6ceff46f 15-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12263): em28xx: set demod profile for Pinnacle Hybrid Pro 320e

The Pinnacle Hybrid Pro 320e was missing a demod config for the xc3028, which
is required for digital tuning to work properly. Add the missing profile.

Thanks to Andreas Lunderhage for testing patches and providing a remote debug
environment.

Cc: Andreas Lunderhage <lunderhage@home.se>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
5343e446014b93f740d5502f9f3bfa3f66dcbc7c 15-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12262): em28xx: Make sure the tuner is initialized if generic empia USB id was used

In cases where the device has a generic Empia USB ID, the call in the
precard setup phase did not set the tuner GPIO. As a result, the tuner may
not be taken out of reset before attempting initialization in the analog
driver.

This problem was not seen before with the EVGA inDtube, since that particular
board has the analog GPIO setup to include taking the tuner out of reset.

Thanks to Andreas Lunderhage for testing patches and providing a remote debug
environment for the Pinnacle 320e.

Cc: Andreas Lunderhage <lunderhage@home.se>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
44010440ca2693a07b1252ee836a23804412575e 09-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12261): em28xx: set GPIO properly for Pinnacle Hybrid Pro analog support

Set the GPIO properly for the analog side of the Pinnacle Hybrid Pro, or else
the emp202 doesn't get detected properly.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
d5b3ba9cb375620a109d79f2e3a7bc21e9b75d8f 09-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12260): em28xx: make support work for the Pinnacle Hybrid Pro (eb1a:2881)

Setup the GPIOs properly and enable support for the DVB side of the Pinnacle
Hybrid Pro USB stick.

Thanks to Andreas Lunderhage for testing patches and providing a remote debug
environment.

Cc: Andreas Lunderhage <lunderhage@home.se>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
ff69786b4ccd0d5b99a60ba0be98237f9b7d8f52 12-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12258): em28xx: fix typo in mt352 init sequence for Terratec Cinergy T XS USB

Andy walls pointed out that we were passing 0x5d to the TUNER_GO register,
instead of 0x01. Set the register properly (note the code did still work with
the incorrect value, so this does not address a regression).

Thanks to Andy Walls for noticing the issue.

Cc: Andy Walls <awalls@radix.net>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
4fb202a8d9d936f7080ab631140b447a0625e36c 12-Jul-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12257): em28xx: make tuning work for Terratec Cinergy T XS USB (mt352 variant)

The Terratec Cinergy T XS USB can have either a zl10353 or an mt352. Add
support for the MT352 variant.

Thanks to Jelle de Jong for providing a unit to test/debug with.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
b80fd2d811b48a92051f86d257b00f373e69a6d7 15-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12245): em28xx: add support for mt9m001 webcams

Thanks to Wally <wally@voosen.eu> for bringing the issue and helping
with the tests.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
579d315218e8a3f696e375c5f6917da6488bec8a 14-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12244): em28xx: adjust vinmode/vinctl based on the stream input format

Depending on the video input format, vinmode/vinctl needs adjustments.
For TV, this is not relevant, since the supported decoders output data
at the same format. However, webcam sensors may have different formats,
so, this needs to be adjusted based on the device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx.h
d36bb4e77257ed0df86deca3f69794f037f68c7d 14-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12243): em28xx: allow specifying sensor xtal frequency

In order to properly estimate fps, mt9v011 sensor driver needs to know
what is the used frequency on the sensor cristal. Adds the proper fields
and initialization code for specifying the cristal frequency.

Also, based on experimentation, it was noticed that the Silvercrest is
outputing data at 7 fps. This means that it should be using a 6.3 MHz
cristal. This information needs to be double checked later, by opening
the device. Anyway, by using this value for xtal, at least now we have
the correct fps report.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
5569996421fa1cfc1fc0d9e683ac1def46ea985d 14-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12239): em28xx: fix webcam scaling

While trying to fix an mt9v001 webcam, I noticed that HSCALE/VSCALE do
work with em28xx + webcam. The issue is that the scaling setup depends
on the number of visible rows/cols of the input image.

With mt9v011 (Silvercrest), the resolution is 640x480. So, the scaling
is different from a normal TV image (720x480 on NTSC). This were causing
a wrong scaling and a previous patch disabled scaling.

As each sensor have their different resolution setting, the xres/yres
should be adjusted accordingly with the input sensor.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
b04fb6615285d18df34ffd6cdd51db7a8a78dda0 13-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12238): em28xx: call sensor detection code for all webcam entries

With the previous approach, autodetection were working only for the two
generic entries (em275x and em2820 unknown ones). So, if someone would
try to force probing an specific device, the code would not properly run
the autodetection code.

With the new approach, the sensor autodetection will be run not only for
the two generic entries, but also do webcam specific ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
527f09a981e398331c2f8d8f7af83cd46e6a06cc 12-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12236): em28xx: stop abusing of board->decoder for sensor information

Instead of using em28xx board decoder field for storing sensor information,
let's use instead a separate field for it.

Also, as sensors are currently autodetected, there's no need of having
it at the boards description. So, move it to the main em28xx struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
8b220793d6fd309176438721088515be893630cd 12-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12235): em28xx: detects sensors also with the generic em2750/2750 entry

Webcams in general don't have eeprom. So, the sensor hint code should be
called to properly detect what sensor is inside.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
8a2e6990f44d4cebaafcc0af1a786912ae733bb2 12-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12234): em28xx-cards: use is_webcam flag for devices that are known to be webcams

By having the webcam devices marked as such, it will help the em28xx
driver to do the right thing on those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
c43221df762c33e832e8855cae77989b6bf69fa6 12-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12233): em28xx: rename is_27xx to is_webcam

Just renames the flag, to use a clearer name. Later patches will use
this flag to properly set some drivers behaviors for webcams.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
11b79ea75ada39b7f1efdebdad520c93c3ac1f0e 05-Jul-2009 Jiri Slaby <jirislaby@gmail.com> V4L/DVB (12202): em28xx, fix lock imbalance

There is one omitted unlock in em28xx_usb_probe. Fix that.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
791a08fc01aaa293a73c9dce260327fdee288faf 03-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12172): em28xx: Add autodetection code for Silvercrest 1.3 mpix

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-i2c.c
58fc1ce37aba8e6371e1ec8a90d650b1965ee6c8 03-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12171): em28xx: fix webcam usage with different output formats

Discovered the bug that were limiting the output format to just RGB565.
Now, it is possible to output image at Bayer format (the original one,
as generated by Silvercrest sensor, and two others), and also on YUY.

Adds Bayer formats also to the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
ed5f1431ebeeba8cc6739e9cd905a7895b66184c 02-Jul-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12169): em28xx-video: fix VIDIOC_G_FMT and VIDIOC_ENUMFMT with webcams

Webcams have different constraints than other v4l devices. This patch
makes the format ioctls to behave better. It also fixes a bug at open()
handler, that were always reseting resolution to the maximum available
one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
f797608cc4f19b44b83ec39c87e14af6fa07826d 23-Jun-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12156): em28xx: Fix tuning for Terratec Cinergy T XS USB (zl10353 version)

Fix the code so that the zl10353 version of the Terratec Cinergy T XS USB
starts working again. This includes fixing what must have been a typo in the
GPIO definition for the digital side of the board, and setting of the
disable_i2c_gate_ctrl property for the zl10353 config, so that the i2c bus
doesn't get wedged the first time something tries to close the gate.

Also, add a printk() making clear that the mt352 version still isn't
supported. This issue is still being actively debugged, but in the meantime
at least the dmesg output will show a very clear error...

Thanks to Jelle de Jong for providing sample hardware to test with.

Thanks to Simon Kenyon for testing various patches and providing SSH access to
his environment so I could debug with access to a valid signal source.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Cc: Simon Kenyon <simon@koala.ie>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
43cb9fe3291bb96390c1d188eb61c2d1581bb61e 30-Jun-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12139): em28xx: add other video formats

Add suppport for the teste RGB565 format (16 bits/pixel).
Currently, webcam support works only at RGB565, at 640x480.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
02e7804b2135ff941b8846f5820cf48fbfdadd54 29-Jun-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (12138): em28xx: add support for Silvercrest Webcam

This webcam uses a em2710 chipset, that identifies itself as em2820,
plus a mt9v011 sensor, and a DY-301P lens.

It needs a few different initializations than a normal em28xx device.

Thanks to Hans de Goede <hdegoede@redhat.com> and Douglas Landgraf
<dougsland@redhat.com> for providing the acces for the webcam during
this weekend, I could make a patch for it while returning back from
FISL/Fudcom LATAM 2009.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
config
m28xx-cards.c
m28xx-core.c
m28xx.h
ccb83408b258f7e9f9fe763f9a7d06ebcc21134f 31-May-2009 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (11912): em28xx: Use v4l bounding/alignment function

The v4l function has a better algorithm for aligning image size.

It appears that the em2800 can only scale by 50% or 100%, i.e. the only
heights supported might be 240 and 480. In that case the old code would
set any height other than 240 to 480. Request 240 get 240, but request 239
and then you get 480. Change it to round to the nearest supported value.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
a4c473033b6a100773a4fd8b7ba1e45baeb1e692 21-Jun-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12102): em28xx: add Remote control support for EVGA inDtube

Add an IR profile for the EVGA inDtube remote control (which is an NEC type
remote)

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
19859229d7d98bc2d582ff45045dd7f73d649383 19-Jun-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12101): em28xx: add support for EVGA inDtube

Add support for the EVGA inDtube. Both ATSC and analog side validated as
fully functional.

Thanks to Jake Crimmins from EVGA for providing the correct GPIO info.
Thanks to Alan Hagge for doing all the device testing.
Thanks to Greg Williamson for providing hardware for testing.

Cc: Jake Crimmins <jcrimmins@evga.com>
Cc: Alan Hagge <ahagge@gmail.com>
Cc: Greg Williamson <cheeseboy16@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
cdf7bfa8926fb26d5900103ae09eb5f3eddb95cc 19-Jun-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (12100): em28xx: make sure the analog GPIOs are set if we used a card hint

In cases where the board had a default USB ID, we would not indentify the
board until after the call to em28xx_set_mode(). As a result, for those
boards the analog GPIOs were not being set before probing the i2c bus for
devices (the probe would occur with the GPIOs being all high).

Make a call to em28xx_set_mode() so that the GPIOs are set properly before
probing the i2c bus for devices.

This problem was detected with the EVGA inDtube, where the tvp5150 is not
powered on unless GPIO1 is pulled low.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
1cdc6392b74246be333e2c88b61beedbf9991422 10-Jun-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11979): em28xx: don't create audio device if not supported

In cases where the device does not actually provide a USB audio class *or*
vendor audio, do not load the driver that provides vendor audio support (such
as the KWorld 2800d). Otherwise, the /dev/audio1 device file gets created and
users get confused.

Also, reworks the logic a bit so that we don't try to inspect the register
content if the register read failed entirely.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
d7de5d8ff74efd01916b01af875a0e87419a3599 06-Jun-2009 Franklin Meng <fmeng2002@yahoo.com> V4L/DVB (11977): em28xx: Add Kworld 315 entry

Added an entry for Kworld 315 (for while, dvb only)

Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
ae3340cbf59ea362c2016eea762456cc0969fd9e 06-Jun-2009 Franklin Meng <fmeng2002@yahoo.com> V4L/DVB (11976): em28xx: set up tda9887_conf in em28xx_card_setup()

Added tda9887_conf set up into em28xx_card_setup()

Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
e2a1b79f7dc54a6f1cc8821e0c7fd68ba7568d81 28-May-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11927): em28xx: provide module option to disable USB speed check

Add an em28xx module option that allows a user to override the USB speed check.
Intended for advanced users who understand the consequences of trying to use
the device with a 12Mbps bus.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
3ed58baf5db4eab553803916a990a3dbca4dc611 28-May-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11925): em28xx: Add support for the K-World 2800d

Make the KWorld 2800d work properly. In this case, that means making the
profile more generic so that it works for both the Pointnix Intra-Oral USB
camera and the KWorld device.

The device provides the audio through a pass-thru cable, so we don't need
an actual audio capture profile (neither the K-World device nor the Pointnix
have an onboard audio decoder).

Thanks to Paul Thomas for providing sample hardware.

Cc: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
64a00b43e63c916f1bf4f6b7f519db0e198ba9d4 28-May-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11923): em28xx: Don't let device work unless connected to a high speed USB port

The em28xx basically just doesn't work at 12 Mbps. The isoc pipe needs
nearly 200 Mbps for analog support, so users would see garbage video, and on
the DVB/ATSC side scanning is likely to work but if the user tried to tune it
would certainly appear to have failed.

It's better to fail explicity up front and tell the user to plug into a USB 2.0
port, than to let the driver load and the user have weird problems with tuning
and garbage video.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
75c74d1c78ec3b713a986e0efc645ed558384cdf 28-May-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (11896): em28xx: Fix for Slow Memory Leak

Test Code: (Provided by Douglas)

v4l-dvb/v4l2-apps/test/stress-buffer.c

The audio DMA area was never being freed and would slowly leak over
time as the v4l device was opened and closed by an application.

Thanks again to Douglas for generating the test code to help locate
memory leaks!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
4d7a2d6721a6380d4ffc26d81d2c8232fd0d2dfc 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11845): ir-kbd-i2c: Use initialization data

For specific boards, pass initialization data to ir-kbd-i2c instead
of modifying the settings after the device is initialized. This is
more efficient and easier to read.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-i2c.c
m28xx.h
c668f32dca105d876e51862a003a302fa61e4ae4 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model

Let card drivers probe for IR receiver devices and instantiate them if
found. Ultimately it would be better if we could stop probing
completely, but I suspect this won't be possible for all card types.

There's certainly room for cleanups. For example, some drivers are
sharing I2C adapter IDs, so they also had to share the list of I2C
addresses being probed for an IR receiver. Now that each driver
explicitly says which addresses should be probed, maybe some addresses
can be dropped from some drivers.

Also, the special cases in saa7134-i2c should probably be handled on a
per-board basis. This would be more efficient and less risky than always
probing extra addresses on all boards. I'll give it a try later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-i2c.c
m28xx-input.c
m28xx.h
1df8e9861cf9fac5737ccb61c7f7fefa77711d40 13-May-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs

In the standard device driver binding model, the name field of
struct i2c_client is used to match devices to their drivers, so we
must stop using it for internal purposes. Define a separate field
in struct IR_i2c as a replacement, and use it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
766ed64de554fda08ceb927d36279eabcb08acb3 24-May-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (11827): Add support for Terratec Grabster AV350

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
4557af9c5338605c85fe54f5ebba3d4b14a60ab8 23-May-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (11825): em28xx: add Terratec Grabby

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
d18e2fda7133287bf8a81809816e646cf17c332e 16-May-2009 Devin Heitmueller <dheitmueller@kernellabs.com> V4L/DVB (11810): em28xx: properly set packet size based on the device's eeprom configuration.

The em28xx actually has a register that tells the driver what the maximum
packet size is (based on a value programmed into the eeprom). Make use of
that register instead of assuming a hardcoded value of 564 (since 564 is not
correct for devices that do QAM such as the KWorld 340u).

Note that for now the em2874 code isn't there, falling back to the 564 value,
however this is not a problem since there are not any em2874 based devices in
the current v4l-dvb tree).

Thanks to Jarod Wilson for detecting the initial problem and figuring out that
the isoc configuration was wrong for his device.

Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-dvb.c
m28xx-reg.h
m28xx.h
42ef4632896b0c44f77fb5783b320cbedd38e3e3 09-Apr-2009 Filipe Rosset <rosset.filipe@gmail.com> V4L/DVB (11487): em28xx: fix typo em28xx_errdev message

Fix typo usbtransfer->usb transfer on em28xx_errdev message.

Signed-off-by: Filipe Rosset <rosset.filipe@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
e5db5d44432abc82b1250dd05bd0a4b011392d9d 09-Apr-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (11486): em28xx: Add EmpireTV board support

Added EmpireTV entry.
Thanks to Xwang <xwang1976@email.it> to provide data for this board.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
5325b4272a53b43f55b82cc369c310c2fcacdca1 02-Apr-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11380): v4l2-subdev: change s_routing prototype

It is no longer needed to use a struct pointer as argument, since v4l2_subdev
doesn't require that ioctl-like approach anymore. Instead just pass the input,
output and config (new!) arguments directly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
e6574f2fbecdb8af807169d345c10131ae060a88 01-Apr-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev

The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on
i2c_get_adapdata to return the v4l2_device. However, this is not always
possible on embedded platforms. So modify the API to pass the v4l2_device
pointer explicitly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.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>
m28xx-video.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>
m28xx-cards.c
m28xx-video.c
36fa674e6ca918fccc95ce8dbb16a8e68c0c1ef3 05-Apr-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (11360): em28xx: use usb_interface.dev for v4l2_device_register

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f2cf250af156bef127433efd255abfae6aab02f6 31-Mar-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (11331): em28xx: convert to v4l2_subdev

Converted em28xx driver to v4l2_subdev.
Thanks to Hans Verkuil <hverkuil@xs4all.nl> for helping this conversion.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
9a4f8201a5d241dd725c1e1c796d826e49dcd396 23-Mar-2009 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (11141): em28xx: fix oops on ARM platform when allocating transfer buffers

Add missing URB_NO_TRANSFER_DMA_MAP flag, since the use of consistent memory
is not permitted for DMA on the ARM platform.

Thanks to Paul Thomas <pthomas8589@gmail.com> for providing sample ARM
hardware that was experiencing the oops (tested on the at91rm9200 based
LinuxStamp).

Thanks to David Brownell <david-b@pacbell.net> for providing insight into the
ARM memory architecture.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
62cfc346a325f60256f5eda93ac3b6e7ba6cdc1b 23-Mar-2009 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (11139): em28xx: add remote control definition for HVR-900 (both versions)

The HVR-900 did not have a remote control defined, so it would not work. Add
the line for both versions of the product.

Thanks to Jens-Michael Hoffmann (#linuxtv user "jmho") for pointing out the
issue and testing the patch.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f263bac9f7181df80b732b7bc11a7a4e38ca962f 07-Mar-2009 Jean Delvare <khali@linux-fr.org> V4L/DVB (10938): em28xx: Prevent general protection fault on rmmod

The removal of the timer which polls the infrared input is racy.
Replacing the timer with a delayed work solves the problem.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
7b9eb81e36b3926d3ee77fbd4bde88d28ab70fa0 08-Mar-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10840): em28xx-dvb: Remove an unused header

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
2bd1d9eb1c27034a77c8e1887156da72d6160ae1 04-Mar-2009 Vitaly Wool <vital@embeddedalley.com> V4L/DVB (10833): em28xx: enable Compro VideoMate ForYou sound

Compro VideoMate uses an external audio DSP chip, controlled via tvaudio
module (tda9874a). This patch improves em28xx infrastructure to support
an external audio processor and fixes the Compro VideoMate entry to work
with it.

Signed-off-by: Vitaly Wool <vital@embeddedalley.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
ac40d9e09825c62b77e8b11b3ed201f390550351 25-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10741): em28xx: Add Kaiser Baas Video to DVD maker support

Added usb vendor/product id for Kaiser Baas Video to DVD maker.
Thanks to Trevor Campbell <tca42186@bigpond.net.au> for providing all data and tests needed to add this card to em28xx driver.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
1f372a930c85270b4435b508b3e029021b1c5b62 25-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10740): em28xx-cards: Add SIIG AVTuner-PVR board

Added SIIG AVTuner-PVR to the right entry.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
812c582390f2c6b81c0400d1286a7bce39d161d0 25-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10739): em28xx-cards: remove incorrect entry

Removed EM2821_BOARD_PROLINK_PLAYTV_USB2 entry.
This entry has a incorrect tuner set.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
df7fa09cca9d80f746c29f95b09a7223f6c2f4e7 25-Feb-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10654): em28xx: VideoMate For You USB TV box requires tvaudio

As reported by Vitaly Wool <vital@embeddedalley.com>:

> about half a year ago I posted the patch that basically enabled Compro
> VideoMate For You USB TV box support.
> The main problem is I couldn't get the sound working.
> So I kind of decomposed the box and found out the audio decoder chip
> used there was Philips TDA9874A. As far as I can see, it's not supported
> within the em28xx suite although it is for other TV tuner drivers.

A tvaudio modprobing confirms that tda9874a chip is accessible via i2c:

tvaudio: TV audio decoder + audio/video mux driver
tvaudio: known chips: tda9840, tda9873h, tda9874h/a, tda9850, tda9855, tea6300, tea6320, tea6420, tda8425, pic16c54 (PV951), ta8874z
tvaudio' 1-0058: chip found @ 0xb0
tvaudio' 1-0058: tvaudio': chip_read2: reg254=0x11
tvaudio' 1-0058: tvaudio': chip_read2: reg255=0x2
tvaudio' 1-0058: tda9874a_checkit(): DIC=0x11, SIC=0x2.
tvaudio' 1-0058: found tda9874a.
tvaudio' 1-0058: tda9874h/a found @ 0xb0 (em28xx #0)
tvaudio' 1-0058: tda9874h/a: chip_write: reg0=0x0
tvaudio' 1-0058: tda9874h/a: chip_write: reg1=0xc0
tvaudio' 1-0058: tda9874h/a: chip_write: reg2=0x2
tvaudio' 1-0058: tda9874h/a: chip_write: reg11=0x80
tvaudio' 1-0058: tda9874h/a: chip_write: reg12=0x0
tvaudio' 1-0058: tda9874h/a: chip_write: reg13=0x0
tvaudio' 1-0058: tda9874h/a: chip_write: reg14=0x1
tvaudio' 1-0058: tda9874h/a: chip_write: reg15=0x0
tvaudio' 1-0058: tda9874h/a: chip_write: reg16=0x14
tvaudio' 1-0058: tda9874h/a: chip_write: reg17=0x50
tvaudio' 1-0058: tda9874h/a: chip_write: reg18=0xf9
tvaudio' 1-0058: tda9874h/a: chip_write: reg19=0x80
tvaudio' 1-0058: tda9874h/a: chip_write: reg20=0x80
tvaudio' 1-0058: tda9874h/a: chip_write: reg24=0x80
tvaudio' 1-0058: tda9874h/a: chip_write: reg255=0x0
tvaudio' 1-0058: tda9874a_setup(): A2, B/G [0x00].
tvaudio' 1-0058: tda9874h/a: thread started]

This patch automatically loads tvaudio when needed (currently, only
with this board).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
1d6af821a91df15e3fc2720c223ec514ae83dc86 12-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10556): em28xx-cards: Add Pinnacle Dazzle Video Creator Plus DVC107 description

Added board Pinnacle Dazzle Video Creator Plus DVC107 to name description field.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
55bf0e7013c2204aba3897987284ced7d3b8ff8b 12-Feb-2009 Nicola Soranzo <nsoranzo@tiscali.it> V4L/DVB (10555): em28xx: CodingStyle fixes

Coding style fixes for recent changesets in em28xx.

Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
f74a61e3c6f218053742c2caf3e247fb41bf395e 11-Feb-2009 Indika Katugampala <indika_20012001@yahoo.co.jp> V4L/DVB (10528): em28xx: support added for IO-DATA GV/MVP SZ - EMPIA-2820 chipset

[dougsland@redhat.com: Fixed CodingStyle]
Signed-off-by: Indika Katugampala <indika_20012001@yahoo.co.jp>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
a1a6ee74f2c68918f2e145dccba3637eea91a52a 11-Feb-2009 Nicola Soranzo <nsoranzo@tiscali.it> V4L/DVB (10525): em28xx: Coding style fixes and a typo correction

Lots of coding style fixes and a typo correction for em28xx.

[dougsland@redhat.com: fixed a reject due to a change on em28xx-audio.c]
Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
7aa0eabde08259c47586df934921c67cff36e7dc 11-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10524): em28xx: Add DVC 101 model to Pinnacle Dazzle description

Added DVC 101 model to Pinnacle Dazzle description

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
22cff7b381eca256d2afb460b3b9815f83810011 08-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10523): em28xx-audio: Add macros EM28XX_START_AUDIO / EM28XX_STOP_AUDIO

Added macros EM28XX_START_AUDIO and EM28XX_STOP_AUDIO for em28xx_cmd().

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx.h
5c030de4757f64246897babcaa7091b4b391a660 08-Feb-2009 Alexey Klimov <klimov.linux@gmail.com> V4L/DVB (10522): em28xx-audio: replace printk with em28xx_errdev

Patch removes printk and place em28xx_errdev macros to provide
information about driver name to dmesg.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
bf510ac380c0e5aac813455fdf7364613cf75b72 08-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10521): em28xx-audio: Add lock for users

Added lock for users count

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
df39ca6437410b9428ebd3ce30fcde193782410d 08-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10520): em28xx-audio: Add spinlock for trigger

Added spinlock for trigger session

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
c744dff260e9efb1080d1e823e588f85176a057b 08-Feb-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10519): em28xx: Fix for em28xx audio startup

Essentially if a snd_em28xx_capture_trigger() stop followed by a snd_em28xx_capture_trigger() start would not yield any
data because there was some logic put in with an adev->shutdown variable which did not seem warranted in my humble opinion.
It would cause snd_em28xx_capture_trigger start never to start up the audio stream until the device was closed and
reopened again. Upon re-opening the device adev->shutdown is reset and audio data would again flow.

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx.h
aa5a1821859c9c2915bc00e79f6e01e619df6e8f 08-Feb-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10518): em28xx: Fix for em28xx memory leak and function rename

Fix for em28xx memory leak and function rename

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-core.c
3e099baff451affd13a93c6fed216943e01b80fd 08-Feb-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10517): em28xx: remove bad check (changeset a31c595188af)

Removed bad check. Thanks to Robert Krakora <rob.krakora@messagenetsystems.com>
to report that.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
56ee38071fe0cf1746d53c5b40a46a835b24fbe4 11-Feb-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10516): em28xx: Add support for Easy Cap Capture DC-60

Thanks to Peter Senna Tschudin <peter.senna@gmail.com> for borrow me one
of those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
9fc2c5ee5d9d797730dd05616757b329f6a227e9 11-Feb-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10515): Adds IR table for the IR provided with this board and includes it at

Kaiomy entry.

Thanks to Peter Senna Tschudin <peter.senna@gmail.com> for borrow me one
of those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
0bf4f6ce6d43b135867a78fa1b4ac58e22d2e329 11-Feb-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10514): em28xx: Add support for Kaiomy TVnPC U2 stick

Thanks to Peter Senna Tschudin <peter.senna@gmail.com> for borrow me one
of those devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
b124d597496fad3ba1ead7ed3b6c197c5b0a2ee7 25-Jan-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10327): em28xx: Add check before call em28xx_isoc_audio_deinit()

Just call em28xx_isoc_audio_deinit() if em28xx sent a usb_submit().

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
00bc0645f02ec0c3486a9f6af9b6167ce5eda62c 25-Jan-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10326): em28xx: Cleanup: fix bad whitespacing

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
51caf91f5ba4f6c02ba2bd53c3f113b9da544ebb 25-Jan-2009 Alexey Klimov <klimov.linux@gmail.com> V4L/DVB (10324): em28xx: Correct mailing list

Move development mail-list to linux-media on vger.kernel.org.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
f7fe3e6f3c3e9ef6ba5ca187b514d225296d18dd 19-Jan-2009 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10323): em28xx: Add entry for GADMEI TVR200

Added entry for GADMEI TVR200.
Thanks to Yohanes Nugroho <yohanes@gmail.com> for testing and data collection.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
cb97716f3bcc3710b5dc44c01fd7450d032c74e0 20-Jan-2009 Thierry MERLE <thierry.merle@free.fr> V4L/DVB (10307): em28xx: use usb_make_path to report bus info

usb_make_path reports canonical bus info. Use it when reporting bus info
in VIDIOC_QUERYCAP.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
07f7db4ce7b29d431553b426e0dcb720c5297a4b 21-Jan-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (10291): em28xx: fix VIDIOC_G_CTRL when there is no msp34xx device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
8ed06fd4729d25959f6af8b7ce4e3888866bfe56 19-Jan-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10255): em28xx: Clock (XCLK) Cleanup

Clock (XCLK) Cleanup

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
dec14f8c0eff54549e5747f8a4d1dc6c0347e2dd 24-Mar-2009 Takashi Iwai <tiwai@suse.de> Merge branch 'topic/snd_card_new-err' into for-linus
7662b00c378fe638e84a853418cd833303fc050c 19-Feb-2009 Nicola Soranzo <nsoranzo@tiscali.it> V4L/DVB (10659): em28xx: register device to soundcard for sysfs

As explained in "Writing an ALSA driver" (T. Iwai), audio drivers should
set the struct device for the card before registering the card instance.
This will add the correct /sys/class/sound/cardN/device symlink, so HAL
can see the device and ConsoleKit sets its ACL permissions for the
logged-in user.

For em28xx audio capture cards found e.g. in Hauppauge WinTV-HVR-900 (R2),
this patch fixes errors like:

ALSA lib pcm_hw.c:1429:(_snd_pcm_hw_open) Invalid value for card
Error opening audio: Permission denied

when running mplayer as a normal user.

Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
9c06210b89e604aa75314d3d173a93292b0d2777 25-Jan-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled

Trace: (Provided by Douglas)

BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:558
in_atomic():0, irqs_disabled():1
Pid: 4918, comm: sox Not tainted 2.6.27.5 #1
[<c04246d8>] __might_sleep+0xc6/0xcb
[<c058c8b0>] usb_kill_urb+0x1a/0xd8
[<c0488e68>] ? __kmalloc+0x9b/0xfc
[<c0488e85>] ? __kmalloc+0xb8/0xfc
[<c058cd5a>] ? usb_alloc_urb+0xf/0x31
[<f8dd638c>] em28xx_isoc_audio_deinit+0x2f/0x6c [em28xx_alsa]
[<f8dd6573>] em28xx_cmd+0x1aa/0x1c5 [em28xx_alsa]
[<f8dd65e1>] snd_em28xx_capture_trigger+0x53/0x68 [em28xx_alsa]
[<f8aa8674>] snd_pcm_do_start+0x1c/0x23 [snd_pcm]
[<f8aa85d7>] snd_pcm_action_single+0x25/0x4b [snd_pcm]
[<f8aa9833>] snd_pcm_action+0x6a/0x76 [snd_pcm]
[<f8aa98f5>] snd_pcm_start+0x14/0x16 [snd_pcm]
[<f8aae10e>] snd_pcm_lib_read1+0x66/0x273 [snd_pcm]
[<f8aac5a3>] ? snd_pcm_kernel_ioctl+0x46/0x5f [snd_pcm]
[<f8aae4a7>] snd_pcm_lib_read+0xbf/0xcd [snd_pcm]
[<f8aad774>] ? snd_pcm_lib_read_transfer+0x0/0xaf [snd_pcm]
[<f89feeb6>] snd_pcm_oss_read3+0x99/0xdc [snd_pcm_oss]
[<f89fef9c>] snd_pcm_oss_read2+0xa3/0xbf [snd_pcm_oss]
[<c064169d>] ? _cond_resched+0x8/0x32
[<f89ff0be>] snd_pcm_oss_read+0x106/0x150 [snd_pcm_oss]
[<f89fefb8>] ? snd_pcm_oss_read+0x0/0x150 [snd_pcm_oss]
[<c048c6e2>] vfs_read+0x81/0xdc
[<c048c7d6>] sys_read+0x3b/0x60
[<c04039bf>] sysenter_do_call+0x12/0x34
=======================

The culprit in the trace is snd_pcm_action() which invokes a spin lock
which disables pre-emption which disables an IRQ which causes the
__might_sleep() function to fail the irqs_disabled() test. Since
pre-emption is enabled then it is safe to de-allocate the memory if
you first unlink each URB. In this instance you are safe since
pre-emption is disabled. If pre-emption and irqs are not disabled then
call usb_kill_urb(), else call usb_unlink_urb().

Thanks to Douglas for tracking down this bug originally!!!

[dougsland@redhat.com: Fixed codyingstyle]
Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-core.c
8760e5b6d1dc9527e0f96f80daaa12a8158d9839 17-Jan-2009 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown

Revert a change made in change 9743 which resulted in a kernel panic in some
cases on shutdown of the audio stream.

First discovered when working on the Pinnacle 880e support, and later
reproduced by a user on the mailing list with the HVR-900 as well.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
6e7b9ea0937eeb75fa166ef7bd22b5f3bb5676d1 19-Jan-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10257): em28xx: Fix for KWorld 330U Board

Fix for KWorld 330U Board

Many thanks to Devin and Mauro!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx-video.c
m28xx.h
7e4b15e4201a101840c226dafe0d3df7ee652bf6 19-Jan-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97

Fix for KWorld 330U AC97

Many thanks to Devin and Mauro again!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
53d12e5a56934c31ca59f3b6f127e5a68e645fd2 16-Jan-2009 Robert Krakora <rob.krakora@messagenetsystems.com> V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition

em28xx: Fix audio URB transfer buffer memory leak and race
condition/corruption of capture pointer

Leak fix kindly contributed by Pádraig Brady.

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
32929fb4c7c4a693ed723253b21e7bf3c8cb4b1c 17-Jan-2009 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (10243): em28xx: fix compile warning

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx.h
8866f9cf8d85f3614855a49b9d9056f265d0cd33 13-Jan-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10228): em28xx: fix audio output PCM IN selection

Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However,
currently, the PCM IN selection is not set by the driver. This patch allows
specifying the PCM IN expected output, via board description table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
24c3c41584b9331be5e0d18d46943729a5bd2d4e 08-Jan-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10192): em28xx: fix input selection

em28xx were trying to access the third input entry, even for boards that
don't support it.

This patch reviews the input mux selection fixing this bug and a few
other troubles, like not validating the input on one userspace ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
758021bfa9ea25c58e62d2f68512628b19502ce7 12-Jan-2009 Takashi Iwai <tiwai@suse.de> drivers/media: Convert to snd_card_create()

Convert from snd_card_new() to the new snd_card_create() function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
m28xx-audio.c
2230c3c803a5f3a84f7c3bd86b8159a551edc8ca 03-Jan-2009 Julia Lawall <julia@diku.dk> V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc

This patch extends 134179823b3ca9c8b98e0631906459dbb022ff9b by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.

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

// <smpl>
@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ !usb_endpoint_xfer_control(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\))
+ !usb_endpoint_xfer_isoc(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\))
+ !usb_endpoint_xfer_bulk(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\))
+ !usb_endpoint_xfer_int(epd)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
26cdc76b2c0b24f7a9c33ab226ca6e4bbae3dbbb 05-Jan-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10177): Fix sparse warnings on em28xx

/home/v4l/master/v4l/em28xx-core.c:396:25: warning: symbol 'outputs' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-input.c:324:6: warning: symbol 'em28xx_ir_start' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-cards.c:1925:5: warning: symbol 'em28xx_init_dev' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-input.c
9baed99ee7a834b1f2599e13f219087f01c63f38 31-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev

Some devices require different setups on struct_audio. Due to that, we
may need to change some fields at dev.adev during device probe. So, this
patch moves the dynamic memory allocation of adev at em28xx-alsa to the
dynamic allocation of struct em28xx dev that happens during device
probe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx.h
87ea5f9d389717ff6da60dc014ce79ae14b7947c 31-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (10160): em28xx: update chip id for em2710

em2710 uses the same chip ID as em2820 (0x12).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-reg.h
aecde8b53b8ee1330a5a8206200f0d6b8845a6e0 30-Dec-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.

Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.

Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.

Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
bec43661b1dc0075b7445223ba775674133b164d 30-Dec-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (10135): v4l2: introduce v4l2_file_operations.

Introduce a struct v4l2_file_operations for v4l2 drivers.

Remove the unnecessary inode argument.

Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.

Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
134179823b3ca9c8b98e0631906459dbb022ff9b 30-Dec-2008 Julia Lawall <julia@diku.dk> V4L/DVB (10130): use USB API functions rather than constants

This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_is_isoc_in(epd)
usb_endpoint_is_isoc_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
- \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
de84830e6959b046a99da3be12246458f4ab9825 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices

The current code was trying to query the AC97 registers for the vendor
information even if it was clearly not a AC97 audio device (resulting in errors
in the dmesg output). This was due to a bug in the way we did the check.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
3fbf930951462871848b5b504fa4a10ab06d2fee 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10124): em28xx: expand output formats available

Add additional output formats, which will be useful for the Pinnacle PCTV
Ultimate 880e integration with the saa7136.

Thanks to Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-reg.h
m28xx-video.c
54d79e339881388cdb6a6888b0f6bcd4911d3582 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10123): em28xx: fix reversed definitions of I2S audio modes

Noticed when doing the audio support for the Pinnacle PCTV HD Ultimate 808e
that the modes were incorrect (the 808e uses I2S in 5 sample mode)

Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-reg.h
62f3e69bd5ff9db1574356a84895324ab3896e44 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10122): em28xx: don't load em28xx-alsa for em2870 based devices

Like the em2874, the em2870 does not have any analog support, so don't bother
loading the em28xx-alsa module.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
7ed3a7a3113a5399a4591fdf1f2a07c9cd954853 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10121): em28xx: remove worthless Pinnacle PCTV HD Mini 80e device profile

The Pinnacle 80e cannot be supported since Micronas yanked their driver
support for the drx-j chipset at the last minute. Remove the device profile
since it cannot work without the drx driver and it being there is only likely
to confuse people into thinking the device is supported but not working.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
e890759220759dfe4f3bea91a2deafb565ec10e9 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10120): em28xx: remove redundant Pinnacle Dazzle DVC 100 profile

The DVC 100 profile is redundant since we already have an existing identical
profile named "Pinnacle Dazzle DVC 90/DVC 100"

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
ed14e1c2f419a380c7a1a3483ac2443d20a24355 30-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (10119): em28xx: fix corrupted XCLK value

Correct problem introduced during the board refactoring where the XCLK
frequency would get zero'd out. The sequence of events was as follows:

em28xx_pre_card_setup() called em28xx_set_model()
em28xx_set_model() would memcpy to dev->board configuration
em28xx_pre_card_setup() would set the dev->board.xclk if not set
em28xx_pre_card_setup() would set the XCLK register based on dev->board.xclk
...
em28xx_card_setup() would call em28xx_set_model()
em28xx_set_model() would memcpy to dev->board configuration (clearing out
value of dev->board.xclk set in em28xx_pre_card_setup)
...
em28xx_audio_analog_set() sets the XCLK register based on dev->board.xclk
(which now contains zero)

The change sets the default XCLK and I2C Clock fields in the board definition
inside of em28xx_set_model() so that subsequent calls do not cause the
values to be overwritten.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
5609cfd23233617858d03fab537bc120f7f6fa7f 28-Dec-2008 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10056): em28xx: Add snapshot button on Pixelview Prolink PlayTV USB 2.0

Added snapshot feature for Pixelview Prolink PlayTV USB 2.0

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
1e1addd57bdf56c51dbc292d7760ea3d207fe833 28-Dec-2008 Douglas Schilling Landgraf <dougsland@redhat.com> V4L/DVB (10055): em28xx: Add entry for PixelView PlayTV Box 4

Added board PixelView PlayTV Box 4
Thanks to Vildenei Negrao Pereira <neodarkaman@brturbo.com.br> for testing and data collection.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
2e5ef2dfc45ff1ecebb0d8657b85b3fc716db9bf 29-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9980): em28xx: simplify analog logic

Now, just two routines are enough for analog: the first one configs the analog
part and register V4L2 devices, and the second one release analog devices.

After this patch, it will be easier to transform em28xx-video into an em28xx
extension, loaded only on analog devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-video.c
m28xx.h
1a23f81b7dc3115b29cff0e4f58b5dd04a6242ad 29-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9979): em28xx: move usb probe code to a proper place

em28xx-video were holding several code that are not specific to V4L2
interface.

This patch moves the core code for em28xx-core, and usb probing code
into em28xx-cards.

This opens the possibility of breaking em28xx into a core module and a
V4L2 module, loaded only on devices that have analog interfaces.

Some cleanup may be done at em28xx-cards to optimize the config code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
14983d8163c78826386404b27ee5bfc72e25a9d4 23-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9970): em28xx: Allow get/set registers for debug on i2c slave chips

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
531c98e71805b32e9ea35a218119100bbd2b7615 22-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9953): em28xx: Add suport for debugging AC97 anciliary chips

The em28xx driver can be coupled to an anciliary AC97 chip. This patch
allows read/write AC97 registers directly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
b6070f0756fe1bccda1c8c67a6bfdfa51022b664 22-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9931): em28xx: de-obfuscate vidioc_g_ctrl logic

vidioc_g_ctrl() were using an uneeded confusing logic. Instead, use the
direct approach.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
5db0b5e1adff92dac54f2dfb1846a42501c8f7d9 22-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9930): em28xx: Fix bad locks on error condition

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
bddcf63313c6a4a85f94db092f45e31f530da691 20-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9927): em28xx: use a more standard way to specify video formats

This patch uses the same code for enumberating video formats that are
present on cx88, bttv and saa7134 drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
381aaba91de9659ccb8c061d6b7248e606903374 20-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9926): em28xx: Fix a bug that were putting xc2028/3028 tuner to sleep

The changeset 78aa52a159cf introduced a bug on em28xx: buffer setup should be
awaking xc3028. Instead, since we didn't specify the tuner mode, the device
were going to sleep, due to the lack of tuner mode when asking tuner to handle
VIDIOC_S_FREQUENCY:

xc2028 0-0061: Device is Xceive 3028 version 1.0, firmware version 2.7
xc2028 0-0061: divisor= 00 00 14 d0 (freq=83.250)
xc2028 0-0061: Putting xc2028/3028 into poweroff mode.
xc2028 0-0061: Printing sleep stack trace:
Pid: 10936, comm: mplayer Tainted: P M 2.6.27.8 #1

Call Trace:
[<ffffffffa0b759ea>] xc2028_sleep+0x89/0x1ab [tuner_xc2028]
[<ffffffffa0b48fb9>] tuner_s_frequency+0xf5/0x165 [tuner]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
c665f4dd99a584036c2bd79a6baa25b06cae42f8 17-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (9922): em28xx: don't assume every eb1a:2820 reference design is a Prolink PlayTV USB2

Don't operate under the assumption that every device that uses the em2820
default USB ID is a Prolink PlayTV USB. We have an eeprom hash, so use that,
since otherwise we cannot support other devices with the 2820 default USB ID
(such as the ADS Tech Instant TV USB USBAV-704)

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
b1fa26c66c975bbd3173a45ef673870fd1d52dea 17-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (9921): em28xx: add chip id for em2874

Add the em2870 to the list of known em28xx chip ids.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
efc52a94840198eb5ba68107812b879d34959dbb 17-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9912): em28xx: fix/improve em28xx locking schema

Changes/fixes on em28xx dev->lock:

- em28xx_init_dev() were unlocking without a previous lock;

- some read ioctls need to lock after the removal of KBL, since a write
may be happening at the same time an ioctl is reading;

- keep the device locked during all device initialization;

- lock/unlock while reading/writing registers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
cf8c91c3e77cc26c43cfe6fc47e649b685736259 17-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9911): em28xx: vidioc_try_fmt_vid_cap() doesn't need any lock

vidioc_try_fmt_vid_cap() just checks if a given resolution is supported.
It doesn't touch on struct em28xx device descriptor. so, there's no need
to lock.

While there, use unlikely() for those values that aren't likely to
occur.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
29b59417c514a2c5291abb4e3a42e5245ffe6058 17-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9910): em28xx: move res_get locks to the caller routines

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
7831364f33af9bb7333f333e9a239b1dd2edea1c 17-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9909): em28xx: move dev->lock from res_free to the caller routines

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
be2c6db122467c6b6b55d93dd08d89cb2ee7821c 09-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9799): em28xx: fix Kworld Hybrid 330 (A316) support

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
f89bc32974a4376e8393001484af28d8c3350ab4 02-Dec-2008 Douglas Schilling Landgraf <dougsland@linuxtv.org> V4L/DVB (9793): em28xx: Add specific entry for WinTV-HVR 850

Added specific entry for WinTV-HVR 850

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
eb6c96345d07c7c3978e77d3ad0b5c5b9e5b2faa 05-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9770): em28xx: turn off tuner when not used

em28xx devices generally get hot when xc3028 tuner is powered on. This
patch solves this by turning power off when the device is not used, at the
expense of having a higher load time, when calling a TV application.

Since firmware load happens on 1 or 2 seconds on most devices, this is not a pain.

Also, it helps to save the planet by saving some power :)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
9e5d6760c28409dd4ebd1cbafee77e5f58d6d574 26-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9756): em28xx: Improve register log format

Change log format to look more like URB transactions. In fact, setup and
IN/OUT transactions are merged. This helps to debug the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
8c2399895dc1b5e8976884d4898e68e61ec23e54 29-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9767): em28xx: improve board description messages

Print manufacturer/product info from USB device and also card entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-video.c
6a18eaf61aadcd7f002ddfa26031525570e6f8b6 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9766): em28xx: improve probe messages

Prints usb speed used by em28xx interface. While there, fixes USB ID's
endiannes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
017ab4b1e2aa31dc9fe986ab6d1f5ffa2a84395b 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9765): em28xx: move tuner gpio's to the cards struct

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
2fe3e2ee72ef17daad1d3769321bb7dd69a003a9 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9764): em28xx: Add support for suspend the device when not used

Several chips may be turned off when the device is not used, like audio,
video and dvb demods. This patch adds a gpio callback at the core
structs to allow turning off such devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-video.c
m28xx.h
f502e861849ade3a128964410c87acedf437a6a1 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9763): em28xx: fix gpio settings

A previous changeset moved gpio from em28xx struct into em28xx_board.
However, the driver were not updated to properly honor those gpio's.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
1c67e76f71e7cccc1e0734aee908391e9f0a32f8 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9762): em28xx: fix tuner absent entries

Before this patch, several devices without tuner were kept the value 0
for tuner_type. However, this means TUNER_TEMIC_PAL. Replace those
entries for the proper TUNER_ABSENT value.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
a5942b5c26864bfc7dda653f294e956dc0a36c84 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9761): em28xx: replace magic numbers for mux aliases

Instead of using magic vmux/amux, let's use an alias where possible.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
122b77e59ed2de0692dfe45c87a93e98156fe03a 27-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9760): em28xx: move gpio lines into board table description

Instead of a large, ugly switch specifying the gpio tables for each
device, let's move it into the boards struct. This also helps to see
what boards have already the gpio's for DVB.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
0ec202d183b4e3d3e4d06612a29e25466889c328 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9759): em28xx: move gpio tables to the top of em28xx-cards

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
2a29a0d770ef6f24a8fd7806655c826d45888cba 26-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9758): em28xx: replace some magic by register descriptions where known

Replaces all occurrences of em28xx_write_regs_req() and em28xx_write_reg()
used to setup register names by em28xx_write_reg().

Also, documents the register names that are known.

This patch were generated by this small perl script:

my %reg_map = (
# Register table - the same as defined on parse_em28xx.pl script
);

while (<>) {
if (m/(.*)em28xx_write_regs_req\(dev\,\s*0x00\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) {
my $reg = $2;
my $val = $3;
$val =~ tr/A-f/a-f/;
$reg = $reg_map{$reg} if defined($reg_map{$reg});
printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val;
} elsif (m/(.*)em28xx_write_regs\(dev\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) {
my $reg = $2;
my $val = $3;
$val =~ tr/A-f/a-f/;
$reg = $reg_map{$reg} if defined($reg_map{$reg});
printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val;
} else {
print $_;
}
}

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
c864405747fa8b50c1454b280c216f54da834cb4 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9755): em28xx: cleanup: We need just one tuner callback

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
1bee0184f6ffba1263a4b1e5732cde2c5292d843 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9754): em28xx: improve debug messages

Now, the first message states board names. Also, removed printing the alternate
settings by default. I2C messages are now clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-i2c.c
m28xx-video.c
ec5de990d912c0d5cca98e030bf6447c1529f56d 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9753): em28xx: cleanup: saa7115 module auto-detects saa711x type

Since saa7115 has saa711x chip auto-detection, there's no need on differenciating
it at cards table. Just use the generic name for all boards that use a philips
saa711x decoder.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
505b6d0b774fa4475fedbd3cebf95199c17a0086 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9752): Remove duplicated fields on em28xx_board and em28xx structs

Several fields are duplicated on both structs. Let's just copy em28xx_board instead.

A later cleanup could just copy the fields that are changed, in order to keep em28xx_board
const.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
m28xx.h
d4d889e329bd0837598b3ef611806421754e9b83 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9751): em28xx: card description cleanups

Remove unused em28xx_board.vchannels and em28xx.video_channels.
Also, .is_em2800 = 0 is not needed, as all data is zeroed by kernel loader.

The table also included a notice that svideo weren't test on Hauppauge
USB2. Remove this notice, since this input also works properly.

Also, it does some whitespace cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
a2070c665459ac37a36bebae5e97bb4a2568990e 25-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9747): em28xx: Properly handles XCLK and I2C speed

The previous patches removed XCLK and I2C magic. Now, we finally know
what those registers do. Also, only a very few cards need different
setups for those.

Instead of keeping the setups for those values inside the per-device
hack magic switch, move the uncommon values to the board-specific
struct, and have a common setup for all other boards.

So, almost 100 lines of hacking magic were removed.

A co-lateral effect of this patch is that it also fixes a bug at em28xx-core, where xclk
were set, without taking any care about not overriding a previous xclk setup.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx.h
6d676d8af852e483044837240ad9ca669a01aaf2 25-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9745): em28xx: Cleanup GPIO/GPO setup code

Cleanup the calls to set the GPIOs and GPOs for various devices,
replacing the register number with the #define from em28xx-reg.h and
converting over to using em28xx_write_reg()

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
55927684e7c616b0b0976cc52926997f2da5930d 25-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9744): em28xx: cleanup XCLK register usage

Convert over to setting the XCLK register usage with the new em28xx_write_reg()
function.

Thanks to Ray Lu from Empia for providing the em2860/2880 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
c9455fbb159711ca7a2ee5a67f0e7ca43287bbd7 22-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9717): em28xx: improve message probing logs

On some em28xx devices, there's an unused interface. This is printed on
the logs as an error. We can just ignore that interface.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
31e0530c32701fc14b845ef84fe61b66e9c5398c 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9676): em28xx: fix a regression caused by 22c90ec6a5e07173ee670dc2ca75e0df0a7772c0

If removing and reiserting the driver on some devices, tuner type will
be unset at the second time. This patch fixes this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
3ce6509456805904799bf669e82a8ea5126e92df 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9675): em28xx: devices with xc2028/3028 don't have tda9887

This patch cleans up the entries of xc2028/3028, since those devices
don't need or use a tda9887.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
30e4ac7c033f6a2c2e3060875a2f08d7909636a1 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9673): em28xx: fix Pixelview PlayTV board entry

Pixelview uses a Sigmatel stac codec. It has an external line out pin,
connected to AC97_MASTER_VOL. It also provides I2S output, but using a

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
e879b8ebb000298f8124fc8fae570afc9eb37cbb 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9672): Allow opening more than one output at the same time

Some devices use more than one AC97 outputs. This patch allows such
devices to properly work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
209acc02249d831e7f2e3d8083b6b562dde5fc6f 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9671): em28xx: Add detection of Sigmatel Stac97xx series of AC97 devices

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
35ae6f04ad3e4c3ed8a83382b6511bd9beb5c768 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9670): em28xx: allow specifying audio output

Some boards use different AC97 setups for output. This patch adds the
capability of specifying the output to be used. Currently, only one
output is selected, but the better is to allow user to select it via a
mixer, on alsa driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
f1990a9c39d957e6896fc506fc5388b7f302c429 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9669): em28xx: Fix a stupid cut-and-paste error

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
23159a0bfcfb329cf68c7a7259e688494273bb7f 20-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9658): em28xx: use em28xx_write_reg() for i2c clock setup

Convert the calls that write the i2c clock register over to the new
em28xx_write_reg() function that allows for or'ing bits

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
b69724899440289ab258ff417c2d6aa104c70310 20-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9657): em28xx: add a functio to write on a single register

Introduce a new function that writes to a single register. This is
useful because the vast majority of register writes are a single
register, and this format permits or'ing register value bits together.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
5faff78904d9c07f38ac0e227b322e9f58d5447c 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9653): em28xx: improve AC97 handling

AC97 devices provide several input and outputs. However, before this
patch, em28xx device weren't properly allowing the usage of ac97
possible combinations. Also, several input volumes were left untouched,
instead of making sure that the volumes were set on mute state.

This patch improves support for ac97 devices by allowing to use any
inputs, and making sure that unused inputs are set on mute state.

Yet, some work is still needed to select the AC97 output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-reg.h
m28xx.h
16c7bcadff2222b297d13951dc30e133f56d0154 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9652): em28xx: merge AC97 vendor id's into a single var

This makes easier to identify vendor ID, since AC97 vendors are
generally identified by 3 bytes. The remaining byte is used by the
vendor to identify its devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
35643943be58aef82826e340761e86e0d37870ec 19-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9651): em28xx: Improve audio handling

This patch properly implements audio handling on em28xx. Before this
patch, it was assumed that every device has an Empia 202 audio chip.
However, this is not true.

After this patch, specific AC97 chipset setup and configurations can be
done.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
8a5caa6bcb03b72db6c19a11e7b2de7656bd3f26 19-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9650): em28xx: replace magic numbers to something more meaningful

audio mux entries were described by 0 and 1 magic numers. Use an enum
alias for each entry type.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
a42aa191cc2b7573bdcf53023c4e9d5cfe91363e 19-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9649): em28xx: remove two amux entries used only on one card

This patch parepares for an audio refactor patch that auto-detects ac97
chips.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
5c2231c84304563fd5d28e8bbb72e09e882a8e32 19-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9648): em28xx: get audio config from em28xx register

Make use of the em28xx chip configuration register to determine whether
we have AC97 audio, I2S audio, or no audio support at all.

Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-reg.h
m28xx-video.c
m28xx.h
67c96f67060abfe595974a77aeb4ce7815893648 18-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9644): em28xx: add em2750 to the list of known em28xx chip ids

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
897511139634b96a5980420f5d37972589a19f17 18-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9643): em28xx: remove the previous register names

Previously, AC97 registers were named as if they were part of em28xx
device, generating some confusion. Replace such names for a more general
naming convention.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-reg.h
6fbcebf06a40f10a1c9dd7bc835115662284c40c 18-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9642): Add AC97 registers found on em28xx devices

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-reg.h
f09fb53075646c35efe0f74d97b7c4bc7ec61e5a 16-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9641): Add chip ID's for em2820 and em2840

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
66767920e3e6532db8afe04f9b2d8e1a9e95cad9 16-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9630): Some boards need to specify tuner address

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
60245e858ddb2255d458868be16ba814f6f8d446 16-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9629): Add support for the ATI TV Wonder HD 600 USB Remote Control

Add support for the ATI TV Wonder HD 600 USB Remote Control
(required a new keymap)

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
4b92253acc723f365ad6b2f32e4118e38133b7b8 13-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9628): em28xx: refactor IR support

Refactor the em28xx IR support based on the em2860/em2880 and em2874
datasheets.

Tested on the HVR-950 (em2883), Pinnacle 800e (em2883), Pinnacle 80e (em2874)
using the remote controls that came with those products.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
m28xx-reg.h
m28xx.h
0a6b8a851efae71b0a6f2cbf5d40880553dfabaa 12-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9612): Fix key repetition with HVR-950 IR

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
91812fa74f29f70a2c3a4bf58f7601f86092794f 12-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9611): em28xx: experimental support for HVR-950 IR

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-input.c
a924a499adb89f52046936deac87264774652a81 12-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9607): em28xx: Properly implement poll support for IR's

The first em28xx were based on i2c IR's. However, some newer designs
are coming with a polling-based IR. Those are done by reading a register
set at em28xx.

This patch adds core polling support for those devices. Later patches will
add support for some device-specific IR's.

This patch adds the same basic IR polling code used by bttv, cx88 and saa7134, and
shares the common getkey masks defined at ir-common.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-input.c
m28xx-reg.h
m28xx-video.c
m28xx.h
864ec0b7a03c8401e6e49f9e480489478ea14cb5 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9590): Add registration for Pinnacle 80e ATSC tuner

Add registration for Pinnacle 80e ATSC tuner

Register the em2874 based Pinnacle 80e device. Note that support for this
device also requires the new drx-j driver (which is not available yet)

Thanks for Ray Lu from Empia for providing the em2874 datasheet.
Thanks to Joerg Schindler from Pinnacle for providing sample hardware.
Thanks to Rainer Miethling from Pinnacle for providing engineering support.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
ebef13d480f0223512963ee785bd93770d404fe3 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9589): Properly support capture start on em2874

Properly support capture start on em2874

The transport stream enable register moved in the em2874, so make it work
properly.

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-reg.h
24a613e4b08c4077b4c809bebab1d4a36d541fcc 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9588): Don't load em28xx audio module for digital-only devices

Rework the logic so that the em28xx-alsa module does not get loaded for devices
that don't support analog audio (such as the em2874)

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-video.c
m28xx.h
95ea4705746f52e17f1f14f9136ea2106ffe3b26 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9587): Handle changes to endpoint layout in em2874

Empia moved around their endpoint configuration in newer chips, so accommodate
the changes

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
492404449532e40b5b6ed06b56aae2bf710239e6 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9586): Fix possible null pointer dereference in info message

Fix case where we could end up dereferencing a NULL pointer if dev->vdev or
dev->vbi_dev were not set properly.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
a527c9f827517a14b869511a954910d973556c8c 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9585): Skip reading eeprom in newer Empia devices

Empia switched to a 16-bit addressable eeprom in newer devices. While we
could certainly write a routine to read the eeprom, there is nothing of use
in there that cannot be accessed through registers, and there is the risk that
we could corrupt the eeprom (since a 16-bit read call is interpreted as a
write call by 8-bit eeproms). So just be safe and bail out of the function.

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-i2c.c
6a1acc3bc5144e004996029b20e46e6020d128a7 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9584): Support different GPIO/GPO registers for newer devices

Empia moved the location of the GPIO/GPO registers in newer devices. Add the
ability to specify the relocated registers (including caching of register
contents).

Thanks for Ray Lu from Empia for providing the em2874 datasheet.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-core.c
m28xx-reg.h
m28xx.h
600bd7f0edee0f9687c3c77e6fe63c74452acbfa 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9583): Remember chip id of devices at initialization

When setting up the device, remember the chip id, so we can control behavior
in the future without having to read the register continuously.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx.h
1ed1dd54b0456a880ab4090275a47eb5a7a245d1 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9582): Add a EM28XX_NODECODER option to the list of available decoders

Add a EM28XX_NODECODER option to the list of available decoders. This option
becomes important for devices that do not have analog support.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx.h
65c9fd4609ccbabe4aa354eeab7823507424d8b3 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9581): Remove unused variable from em28xx-audio.c

Remove unused variable from em28xx-audio.c

Fix warning for unused "ret" variable

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
5caeba045c3a676b892790c6685e542f81a4f96e 12-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9580): Add chip id for em2874 to list of known chips

Add em2874 chip id

Add chip id for em2874 to list of known chips

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-reg.h
1f6340bd431921f9b6dc995973eb065d6c14f024 07-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9532): Properly handle error messages during alsa registering

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
af128a102c4aee994b4ff6e422b3cfab17127578 30-Oct-2008 Kay Sievers <kay.sievers@vrfy.org> V4L/DVB (9521): V4L: struct device - replace bus_id with dev_name(), dev_set_name()

This patch is part of a larger patch series which will remove
the "char bus_id[20]" name string from struct device. The device
name is managed in the kobject anyway, and without any size
limitation, and just needlessly copied into "struct device".

To set and read the device name dev_name(dev) and dev_set_name(dev)
must be used. If your code uses static kobjects, which it shouldn't
do, "const char *init_name" can be used to statically provide the
name the registered device should have. At registration time, the
init_name field is cleared, to enforce the use of dev_name(dev) to
access the device name at a later time.

We need to get rid of all occurrences of bus_id in the entire tree
to be able to enable the new interface. Please apply this patch,
and possibly convert any remaining remaining occurrences of bus_id.

We want to submit a patch to -next, which will remove bus_id from
"struct device", to find the remaining pieces to convert, and finally
switch over to the new api, which will remove the 20 bytes array
and does no longer have a size limitation.

Thanks,
Kay

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
231ffc9c07021afcfb1afa229aa4935730e5163b 17-Dec-2008 Devin Heitmueller <dheitmueller@linuxtv.org> V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command

Fix a NULL pointer dereference that would occur if the video decoder tied to
the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver)

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
a693b0cdba94f60f7ed43754d2c34151cdd11da5 01-Dec-2008 Mauro Carvalho Chehab <mchehab@redhat.com> em28xx: remove backward compat macro added on a previous fix

commit 50f3beb50abe0cc0228363af804e50e710b3e5b0 fixed em28xx-alsa
locking schema. However, a backport macro was kept.

This patch removes the macro, since it is not needed for the module
compilation against upstream.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
484ab62c5ee805c2bdc405a85a4e64da2722690f 24-Nov-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (9748): em28xx: fix compile warning

Label fail_unreg is no longer used.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
faa3bd2e48e594e9475e92fb84bb6ebe6f62f23b 24-Nov-2008 Douglas Schilling Landgraf <dougsland@linuxtv.org> V4L/DVB (9743): em28xx: fix oops audio

Replaced usb_kill_usb for usb_unlink_usb
(wait until urb to fully stop require USB core to put the calling process to sleep).

Oops:
http://www.kerneloops.org/raw.php?rawid=71799&msgid=

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
50f3beb50abe0cc0228363af804e50e710b3e5b0 24-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9742): em28xx-alsa: implement another locking schema

Instead of using a spinlock, it is better to call the proper pcm stream
locking schema.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
818a557eeb9c16a9a2dc93df348b0ff68fbc487f 20-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9668): em28xx: fix a race condition with hald

Newer versions of hald tries to open it to call QUERYCAP.

Due to the lack of a proper locking, it is possible to open the device
before it finishes initialization.

This patch adds a lock to avoid this risk, and to protect the list of
em28xx devices.

While here, remove the uneeded BKL lock.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
f2a2e4910502e866833732f31ee697d15b3e56fd 19-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9647): em28xx: void having two concurrent control URB's

Now that we have a polling task for IR, there's a race condition, since
IR can be polling while other operations are being doing. Also, we are
now sharing the same urb_buf for both read and write control urb
operations. So, we need a mutex.

Thanks to Davin Heitmueller <devin.heitmueller@gmail.com> for warning me.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx-video.c
m28xx.h
c4a98793a63c423c9e1af51822325969e23c16d4 18-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb

Before this patch, every register setup on em28xx were dynamically
allocating a temporary buffer for control URB's to be handled.

To avoid this ping-pong, use, instead a pre-allocated buffer.

Also, be sure that read control URB's also use the buffer, instead of
relying on a stack buffer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
m28xx.h
625ff1679456d8adb9af0c980394ea3954e727a8 18-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails

em28xx_init_dev() has some error conditions that are not properly
de-allocating dev var, nor freeing the device number for a future usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
3f9b46c154da5ec4facca88f82d1820eb329fd3e 15-Nov-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (9632): make em28xx aux audio input work

The attached patch makes the em28xx auxillary audio input work.
Tested with the HVR-950.

em28xx: make auxillary audio input work

The tuner audio input was working but the aux input wasn't. Tested with
the HVR-950.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-core.c
c41109fc9a13c6af0e4069dd92fdb4c5c8046649 16-Nov-2008 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-i2c.c
c6330fb86fd0fed98b7e0d5792881a77b778fefc 19-Oct-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d

The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now
independent of the minor number. So instead of using the minor field
of the video_device struct one has to use the num field: this always
contains the kernel number of the device node.

I forgot about this when I did the v4l2 core change, so this patch
converts all drivers that use it in one go. Luckily the change is
trivial.

Cc: michael@mihu.de
Cc: mchehab@infradead.org
Cc: corbet@lwn.net
Cc: luca.risolia@studio.unibo.it
Cc: isely@pobox.com
Cc: pe1rxq@amsat.org
Cc: royale@zerezo.com
Cc: mkrufky@linuxtv.org
Cc: stoth@linuxtv.org
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
46510b56ca56a25ce973d6a6e8490c1109ff94ef 11-Oct-2008 Thierry MERLE <thierry.merle@free.fr> V4L/DVB (9155): em28xx-dvb: dvb_init() code factorization

In dvb_init(),
case EM2880_BOARD_TERRATEC_HYBRID_XS:
case EM2880_BOARD_KWORLD_DVB_310U:
can be put in the same case than EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
since they do the same thing.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
dd89601d47e2eeab7c17b25f2549444751bcffe4 04-Oct-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (9133): v4l: disconnect kernel number from minor

The v4l core creates four different video devices (video, vbi, radio, vtx)
and each has its own range of minor numbers. However, modern devices keep
increasing the number of devices that they need so a maximum of 64 video
devices will not be enough in the future. In addition this scheme makes
it very hard to add new device types.

This patch disconnects the kernel number allocation (e.g. video0, video1,
etc.) from the actual minor number (just pick the first free minor).

This allows for much more flexibility in the future. However, it does
require the use of udev. For those who cannot use udev a new CONFIG option
was created that changes the allocation scheme back to the old behavior.

Thanks to Greg KH for suggesting this approach during the 2008 LPC.

In addition, several bugs were fixed in the ivtv and cx18 drivers: these
drivers try to allocate specific kernel numbers but that scheme contained
a bug which caused what should have been e.g. video17 to appear as e.g.
video2.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.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>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
f2a01a0027b29f682c3833d582e2827a4690f661 08-Sep-2008 Douglas Schilling Landgraf <dougsland@linuxtv.org> V4L/DVB (8937): em28xx: Fix and add some validations

Fixed and Added some validations

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-i2c.c
m28xx-video.c
a50f4a444a14a116e2eb077e01c2eaf58ddb7c6a 08-Sep-2008 Douglas Schilling Landgraf <dougsland@linuxtv.org> V4L/DVB (8936): em28xx-cards: Add vendor/product id for EM2820_BOARD_PROLINK_PLAYTV_USB2

Added vendor/product id for EM2820_BOARD_PROLINK_PLAYTV_USB2

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
d45b9b8ab43c8973a9630ac54f4ede6c3e009f9e 04-Sep-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings

Fix sparse warnings. None are serious, but cutting down on these helps find
future serious sparse warnings/errors.

Redid the av7710.c patch based on a suggestion by Oliver Endriss.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-dvb.c
m28xx-i2c.c
m28xx.h
d56dc61265d2527a63ab5b0f03199a43cd89ca36 30-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8613): v4l: move BKL down to the driver level.

The BKL is now moved from the video_open function in v4l2-dev.c to the
various drivers. It seems about a third of the drivers already has a
lock of some sort protecting the open(), another third uses
video_exclusive_open (yuck!) and the last third required adding the
BKL in their open function.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-video.c
db98fb8b5b9210ba3b14fb984a26060e4afdb9f5 28-Sep-2008 Wiktor Grebla <greblus@gmail.com> V4L/DVB (9103): em28xx: HVR-900 B3C0 - fix audio clicking issue

Fixed audio clicking problem which could be heard when using analog tv or composite input

Signed-off-by: Wiktor Grebla <greblus@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
m28xx-cards.c
da3808e10faca68b064ac897753fa4e1707d29a4 30-Sep-2008 Darron Broad <darron@kewl.org> V4L/DVB (9099): em28xx: Add detection for K-WORLD DVB-T 310U

Correct firmware type to MTS
Correct audio routing for composite/s-video
Add DVB-T detection.

This patch uses the eeprom hash method for detection as the vendor/product
ids are also used for the DIGIVOX_AD. This may be a clone of the same
product. Explanatory text has been added prior to the hask look-up in
anticipation that it may help others.

The following has been tested to work:
Analogue TV (PAL-I)
Composite In
DVB-T (UK Crystal Palace)
USB AUDIO

The following has not been tested but probably works:
S-Video In

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
m28xx-dvb.c
5ea7fe48a95084897786b0f20109d0611bdababc 16-Sep-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8967): Use correct XC3028L firmware for AMD ATI TV Wonder 600

The AMD ATI TV Wonder 600 has an XC3028L and *not* an XC3028, so we need to
load the proper firmware to prevent the device from overheating.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
c737684b51e1edee16fbdf22e9a65ddad261e907 08-Sep-2008 Douglas Schilling Landgraf <dougsland@linuxtv.org> V4L/DVB (8935): em28xx-cards: Remove duplicate entry (EM2800_BOARD_KWORLD_USB2800)

Removed duplicated entry for EM2800_BOARD_KWORLD_USB2800

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-cards.c
ff9b3e430b04e00dd2d29a26ae9438d7044a51db 04-Sep-2008 Douglas Schilling Landgraf <dougsland@linuxtv.org> V4L/DVB (8884): em28xx-audio: fix memory leak

Free allocated memory

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
m28xx-audio.c
a674a3b492d8085fd02ee49ed11cb42c63f0f71a 01-Aug-2008 Eugeniy Meshcheryakov <eugen@debian.org> V4L/DVB (8582): set mts_firmware for em2882 based Pinnacle Hybrid Pro

Pinnacle Hybrid Pro (2304:0226) requires mts_firmware flag to have any
sound. Without this flag it is useful only for watching silent movies.

Signed-off-by: Eugeniy Meshcheryakov <eugen@debian.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
ee281b856d4e4921da24387ab116bb0855c2efaa 27-Jul-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (8543): em28xx: Rename #define for Compro VideoMate ForYou/Stereo

There are two videomate boards supporded by em28xx. The names are almost
identical.
This patch renames one of such entries to something else.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
fe43ef894c282dbfa963872eef577bab46a178fb 27-Jul-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (8542): em28xx: AMD ATI TV Wonder HD 600 entry at cards struct is duplicated

Thanks to "Devin Heitmueller" <devin.heitmueller@gmail.com> for pointing this
issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
10ac6603613d46a43a4544fbbe9581e50879bd45 27-Jul-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (8541): em28xx: HVR-950 entry is duplicated.

Thanks to "Devin Heitmueller" <devin.heitmueller@gmail.com> for pointing this
issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
d3603341e2f3c39f017f8df4b1cd734aeb0d453b 27-Jul-2008 Vitaly Wool <vital@embeddedalley.com> V4L/DVB (8540): em28xx-cards: Add Compro VideoMate ForYou/Stereo model

Added Compro VideoMate ForYou/Stereo model (analog only)

Signed-off-by: Vitaly Wool <vital@embeddedalley.com>
[dougsland@gmail.com: Solved conflicts with v4l-dvb devel tree]
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
95b86a9a9020da22e7c25abc77aae4dc8f02ab55 27-Jul-2008 Douglas Schilling Landgraf <dougsland@gmail.com> V4L/DVB (8539): em28xx-cards: New supported IDs for analog models

- New supported IDs for analog models
(Based on Markus Rechberger <mrechberger@gmail.com> version of em28xx driver)

- Validation field for new em28xx boards.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
59d07f1b705c466ea4eaca9c43d46be6d6a065a4 27-Jul-2008 Aron Szabo <aron@aron.ws> V4L/DVB (8538): em28xx-cards: Add GrabBeeX+ USB2800 model

Added GrabBeeX+ USB2800 model (analog only)

[mchehab@infradead.org: Need to fix some merge conflicts]
Signed-off-by: Aron Szabo <aron@aron.ws>
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
0ea6bc8d43c9ee3c5384bea184eab020927a5b2c 26-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_device

The type and type2 fields were unused and so could be removed.
Instead add a vfl_type field that contains the type of the video
device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e14b3658a7651ffd9b1f407eaf07f4dde17ef1e7 26-Jul-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8492): Add support for the ATI TV Wonder HD 600

em28xx-cards.c
em28xx-dvb.c
em28xx.h
- Add support for the ATI TV Wonder HD 600, based on a 94 email exchange and
USB traces provided by Ronnie Bailey

Thanks to Ronnie Bailey <purevw@wtxs.net> for testing the changes

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
655b8408557d586212d0797d423babdc464c587f 26-Jul-2008 reinhard schwab <reinhard.schwab@aon.at> V4L/DVB (8489): add dvb-t support for terratec cinergy hybrid T usb xs

This patch adds dvbt support for the terratec cinergy hybrid T usb xsstick.
Thanks to Devin Heitmueller and Mauro Chehab for guiding me.

Signed-off-by: Reinhard Schwab <reinhard.schwab@aon.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
a399810ca69d9d4bd30ab8c1678c7439e567f90b 21-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct

All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in
a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it.

This ensures a clean separation between the const ops struct and the non-const
video_device struct.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
38f9d308597fe3f8d52bfa30e7ed6c742b85a1db 23-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8477): v4l: remove obsolete audiochip.h

Converted the last users of audiochip.h to the v4l2-chip-ident.h header
and remove the now unused audiochip.h header.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.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>
m28xx-video.c
5e85e732f0ed56aa97a3ba26ac2b93ffe597a208 20-Jul-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (8428): videodev: rename 'dev' to 'parent'

The field 'dev' is not the video device, but the parent of the video device.
Rename accordingly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.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>
m28xx-i2c.c
a9fc52bcbeb5245b58d23c558f3e3e8f18bebbc3 28-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8123): Add support for em2860 based PointNix Intra-Oral Camera

em28xx-cards.c
em28xx-input.c
em28xx-video.c
em28xx.h
- Add support for the PointNix Intra-Oral Camera, which required addition of
a construct for reading the "snapshot" button (provided on the em2860 and
em2880 chips, but this is the first case where I have seen it actually used
in a product). The button is wired to pin 56 on the em2880.

http://www.pointnix.com/ENG/dental/product_02.asp

Thanks to Roberto Mantovani <rmantovani@libero.it> for testing the changes

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-input.c
m28xx-video.c
m28xx.h
17d9d558e818530cc7d210ffea575a36f48eaa1a 08-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8006): em28xx: Split HVR900 into two separate entries

- Separate the newer variant of the HVR-900 into its own device profile
because it has a Micronas DRX397 instead of the Zarlink demod. This
doesn't make the device work, but at least we don't try to initialize it
as though it had the Zarlink device.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
[mchehab@infradead.org: avoid compilation breakage at mainstream, where drx397xD.h doesn't exist yet]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
4fd305b2a2c4d16e8d4ebc95c84f946edd3385c5 04-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (7992): Add support for Pinnacle PCTV HD Pro stick (the older variant 2304:0227)

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
78b526a43561d7e5e702ba27948e422dfbc4bea1 28-May-2008 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (7949): videodev: renamed the vidioc_*_fmt_* callbacks

The naming for the callbacks that handle the VIDIOC_ENUM_FMT and
VIDIOC_S/G/TRY_FMT ioctls was very confusing. Renamed it to match
the v4l2_buf_type name.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
83ee87a31dc43a5fd6dee3562c146033c3a4cb39 14-Jun-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (8026): Avoids an OOPS if dev struct can't be successfully recovered

On some alsa versions, it seems that snd_pcm_substream_chip(substream)
is returning a NULL pointer. This causes an OOPS, as reported by:

https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/212271
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/212960

This patch avoids the OOPS by not letting and open() succeed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
a8a1f8cc0cae07c209f13857adbdd4b87b36cdde 10-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8018): Add em2860 chip ID

em28xx-cards.c
em28xx-reg.h
- Add em2860 chip ID (seen on Pointnix Intra-Oral Camera)
http://www.pointnix.com/ENG/dental/product_02.asp

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-reg.h
df619181631217e3166bb6c7538f981e0272617f 10-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8017): Ensure em28xx extensions only get run against devs that support them

em28xx-audio.c
em28xx-dvb.c
- Em28xx extensions should ensure they are being only loaded against devices
that support them. Deals with case where there are multiple em28xx
devices, some of which have DVB (or ALSA) support and some do not.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
m28xx-dvb.c
b38cc642000f0a262db367ffb95cd02ca2ead59b 09-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8011): em28xx: enable DVB for HVR-900

em28xx-cards.c
- DVB support is supposed to be enabled for the first generation HVR-900.
This device was confirmed with DVB by mkrufky when we did the original work
in April, but I guess we forgot to set the flag.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
0367ca1bc7346d9ea89a4b4f1b9220489bda65a3 09-Jun-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (8010): em28xx: Properly register extensions for already attached devices

em28xx-video.c
- Properly handle loading of the module when multiple devices are already
connected (such as at bootup). Before we were only calling dvb_init()
against the last device in the list, so while we were handling subsequent
adds properly, if there were multiple devices present on driver load,
everybody except the last device would not get initialized.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
a954b6681dd389e6bb63d9b5f3254d675f6984c9 21-May-2008 Al Viro <viro@ftp.linux.org.uk> V4L/DVB (7970): mix trivial endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
eabcaf32041fcd04672049e76124bd4cd63b1cbf 06-May-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7848): Fix dependencies for tuner-xc2028 and em28xx-dvb

em28xx-dvb doesn't need FW_LOADER. Instead, tuner-xc2028 needs to select
FW_LOADER.

Also, this can happen only if HOTPLUG is selected, since FW_LOADER
is dependent on HOTPLUG.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
fdbbfb092cee0d826cba96df51f56c0e22cae579 06-May-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7846): Re-creates VIDEO_TUNER

VIDEO_TUNER is responsible for compilation of tuners.ko module. This were the
previous behaviour before the creation of MEDIA_TUNER.

Before this patch, tuner.ko were created even for drivers that don't need a
tuner (like webcam drivers).

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
74ee05109c9d6ae2dfe1b462592d3854ddbf1f6a 01-May-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7823): em28xx: add additional usb subids for Hauppauge HVR-950

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
6430a5a368208ae6c4bcd13e1f06460c96af66be 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7806): em28xx: dvb_unregister_frontend() shouldn't be called, if not registered yet

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-dvb.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.
config
7c91f0624a9a2b8b9b122cf94fef34bc7f7347a6 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB(7767): Move tuners to common/tuners

There were several issues in the past, caused by the hybrid tuner design, since
now, the same tuner can be used by drivers/media/dvb and drivers/media/video.

Kconfig items were rearranged, to split V4L/DVB core from their drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
akefile
094f9b4b317b235b8d7fa03b356b9a3f3633b55b 25-Apr-2008 Janne Grunau <janne-dvb@grunau.be> V4L/DVB (7734): em28xx: copy and paste error in em28xx_init_isoc

Fixes a copy and paste error in check of kzalloc return value. The check block
was copied from the previous allocation but the variable wasn't exchanged.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
4269a8eed210d143298baf80185317fc1dcb25ca 21-Apr-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (7652): em28xx: Drop the severity level of the "urb resubmit failed"

em28xx-core.c
- Drop the severity level of the "urb resubmit failed" to debug, since it
occurs every time a stream disconnects, which fills the dmesg log

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
d1e0b57162f45bb9c6bff25aa33b6e8424556422 18-Apr-2008 Andrew Morton <akpm@linux-foundation.org> V4L/DVB (7650): git-dvb: Kconfig fix

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
e77ebdaa927a9e1b6a2e46086f6ca9a445cd0b88 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7619): em28xx: adds proper demod IF for HVR-900

Thanks to Aidan Thornton <makosoft@googlemail.com> for helping
to test this firmware

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
e54318e5a41cfe10325ae2f817d337beb84e79aa 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7618): em28xx: make some symbols static

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
e9888a1330402050e596b2553e7009fe371c42be 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7617): Removes a manual mode setup

The setup is already done at open().

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e3569abc1c51d24f9c64b214f85477e490b156e3 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7616): em28xx-dvb: Properly selects digital mode at the right place

The driver should be switched to digital mode, when trying to access the
frontend or when streaming.

This patch provides the correct code to support this feature.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-dvb.c
c67ec53f8f4e90ebd482789e2f6d121f41a0bd90 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7615): em28xx: Provide the proper support for switching between analog/digital

Before this patch, HVR900/HVR950 were incorreclty going back to analog. The
result is that only digital were working.

This patch provides the proper setup for analog/digital and tuner callback.
It also properly resets analog into a sane state at open().

Thanks to Steven Toth <stoth@linuxtv.org> and Michael Krufky <mkrufky@linuxtv.org>
for helping to set the proper parameters to GPO/GPIO em2883 ports.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-video.c
m28xx.h
82ac4f876505615ba9dc6a73cd9a584bad8fe23f 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7614): em28xx-core: fix some debug printk's that wrongly received KERN_INFO

Those printk's were adding more info to a line that were already being
printed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
41facaa4b63cc1a0ff5a900149a29942d47e1491 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7613): em28xx: rename registers

Now, all registers will follow the same convension:

EM28XX_R<reg_number>_<reg_name>

This allows to associate a register with its value, and also with a canonical
name. Also, registers that are specific to a given chip were renamed accordingly,
as EM2800_foo (for 2800 only registers) or EM2880_foo (for registers that started
to appear on em2880).

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-reg.h
m28xx-video.c
m28xx.h
7e26ca8012a8392c5e53055b8ff3d9512faee6c6 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7612): em28xx-cards: use register names for GPIO/GPO

Before this patch, registers 0x04 and 0x08 were referenced by its value. This is
bad, since makes harder for someone to understand what this is doing.

This patch renames those two registers into an appropriate name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
2ba890ec0849b222a6dabb5192ccd8fd1696d6d3 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7611): em28xx: Move registers to a separate file

em28xx.h contains lots of different stuff inside. The better is to break it on
some files.

This patch removes the register names, moving them to a separate file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-reg.h
m28xx.h
89b329ef9d7cc16ed46fc991b21b2d45e7bf452c 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7610): em28xx: Select reg wait time based on chip ID

This is more conservative than just removing the msleep() from
em28xx_write_regs_req(), since some old hardware may still need it.
So, it will remove the sleep time only for those chips where this
removal were tested.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
7640ea99339c687864f6131598e2eee2ca73cb9c 18-Apr-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (7609): em28xx-core: speed-up firmware load

em28xx-core.c:
- Remove sleep in i2c message routine which slows down i2c by a factor
10x. Load time for BASE firmware went from 13s to .973s

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
83244025e70aadd7e8baad520decf5d53d534d8f 18-Apr-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (7608): em28xx-dvb: Some cleanups and fixes

em28xx-dvb.c:
- Remove unneeded xc3028_ctrl structure. The driver automatically preserves
the previous value

tuner-xc2028.c:
- Make the return type for xc2028_get_reg signed, since all of the callers
are looking for "< 0" to detect errors.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-dvb.c
6ea54d938b6f81baa0952a8b15d3e67e6c268b8f 18-Apr-2008 Douglas Schilling Landgraf <dougsland@gmail.com> V4L/DVB (7607): CodingStyle fixes

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
m28xx.h
e6a353b0dc2686ae04805919e7a22430d2f1e29e 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7606): em28xx-dvb: Program GPO as well

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
102a0b0879a01a413ed5f667f7db9c2085ca8474 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7604): em28xx-dvb: Fix analog mode

The analog entries are wrong. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-dvb.c
m28xx.h
3421b7787a2cf41ac5edce9b5766bddd1e1d9986 18-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7603): em28xx-dvb: don't use videobuf-dvb

Modifies em28xx-dvb not to use videobuf-dvb, but instead to include the code
for registering dvb devices locally and use the URB management code in the
em28xx driver directly. DVB data streaming should now work.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-dvb.c
m28xx-video.c
m28xx.h
579f72e44fb1c991352f44c20b471c3001357f68 18-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7602): em28xx: generalise URB setup code

Move the URB setup and management code to em28xx-core.c and generalise
it slighlty so that the DVB code can use it.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
m28xx.h
7e6388a1b97cca57a1906df6104feb4001721576 18-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7601): em28xx-dvb: add support for the HVR-900

Adds the correct GPIOs and demod attach code for the HVR-900


Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
m28xx-cards.c
m28xx-dvb.c
d2d9fbfd732f49999a2a94f2479934488fe3ea9d 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7600): em28xx: Sets frequency when changing to analog mode

This will make tuner-xc2028 to change to analog, if needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
52284c3e47bf502aaff72ab2ede509193b628b1b 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7599): em28xx-dvb: videobuf callbacks are waiting for em28xx_fh

Thanks to Devin Heitmueller <devin.heitmueller@gmail.com> for pointing
this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-dvb.c
m28xx.h
bdfbf9520372daf2b4d6941474c92310848ccb27 18-Apr-2008 Devin Heitmueller <devin.heitmueller@gmail.com> V4L/DVB (7598): em28xx: several fixes on gpio programming

em28xx-cards.c:
- Fix reversed val/rst values in both analog_gpio and digital_gpio
vectors
- Fix crash that would was occurring during every analog startup
while looping over gpio_ctl
- Remove what appears to be a redundant setting of gpio_ctl->val
- Don't use OREN538 demodulation for the HVR-950 (prevents ATSC
scanning from working)

em28xx-dvb.c:
- Tuner should be in digital mode when issuing the reset
- Add copyright
- Change struct definition (corresponds to fix in em28xx-cards.c for
gpio_ctl looping)

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
3ca9c09379e8f3be0744c47f72769457fa46e9f3 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7597): em28xx: share the same xc3028 setup for analog and digital modes

Thanks to Devin Heitmueller <devin.heitmueller@gmail.com> and Aidan
Thornton" <makosoft@googlemail.com> for pointing some errors with the
previous scenario.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-dvb.c
m28xx.h
227ad4ab9058ef2624934183e8083886cf64bf56 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7596): em28xx-dvb: Add support for HVR950

This patch adds DVB support for Hauppauge HVR950.

Thanks to Michael Krufky <mkrufky@linuxtv.org> for getting those values.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
m28xx-cards.c
m28xx-dvb.c
ee6e3a865a469c78daa93a1e6cdbaca3a102f9c8 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7595): Improve generic support for setting gpio values

em28xx based devices with xc3028 may require some specific gpio values.
This patch adds a generic handling for such values.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx.h
acaa4b609fbab25e09459cd8e842e292b27f5ecb 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7594): em28xx: Fix Kconfig

Some devices have msp3400 audio decoder chip. Selects it, if em28xx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
3aefb79af8d41c85e11da7109d62038849421bb6 18-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7593): em28xx: add a module to handle dvb

This patch adds em28xx-dvb. This driver is highly based on cx88-dvb and
saa7134-dvb.

This code currently loads and unloads successfully. However, some
changes are needed to properly support the mpeg streams and to setup
em28xx to work on DVB mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
akefile
m28xx-cards.c
m28xx-dvb.c
m28xx-video.c
m28xx.h
44dc733cd9edac53402d705cd2f720accd0b3e2c 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7567): em28xx: Some cleanups

Removes some fields from data structs.

There are some fields that are just caching some calculus for buffer
size. The calculus were moved to the places it were needed and the now
unused fields were removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
m28xx.h
3b5fa928a6b2971ec65571745defc5d9758b4bc1 13-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7565): em28xx: fix buffer underrun handling

This patch fixes three related issues and a fourth trivial one:

- Use buffers even if no-one's currently waiting for them (fixes
underrun issues);

- Don't return incomplete/mangled frames at the start of streaming and
in the case of buffer underruns;

- Fix an issue which could cause the driver to write to a buffer that's
been freed after videobuf_queue_cancel is called (exposed by the
previous two fixes - for some reason, ignoring buffers that weren't
being waited on worked around the issue);

- Fix a bug which could cause only one field to be filled in the first
buffer (or first few buffers) after streaming is started.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
b4916f8ca1da71bb97fb6dcf1e8da3f9c64cf80e 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7564): em28xx: Some fixes to display logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
dbecb44c11d9517d604240b53581951ac4e3b5e6 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7563): em28xx: Add missing checks

There are some cases where nobody is waiting for a buffer. Due to the
lack of check, if you try to abort the userspace app, machine were
hanging, since IRQ were trying to use a buffer that were disallocated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
cb7847249f1b2bad201e38c770ef4401c61c022a 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7559): em28xx: Fills the entire buffer, before getting another one

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e9e6040df6c96678d7b776b3902e3b2c6bbfc5a3 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7557): em28xx: honour video_debug modprobe parameter

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
0ea13e6e59853cab9e8ed3ac231ec5d44d8386a6 13-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7556): em28xx: fix locking on vidioc_s_fmt_cap

Currently, vidioc_s_fmt_cap is allowed even if streaming is running on some
other fh. This is likely to cause issues.

Block use of vidioc_s_fmt_cap if someone else has claimed access to the device.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
b957dfdc3161d00b01b52154eb2d53580c8911e5 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7555): em28xx: remove timeout

It seems that we don't need a timeout for em28xx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
0561297501842b5d7e0ca8805084f4d3f97c1078 13-Apr-2008 Brandon Philips <bphilips@suse.de> V4L/DVB (7550): em28xx: Fix a possible memory leak

I did notice a possible memory leak since iolock is could possibly be
called before a buffer has been freed.

This ensure s_fmt isn't called while the queue is busy thereby avoiding
iolock on already allocated buffers.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
78bb3949a965e8a28e20988e28868429606b3639 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7549): em28xx: some small cleanups

- Remove dead code;
- Fix a few CodingStyle issues;
- Prints frame number, if debug is enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e0fadfd34dda2205b296b8826acfaaf4df2e022f 13-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7548): Various fixes for the em28xx videobuf code

- Aborting buffer_filled if no-one's waiting on the waitqueue probably isn't
what we want, since just because no-one's waiting for it now doesn't mean they
wouldn't dequeue it in time. (vivi gets away with this, possibly because it
can fill each buffer much faster.)

- The first BUG_ON(lencopy <= 0); really isn't worth causing a kernel panic
over, especially since there are some reasons why it could trigger in normal use.

- The top and botom frames are actually the wrong way around.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e74153d44a57d9445fb1dfad7c3accbec6d4a873 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7547): em28xx: Fix a broken lock

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
f245e549f0d1fb43fd6d7759d31cd763e6d914b6 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7545): em28xx: Fix CodingStyle errors and most warnings introduced by videobuf

The last videobuf changes introduced several CodingStyle errors. Fixes all those
errors, as reported by checkpatch.pl

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
ca21d2dc945c224c3f121f6b5f2436877f029eed 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7544): em28xx: Fix timeout code

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
47625da2ab5e98728cdefbd344fb1493c26769ad 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7543): Fix capture start/stop and timeout

Also removes the dead restart_video_queue() function

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
ea8df7e09d2226c321c234a8f736fdb167a046cb 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7542): em28xx: Fix some warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
d7aa80207babe694b316a48200b096cf0336ecb3 13-Apr-2008 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (7541): em28xx: Some fixes to videobuf

It fixes a couple of minor bugs, comments out a bogus BUG_ON, sets fh->type
correctly, uses dev->width and dev->height for now, and adds a missing spinlock
init (nasty - caused a system lockup). It also adds some debug code which
probably isn't all that useful. I haven't tested this version of the patch yet,
though, so I'm not sure what you can expect if you try it.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
ad0ebb96c220c461386e9a765fca3daf5590d01e 13-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7540): em28xx: convert to use videobuf-vmalloc

The usage of videobuf-vmalloc allows to cleanup em28xx logic.

Also, it reduced its size by about 5.42% on i386 arch (and about 7.5% on x86_64):

39113 4876 40 44029 abfd old/em28xx.ko
36731 4868 40 41639 a2a7 /home/v4l/master/v4l/em28xx.ko

Also, the preliminary tests, made on a single core 1.5 MHz Centrino showed
that CPU usage reduced from 42%-75% to 28%-33% (reports from "top") command.

A test with time command presented an even better result:

This is the performance tests I did, running code_example to get 1,000 frames
@29.995 Hz (about 35 seconds of stream), tested on a i386 machine, running at
1,5GHz:

The old driver:

$ time -f "%E: %Us User time, %Ss Kernel time, %P CPU used" ./capture_example
0:34.21: 8.22s User time, 25.16s Kernel time, 97% CPU used

The videobuf-based driver:

$ time -f "%E: %Us User time, %Ss Kernel time, %P CPU used" ./capture_example
0:35.36: 0.01s User time, 0.05s Kernel time, 0% CPU used

Conclusion:

The time consumption to receive the stream where reduced from about 33.38
seconds to 0.05 seconds.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
m28xx.h
d80e134dc8e7e078248f7966a6884858f7ab185f 09-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com> V4L/DVB (7522): media/video/em28xx replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
ab8b870e430d3e2cfb299f81e0ae0aef7fe5bfda 22-Apr-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7381): tuner: rename TUNER_PHILIPS_ATSC to TUNER_PHILIPS_FCV1236D

TUNER_PHILIPS_ATSC is an ambiguous name for a tuner. Rename it to
TUNER_PHILIPS_FCV1236D to be more descriptive.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
2c4a07b2da61bcd33f18195ff7f355c5bb285904 22-Apr-2008 Sascha Sommer <saschasommer@freenet.de> V4L/DVB (7331): Fix em2800 altsetting selection

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-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>
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
46cb57e62824a8d6f9e12bedc98c41738a1478ce 04-Mar-2008 Andrew Morton <akpm@linux-foundation.org> V4L/DVB (7291): em28xx: correct use of and fix

be less silly while we're there.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
8281db3b52c1b0e0bd249e8700cf35e64c1e13bd 27-Feb-2008 Julia Lawall <julia@diku.dk> V4L/DVB (7285): em28xx: Correct use of ! and &

In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that
involved converting !x & y to !(x & y). The code below shows the same
pattern, and thus should perhaps be fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

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

// <smpl>
@@ expression E1,E2; @@
(
!E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
61b080d214c4dba91fb726169fb0c3f0e8de4b45 08-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set

Thanks to Alan Stern <stern@rowland.harvard.edu> for pointing this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
3687e1e67e4920a202d53cc24678fb34fcda8fc5 08-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7179): Allow more than one em28xx board

em28xx driver is capable of handling more than one usb device. However, isoc
transfers require a large amount of data to be transfered.

Before this patch, just one em28xx board were enough to allocate more than 50%
URBs:

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8
B: Alloc=480/800 us (60%), #Int= 0, #Iso= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1

So, only one board could use an USB host at the same time. After the patch, it
is possible to use more than one em28xx at the same time, on the same usb host,
if the image size is slower or equal to 345600, since those images will
require about 30% of the URBs:

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8
B: Alloc=232/800 us (29%), #Int= 0, #Iso= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1

So, in thesis, after the patch, it would be possible to use up to 3 boards by
each usb host, if the devices are generating small images.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
m28xx.h
92ea42f442c4895e38f525a097d7d8ce2a55b9b9 06-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7164): em28xx-alsa: Add a missing mutex

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
m28xx.h
00b8730f5db19f9ea0985d7f14f869df79a0bf76 06-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7163): em28xx: makes audio settings more stable

Improves audio configurations on em28xx:
- mutes audio before changing amux;
- adds a delay after setting audio src;
- waits up to 50ms for ac97 busy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
0df8130fe80ebde052516c1d729aa5d1c69ebc5c 06-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7162): em28xx: Fix endian and returns the correct values

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
0da5176f4e0d5aea3e33a11a17c1847939df4dcc 06-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7161): em28xx: Fix printing debug values higher than 127

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
1e7ad56f1fef94a7d8c1050bf3548d957fe67c01 06-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7160): em28xx: Allow register dump/setting for debug

Adds vidioc_[g|s]_register handlers. This allows getting/setting register
from em28xx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
7463dda2ae868d3e0a6c98f65d6331481fc73ca3 06-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7158): Fix em28xx audio initialization

AC97 register initialization seem to always be needed. This patch fixes audio
for Prolink/Pixelview USB2 board.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
1685a6fed210b110ac8abeff24e2ffd1713cb3fb 05-Feb-2008 Andrew Morton <akpm@linux-foundation.org> V4L/DVB (7156): em28xx/em28xx-core.c: fix use of potentially uninitialized variable

drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source':
drivers/media/video/em28xx/em28xx-core.c:276: warning: 'no_ac97' may be used uninitialized in this function

This looks like a genuine bug to me.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
427d20c4e6321ed2482630900891e40b4f2de6a3 30-Jan-2008 Luc Saillard <luc@saillard.org> V4L/DVB (7132): Add USB ID for a newer variant of Hauppauge WinTV-HVR 900

Device description:
WinTV-HVR-900
M/R: 65018/B3C0 ##4207

Signed-off-by: Luc Saillard <luc@saillard.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
532fe65205253aef1ce5c0c76d2d8d303fb3fe71 29-Jan-2008 Adrian Bunk <bunk@kernel.org> V4L/DVB (7106): em28xx/: make 2 functions static

This patch makes the following needlessly global functions static:
- em28xx-core.c:em28xx_write_reg_bits()
- em28xx-video.c:em28xx_vdev_init()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
m28xx.h
a348d2005d4a76c8c84150329f926c255c994ead 18-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7049): Remove sound/driver.h

sound/driver.h is already included by sound/core.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
95a940e9e1d63c2bff170fcd59ab4e1b5c4c602d 10-Feb-2008 S.Çağlar Onur <caglar@pardus.org.tr> drivers/media/video/em28xx/: Fix undefined symbol error with CONFIG_SND=N

Without this you get undefined symbol errors with CONFIG_SND=N:

ERROR: "snd_pcm_period_elapsed" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_pcm_hw_constraint_integer" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_pcm_set_ops" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_pcm_lib_ioctl" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_card_new" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_card_free" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_card_register" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!
ERROR: "snd_pcm_new" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined!

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
config
ed086314f4e41eb90a9107c7fb2737230686f668 24-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7060): em28xx: remove has_tuner

has_tuner flag doesn't make much sense, since tuner_type=TUNER_ABSENT
means the same thing.

Having two ways to say that a tuner is not present is
not nice, since it may lead to bad setups. In fact, with the previous
code, if a device were using has_tuner=0, but the user forces a tuner,
with modprobe option tuner=type, the modprobe option won't work.

Also, tveeprom returns TUNER_ABSENT, when tuner is unknown or absent.
So, with the previous logic, in this case, the driver should set
has_tuner=0, or has_tuner=1 otherwise.

Instead of adding several additional tests and setups, better just to
remove .has_tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.c
m28xx.h
c8793b035df7b18997d1cf34254064dac166f009 13-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7021): Move all board specific configuration to em28xx-cards.c

This cleanup moves the board-specific configurations to em28xx-cards.c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-input.c
m28xx.h
15b9becc68793209a2afd6c580bf71a71fee90a6 13-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7020): Add USB ID for a newer variant of Hauppauge WinTV USB2

Thanks to Jeroen Janssen <Jeroen.Janssen@vub.ac.be>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
3f4dfe2acf4ffed48395e69166531d8925eb106a 06-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6970): Request snd-usb-audio for devices with Audio Class support

Before this patch, only Vendor Class audio support were loaded. This means that
older em28xx devices won't have digital audio support loaded.

This patch changes the logic to auto load eighter snd-usb-audio, for devices
with USB Audio Class or em28xx-alsa, for devices with USB Vendor Class.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
a4950134d46f0b83745f05ea37987785a3905eba 06-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6969): Avoid causing regressions for non-HVR950 boards

Only HVR950 has analog_gpio configured. It makes no sense to set gpio to 0 for
other boards. Better to add a test, while this var is not set for all xc3028
devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
0be4375410f1ecc917f3c0caf8f98908d357c93f 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6956): Add Radio support for em28xx

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
3abee53e4402b6ae39e1e610f9ef94eb74097138 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6955): Properly implement 12MHz I2S support

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
d7448a8d9d06ca2ca4fd1f17404450ecba8bea3a 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6952): Add code for autoloading em28xx-alsa, if needed

Older em28xx devices does implement standard Audio Class.

However, on newer devices, this were replaced by a Vendor Class. This
patch autodetects that an em28xx lacks Audio Class and auto-loads
em28xx-alsa, for the devices that implements only a Vendor Class.

For devices with Audio Class, snd-usb-audio module will provide an ALSA
interface.

This patch uses the request_module_async function as defined on cx88-mpeg.c,
originally wrote by Markus Rechberger.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
m28xx-video.c
m28xx.h
6d79468dd8537530f4150e76ed9b4b63f80571c6 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6951): Integrates em28xx-audio.c into em28xx kernel module

Also fixes the remaining CodingStyle issues that Lindent didn't fix.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
akefile
m28xx-audio.c
m28xx-video.c
m28xx.h
1a6f11e0e8db9e76ef34bc6731d5291e4df1ba37 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6950): Lindent em28xx-audio.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
a52932b405f23082f78ff12f4dd3e1741fcaab6f 05-Jan-2008 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (6949): Adds em28xx-audio module

em28xx-audio module exports em28xx Vendor Class audio as an -alsa
driver. This module were written based on usbaudio driver by Markus
Rechberger. Recently, he acked to allow us to merge it on kernel:

http://lists-archives.org/video4linux/20408-supporting-prolink-pixelview-405-dvd-maker.html

Thanks to Markus Rechberger <mrechberger@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-audio.c
74f38a82376fb1b289d0957429ba45349f0cad62 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6948): HVR950 requires additional settings for audio to properly work

Thanks to Markus Rechberger <mrechberger@gmail.com> for retriving those
commands.

Also, MTS firmware is required for audio to work on HVR950.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
539c96d0fd86bfdcfac75c88b74aa5798439293d 05-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6947): Improve audio setup handling

It is possible to select audio inputs via em28xx or via ac97 functions.
This patch allows configuring a board to use either one way.

It also do some cleanups at audio setup configurations.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-video.c
m28xx.h
aec2aef267203d9ac06ce3508682c0aa81a069dc 17-Dec-2007 Aurelien Jarno <aurelien@aurel32.net> V4L/DVB (em28xx): Add support for Pinnacle Dazzle DVC 100

The patch below adds the "Pinnacle Dazzle DVC 100" to the list of
cards supported by the em28xx driver. As the configuration is the same
as the DVC 90 one, it simply adds a new USB ID to the list of devices
supported by the DVC 90 configuration.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
c23f5949c0eeec328c872f29c8f4c233e73c3c4d 23-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6665): Fix CodingStyle

thanks to checkpatch.pl

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
5add9a6f3c90680f89b4694e81025d2aed9559af 22-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6659): Convert MTS to bitfield

Xc2028.3028 has two type of firmwares: audio-standard specific ones and
baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz
BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares.

It seems that the option to use MTS or a standard-specific audio decoding
depends on the way xc2028/3028 is connected.

Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS
firmware, this patch converts it to a bitfield that can be shared with other
proprieties of xc2028/3028.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
122d15888a8aa95fb6ca32eb1307c3e3337f1a38 20-Nov-2007 Aidan Thornton <makosoft@googlemail.com> V4L/DVB (6619): Use MTS firmware for the HVR-900

The HVR-900 requires the MTS version of the xc3028 firmware in order
to get any sound. The below patch selects this firmware variant on
HVR-900 cards, as well as splitting the HVR-950 into its own entry
(since I don't know if it uses the MTS variant and it will have to be
split off eventually anyway).

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
7d497f8afa80128bb99a425a6d7a766a863128a5 11-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6587): Cleanup at tv norm selection

With the conversion to the vidio_ioctl2, tvnorms array is not required anymore.

Also, removed some code from V4L1 time (VIDEO_MODE_foo), specied at the
non-used video_decoder.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
cb77d010221e66c63f4a71546fed73be9b12b9a3 11-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6586): Remove some dead code and make drive fully V4L2 compatible

There were some vestiges of an old V4L1 I2C driver that were called by em28xx.
This patch removes this dead code, and replaces videodev.h to videodev2.h

Now, this driver doesn't require V4L1 anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
m28xx-video.c
m28xx.h
195a4ef627e110cd468a69fdb973548e6914577a 11-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6585): Convert em28xx to video_ioctl2

Uses the newer ioctl handler at videodev. This patch also cleans up some
bad logic at the driver and do CodingStyle and other cleanups at the
resulting driver.

Also, since VIDIOCMBUF were not working, the V4L1 compat code were removed.
The compat code will eventually be re-inserted, if we find a clean way for
implementing compatibility with the old API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
9e31ced888d1ca49ec5be51ef295e3ce994366c4 11-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6584): Fix read() method

Backport read() fixes from Markus Rechberger.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
a225452ef80a7bd894fd2dfd01a4973d444152f4 11-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6583): Fix em28xx read stream locking

On some situations, closing an streaming application and re-opening were
returning -EBUSY.

Uses the same locking schema also present on cx88.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
a3a048cea301baba5d451991074a85dc20a8f228 11-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6582): Fix em28xx to allow multiple open

Allows shared access support for em28xx. Just one userspace application is
allowed to get stream. The other(s) application(s) can change V4L2 controls,
set video standards, etc.

This patch were splited from Markus Rechberger's tree and backported to 2.6.17
by Pádraig Brady.

The original patch were ported to the latest em28xx version and had CodingStyle
corrected to solve the issues pointed by scripts/checkpatch.pl.

Thanks to Pádraig Brady <P@draigBrady.com> for pointing this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
98ae127cae56b99f2282d73399e0e1ca7dc13bc9 05-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6562): Make HVR900 to use also tveeprom

Hauppauge firmwares can be decoded using tveeprom. This patch adds HVR-900 as
a tveeprom client. It also adds xc3028 tuner entry to tveeprom.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
f8b6030ccca06bf0d45d9b0908caac9b624a9beb 05-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6560): Fix a bug when setting tuner type

Tuner-type were correctly filled only by the hint function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
232fcefb55e67cf38176a1e5c188a04694445f11 25-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB(6548b) Fix compilation for em28xx

From: Mauro Carvalho Chehab <mchehab@infradead.org>

In file included from drivers/media/video/em28xx/em28xx-i2c.c:31:
drivers/media/video/tuner-xc2028.h:10:26: error: dvb_frontend.h: No such file or directory

In file included from drivers/media/video/em28xx/em28xx-i2c.c:31:
drivers/media/video/tuner-xc2028.h:32: warning: 'struct dvb_frontend' declared inside parameter list
drivers/media/video/tuner-xc2028.h:32: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
akefile
d2ba055d3b7ca7694af38a735f00850363ee9417 04-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6546): Add comments for the hint methods

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
fad7b958e753e18ff443786360f7846da50a3085 04-Nov-2007 Sascha Sommer <saschasommer@freenet.de> V4L/DVB (6545): em28xx: autodetect Cinergy 200 USB and VGear PocketTV

Adds autodetection support for the Cinergy200 USB and the VGear PocketTV.

Whenever a usb device with generic empia em2800 usb ids is detected the device
gets scanned for connected i2c devices. If the device list matches an em2800
device in the device list the model id gets changed accordingly.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
4362559d826b369df41fc74df4c5db6061962dce 03-Nov-2007 Sascha Sommer <saschasommer@freenet.de> V4L/DVB (6539): em28xx: add support for vgear pockettv

attached patch adds support for the vgear pockettv.
It seems to require a write to another register for audio to work.
I checked my old cinergydrv and we did the same register write there. I
therefore enabled it for all em2800 based devices.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
5a80415bcabf2b59e8c34db6e743c54582cfd3c2 04-Nov-2007 Sascha Sommer <saschasommer@freenet.de> V4L/DVB (6538): em28xx: fix locking to allow accesses from 2 different threads at the same time

The attached patch modifies the em28xx driver so that there can be ioctls from
multiple different threads.

This is necessary for capture apps like MPlayer that use different threads for
capturing and channel tuning.

Now the locking is only done for the ioctls that change properties of the
device or access the i2c bus.

It also removes some locks that look unnecessary:

In em28xx_init_dev:
the videodevice is not registered yet so nothing can access the hardware
meanwhile, the device struct is not assigned to the interface yet so no race
with disconnect is possible

In em28xx_release_resources:
it gets only called when dev->lock is already held

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
ea4fd5679b258d8ae85124a47b587a53ba6409de 04-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6537): Add entry for Pixelview Prolink PlayTV USB 2.0

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
03910cc39035d27f4c85c8ad2a236cc5c9456127 04-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6536): Add a hint for boards without unique USB ID

This patch adds a function to allow trying to detect boards that shares
the generic IDs.

The current detection method is based at eeprom checksum.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
3dbd85ba36ff74af87550e76f5765a768b108409 03-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6535): Fix: Adds the generic PCI IDs for em28xx

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.c
7d070e26a868bd72f0d32189e0f3ceba47d2db82 02-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6519): Fix HVR900/HVR950 entry

- Television is now default;
- Add HVR950 name at the entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
352fae1dffe2d0d04949e579d03667377a176cff 01-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6516): Allow faster loading by using 64 bytes block by em28xx i2c write

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
6c362c8e58da972728a3666a0a00b9c2f1574e1f 30-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6476): Add support for analog tv on HVR-950

This patch adds USB ID for HVR-950. It also adds the callback for handling
firmware loading.

Thanks to Markus Reichberger for the reset commands.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-i2c.c
882876bf9780fac570184b719a76140a1b1e4178 29-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6474): Add support for tuner-xc2028

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
12466577853b0d057f4416f4c7020e544f3a4209 24-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6422): Add the pending entries for xc2028/3028 based boards

Also replaces all occurrences of TUNER_XCEIVE_XC3028 to TUNER_XC2028.

Some work is still may be required to make sure that non-tm6000 drivers will
be capable of using tuner-xc2028.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.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>
m28xx-i2c.c
m28xx-video.c
63337dd3f5506628e4831b08e39e09d7f1407769 10-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6581): Fix: avoids negative vma usage count

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
2b2c93ac998896db0d2b754a4fd83479bda7efde 03-Nov-2007 Sascha Sommer <saschasommer@freenet.de> V4L/DVB (6540): em28xx: fix failing autodetection after the reboot

The attached patch is required so that the autodetecion code also works after
a reboot.

Setting the I2C speed does not seem to be supported for em2800.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
fe51f819bcbaa1fe94291f4bbe2a6a40c1653b54 02-Nov-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6532): Add the remaining addresses for tda9887

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-i2c.c
8c6da5c41e39abc8d775a14f3bea28bec6c76d69 02-Nov-2007 Ludovico Cavedon <cavedon@sssup.it> V4L/DVB (6531): Fix a regression caused by commit 153962364dc6fa4a24571885fbe76506d8968610

From: Ludovico Cavedon <cavedon@sssup.it>

Signed-off-by: Ludovico Cavedon <cavedon@sssup.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-i2c.c
6d35c8f648763299926d6e19de5334e15a9be7ab 01-Nov-2007 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (6514): em28xx: Include linux/mm.h

This em28xx-video.c uses functions from this header, but doesn't include it.
It depends on some v4l headers included two levels down including poll.h,
which includes mm.h.

These v4l headers might change, so it's best to include the headers needed
directly.

It also causes problems for the out of core build system's backward
compatibility with older kernels, which is the real reason I bothered to
create a patch for something that would otherwise be so minor that it would
hardly be worth the trouble.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
cb20630cefb382a360fcc9ea054e597596153f42 29-Oct-2007 Randy Dunlap <randy.dunlap@oracle.com> V4L/DVB (6479): use input functions, should depend on INPUT

All of these drivers select VIDEO_IR, which uses the input subsystem,
so they should also depend on INPUT.

Problem examples:

drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc0a): undefined reference to `get_key_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc4f): undefined reference to `get_key_pinnacle_grey'
drivers/built-in.o: In function `saa7134_input_fini':
(.text+0x11cd8b): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d1fa): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d317): undefined reference to `input_register_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d6ca): undefined reference to `input_free_device'

drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c3f3): undefined reference to `ir_codes_hauppauge_new'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c450): undefined reference to `ir_codes_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c480): undefined reference to `ir_codes_purpletv'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c495): undefined reference to `ir_codes_pinnacle_grey'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c622): undefined reference to `ir_rc5_timer_end'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c637): undefined reference to `ir_rc5_timer_keyup'
drivers/built-in.o: In function `build_key':
saa7134-input.c:(.text+0x11c769): undefined reference to `ir_extract_bits'
saa7134-input.c:(.text+0x11c7ad): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f0): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f9): undefined reference to `ir_input_nokey'
saa7134-input.c:(.text+0x11c806): undefined reference to `ir_input_nokey'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ca07): undefined reference to `ir_codes_encore_enltv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11caf6): undefined reference to `ir_input_init'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cbf2): undefined reference to `ir_codes_avermedia'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc24): undefined reference to `ir_codes_pctv_sedna'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc53): undefined reference to `ir_codes_flydvb'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc85): undefined reference to `ir_codes_videomate_tv_pvr'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ccb7): undefined reference to `ir_codes_pixelview'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cce9): undefined reference to `ir_codes_eztv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cd1b): undefined reference to `ir_codes_manli'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cda8): undefined reference to `ir_codes_cinergy'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cdd7): undefined reference to `ir_codes_flyvideo'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce06): undefined reference to `ir_codes_asus_pc39'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce7d): undefined reference to `ir_codes_gotview7135'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cee1): undefined reference to `ir_codes_proteus_2309'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
e7222ca9b4e6c6cdabedd8d33da59263ace85a02 15-Oct-2007 Florin Malita <fmalita@gmail.com> V4L/DVB (6350): V4L: possible leak in em28xx_init_isoc

Coverity (CID 1929) spotted the following: if a transfer buffer
allocation fails, the last allocated urb is leaked (it hasn't been
stored in dev->urb[] yet so em28xx_uninit_isoc misses it). The patch
also includes a small typo fix.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
22c4a4e98ece0eaff13b3d0ac73c5283013eb6b1 15-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field

struct video_device used to define a .hardware field. While
initialized on severl drivers, this field is never used inside V4L.
However, drivers using it need to include the old V4L1 header.

This seems to cause compilation troubles with some random configs.
Better just to remove it from all drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
3a4fa0a25da81600ea0bcd75692ae8ca6050d165 19-Oct-2007 Robert P. J. Day <rpjday@mindspring.com> Fix misspellings of "system", "controller", "interrupt" and "necessary".

Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
m28xx-video.c
3be27d37c257fa5f99363f9c8e06e405cbad712e 13-Oct-2007 David Brownell <david-b@pacbell.net> i2c: Remove NOP i2c_algorithm.algo_control() methods

This removes NOP implementations of i2c_algorithm.algo_control.

With this change, there are no implementations of this hook in
the kernel.org tree ... that hook seems about ripe to remove.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
m28xx-i2c.c
a991f44b79fa49b281eb078eed4a76a42101012a 10-Oct-2007 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry

The rest of V4L files.

There is one list_for_each+list_entry in cpia_pp.c that
wasn't changed because it expects the loop iterator to remain NULL if
the list is empty.

A bug in vivi is fixed; the 'safe' version needs to be used because the loop
deletes the list entries.

Simplify a second loop in vivi and get rid if an un-used variable in that loop.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.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>
m28xx-core.c
m28xx-input.c
afa76b392e10d37c9e717198b5c2686de26c629d 13-Aug-2007 Rolf Eike Beer <eike-kernel@sf-tec.de> V4L/DVB (6005): Initialize filp->private_data only once in em28xx_v4l2_open

Some lines later filp->private_data is initialized to dev again.
Since there are some checks that might fail in the mean time
keep the later version.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
1207cf84f289694ba7ba8eeaa346a0195b3de606 09-Aug-2007 Jesper Juhl <jesper.juhl@gmail.com> USB: Fix a memory leak in em28xx_usb_probe()

If, in em28xx_usb_probe() the memory allocation
dev->alt_max_pkt_size = kmalloc(32*
dev->num_alt,GFP_KERNEL);
fails, then we'll bail out and return -ENOMEM.
The problem is that in that case we don't free the storage allocated
to 'dev', thus causing a memory leak.

This patch fixes the leak by freeing 'dev' before we return -ENOMEM.
This fixes Coverity bug #647.


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
m28xx-video.c
bf57ab7ae74591973265ebd8e18bd0e785dbfb33 21-May-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (5640): Fix: em28xx shouldn't be selecting VIDEO_BUF

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
1b2bad2f049e405530b4a8a478edc45770b219c1 15-May-2007 Al Viro <viro@ftp.linux.org.uk> em28xx and ivtv should depend on PCI

.. because video-buf.c requires PCI, and VIDEO_EM28XX selects it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
config
57a44415beee38d1afcd8e1b5fad66f3414d2dac 11-May-2007 Linus Torvalds <torvalds@woody.linux-foundation.org> Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (44 commits)
V4L/DVB (5571): V4l1-compat: Make VIDIOCSPICT return errors in a useful way
V4L/DVB (5624): Radio-maestro.c cleanup
V4L/DVB (5623): Dsbr100.c Replace usb_dsbr100_do_ioctl to use video_ioctl2
V4L/DVB (5622): Radio-zoltrix.c cleanup
V4L/DVB (5621): Radio-cadet.c Replace cadet_do_ioctl to use video_ioctl2
V4L/DVB (5619): Dvb-usb: fix typo
V4L/DVB (5618): Cx88: Drop the generic i2c client from cx88-vp3054-i2c
V4L/DVB (5617): V4L2: videodev, allow debugging
V4L/DVB (5614): M920x: Disable second adapter on LifeView TV Walker Twin
V4L/DVB (5613): M920x: loosen up 80-col limit
V4L/DVB (5612): M920x: rename function prefixes from m9206_foo to m920x_foo
V4L/DVB (5611): M920x: replace deb_rc with deb
V4L/DVB (5610): M920x: remove duplicated code
V4L/DVB (5609): M920x: group like functions together
V4L/DVB (5608): M920x: various whitespace cleanups
V4L/DVB (5607): M920x: Initial support for devices likely manufactured by Dposh
V4L/DVB (5606): M920x: add "c-basic-offset: 8" to help emacs to enforce tabbing
V4L/DVB (5605): M920x: Add support for LifeView TV Walker Twin
V4L/DVB (5603): V4L: Prevent queueing queued buffers.
V4L/DVB (5602): Enable DiSEqC in Starbox II (vp7021a)
...
c5da5afb9d7b244cfe3334c77e90b4296cf5f263 02-May-2007 Jan Engelhardt <jengelh@linux01.gwdg.de> V4L/DVB (5586): Use menuconfig objects II - V4L

Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
59c51591a0ac7568824f541f57de967e88adaa07 09-May-2007 Michael Opdenacker <michael@free-electrons.com> Fix occurrences of "the the "

Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
m28xx-video.c
beb7dd86a101263bf63a78c7c6d4da3849b35bd6 09-May-2007 Robert P. J. Day <rpjday@mindspring.com> Fix misspellings collected by members of KJ list.

Fix the misspellings of "propogate", "writting" and (oh, the shame
:-) "kenrel" in the source tree.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
m28xx-i2c.c
6473d160b4aba8023bcf38519a5989694dfd51a7 06-Mar-2007 Jean Delvare <khali@linux-fr.org> PCI: Cleanup the includes of <linux/pci.h>

I noticed that many source files include <linux/pci.h> while they do
not appear to need it. Here is an attempt to clean it all up.

In order to find all possibly affected files, I searched for all
files including <linux/pci.h> but without any other occurence of "pci"
or "PCI". I removed the include statement from all of these, then I
compiled an allmodconfig kernel on both i386 and x86_64 and fixed the
false positives manually.

My tests covered 66% of the affected files, so there could be false
positives remaining. Untested files are:

arch/alpha/kernel/err_common.c
arch/alpha/kernel/err_ev6.c
arch/alpha/kernel/err_ev7.c
arch/ia64/sn/kernel/huberror.c
arch/ia64/sn/kernel/xpnet.c
arch/m68knommu/kernel/dma.c
arch/mips/lib/iomap.c
arch/powerpc/platforms/pseries/ras.c
arch/ppc/8260_io/enet.c
arch/ppc/8260_io/fcc_enet.c
arch/ppc/8xx_io/enet.c
arch/ppc/syslib/ppc4xx_sgdma.c
arch/sh64/mach-cayman/iomap.c
arch/xtensa/kernel/xtensa_ksyms.c
arch/xtensa/platform-iss/setup.c
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-mpc.c
drivers/media/video/saa711x.c
drivers/misc/hdpuftrs/hdpu_cpustate.c
drivers/misc/hdpuftrs/hdpu_nexus.c
drivers/net/au1000_eth.c
drivers/net/fec_8xx/fec_main.c
drivers/net/fec_8xx/fec_mii.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/fs_enet/mac-fcc.c
drivers/net/fs_enet/mac-fec.c
drivers/net/fs_enet/mac-scc.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/ibm_emac/ibm_emac_core.c
drivers/net/lasi_82596.c
drivers/parisc/hppb.c
drivers/sbus/sbus.c
drivers/video/g364fb.c
drivers/video/platinumfb.c
drivers/video/stifb.c
drivers/video/valkyriefb.c
include/asm-arm/arch-ixp4xx/dma.h
sound/oss/au1550_ac97.c

I would welcome test reports for these files. I am fine with removing
the untested files from the patch if the general opinion is that these
changes aren't safe. The tested part would still be nice to have.

Note that this patch depends on another header fixup patch I submitted
to LKML yesterday:
[PATCH] scatterlist.h needs types.h
http://lkml.org/lkml/2007/3/01/141

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
m28xx-cards.c
53c4e9551c2930767fcdaa54323616c32ed6e9c6 29-Mar-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (5479): Use ARRAY_SIZE instead of a magic number

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-i2c.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>
m28xx-input.c
fa027c2a0a0d6d1df6b29ee99048502c93da0dd4 12-Feb-2007 Arjan van de Ven <arjan@linux.intel.com> [PATCH] mark struct file_operations const 4

Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.

[akpm@sdl.org: dvb fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
m28xx-video.c
9a2816c1c4ca7f5d02de4339589913701251dd5a 27-Dec-2006 David Brownell <david-b@pacbell.net> V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch

- CAFE_CCIC needs to depend on PCI, else "allyesconfig" breaks
on systems without PCI
- em28xx-video can't udelay(2500) else "allyesconfig" breaks
on systems that refuse to spin that long (I saw it on ARM)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
663d1ba2f1f66db43ab95350f965c1d9f2e3e5bc 10-Oct-2006 Al Viro <viro@ftp.linux.org.uk> [PATCH] em28xx NULL noise removal

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
m28xx-video.c
7d12e780e003f93433d49ce78cfedf4b4c52adc5 05-Oct-2006 David Howells <dhowells@redhat.com> IRQ: Maintain regs pointer globally rather than passing to IRQ handlers

Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.

(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.

(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
m28xx-core.c
784e8fe417d45b526eeb74794b7df43e11000f70 26-Aug-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4546): Add u32 argument to VIDIOC_INT_RESET.

The extra argument makes it possible to reset subsystems of a chip if
that is supported.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
faa1cb2039141030c7179b530ea4c63246847bc3 22-Aug-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4518): Allow manually selecting the proper helper drivers

There are several boards on V4L that can work with several different
helper modules for audio/video encoding/decoding and similar stuff.
This patch adds the capability of choicing between autoselecting the
pertinent helper modules for each driver, or to manually selecting
them.
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mike Isely <isely@pobox.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
eb42c42449b4d018881dc8f1856ce84cf74f90c5 18-Aug-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4507): Make tvp5150 an independent Kconfig item

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
4987abed29247063bb70374e60916584a43975ef 27-Jun-2006 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (4267): Remove all instances of request_module("tda9887")

We should no longer try to load the tda9887 module, because it no longer
exists. The tda9887 driver has been merged into the tuner module.
This patch removes all instances of request_module("tda9887") from
the following video4linux drivers: bttv, cx88, em28xx and saa7134.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.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>
m28xx-i2c.c
b93eedb62e358588c5e595b07fb85efa1f597a9f 26-Mar-2006 Sylvain Pasche <sylvain.pasche@gmail.com> V4L/DVB (4023): Subject: Pinnacle PCTV grey remote control support

This adds support for the older (?) Pinnacle PCTV remotes (with all buttons
colored in grey). There's no autodetection for the type of remote, though;
saa7134 defaults to the colored one, to use the grey remote the
"pinnacle_remote=1" option must be passed to the saa7134 module

Signed-off-by: Sylvain Pasche <sylvain.pasche@gmail.com>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-input.c
f6320bd3df5964619346bac77b36d03c5a82f6fd 22-May-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3968a): Remove compatibility check for I2C_PEC

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-i2c.c
adcb0fa2504aac35e0ed285147b11e75a6db34c7 22-May-2006 Adrian Bunk <bunk@stusta.de> V4L/DVB (3963): Em28xx/: possible cleanups

This patch contains the following possible cleanups:
- make the following needlessly global functions static:
- em28xx-core.c: em28xx_accumulator_set()
- em28xx-core.c: em28xx_capture_area_set()
- em28xx-core.c: em28xx_scaler_set()
- em28xx-core.c: em28xx_isocIrq()
- remove the following unused EXPORT_SYMBOL's:
- em28xx-cards.c: em28xx_boards
- em28xx-cards.c: em28xx_bcount
- em28xx-cards.c: em28xx_id_table

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx.h
2e7c6dc3989136844eb63e05f9e4dc6608a763c6 03-Apr-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3715): Change all emails to the currently used one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
m28xx.h
c7c0b34c27bbf0671807e902fbfea6270c8f138d 02-Apr-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3712): Fix video input setting of em28xx, use _INT_S_VIDEO_ROUTING in tvp5150

- Use new routing input defines in em28xx-cards.c
- Fix S-Video settings for tvp5150-based cards (input was copied from saa7115
based cards and worked only because S-Video was selected in the default: case)
- Replace VIDIOC_S_INPUT by VIDIOC_INT_S_VIDEO_ROUTING in em28xx-video.c
- Remove the now obsolete VIDIOC_S_INPUT handler in saa7115.c
- Add VIDIOC_INT_G/S_VIDEO_ROUTING in tvp5150.c
- Add new media/tvp5150.h with the routing defines.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.c
7c908fbb0139fa1080412d0590189abfe2df87eb 11-Apr-2006 Eric Sesterhenn <snakebyte@gmx.de> V4L/DVB (3790): Use after free in drivers/media/video/em28xx/em28xx-video.c

In several places we use dev->devno right after we kfree() dev. This fixes
coverity bug id #1065

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
cd41e28e2d0f198ad56840bf8ba13cb41b129bab 09-Apr-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3774): Create V4L1 config options

V4L1 API is depreciated and should be removed soon from kernel. This patch
adds two new options, one to disable V4L1 drivers, and another to disable
V4L1 compat module. This way, it would be easy to check what still depends
on V4L1 stuff, allowing also to test if app works fine with V4L2 only support.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
8036dc6bdca0faa981be01377728678a6f6f3fde 04-Apr-2006 Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree

This fixes some uneeded rebuilds under drivers/media/video after moving
the source tree. The makefiles used $(src) and $(srctree) for include
paths, which is unnecessary. Changed to use relative paths.

Compile tested, produces byte-identical code to the previous makefiles.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
akefile
07151724a35e8e70f1aa64ce30a5a3f5c1ad49a3 01-Apr-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3702): Make msp3400 routing defines more consistent

Renamed various msp3400 routing defines to be more consistent and less
confusing. Esp. the MSP_DSP_OUT defines were confusing since it is really
a DSP input.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.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>
m28xx-video.c
2474ed444b475614ef795523076be7cc8437ae00 19-Mar-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3582): Implement correct msp3400 input/output routing

- implement VIDIOC_INT_S_AUDIO_ROUTING for msp3400 and tvaudio
- use the new command in bttv, pvrusb2 and em28xx.
- remove the now obsolete MSP_SET_MATRIX from msp3400 (yeah!)
- remove the obsolete VIDIOC_S_AUDIO from msp3400.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.c
49965a80a4c4f5cbe15fb3bb1f8f8b0ec4ef02bc 19-Mar-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3581): Add new media/msp3400.h header containing the routing macros

Moved msp3400.h to msp3400-driver.h.
Created media/msp3400.h with the new routing defines and lots of comments.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
ac9ec9358e63878b105f48f5f094105dff7d9833 16-Mar-2006 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (3524): Kconfig: add menu items for saa7115 and saa7127

- created Kconfig menu item, VIDEO_SAA711X, for the saa7115 module,
which supports SAA7113, SAA7114 and SAA7115 video decoders.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
config
f5762e441d5022ecc5b66b5fe54e41e2ac5d02be 13-Mar-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3513): Remove saa711x driver

Now, em28xx uses saa7115 instead of saa711x.
saa7115 driver is capable of handling saa 7113, 7114 and 7115.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
19478843e4f8af7de9b297876519ee8b98c2f5ad 14-Mar-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3499): Fix a bug when more than MAXBOARDS were plugged on em28xx

Coverity reported a bug at checking max number of supported boards by
em28xx init code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.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>
m28xx-cards.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>
m28xx-cards.c
9475fb1c717ee5ce3df767b8e3b9439d341f043d 27-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3293): Fixed amux hauppauge hvr900/terratec hybrid xs

Fixed amux hauppauge hvr900/terratec hybrid xs

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.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>
m28xx-cards.c
m28xx-i2c.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>
m28xx-cards.c
282b7cb3e03d9ada4067083e61919d74197a1e5a 07-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3326): Adding support for Terratec Prodigy XS

Adding support for Terratec Prodigy XS

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
3593cab5d62c4c7abced1076710f9bc2d8847433 07-Feb-2006 Ingo Molnar <mingo@elte.hu> V4L/DVB (3318b): sem2mutex: drivers/media/, #2

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
e5d4a56d5d824e4dfe7d065d0fedb02e63952710 07-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3314): Fixed em28xx based system lockup

Fixed em28xx based system lockup, device needs to be initialized
before starting the isoc transfer otherwise the system will completly lock up.

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e8e41da46dca6b33e990b48ee379503d25b4da65 07-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3306): Fixed i2c return value, conversion mdelay to msleep

fixed i2c return value, conversion mdelay to msleep

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
m28xx-i2c.c
33ccaa3feb2a6e09942b6f0af6fbb0451a2e1537 07-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3280): Changed description of KWorld PVR TV 2800RF

Changed description of KWorld PVR TV 2800RF

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
4d17d0834a2e6a5cba096ea09592a4a096183300 07-Feb-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3276): Added terratec hybrid xs and kworld 2800rf support

- Added terratec hybrid xs product/vendorid
- Added gpio audio initialization for kworld pvr 2800rf

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx.h
a94e95b443811c127734ef10f3b7d2220532c1d2 23-Jan-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3432): Hauppauge HVR 900 Composite support

- Hauppauge HVR 900 Composite support

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-cards.c
m28xx-video.c
m28xx.h
cbcf749382a7bbf70b1bbf6eeb3234d1682c9f17 23-Jan-2006 Michael Krufky <mkrufky@m1k.net> V4L/DVB (3431): fixed spelling error, exectuted --> executed.

- fixed spelling error, exectuted --> executed.

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-core.c
9aeb4b051b65c0248ea6589096950413c4da9d63 23-Jan-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3423): CodingStyle fixes.

- CodingStyle fixes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
2d50f847c62acbafa25dc690d0fe65b8b908a326 23-Jan-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3422): Implemented VIDIOC_G_FMT/S_FMT for sliced VBI

- Implemented VIDIOC_G_FMT/S_FMT for sliced VBI
- VIDIOC_S_FMT now calls a function

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
e5589befc472ca50882f37c4fb32333fc93a65b7 23-Jan-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3421): Several fixes to prepare for VBI

- Fixed VBI compilation.
- Included capacity to specify vbi and video number.
- Added a better control for using more than one em28xx device.
- VIDIOC_G_FMT now calls a function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
m28xx.h
439090d7d82a333a21987dcbccb90961f27fd2e9 23-Jan-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3406): Added credits for em28xx-video.c

- Added credits for sn9c102 kernel module and his author as
some parts of em28xx-video were based.

Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Acked-by: Markus Rechberger <mrechberger@gmail.com>
Acked-by: Ludovico Cavedon <cavedon@sssup.it>
Acked-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.c
4c0f631e14b849782259519c749414b1f1ddbfa8 23-Jan-2006 Ricardo Cerqueira <v4l@cerqueira.org> V4L/DVB (3393): Move all IR keymaps to ir-common module

- All the keymaps have the same structure, and can be shared between different
chips, so it makes no sense having them scattered between the input files.
This aggregates them all at ir-common module.
- Added new Hauppauge remote (Hauppauge grey), contributed by J.O. Aho
<trizt@iname.com> (with some small changes)
Changed KEY_KPx (keypad numerals) references to KEY_x, to avoid problems
when NumLock is off (suggested by Peter Missel <peter.missel@onlinehome.de>)
- Some cleanups at IR code

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-input.c
366cc64b0d9ac922ac4f0f54e06c13ec95249928 16-Jan-2006 Markus Rechberger <mrechberger@gmail.com> V4L/DVB (3390): Added remote control support for pinnacle pctv

- Added remote control support for pinnacle pctv

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-input.c
1e4baed379a2bff3c728ea34602d3432fb047af8 15-Jan-2006 Ingo Molnar <mingo@elte.hu> V4L/DVB (3380): Semaphore to mutex conversion on drivers/media

- Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
m28xx-video.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>
m28xx-video.c
0e7072ef6623c3dc58faf3f7310aba77b0a5845e 09-Jan-2006 Michael Krufky <mkrufky@m1k.net> V4L/DVB (3277): Fix incorrect filename reference in top comments


- Fix incorrect filename reference in top comments

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx.h
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>
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
9bb13a6dc3a6f68c990264838ff0493d900c48d7 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3233): Fixed API to set I2S speed control


- Created a new ioctl to control I2S speed. Old calls to an
inadequate V4L2 API replaced.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-cards.c
m28xx-video.c
m28xx.h
d21838dd7d098e102ced2fafed62dcb133c4d71c 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3123b): syncs V4L subsystem tree with kernel

- This patch makes kernel in sync with v4l subsystem tree.
- some lines reordered to be sync.
- some reduntant codes removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-core.c
b060c25f70adb20532dacefa72029d1d2db1a7f1 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3123a): remove uneeded #if from V4L subsystem

- some uneeded #if were introduced by a previous patch.
this patch removes these.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-i2c.c
7865c44d8ae832d6fb6522862268c7bd7814fd44 09-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (3100): fix compile error, remove dead code and volume scaling

- Fix compile error (missing '}') in em28xx-video.c. Remove dead code and
volume scaling from msp3400.c. Volume scaling does not belong there, it should
be done in the driver for the card that uses the msp3400 if needed, not in the
msp3400.c source. The volume scaling code gave problems with the ivtv driver
which does not need to do any scaling.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-video.c
c0477ad9feca01bd8eff95d7482c33753d05c700 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L/DVB (3099): Fixed device controls for em28xx on WinTV USB2 devices

- Controls now come from video and audio decoder driver for msp3400 and tvp5150.
- Added audio and sound controls as provided by msp3400 and tvp5150.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-video.c
e8efb71d02d008a665ba88e6f75af691d9425e49 09-Jan-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L (0978): 64-bit fixes for removing warnings on compat_ioctl32

- 64-bit fixes for removing warnings on compat_ioctl32.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-core.c
17cbe2e5831c3df114c8d7b7d8bf07f2c35a6030 09-Jan-2006 Mauro Carvalho Chehab <mchehab@brturbo.com.br> V4L (963): Explicit compat_ioctl32 handler to em28xx

- Included explicit compat_ioctl32 handler.
- removed extra line on cardlist.


Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-video.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>
m28xx-i2c.c
75318d2d7cab77b14c5d3dbd5e69f2680a769e16 21-Nov-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] USB: remove .owner field from struct usb_driver

It is no longer needed, so let's remove it, saving a bit of memory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
m28xx-video.c
f85c657ff1f712abd5207a95fba8a5fcc282ab04 19-Dec-2005 Jean Delvare <khali@linux\-fr.org> [PATCH] V4L/DVB (3188): Fix compilation failure with gcc 2.95.3.

- Fix compilation failure with gcc 2.95.3.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
8bcc247617deaf229962e9d663c69e65523519ab 15-Dec-2005 Al Viro <viro@ftp.linux.org.uk> [PATCH] em28xx: %zd for size_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
m28xx-core.c
3639c8619d50a6dea8fa106a5c61d848ffdcd3d6 12-Dec-2005 Sascha Sommer <saschasommer@freenet.de> [PATCH] V4L/DVB: (3113) Convert em28xx to use vm_insert_page instead of remap_pfn_range

Convert em28xx to use vm_insert_page instead of remap_pfn_range

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Michael Krufky <mkrufky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
m28xx-core.c
m28xx-video.c
674434c691e10015660022fc00b04985a23ef87b 12-Dec-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 4

Clean up whitespaces at v4l/dvb files

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>
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
943a49027b6d9829b737e6da3d72b867a7a6f832 01-Dec-2005 Adrian Bunk <bunk@stusta.de> [PATCH] V4L: Makes needlessly global code static

This patch makes needlessly global code static.

Signed-off-by: Adrian Bunk <bunk@stusta.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>
m28xx-core.c
m28xx-video.c
6555f4322f5c8dc03047eb566d8519ba348e02de 14-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: (963) em28xx IR fixup

Removed the code that avoids repeating events when pressing IR keys.

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>
m28xx-input.c
9d4d9c05c807ab8a49ac0024987b223bb32c022d 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L: 920: fixed autodetection of max size by if alternate setting

- Fixed autodetection of max size by if alternate setting
- Fixed some debug messages

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>
m28xx-core.c
m28xx-video.c
m28xx.h
eac94356c8f9f7d3854ed0290a406b13bfe8df4c 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] V4L: 907: em28xx cleanups and fixes

- Em28xx cleanups and fixes.
- Some cleanups and audio amux adjust.
- em28xx will allways try, by default, the biggest size alt.
- Fixes audio mux code.
- Fixes some logs.
- Adds support for digital output for WinTV USB2 board.

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>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
b296fc6017e0ec6bc6cd0f40275f268035eb6b8b 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 898: em2820 i2c fix

- Miscelaneous fixes for em28xx
- I2C hardware named changed to wright value.
- utsname included to em28xx-video.c
- Makefile fixes.

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>
akefile
m28xx-video.c
ad07d93ae7884a72a293eb4efb61a872f109ebd5 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 897: saa7146 fix

- Fixing headers to compile cleanly.

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>
m28xx-video.c
2ea55ad3897d8abac07435190c851f804433801f 09-Nov-2005 Michael Krufky <mkrufky@m1k.net> [PATCH] v4l: 891: change config em28xx to config video em28xx

- Change CONFIG_EM28XX to CONFIG_VIDEO_EM28XX

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>
akefile
c2e0b62e050374ddbf3221e7b78e1d0f26e148cb 09-Nov-2005 Michael Krufky <mkrufky@m1k.net> [PATCH] v4l: 890: fixed typo

- Fixed typo.

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>
config
15871a2905b84d6dba9013dbcbd9c79ace694ffb 09-Nov-2005 Michael Krufky <mkrufky@m1k.net> [PATCH] v4l: 889: add em28xx to kernel build

- Add em28xx to kernel build.

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>
config
akefile
3acf28095009509c9ca1e283de821b5be9ddede6 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 886: renamed common structures to em28xx

- Renamed common structures to em28xx

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>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
m28xx.h
f7abcd385cc8a5a2f75b07c8325067ea2785ba1e 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 877: module em2820 renamed to em28xx and moved to v4l dir

- Module em2820 renamed to em28xx and moved to V4L dir.

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>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
feff0485ebcf05b5af8a3c82aa5c361d9f8b6e75 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 864: improved isoc error detection

- Improved isoc error detection.

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>
m28xx-core.c
45632c4f835e74f937d8632f7ba2dd49aa39c476 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 863: added pinnacle dazzle dvc 90

- Added Pinnacle Dazzle DVC 90

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>
m28xx-cards.c
m28xx.h
91cad0f2bda7cd254efcbbff0e53f86941ca7764 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 856: some module rename and small fixes

- Some module rename and small fixes

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>
m28xx-i2c.c
m28xx-video.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>
m28xx-core.c
m28xx-video.c
a38a7d4ff8539817691a335149cac903be4250f8 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 841: added saa7114 initcode for msi vox usb 2.0

- Added saa7114 initcode for MSI Vox USB 2.0

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>
m28xx-video.c
30556b23f31973ca311341277c4e4b128c0528bb 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 840: fixed settings for msi vox usb 2.0 saa7114 is missing atm

- Fixed settings for MSI Vox USB 2.0 (saa7114 is missing atm)

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>
m28xx-cards.c
m28xx-i2c.c
m28xx.h
08eca13dc407c389f04ce295144bb3fcd996a10d 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 838: modified settings for msi vox usb 2.0

- Modified settings for MSI VOX USB 2.0

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>
m28xx-cards.c
f59ab27b7a6fd760268f695078c739f3036b4edf 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 820: fixed log for tveeprom on em28xx cards

- Fixed log for tveeprom on em28xx cards.

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>
m28xx-cards.c
ac9cd97640a8bcad75dc7305761365c3e339bbc5 09-Nov-2005 Ricardo Cerqueira <v4l@cerqueira.org> [PATCH] v4l: 817: saa713x keymaps and key builders were moved from ir kbd i2c c

- SAA713x keymaps and key builders were moved from ir-kbd-i2c.c

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>
m28xx-input.c
1a9ca74d22065355d61bb6395590378040e7366d 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 815: commented obsoleted stuff at videodev headers

- Commented obsoleted stuff at videodev headers.

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>
m28xx-video.c
86bb4a215d152111f20daeb2a530f064afee8542 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 814: cleanup dev assignment

- Cleanup dev assignment

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>
m28xx-video.c
9c75541fc97252e605b7bc8f9b09f816483e22fb 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 813: replaced obsolete video get drvdata and video set drvdata

- Replaced obsolete video_get_drvdata and video_set_drvdata

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>
m28xx-video.c
m28xx.h
02f7427333c5784a937314a305132ed31cc6b9d1 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 802: replaced kmalloc kfree with usb buffer alloc usb buffer free to get

- Replaced kmalloc/kfree with usb_buffer_alloc/usb_buffer_free to get

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>
m28xx-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>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
m28xx.h
16f2e6229f6f7b89cb42f4942cb46dc645faae2a 09-Nov-2005 Sascha Sommer <saschasommer@freenet.de> [PATCH] v4l: 793: remotes for the cinergy 200 usb and cinergy 250 usb are the same

- Remotes for the Cinergy 200 USB and Cinergy 250 USB are the same.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
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>
m28xx-input.c
4f9c05aa727a3b27e28972f2f3938b29ad81b833 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 791: codingstyle fixes

- CodingStyle fixes

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
m28xx-input.c
e43f14af143921ac6680aa3ddfff111bef4e034a 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 790: added support for terratec cinergy 250 usb

- Added support for Terratec Cinergy 250 USB

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>
m28xx-input.c
74458e6c1aea9e422e46030e7bc61e9b0984be5b 09-Nov-2005 Sascha Sommer <saschasommer@freenet.de> [PATCH] v4l: 786: chip id removed since it isn t required anymore

- Chip_id removed since it isn't required anymore.

Signed-off-by: Sascha Sommer <saschasommer@freenet.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>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
m28xx.h
d5e5265315770bda46c50ecaa64e2b9790f2064c 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 784: several improvement on i2c ir handling for em2820

- Several Improvement on I2C IR handling for em2820:
- moved Pinnacle IR table (ir_codes_em2820) to em2820-input.c
- IR struct renamed and moved to a header file.
- New file to handle em2820-specific IR.
- Some cleanups.
- attach now detects I2C IR and calls em2820-specific IR code
- IR compat code moved to compat.h
- New header with struct IR_i2c there, to allow it to be
used by board-specific input handlers.

- Some improvements at em28xx board detection:
- Board detection message improved to show interface and class.
- Now it doesn't touch audio interfaces.

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>
m28xx-cards.c
m28xx-i2c.c
m28xx-input.c
m28xx-video.c
m28xx.h
da45a2a5b96afd7188c058a55eb2917d6524c0cf 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 783: fixed bad em2820 remote layout values

- Fixed bad em2820 remote layout values
- set KNC One and Purple TV layouts back to default
- added pinnacle ir remote i2c address to the i2c scanner

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>
m28xx-i2c.c
55b8b2d173adea54a9e8407f26630c19274fa0b6 09-Nov-2005 Paul Vriens <Paul.Vriens@xs4all.nl> [PATCH] v4l: 780: fixed typo in module param description

- Fixed typo in module param description

Signed-off-by: Paul Vriens <Paul.Vriens@xs4all.nl>
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>
m28xx-core.c
596d92d5128d308b5a79f21c3e72c87f5fc7e58b 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 767: included support for em2800

- Included support for em2800.

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>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h
c365864faf8c68db9d1a64d4356758da9f206ff1 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 762: added support for the terratec cinergy 250 usb tv remote

- Added support for the terratec cinergy 250 usb tv remote

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>
m28xx-i2c.c
a9ae9fb17bdcb22ae0c1abc6ebd97704dd80d9d1 09-Nov-2005 Markus Rechberger <mrechberger@gmail.com> [PATCH] v4l: 761: fixed registry value in em2820

- Fixed registry value in em2820-i2c.c which corrects a tuner setting (also
removed that call from em2820-video.c)

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>
m28xx-i2c.c
m28xx-video.c
98f30ed06a0feade6250438b0bd6cc472f26b12a 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 739: created make changelog to make easier to generate patches

- Created make changelog to make easier to generate patches.

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>
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
1f6173ed9b48709383631e2c43eed770f15d05d1 09-Nov-2005 Mauro Carvalho Chehab <mchehab@brturbo.com.br> [PATCH] v4l: 729: fixed include when compiling at kernel tree

- Fixed include when compiling at kernel tree

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>
m28xx-cards.c
m28xx-core.c
m28xx-video.c
c06f57f55a0e499ec38fbb62812ad3fe08ad246e 09-Nov-2005 Michael Krufky <mkrufky@m1k.net> [PATCH] v4l: 723: fix build for 2.6.14

- Fix build for 2.6.14

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>
m28xx-i2c.c
fd35a6b454818e01f761622e9ac5824ce2d7baf5 09-Nov-2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> [PATCH] v4l: 718: fixed build

- Fixed build.

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>
m28xx-i2c.c
a6c2ba283565dbc9f055dcb2ecba1971460bb535 09-Nov-2005 akpm@osdl.org <akpm@osdl.org> [PATCH] v4l: 716: support for em28xx board family

- Added support for em28xx board family

Signed-off-by: Ludovico Cavedon <cavedon@sssup.it>
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>
m28xx-cards.c
m28xx-core.c
m28xx-i2c.c
m28xx-video.c
m28xx.h