safe/jmp/linux-2.6
15 years agoV4L/DVB (10644): v4l2-subdev: rename dev field to v4l2_dev
Hans Verkuil [Sat, 14 Feb 2009 15:00:53 +0000 (12:00 -0300)]
V4L/DVB (10644): v4l2-subdev: rename dev field to v4l2_dev

Remain consistent in the naming: fields pointing to v4l2_device should
be called v4l2_dev. There are too many device-like entities without
adding to the confusion by mixing naming conventions.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10643): v4l2-device: allow a NULL parent device when registering.
Hans Verkuil [Sat, 14 Feb 2009 14:54:23 +0000 (11:54 -0300)]
V4L/DVB (10643): v4l2-device: allow a NULL parent device when registering.

Some drivers (e.g. for ISA devices) have no parent device because there
is no associated bus driver. Allow the parent device to be NULL in
those cases when registering v4l2_device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10642): vivi: update comment to reflect that vivi can now create more than...
Hans Verkuil [Sat, 14 Feb 2009 14:37:17 +0000 (11:37 -0300)]
V4L/DVB (10642): vivi: update comment to reflect that vivi can now create more than 32 devs.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10641): v4l2-dev: remove limit of 32 devices per driver in get_index()
Hans Verkuil [Sat, 14 Feb 2009 14:31:01 +0000 (11:31 -0300)]
V4L/DVB (10641): v4l2-dev: remove limit of 32 devices per driver in get_index()

get_index() had a limitation of 32 devices per driver. This was
unnecessarily strict and has been replaced with the maximum number
of devices. That should really satisfy anyone!

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10639): gspca - sq905: New subdriver.
Adam Baker [Fri, 6 Feb 2009 18:12:46 +0000 (15:12 -0300)]
V4L/DVB (10639): gspca - sq905: New subdriver.

Add initial support for cameras based on the SQ Technologies SQ-905
chipset (USB ID 2770:9120) to V4L2 using the gspca infrastructure.
Currently only supports one resolution and doesn't attempt to inform
libv4l what image flipping options are needed.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10638): gspca - t613: Bad debug level when displaying the sensor type.
Jean-Francois Moine [Fri, 6 Feb 2009 17:11:58 +0000 (14:11 -0300)]
V4L/DVB (10638): gspca - t613: Bad debug level when displaying the sensor type.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10637): gspca - t613: Bad sensor name in kernel trace when 'other' sensor.
Jean-Francois Moine [Fri, 6 Feb 2009 16:45:23 +0000 (13:45 -0300)]
V4L/DVB (10637): gspca - t613: Bad sensor name in kernel trace when 'other' sensor.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10636): gspca - sonixj: Add autogain for ov7630/48 and vflip for ov7648.
Jean-Francois Moine [Thu, 5 Feb 2009 18:12:24 +0000 (15:12 -0300)]
V4L/DVB (10636): gspca - sonixj: Add autogain for ov7630/48 and vflip for ov7648.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10635): gspca - sonixj: No vertical flip control for mt9v111.
Jean-Francois Moine [Thu, 5 Feb 2009 18:04:33 +0000 (15:04 -0300)]
V4L/DVB (10635): gspca - sonixj: No vertical flip control for mt9v111.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10620): gspca - main: More checks of the device disconnection.
Jean-Francois Moine [Thu, 12 Feb 2009 11:05:45 +0000 (08:05 -0300)]
V4L/DVB (10620): gspca - main: More checks of the device disconnection.

- prevent application oops when the device is disconnected
- wake up the application at disconnection time
- check the disconnection in ioctl dqbuf and poll

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10534): Output HW/SW version from scratchpad
Tobias Lorenz [Thu, 12 Feb 2009 17:56:30 +0000 (14:56 -0300)]
V4L/DVB (10534): Output HW/SW version from scratchpad

This patch adds functions to access the scratchpad.
For it is this good for? In the first two bytes, the developers
stored the HW/PCB version and the software release of the firmware.
This is now written to syslog, so debugging get's easier.
Also knowing the versions is the key for flash upgrades later on.

There are also some cleanups of the flash report sizes.

Altogether this should justify the new version number 1.0.9.

Thanks to Rick Bronson <rick@efn.org>

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10633): DAB: fix typo
Márton Németh [Sun, 1 Feb 2009 22:31:54 +0000 (19:31 -0300)]
V4L/DVB (10633): DAB: fix typo

Fix typo in "DAB adapters" section in Kconfig.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10632): Added support for AVerMedia Cardbus Hybrid remote control
Oldřich Jedlička [Thu, 12 Feb 2009 06:43:11 +0000 (03:43 -0300)]
V4L/DVB (10632): Added support for AVerMedia Cardbus Hybrid remote control

Added support for I2C device at address 0x40 and subaddress 0x0d/0x0b
that provides remote control key reading support for AVerMedia Cardbus
Hybrid card, possibly for other AVerMedia Cardbus cards.

The I2C address 0x40 doesn't like the SAA7134's 0xfd quirk, so it was
disabled.

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10631): zoran: fix printk format
Randy Dunlap [Thu, 12 Feb 2009 18:19:24 +0000 (15:19 -0300)]
V4L/DVB (10631): zoran: fix printk format

