Luca Risolia [Mon, 26 Mar 2007 19:12:04 +0000 (16:12 -0300)]
V4L/DVB (5474): SN9C1xx driver updates
@ Don't assume that SOF headers can't cross packets boundaries
@ Fix compression quality selection
+ Add support for MI-0360 image sensor
* Documentation updates
@ Fix sysfs
@ MI0343 rewritten
* HV7131R color fixes and add new ABLC control
* Rename the archive from "sn9c102" to "sn9c1xx"
* fix typos
* better support for TAS5110D
@ fix OV7630 wrong colors
@ Don't return an error if no input buffers are enqueued yet on VIDIOC_STREAMON
* Add informations about colorspaces
* More appropriate error codes in case of failure of some system calls
* More precise hardware detection
* Add more informations about supported hardware in the documentation
+ More supported devices
+ Add support for HV7131R image sensor
Adrian Bunk [Sun, 25 Mar 2007 15:14:38 +0000 (12:14 -0300)]
V4L/DVB (5471): Cpia_pp.c: convert to module_{init,exit}
After looking at a section bug (in the non-modular case, clearly
non-init code referenced the __initdata parport_nr[]), I thought it was
time to convert this driver to module_{init,exit}.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Jonathan Corbet [Fri, 27 Apr 2007 15:32:28 +0000 (12:32 -0300)]
V4L/DVB (5466): Fix up some Cafe CCIC delay issues
Fix up unsociable Cafe CCIC delays.
The Cafe CCIC driver contains some lengthy delays, some of which are
unnecessary and some of which are done under lock. Some were marked
with comments, but the comments somehow failed to make the issue go
away. So fix it for real.
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Jonathan Corbet [Sun, 25 Mar 2007 14:35:56 +0000 (11:35 -0300)]
V4L/DVB (5464): Set the PCI device in the V4L2 device
Set the PCI dev in the V4L2 dev so that the proper sysfs link gets made
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Logitech ViewPort AV 100 has the same internals as Cisco VT Camera.
Fixing Pwc driver to handle it properly.
Also, fixed the comments for both cameras.
Thanks to Martin Rubli for pointing me this.
Jean Tourrilhes [Wed, 21 Mar 2007 19:29:16 +0000 (16:29 -0300)]
V4L/DVB (5461): Pwc: cisco VT Camera support
I have a Cisco VT Camera, and it was just collecting dust. I decided to
try connecting it to my Linux box at home.
Just a disgression about the product. The Cisco VT Camera is a webcam
Cisco sold to work with their IP phone hardware and software. It's mostly
useless on Windows, as it interfaces only to Cisco software. You can find
some for cheap on eBay...
Physically, it's just a Logitech Pro 4000. The only difference with the
Pro 4000 is the Cisco logo and that it's grey like the Pro 3000. I believe
Cisco is now selling the Cisco VT Camera II, which look to be something
else...
So, assuming that it was a Pro 4000 inside, I created the little patch
attached.
I'm new to webcam under Linux, but I managed to get an image from it using
xawtv, and the image looked all right, so I consider that a success. The
imaged seemed a bit small and I could not get the microphone driver loaded,
but I assume it's my lack of experience. Note that I did not try any other
type_id, but this one works great.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Hartmut Hackmann [Sun, 18 Mar 2007 22:23:20 +0000 (19:23 -0300)]
V4L/DVB (5458): Tda1004x: add ts_mode option to config struct
The struct tda1004x_config has a new entry: .ts_mode
Possible values are TDA10046_TS_PARALLEL or TDA10046_TS_SERIAL
There always is only one interface active, default is parallel.
Trent Piepho [Mon, 19 Mar 2007 05:24:09 +0000 (02:24 -0300)]
V4L/DVB (5457): Dvb-pll: Replace sleep function with a more capable one
The dvb-pll sleep function could only send a 2-byte sequence to the PLL.
This isn't enough in some cases, for example fmd1216me will need to send
a 4-byte command to set both BB and AB to the correct values.
Instead of using a fake band with a frequency of 0 to store the sleep
data (which has room for only two bytes), the new sleep function works
like the init function. A new pointer is added to the pll description,
and when non-NULL points to a buffer with the length and data to send.
Trent Piepho [Mon, 19 Mar 2007 05:24:04 +0000 (02:24 -0300)]
V4L/DVB (5456): Dvb-pll: Move IF frequency from per-band data to per-tuner data
The IF frequency was specified for each band, but it's not something that
changes from band to band. None of the tuner definitions had a different
IF frequency (called offset) from one band to another. Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Trent Piepho [Mon, 19 Mar 2007 05:23:59 +0000 (02:23 -0300)]
V4L/DVB (5455): Dvb-pll: Adjust rounding to be consistent
Some PLLs had one half the step size added to the offset, so that the
divisor would be rounded to the nearest integer. Some didn't and so
would always be rounded down.
This makes dvb-pll round to the nearest when calculating the divisor,
without the offset needing to be fudged. PLLs that had a fudged offset
have the offset changed to be just the IF frequency.
The satellite PLL dvb_pll_philips_sd1878_tda8261 was rounding up for some
reason, and I've kept it that way.
In addition, frequencies that were rounded to the nearest kHz are
extended to full Hz resolution. One sixth MHz step sizes that were
listed as 166,666 Hz are changed to 166,667 Hz, which is slightly closer.
PLLs that were already rounding:
dvb_pll_tda665x, offset was 36 1/6 (to nearest kHz) + step/2
dvb_pll_fmd1216me, offset was 36 1/8 (to two digits) + step/2
dvb_pll_thomson_fe6600, offset was 36 1/8 (to two digits) + step/2
dvb_pll_env57h1xd5, offset was 36 1/8 + step
Note that the last PLL, dvb_pll_env57h1xd5, appears to have had a bug in
the offset. Rather than adding stepsize/2, it was adding a full
stepsize. The PLL definition originally came from the dibusb driver,
which used 36 1/8 + step/2. The change to 36 1/8 + step was probably a
mistake added when the tuner was converted to dvb-pll.
Trent Piepho [Fri, 9 Mar 2007 18:07:07 +0000 (15:07 -0300)]
V4L/DVB (5452): Cx88: merge identical boards
The attach code for HAUPPAUGE_HVR3000 and HAUPPAUGE_HVR1300 is exactly
the same as the code used by HAUPPAUGE_HVR1100, HAUPPAUGE_HVR1100LP, and
WINFAST_DTV2000H. So, those first two cards are added to the case block
used by the last three.
Hartmut Hackmann [Tue, 13 Mar 2007 23:44:22 +0000 (20:44 -0300)]
V4L/DVB (5443): Saa7134: put tuner to sleep mode after board initialization
Besides power saving, this puts the AGC output of the tda8290
to tristate. This is necessary for some hybrid boards which
don't use a multiplexer for the AGC
Ian Armstrong [Fri, 16 Mar 2007 10:44:42 +0000 (07:44 -0300)]
V4L/DVB (5438): Fix ivtv yuv threshold handling
Modifies automatic mode selection for yuv playback. Behaviour is now that
source video with a vertical resolution below that of the currently set
broadcast mode will be treated as progressive. Video with a vertical
resolution greater or equal to the current broadcast mode (up to 576 lines)
will be treated as interlaced.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Steven Toth [Tue, 13 Mar 2007 01:26:40 +0000 (22:26 -0300)]
V4L/DVB (5434): Updates to the tveeprom tuner, video decoder and audio chip
Some of the new tuner entries may need to be mapped to compatible
tuners already defined. I don't know for certain which tuners
are compatible between manufacturers.
Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Trent Piepho [Mon, 12 Mar 2007 15:13:12 +0000 (12:13 -0300)]
V4L/DVB (5428): M920x: Detect zero-length I2C messages and fix a typo
Change a 00 to just 0
Detect zero-length I2C messages and return not supported. I think I know
how to send one, but the problem is getting the slave's ack. The only
point of a zero-length message is for probing; too see if the slave will
ack its address. Since we don't know how to get the ack, we can't
support zero-length messages in a useful way, so it's probably best to
just return not supported for them.
Trent Piepho [Tue, 6 Mar 2007 02:55:00 +0000 (23:55 -0300)]
V4L/DVB (5427): M920x: Improve I2C operations
Write some better documentation about what might be known about how the
m920x I2C works, since a datasheet is lacking.
The I2C xfer function should now handle more types of I2C transactions
than it could before. Those it can't, will return error codes instead of
being executed incorrectly. Multi-byte reads were not being done
correctly, which should be fixed.
Aapo Tahkola [Mon, 5 Mar 2007 21:23:19 +0000 (18:23 -0300)]
V4L/DVB (5423): M920x: i2c cleanups
- Implement m920x i2c as suggested by Pierre Willenbrock
- remove "magic" hack
- r/w bit is not part of the i2c address
- move hardware remarks to header file
Hans Verkuil [Sun, 11 Mar 2007 17:16:42 +0000 (14:16 -0300)]
V4L/DVB (5420): Initialize the inputs before registering the devices.
Once the devices have been registered anyone can start changing the inputs or
TV standard before they have been initialized by the driver. This leads to
cases were the input is changed in an udev rule, but after that rule is
triggered the tail-end of the ivtv driver initialization can override
that by selecting the tuner input.
The correct sequence is to first setup the input, initial frequency and TV
standard before finally registering the video devices. This prevents any
udev rules from being triggered prematurely.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Hans Verkuil [Sat, 10 Mar 2007 21:29:48 +0000 (18:29 -0300)]
V4L/DVB (5412): Fix VIDIOC_TRY_ENCODER_CMD and VIDEO_TRY_COMMAND
VIDIOC_TRY_ENCODER_CMD did the same as VIDIOC_ENCODER_CMD, now it no longer
touches the encoder.
Both the encoder and decoder commands did not clear the flags field of unknown
flags.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Those two experimental APIs never worked fine nor, afaik, were
implemented at the apps. Their functionalities were implemented by other
means.
So, let's remove those obsolete stuff.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Hans Verkuil [Sat, 10 Mar 2007 09:59:44 +0000 (06:59 -0300)]
V4L/DVB (5406): Add comment why the symbols are exported.
It is not immediately obvious why the ivtv symbols are exported
in ivtv-driver.c since both ivtv-fb and the IR-blaster module
are still out-of-tree, currently being ported to be in kernel.
Added a comment so people are aware of these issues.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Hans Verkuil [Sat, 10 Mar 2007 09:24:30 +0000 (06:24 -0300)]
V4L/DVB (5402): Add vsync_field to the union in video_event for VIDEO_EVENT_VSYNC
VIDEO_EVENT_VSYNC needs to tell the application which field it was that
received a VSYNC (odd/even/progressive). The vsync_field was added to the
union in video_event for this purpose.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch fixes the following compile error with CONFIG_MODULES=n:
CC drivers/media/video/saa7134/saa7134-core.o
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc2-mm1/drivers/media/video/saa7134/saa7134-core.c:979:24: error: macro "request_submodules" passed 1 arguments, but takes just 0
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc2-mm1/drivers/media/video/saa7134/saa7134-core.c: In function 'saa7134_initdev':
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc2-mm1/drivers/media/video/saa7134/saa7134-core.c:979: error: 'request_submodules' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc2-mm1/drivers/media/video/saa7134/saa7134-core.c:979: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.21-rc2-mm1/drivers/media/video/saa7134/saa7134-core.c:979: error: for each function it appears in.)
make[5]: *** [drivers/media/video/saa7134/saa7134-core.o] Error 1
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Trent Piepho [Wed, 7 Mar 2007 21:19:48 +0000 (18:19 -0300)]
V4L/DVB (5391): Saa7134: Clean up printk()s
Change some debug messages from printk() to dprintk().
Add KERN_WARNING and KERN_ERR level indicators to other printk()s that
lacked them.
Format printk lines with consistent ("%s/dvb: ", dev->name) prefix.
Fixed dprintk macro, which had an if with no else that wasn't protected
with a do {} while(0) block. That leads to "if(...) dprintk(); else" not
doing what one would expect.
Andrew Morton [Wed, 7 Mar 2007 14:28:33 +0000 (11:28 -0300)]
V4L/DVB (5388): Ivtv warning fix
drivers/media/video/ivtv/ivtv-i2c.c:547: warning: initializer-string for array of chars is too long
drivers/media/video/ivtv/ivtv-i2c.c:547: warning: (near initialization for 'ivtv_i2c_client_template.name')
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Oliver Endriss [Sat, 3 Mar 2007 17:45:48 +0000 (14:45 -0300)]
V4L/DVB (5381): Dvb-ttpci: Update frontend lock status in transfer mode (bugfix)
In transfer/replay mode the frontend lock status was never updated.
This caused a 'black screen' if VDR switched from transfer mode to
live mode on the same transponder.
Thanks to Marco Schluessler for spotting the problem.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The code the i2c transactions was leftover from the old V4L-based ATSC
driver. It did too little with too much code. It is re-written to
remove unnecessary parameters and be more efficient. A demod register
can now be read with one function call, instead of repeating a dozen line
block of code each time.
There were msleep()'s, which appear to be unnecessary, spread around all
the I2C transactions. These have been removed. Reading SNR used to take
about 130 ms, now it's down to 1.8 ms.
Reads from the demodulator's registers do not return correct results
sometimes. Adding or removing the delays in the I2C transactions did not
appear to effect the probability of failure. If anything, the
transactions without delays were less likely to fail, but since far more
transactions could be made per second the number of failures per hour was
greater.
To increase reliability, the SNR and get_params functions will now retry
once if they get bad data back. This appears to have reduced the
probability of failure to effectively zero.
Some error messages are cleaned up or given KERN_* levels when they were
missing.
or51132_setmode() wasn't returning correct error codes, which is fixed as
well.
Dennis Ranke [Fri, 2 Mar 2007 09:27:28 +0000 (06:27 -0300)]
V4L/DVB (5373): [PATCH] Hauppauge Nova-T endianess problem on powerpc
When trying to use a Hauppauge Nova-T Stick on a big-endian architecture
(such as powerpc) no frontend can be attached.
The attached patch fixes this problem by removing two lines in
dib0700_ctrl_rd() that try to correct the endianess on two values that
already are correct:
- /* think about swapping here */
- value = le16_to_cpu(value);
- index = le16_to_cpu(index);
With this simple patch this dvb hardware works great, thanks to anyone
involved for the good work. :)
Signed-off-by: Dennis Ranke <mail@exoticorn.de> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (5371): [PATCH] Pinnacle PCTV Sat Pro USB (450e) support by ttusb2.c (400e driver)
Added USB_PID_PCTV_450E to the 'usb_device_id ttusb2_table' and an entry in the
.devices table. The 400e driver now supports the 'Pinnacle PCTV Sat Pro USB
(450e)' with USB_ID 2304:0222.
V4L/DVB (5369): Fixed 1 byte too short buffer in tda827x.c
- The i2c data buffer in tda827xa_set_params was 1 byte too short
- saa7134-dvb now gives an error mesage if tda827x could not be attached
- coding style fix in tda1004x.c
The code of the dvb-pll driver and the lgh06xf driver is nearly
identical. The main difference is that the lgh06xf driver would set the
AGC TOP value on every tune call. The dvb-pll driver now has the ability
to set the AGC TOP when the front-end device is opened, which is a better
way to go about it. By using this ability of dvb-pll, the lgh06xf driver
is made unnecessary.
There is one other difference. dvb-pll will probe for the presence of an
I2C pll chip by doing a one byte read, the lgh06xf driver did not do
this. In some devices the PLL is not reachable over I2C at the timer the
tuner is attached. Some more initialization, such as firmware loading,
must take place first. None of the devices using a LG-H06xF should have
this problem.
V4L/DVB (5362): Dvb-pll: add code for doing tuner initialization
Some tuners need or benefit from initialization, to change certain
settings from their power on default values.
Typically, tuners with TUA603x PLLs can benefit from setting the AGC TOP
value to something else. This patch includes code to set the AGC TOP to
103 dBuV for the Thomson DTT-761x tuners, which I have experimentally
verified gives the best SNR readings, increasing SNR by about 0.19 dB
over the default value.
Other tuners can make use of this as well. For example, the separate LG
TDVS-H06xF driver's only difference from dvb-pll is this same setting of
AGC TOP value.
V4L/DVB (5361): Dvb-pll: Fix Kconfig files and allow dvb-pll to be optional
A number of drivers selected DVB_PLL when they did not need it, and some
that did need it did not select it.
The DVB_PLL option is given a name and help text, so that it will show up
in the config menu. DVB_PLL support can be turned on if an out-of-tree
driver needs it.
The standard dvb fe customization support is added to dvb-pll.h. Since
all modules which select DVB_PLL do so unconditionally, it is not
possible to turn dvb-pll off when an enabled module selects it, unlike
most of the other frontend/tuner drivers. This is because the users of
dvb-pll have static references to dvb-pll symbols other than the attach
function. If these references are removed, then dvb-pll will be
disablable as the other frontend/tuner drivers are.
Hans Verkuil [Fri, 27 Apr 2007 15:31:25 +0000 (12:31 -0300)]
V4L/DVB (5345): ivtv driver for Conexant cx23416/cx23415 MPEG encoder/decoder
It took three core maintainers, over four years of work, eight new i2c
modules, eleven new V4L2 ioctls, three new DVB video ioctls, a Sliced
VBI API, a new MPEG encoder API, an enhanced DVB video MPEG decoding
API, major YUV/OSD contributions from Ian and John, web/wiki/svn/trac
support from Axel Thimm, (hardware) support from Hauppauge, support and
assistance from the v4l-dvb people and the many, many users of ivtv to
finally make it possible to merge this driver into the kernel.
Thank you all!
Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com> Signed-off-by: Chris Kennedy <c@groovy.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: John P Harvey <john.p.harvey@btinternet.com> Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The documentation of Several miscellaneous commands was updated.
As a result of which the CX2341X_ENC_UNKNOWN command was renamed to
CX2341X_ENC_SET_VERT_CROP_LINE.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
David Härdeman [Fri, 27 Apr 2007 15:31:22 +0000 (12:31 -0300)]
V4L/DVB (5335): Budget-ci: Use the repeat handling of the input subsystem
The attached patch contains the last set of changes to the budget-ci IR
handling which makes it use the repeat handling of the input subsystem.
This allows some code simplification, makes sure that repeat key presses
are reported as such and also allows the "debounce" hack to be removed
altogether.
In addition a couple of static variables were removed which would have
confused the IR code if more than one card is used.
Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Oliver Endriss [Fri, 27 Apr 2007 15:31:21 +0000 (12:31 -0300)]
V4L/DVB (5334): Dvb-ttpci: Infrared remote control refactoring
Infrared remote control support rewritten.
Now each device provides its own event device, keymap, protocol,
inversion and address setting.
EVIOCGKEYCODE and EVIOCSKEYCODE ioctls are supported to read/modify
a keymap. Keymaps may be loaded using
- input tools (keyb etc.)
- av7110_loadkeys (obsolete, for backward compatibility)
New command line parameters:
- ir_protocol: select infrared protocol: 0 RC5, 1 RCMM (default)
- ir_inversion: signal inversion: 0 not inverted (default), 1 inverted
- ir_device_mask: bitmask of infrared devices (default: accept all)
Those parameters may be set anytime.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (5326): Allow to set tuner_config in attach inform
This patch move the assignment of the tuner config and the callback
before the check whether it is called in the attach inform.
This solves a module load order issue
V4L/DVB (5323): Updated support for tuner callbacks
This change supplies a more generic version of the tuner callback.
The tuner struct now has a function pointer
int (*tuner_callback) (void *dev, int command, int arg)
additionally to a int config parameter.
both can be set through the TUNER_SET_TYPE_ADDR client call.
Note that the meaning of the parameters depend on the tuner type.
V4L/DVB (5321): Saa7134-dvb: initialize the dvb frontend in dvb_init
The hardware is completely initialized afterwards, especially the
tda10046 has its firmware - which is also necessary in analog mode
of some hybrid boards.
Calling the sleep function afterwards saves power and definitely puts
hybrid boards into analog mode without additional code elsewere.
V4L/DVB (5319): Set tda827x to sleep mode after attach
This change sets the tda827x to sleep mode right after attach in dvb
mode. It is just to save power. For the same reason, the ADC of the
tda10046 gets turned off in sleep mode.
V4L/DVB (5318): Fix tda8290 code for tda827x module
During tuner attach, the pointers to host dev structure
are not set yet, so the I2c adapter needs to be accessed differently.
This patch also does some minor cleanup in the saa7134-dvb module.