Fix printk format warning:

drivers/media/video/zoran/zoran_driver.c:345: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB: calibration still successful at 10
Roel Kluin [Wed, 11 Feb 2009 09:34:11 +0000 (06:34 -0300)]
V4L/DVB: calibration still successful at 10

With while (i++ < 10) { ... } i can reach 11, so callibration still
succeeds at i == 10.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10629): tvp514x: try_count reaches 0, not -1
Roel Kluin [Mon, 9 Feb 2009 21:57:06 +0000 (18:57 -0300)]
V4L/DVB (10629): tvp514x: try_count reaches 0, not -1

with while (try_count-- > 0) { ... } try_count reaches 0, not -1.

Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10628): V4L: Storage class should be before const qualifier
Tobias Klauser [Mon, 9 Feb 2009 21:06:49 +0000 (18:06 -0300)]
V4L/DVB (10628): V4L: Storage class should be before const qualifier

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10618): gspca - some drivers: Fix compilation warnings.
Jean-Francois Moine [Mon, 2 Feb 2009 19:25:38 +0000 (16:25 -0300)]
V4L/DVB (10618): gspca - some drivers: Fix compilation warnings.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10617): gspca - vc032x: Remove the vc0321 reset.
Jean-Francois Moine [Mon, 2 Feb 2009 10:43:50 +0000 (07:43 -0300)]
V4L/DVB (10617): gspca - vc032x: Remove the vc0321 reset.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10616): tw9910: color format check is added on set_fmt
Kuninori Morimoto [Tue, 27 Jan 2009 06:02:41 +0000 (03:02 -0300)]
V4L/DVB (10616): tw9910: color format check is added on set_fmt

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10575): V4L2: Add COLORFX user control
Sergio Aguirre [Tue, 20 Jan 2009 21:34:43 +0000 (18:34 -0300)]
V4L/DVB (10575): V4L2: Add COLORFX user control

This is a common feature on many cameras. the options are:
Default colors,
B & W,
Sepia

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10574): saa7134: fix Avermedia E506R composite input
Tim Farrington [Thu, 15 Jan 2009 12:58:55 +0000 (09:58 -0300)]
V4L/DVB (10574): saa7134: fix Avermedia E506R composite input

Make correction to composite input plus svideo input to Avermedia E506R

Signed-off-by: Tim Farrington <timf@iinet.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10571): v4l2-framework.txt: Fixes the videobuf init functions
Mauro Carvalho Chehab [Sat, 14 Feb 2009 10:51:28 +0000 (07:51 -0300)]
V4L/DVB (10571): v4l2-framework.txt: Fixes the videobuf init functions

Documents the driver usage functions, instead of the generic one used
by the videobuf specific handlers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10570): v4l2-framework: documments videobuf usage on drivers
Mauro Carvalho Chehab [Sat, 14 Feb 2009 10:29:07 +0000 (07:29 -0300)]
V4L/DVB (10570): v4l2-framework: documments videobuf usage on drivers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10568): bttv: dynamically allocate device data
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10568): bttv: dynamically allocate device data

The bttv driver had static array of structures for up to 16 possible bttv
devices, even though few users have more than one or two.  The structures
were quite large and this resulted in a huge BSS segment.

Change the driver to allocate the bttv device data dynamically, which
changes "struct bttv bttvs[BTTV_MAX]" to "struct bttv *bttvs[BTTV_MAX]".
It would be nice to get ride of "bttvs" entirely but there are some
complications with gpio access from the audio & mpeg drivers.

To help bttvs removal along anyway, I changed the open() methods use the
video device's drvdata to get the driver data instead of looking it up in
the bttvs array.  This is also more efficient.  Some WARN_ON()s are added
in cases the device node exists by the bttv device doesn't, which I don't
think should be possible.

The gpio access functions need to check if bttvs[card] is NULL now.  Though
calling them on a non-existent card in the first place is wrong, but hard
to solve given the fundamental problems in how the gpio access code works.

This patch reduces the bss size by 66560 bytes on ia32.  Overall change is a
reduction of 66398 bytes, as the WARN_ON()s add some 198 bytes.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10567): bttv: shrink muxsel data in card database
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10567): bttv: shrink muxsel data in card database

Over half of the card database was used to store muxsel data.  64 bytes
were used to store one 32 bit word for each of up to 16 inputs.

The Bt8x8 only has two bits to control its mux, so muxsel data for 16
inputs will fit into a single 32 bit word.  There were a couple cards that
had special muxsel data that didn't fit in two bits, but I cleaned them up
in earlier patches.

Unfortunately, C doesn't allow us to have an array of bit fields.  This
makes initializing the structure more of a pain.  But with some cpp magic,
we can do it by changing:
.muxsel = { 2, 3, 0, 1 },
.muxsel = { 2, 2, 2, 2, 3, 3, 3, 3, 1, 1 },
Into:
.muxsel = MUXSEL(2, 3, 0, 1),
.muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),

That's not so bad.  MUXSEL is a fancy macro that packs the arguments (of
which there can be one to sixteen!) into a single word two bits at a time.
It's a compile time constant (a variadic function wouldn't be) so we can
use it to initialize the structure.  It's important the the arguments to
the macro only be plain decimal integers.  Stuff like "0x01", "(2)", or
"MUX3" won't work properly.

I also created an accessor function, bttv_muxsel(btv, input), that gets the
mux bits for the selected input.  It makes it cleaner to change the way the
muxsel data is stored.

This patch doesn't change the code size and decreases the datasegment by
9440 bytes.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10566): bttv: clean up mux code for IDS Eagle
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10566): bttv: clean up mux code for IDS Eagle

This card apparently uses an external mux and the Bt878's mux should always
be set to MUX2.  The values for the external mux control bits were stored
in the muxsel field.  This meant that when changing inputs the driver would
switch the Bt878's mux to whatever value the external mux was supposed to
be set to, then eagle_muxsel() would switch it back to MUX2 and program the
external mux.  This creates an unnecessary switch of the Bt878's mux.

So change muxsel to be 2 for each input.  The external mux bits are just
"input&3" so they don't really need to be stored anywhere.  This also
eliminates the last non-standard use of the muxsel data.

Cc: M G Berberich <berberic@fmi.uni-passau.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10565): bttv: fix external mux for RemoteVision MX
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10565): bttv: fix external mux for RemoteVision MX

Old versions of the bttv driver would use the high nibble of an input's
muxsel value to program the GPIO lines enabled via gpiomask2.  Apparently
this was supposed to be for switching external audio muxes.  Anyway, the
code that did this was removed sometime in the pre-git 2.6 series.

The RemoteVision MX board used this feature to control an external video
mux and I guess no one noticed when they removed the code.

Move the extra gpio mux data out of the high nibble of muxsel and to
rv605_muxsel(), then have that function set the gpio lines with it.

From looking at the CD22M3494E datasheet, it seems like the mdelay(1) is a
much longer delay than necessary.  It looks like only around 20 ns is
necessary.

Cc: Miguel Freitas <miguel@cetuc.puc-rio.br>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10564): bttv: fix external mux for PHYTEC VD-009
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10564): bttv: fix external mux for PHYTEC VD-009

Old versions of the bttv driver would use the high nibble of an input's
muxsel value to program the GPIO lines enabled via gpiomask2.  Apparently
this was supposed to be for switching external audio muxes.  Anyway, the
code that did this was removed sometime in the pre-git 2.6 series.

These phytec boards used this feature to control an external video mux and
I guess no one noticed when they removed the code.

So add a muxsel_hook for these boards that does the necessary gpio setting.

BTW, I doubt the needs_tvaudio setting for these cards is correct.

Cc: Dirk Heer <d.heer@phytec.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10563): bttv: clean up mux code for IVC-120G
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10563): bttv: clean up mux code for IVC-120G

The card data for BTTV_BOARD_IVC120 set muxsel to a bunch of bogus values
(1 to 16), which the common mux code would use to set the Bt878's mux to
some random value.  Then the custom code in ivc120_muxsel() would change
the Bt878's mux to the right value (always MUX0).

Better to just make the muxsel data correct (all zeros, easy!) and get the
mux right to begin with.  Then the extra Bt878 mux setting code in
ivc120_muxsel() can be eliminated (the rest of the code for the IVC-120G's
external mux is still there of course).

This will help me clean up muxsel for some other changes.  It should also
get rid of an unnecessary mux switch when changing from certain inputs to
certain other inputs on the IVC-120G.

Cc: Alan Garfield <alan@fromorbit.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10562): bttv: rework the way digital inputs are indicated
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10562): bttv: rework the way digital inputs are indicated

The code was using a muxsel value of -1U to indicate a digital input.  A
couple places in were checking of muxsel < 0 to detect this, which doesn't
work of course because muxsel is unsigned and can't be negative.

Only a couple cards had digital inputs and it was always the last one, so
for the card database create a one bit field that indicates the last input
is digital.  On init, this is used to set a new field in the bttv struct to
the digital input's number or UNSET for none.  This makes it easier to
check if the current input is digital.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10561): bttv: store card database more efficiently
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10561): bttv: store card database more efficiently

The bttv card database is quite large and the data structure used to store
it wasn't very efficient.  Most of the field are only used at card
initialization time so it doesn't matter if they aren't efficient to
access.

Overall the changes reduce code size by 60 bytes in ia32.  The data size is
decreased by 5024 byes.  It is probably even more for 64-bit kernels.

Move the fields in the struct around to be sorted from largest to smallest.
This saves on padding space used for alignment.

Get rid of the unused digital_mode field.  Leave the setting as a comment
in the few cards entries that set it, in case someone ever writes the code.

Get rid of the unused audio_inputs field.  Leave the values in the card
entries in case someone ever writes code that might use it.

Get ride of the unused radio_addr field.  No card entries even set it to
anything interesting so it's not left as comments.  All the code that used
it was removed in commit v2.6.14-3466-g291d1d7 from Nov 8th 2005.

Reduce video_inputs to u8 as no card has more than 255 inputs (the most is
16).

Change tuner_addr to u8.  I2C addresses are only seven bits and 255 means
ADDR_UNSET, so everything fits.

Make has_radio a one bit flag.

Make the pll setting a two bit field.

Reduce svhs to four bits as no card has an s-video input above 9.  Change
the value for no s-video input from UNSET (which is -1U and out of range of
four bits) to NO_SVHS (which is now 15).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10560): bttv: make tuner card info more consistent
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10560): bttv: make tuner card info more consistent

The bttv card database structure had a "tuner" field that was the input
number of the tuner input or UNSET for no tuner.  However, the only values
it could ever be are 0 and UNSET.  Having a tuner on an input other than 0
didn't work and was never used.

There is also a "tuner_type" field that can be set to TUNER_ABSENT to
indicate no tuner, which makes "tuner = UNSET" redundant.  In many cases,
tuner_type was set to UNSET when there was no tuner, which isn't quite
correct.  tuner_type == UNSET is supposed to mean the tuner type isn't yet
known.

So, I changed cards where "tuner == UNSET" to always have tuner_type of
TUNER_ABSENT.  At this point the tuner field is redundant, so I deleted it.

I have the card setup code set the card's tuner_type (not the card type's
tuner_type!) to TUNER_ABSENT if it hasn't yet been set at the end of the
setup code.  Various places that check if the card has a tuner will now
look for this instead of checking the card type's "tuner" field.

Also autoload the tuner module before issuing the TUNER_SET_TYPE_ADDR I2C
client call instead of after issuing it.

Overall, on ia32 this decreases compiled code size by about 24 bytes and
reduces the data size by 640 bytes.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10559): bttv: Fix TDA9880 norm setting code
Trent Piepho [Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)]
V4L/DVB (10559): bttv: Fix TDA9880 norm setting code

The code to set the norm for the TDA9880 analog demod was comparing
btv->norm, an index into the bttv driver's norm array, to V4L2_STD_NTSC,
which is a bit flag that's part of the V4L2 API.  This doesn't work of
course and results in the PAL path always being taken.

What's more, it modified the bttv_tvcards[] entries for cards using the
TDA9880.  This is wrong because changing the norm on one card will also
affect other cards of the same type.  Writing to bttv_tvcards is also bad
because it should be read-only or even devinitdata.

Changing the norm would also cause the audio to become unmuted.

Have the code get called for both norm setting and audio input setting
(which where the gpios are set) to avoid needed to modify bttv_tvcards.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10558): bttv: norm value should be unsigned
Trent Piepho [Thu, 29 Jan 2009 00:32:58 +0000 (21:32 -0300)]
V4L/DVB (10558): bttv: norm value should be unsigned

The norm value in the driver is an index into an array and the the driver
doesn't allow it to be negative or otherwise invalid.  It should be
unsigned but wasn't in all places.

Fix some structs and functions to have the norm be unsigned.  Get rid of
useless checks for "< 0".  Most of the driver code can't handle a norm
value that's out of range, so change some ">= BTTV_TVNORMS" checks to
BUG_ON().  There's no point in silently ignoring invalid driver state just
to crash because of it later.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10556): em28xx-cards: Add Pinnacle Dazzle Video Creator Plus DVC107 description
Douglas Schilling Landgraf [Thu, 12 Feb 2009 17:22:42 +0000 (14:22 -0300)]
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>
15 years agoV4L/DVB (10555): em28xx: CodingStyle fixes
Nicola Soranzo [Thu, 12 Feb 2009 17:21:52 +0000 (14:21 -0300)]
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>
15 years agoV4L/DVB (10544): v4l2-common: add comments warning that about the sort order
Hans Verkuil [Fri, 13 Feb 2009 13:57:48 +0000 (10:57 -0300)]
V4L/DVB (10544): v4l2-common: add comments warning that about the sort order

Control arrays as are used with v4l2_ctrl_next must be sorted from
low to high. Add a comment at the top of all such arrays to warn
about this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10542): v4l2-subdev: add querystd and g_input_status
Hans Verkuil [Fri, 13 Feb 2009 10:48:21 +0000 (07:48 -0300)]
V4L/DVB (10542): v4l2-subdev: add querystd and g_input_status

In order to convert the v4l1 zoran and vino i2c drivers to v4l2 these
extra ops are required.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10540): cx2341x: fixed bug causing several audio controls to be no longer...
Hans Verkuil [Fri, 13 Feb 2009 08:12:02 +0000 (05:12 -0300)]
V4L/DVB (10540): cx2341x: fixed bug causing several audio controls to be no longer listed

The cx2341x_mpeg_ctrls array must be ordered by control ID. I know that
this is bad design, but for now I will just fix this bug and revisit it
when all drivers have moved to v4l2_device/v4l2_subdev, since that will
allow me to do greatly improve control handling.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10539): saa6588: remove legacy_class, not needed for saa6588
Hans Verkuil [Fri, 13 Feb 2009 08:08:27 +0000 (05:08 -0300)]
V4L/DVB (10539): saa6588: remove legacy_class, not needed for saa6588

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10538): saa6588: add g_chip_ident support.
Hans Verkuil [Wed, 11 Feb 2009 22:28:30 +0000 (19:28 -0300)]
V4L/DVB (10538): saa6588: add g_chip_ident support.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10537): saa6588: convert to v4l2_subdev.
Hans Verkuil [Wed, 11 Feb 2009 22:23:57 +0000 (19:23 -0300)]
V4L/DVB (10537): saa6588: convert to v4l2_subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10536): saa6588: convert to v4l2-i2c-drv-legacy.h
Hans Verkuil [Wed, 11 Feb 2009 22:14:09 +0000 (19:14 -0300)]
V4L/DVB (10536): saa6588: convert to v4l2-i2c-drv-legacy.h

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10531): Code rearrangements in preparation for other report types
Tobias Lorenz [Thu, 12 Feb 2009 17:55:56 +0000 (14:55 -0300)]
V4L/DVB (10531): Code rearrangements in preparation for other report types

LED_REPORT and all flash REPORTs are on it's way. This code rearrangement
cleans up the code for proper integration later on.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10530): Documentation and code cleanups
Tobias Lorenz [Thu, 12 Feb 2009 17:55:45 +0000 (14:55 -0300)]
V4L/DVB (10530): Documentation and code cleanups

- "DealExtreme" sells the "PCear" radio and that comes from "Sanei Electric".
- MPlayer is also usable as radio application.
- Consistent usage of tabulators and blanks in the code.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10528): em28xx: support added for IO-DATA GV/MVP SZ - EMPIA-2820 chipset
Indika Katugampala [Wed, 11 Feb 2009 14:13:05 +0000 (11:13 -0300)]
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>
15 years agoV4L/DVB (10525): em28xx: Coding style fixes and a typo correction
Nicola Soranzo [Wed, 11 Feb 2009 02:28:24 +0000 (23:28 -0300)]
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>
15 years agoV4L/DVB (10524): em28xx: Add DVC 101 model to Pinnacle Dazzle description
Douglas Schilling Landgraf [Wed, 11 Feb 2009 01:00:06 +0000 (22:00 -0300)]
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>
15 years agoV4L/DVB (10523): em28xx-audio: Add macros EM28XX_START_AUDIO / EM28XX_STOP_AUDIO
Douglas Schilling Landgraf [Sun, 8 Feb 2009 04:38:10 +0000 (01:38 -0300)]
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>
15 years agoV4L/DVB (10522): em28xx-audio: replace printk with em28xx_errdev
Alexey Klimov [Sun, 8 Feb 2009 04:16:32 +0000 (01:16 -0300)]
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>
15 years agoV4L/DVB (10521): em28xx-audio: Add lock for users
Douglas Schilling Landgraf [Sun, 8 Feb 2009 04:11:13 +0000 (01:11 -0300)]
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>
15 years agoV4L/DVB (10520): em28xx-audio: Add spinlock for trigger
Douglas Schilling Landgraf [Sun, 8 Feb 2009 17:17:15 +0000 (14:17 -0300)]
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>
15 years agoV4L/DVB (10519): em28xx: Fix for em28xx audio startup
Robert Krakora [Sun, 8 Feb 2009 16:10:39 +0000 (13:10 -0300)]
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>
15 years agoV4L/DVB (10518): em28xx: Fix for em28xx memory leak and function rename
Robert Krakora [Sun, 8 Feb 2009 16:09:11 +0000 (13:09 -0300)]
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>
15 years agoV4L/DVB (10517): em28xx: remove bad check (changeset a31c595188af)
Douglas Schilling Landgraf [Sun, 8 Feb 2009 13:45:34 +0000 (10:45 -0300)]
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>
15 years agoV4L/DVB (10516): em28xx: Add support for Easy Cap Capture DC-60
Mauro Carvalho Chehab [Wed, 11 Feb 2009 17:18:36 +0000 (14:18 -0300)]
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>
15 years agoV4L/DVB (10515): Adds IR table for the IR provided with this board and includes it at
Mauro Carvalho Chehab [Wed, 11 Feb 2009 17:15:14 +0000 (14:15 -0300)]
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>
15 years agoV4L/DVB (10514): em28xx: Add support for Kaiomy TVnPC U2 stick
Mauro Carvalho Chehab [Wed, 11 Feb 2009 17:13:20 +0000 (14:13 -0300)]
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>
15 years agoV4L/DVB (10512): tda1004x: Fix eeprom firmware load on boards with 16MHz Xtal
Mauro Carvalho Chehab [Mon, 9 Feb 2009 16:12:41 +0000 (13:12 -0300)]
V4L/DVB (10512): tda1004x: Fix eeprom firmware load on boards with 16MHz Xtal

For i2c normal work, we need to slow down the bus speed. However, the
slow down breaks the eeprom firmware load. So, use normal speed for
eeprom booting and then restore the i2c speed after that.

It should also be noticed that no other I2C transfer should be in course
while booting from eeprom, otherwise, tda10046 goes into an instable
state. So, proper locking are needed at the i2c bus master.

Tested with saa7134 MSI TV @nyware A/D board, that comes with an eeprom
with firmware version 29.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10511): saa7134: get rid of KBL
Mauro Carvalho Chehab [Mon, 9 Feb 2009 15:27:03 +0000 (12:27 -0300)]
V4L/DVB (10511): saa7134: get rid of KBL

KBL is not needed on saa7134, so, let's remove it.

However, we should take some care to avoid opening the module while
initializing it. This issue exists with newer udev's that opens a device
as soon as the driver is registered. So, a proper lock is needed on
open.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10509): saa7134-video: two int controls lack a step
Mauro Carvalho Chehab [Mon, 9 Feb 2009 08:33:54 +0000 (05:33 -0300)]
V4L/DVB (10509): saa7134-video: two int controls lack a step

Fix two broken controls where a step weren't specified. Without a step,
userspace apps won't allow to adjust such controls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10508): saa7134: Cleanup: remove unused waitqueue from struct
Mauro Carvalho Chehab [Mon, 9 Feb 2009 08:29:54 +0000 (05:29 -0300)]
V4L/DVB (10508): saa7134: Cleanup: remove unused waitqueue from struct

The waitqueue is never used. So, let's just remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10507): saa7134: Fix analog mode on devices that need to open an i2c gate
Mauro Carvalho Chehab [Sun, 8 Feb 2009 12:33:15 +0000 (09:33 -0300)]
V4L/DVB (10507): saa7134: Fix analog mode on devices that need to open an i2c gate

Some saa7134 devices require to open an i2c gate before tuning. This
patch fix the initialization for those devices.

The nxt200x_gate_ctrl() logic were returned back to the old place, since
we don't know how to close the gate. A future pacth could revert that
change and provide the proper close gate control, to avoid keeping it
open forever.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10506): saa7134: move tuner init code to saa7134-cards
Mauro Carvalho Chehab [Sun, 8 Feb 2009 11:50:50 +0000 (08:50 -0300)]
V4L/DVB (10506): saa7134: move tuner init code to saa7134-cards

On certain devices, before opening a tuner, we need to open the tuner
gate via i2c.

This patch just moves the tuner probing code to the same place where
such i2c commands are handled, to make easier to fix this trouble on
later patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10505): tda8290: Print an error if i2c_gate is not provided
Mauro Carvalho Chehab [Sun, 8 Feb 2009 11:42:29 +0000 (08:42 -0300)]
V4L/DVB (10505): tda8290: Print an error if i2c_gate is not provided

While here, be sure that gate will be kept disabled if an error occurs.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10504): tda827x: Be sure that gate will be open/closed at the proper time
Mauro Carvalho Chehab [Sun, 8 Feb 2009 11:34:43 +0000 (08:34 -0300)]
V4L/DVB (10504): tda827x: Be sure that gate will be open/closed at the proper time

The gate control logic is broken: several routines just keep it open;
other rotines close it properly; there are even other routines that
assumes that it is open without really checking or opening it.

Instead of having to manually handle the gate control and having such
troubles, let a sub-routine take care of the gate, opening it before
i2c_transfer and closing it after that. This avoids leaving the gate
into a random state.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10502): saa7146: move v4l2 device registration to saa7146_vv.
Hans Verkuil [Sat, 7 Feb 2009 23:42:33 +0000 (20:42 -0300)]
V4L/DVB (10502): saa7146: move v4l2 device registration to saa7146_vv.

Doing the v4l2_device registration in the saa7146 core will make it
dependent on v4l2, even for DVB-only boards. This registration and
unregistration belongs in saa7146_vv instead.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10501): saa7146: prevent unnecessary loading of v4l2-common.
Hans Verkuil [Sat, 7 Feb 2009 23:15:22 +0000 (20:15 -0300)]
V4L/DVB (10501): saa7146: prevent unnecessary loading of v4l2-common.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10500): saa7146: setting control while capturing should return EBUSY, not...
Hans Verkuil [Sat, 7 Feb 2009 14:25:05 +0000 (11:25 -0300)]
V4L/DVB (10500): saa7146: setting control while capturing should return EBUSY, not EINVAL.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10499): saa7146: convert saa7146 and mxb in particular to v4l2_subdev.
Hans Verkuil [Sat, 7 Feb 2009 14:18:05 +0000 (11:18 -0300)]
V4L/DVB (10499): saa7146: convert saa7146 and mxb in particular to v4l2_subdev.

Modified mxb to load the i2c modules through v4l2_subdev. So no more probing.
Modified tea6415c and tea6420 to use the standard routing ops to do the
routing, rather than using private commands. Dropped the private commands
from tda9840 (they were never used except during initialization of the
module).

Added saa7146 support for VIDIOC_DBG_G_CHIP_IDENT.

Converted saa5246a and saa5249 to v4l2_subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10498): saa7146: the adapter class will be NULL when v4l2_subdev is used.
Hans Verkuil [Sat, 7 Feb 2009 10:45:08 +0000 (07:45 -0300)]
V4L/DVB (10498): saa7146: the adapter class will be NULL when v4l2_subdev is used.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10497): saa7146: i2c adapdata now points to v4l2_device.
Hans Verkuil [Sat, 7 Feb 2009 10:38:12 +0000 (07:38 -0300)]
V4L/DVB (10497): saa7146: i2c adapdata now points to v4l2_device.

Prepare for converting to v4l2_subdev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10496): saa7146: implement v4l2_device support.
Hans Verkuil [Sat, 7 Feb 2009 10:23:40 +0000 (07:23 -0300)]
V4L/DVB (10496): saa7146: implement v4l2_device support.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10490): v4l2: prefill ident and revision from v4l2_dbg_chip_ident.
Hans Verkuil [Sat, 7 Feb 2009 14:00:02 +0000 (11:00 -0300)]
V4L/DVB (10490): v4l2: prefill ident and revision from v4l2_dbg_chip_ident.

Drivers that implement this always have to set the ident and revision
to V4L2_IDENT_NONE and 0. Do this in the v4l2 core so drivers don't have
to do this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10489): doc: use consistent naming conventions for vdev and v4l2_dev.
Hans Verkuil [Sat, 7 Feb 2009 10:07:04 +0000 (07:07 -0300)]
V4L/DVB (10489): doc: use consistent naming conventions for vdev and v4l2_dev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10488): ivtv: cleanup naming conventions
Hans Verkuil [Sat, 7 Feb 2009 10:02:27 +0000 (07:02 -0300)]
V4L/DVB (10488): ivtv: cleanup naming conventions

Use consistent naming for pci_dev, v4l2_device and video_device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10487): doc: update hm12 documentation.
Hans Verkuil [Fri, 6 Feb 2009 18:35:22 +0000 (15:35 -0300)]
V4L/DVB (10487): doc: update hm12 documentation.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10486): ivtv/cx18: fix g_fmt and try_fmt for raw video
Hans Verkuil [Fri, 6 Feb 2009 18:31:59 +0000 (15:31 -0300)]
V4L/DVB (10486): ivtv/cx18: fix g_fmt and try_fmt for raw video

The raw video device didn't report the image size correctly.

When setting a new image the image height has to be a multiple of 32 lines.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10465): dsbr100: Add few lost mutex locks.
Alexey Klimov [Sun, 8 Feb 2009 05:00:14 +0000 (02:00 -0300)]
V4L/DVB (10465): dsbr100: Add few lost mutex locks.

Patch adds two lost mutex locks.

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>
15 years agoV4L/DVB (10464): radio-si470x: use usb_make_path in usb-radio drivers
Alexey Klimov [Fri, 6 Feb 2009 01:52:29 +0000 (22:52 -0300)]
V4L/DVB (10464): radio-si470x: use usb_make_path in usb-radio drivers

Place usb_make_path in radio-si470x.c that used when reporting bus_info
information in vidioc_querycap.

Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
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>
15 years agoV4L/DVB (10463): radio-mr800: fix checking of retval after usb_bulk_msg
Alexey Klimov [Thu, 5 Feb 2009 12:00:03 +0000 (09:00 -0300)]
V4L/DVB (10463): radio-mr800: fix checking of retval after usb_bulk_msg

Patch corrects checking of returned value after usb_bulk_msg. Now we
also check if number of transferred bytes equals to BUFFER_LENGTH.

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>
15 years agoV4L/DVB (10462): radio-mr800: increase version and add comments
Alexey Klimov [Thu, 5 Feb 2009 11:58:31 +0000 (08:58 -0300)]
V4L/DVB (10462): radio-mr800: increase version and add comments

Increase driver version to 0.10, remove old and add new useful comments.

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>
15 years agoV4L/DVB (10461): radio-mr800: add few lost mutex locks
Alexey Klimov [Thu, 5 Feb 2009 11:57:19 +0000 (08:57 -0300)]
V4L/DVB (10461): radio-mr800: add few lost mutex locks

Patch adds two lost mutex locks.

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>
15 years agoV4L/DVB (10460): radio-mr800: add stereo support
Alexey Klimov [Thu, 5 Feb 2009 11:56:07 +0000 (08:56 -0300)]
V4L/DVB (10460): radio-mr800: add stereo support

Patch introduces new amradio_set_stereo function.
Driver calls this func to make stereo radio reception.
Corrects checking of returned value after usb_bulk_msg.

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>
15 years agoV4L/DVB (10459): radio-mr800: fix amradio_set_freq
Alexey Klimov [Thu, 5 Feb 2009 11:54:17 +0000 (08:54 -0300)]
V4L/DVB (10459): radio-mr800: fix amradio_set_freq

Fixing frequency adjustment to provide better diapason(band?) fit.
Also, add AMRADIO_SET_FREQ to the list of commands.

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>
15 years agoV4L/DVB (10458): radio-mr800: move radio start and stop in one function
Alexey Klimov [Thu, 5 Feb 2009 11:53:02 +0000 (08:53 -0300)]
V4L/DVB (10458): radio-mr800: move radio start and stop in one function

Patch introduces new amradio_set_mute function. Amradio_start and
amradio_stop removed. This makes driver more flexible and it's useful
for next changes.

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>
15 years agoV4L/DVB (10457): radio-mr800: add more dev_err messages in probe
Alexey Klimov [Thu, 5 Feb 2009 11:51:51 +0000 (08:51 -0300)]
V4L/DVB (10457): radio-mr800: add more dev_err messages in probe

Patch adds 3 dev_err messages in usb_amradio_probe() function.

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>
15 years agoV4L/DVB (10456): radio-mr800: place dev_err instead of dev_warn
Alexey Klimov [Thu, 5 Feb 2009 11:49:58 +0000 (08:49 -0300)]
V4L/DVB (10456): radio-mr800: place dev_err instead of dev_warn

There should be dev_err message if video_register_device() fails.
Correct this situation.

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>
15 years agoV4L/DVB (10455): radio-mr800: codingstyle cleanups
Alexey Klimov [Thu, 5 Feb 2009 11:48:43 +0000 (08:48 -0300)]
V4L/DVB (10455): radio-mr800: codingstyle cleanups

Cleanups of many if-check constructions.

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>
15 years agoV4L/DVB (10453): af9015: add MC44S803 support
Jochen Friedrich [Mon, 2 Feb 2009 17:59:50 +0000 (14:59 -0300)]
V4L/DVB (10453): af9015: add MC44S803 support

Add MC44S803 support to AF9015 driver.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10452): Add Freescale MC44S803 tuner driver
Jochen Friedrich [Mon, 2 Feb 2009 17:50:09 +0000 (14:50 -0300)]
V4L/DVB (10452): Add Freescale MC44S803 tuner driver

Add Freescale MC44S803 tuner driver.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10446): cx18: Finally get sliced VBI working - for 525 line 60 Hz systems...
Andy Walls [Mon, 9 Feb 2009 01:40:04 +0000 (22:40 -0300)]
V4L/DVB (10446): cx18: Finally get sliced VBI working - for 525 line 60 Hz systems at least

Sliced VBI, in the manner that ivtv implements it as a separate data stream,
now works for 525 line 60 Hz systems like NTSC-M.  It may work for 625 line
50 Hz systems, but I have more engineering work to do, to verify it is operating
properly.  Sliced data insertion into the MPEG PS should be working, but is
untested.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10445): cx18: Process Raw VBI on a whole frame basis; fix VBI buffer size
Andy Walls [Sat, 7 Feb 2009 18:47:28 +0000 (15:47 -0300)]
V4L/DVB (10445): cx18: Process Raw VBI on a whole frame basis; fix VBI buffer size

The cx23418 appears to send Raw VBI buffers with a PTS on a per frame
basis, not per field, so process Raw VBI on a whole frame basis and reduce
some complexity.  Fix VBI buffer size computation to handle a whole
frame of Raw VBI for a 625 line system, which is the worst case and will
work for 525 lines systems as well.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10444): cx18: Fix sliced VBI PTS and fix artifacts in last raw line of field
Andy Walls [Sat, 7 Feb 2009 04:31:22 +0000 (01:31 -0300)]
V4L/DVB (10444): cx18: Fix sliced VBI PTS and fix artifacts in last raw line of field

Fixed an endianess problem with the collection of the PTS from
the VBI buffer given to us by the encoder.  Also extrapolated the
last 12 bytes of the last line of each field, to remove artifacts
created by removing the first 12 bytes of each field for raw VBI.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10443): cx18: Use correct line counts per field in firmware API call
Andy Walls [Sat, 7 Feb 2009 04:15:44 +0000 (01:15 -0300)]
V4L/DVB (10443): cx18: Use correct line counts per field in firmware API call

The driver was incorrectly setting 0 line counts in a firmware
API call to set the maximum amount of lines per field.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10442): cx18: Fixes for enforcing when Encoder Raw VBI params can be set
Andy Walls [Fri, 6 Feb 2009 21:33:43 +0000 (18:33 -0300)]
V4L/DVB (10442): cx18: Fixes for enforcing when Encoder Raw VBI params can be set

The Encoder will only allow the Raw VBI parameters, along with a number of
other API parameters, to take effect when no analog captures are in
progress.  These parameters must be set before the first analog capture starts,
be it MPEG, VBI, YUV, etc., and cannot be changed until the last one stops.  It
is not obvious to me what capture channel API parameters are shared and which
ones must be set per capture channel, so set them all for every analog
capture channel start up.  This fixes the driver so that VBI capture can be
started up after the MPEG capture is going.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10441): cx18: Fix VBI ioctl() handling and Raw/Sliced VBI state management
Andy Walls [Fri, 6 Feb 2009 01:37:49 +0000 (22:37 -0300)]
V4L/DVB (10441): cx18: Fix VBI ioctl() handling and Raw/Sliced VBI state management

More sliced VBI fixes to bring the cx18 driver closer to full V4L2 spec
compliance for VBI and to get sliced VBI working better.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10440): cx18: Fix presentation timestamp (PTS) for VBI buffers
Andy Walls [Mon, 2 Feb 2009 00:42:12 +0000 (21:42 -0300)]
V4L/DVB (10440): cx18: Fix presentation timestamp (PTS) for VBI buffers

The old code from ivtv used a CX23415/6 PTS, which was simply left at 0 in the
cx18 driver.  Since the CX23418 gives us what I think is a PTS (or some other
90 kHz clock count) with each VBI buffer, this change has the cx18 driver use
that as a PTS.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10439): cx18: Clean-up and enable sliced VBI handling
Andy Walls [Sat, 31 Jan 2009 03:33:02 +0000 (00:33 -0300)]
V4L/DVB (10439): cx18: Clean-up and enable sliced VBI handling

Removed legacy ivtv state variables, added comments, and cleaned
up sliced VBI related code.  Enabled sliced VBI.

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