- usbvision_muxsel simplified, now uses some well known constants.
- since the decoder needs to change input norm, call to muxsel added when
changing video standard.
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Alter the tuner type for the WinTV USB UK PAL model.
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Hauppauge WinTV USB SECAM_L fixed (needed some picture X and Y shiftings)
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
It has been confirmed that the FlyDVB IR codes currently in the kernel
work with the LifeView FlyDVB-S LR300. This one line addition adds it
to the list of supported cards.
Signed-off-by: James Le Cuirot <chewi@aura-online.co.uk>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Some includes were added after some non-include macros, on old drivers.
Better to keep all includes at the beginning of the files. This change
also helps to make backports to properly work at the development tree.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Clean up the use of structure templates in cx88-i2c and cx88-vp3054-i2c.
For one thing, a real template is supposed to be read-only. And in some
cases it's more efficient to initialize the few fields we need
individually.
This clean-up shrinks cx88-i2c.o by 33% and cx88-vp3054-i2c.o by 49%
(x86_64).
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The following doesn't make much sense:
drivers/media/video/Kconfig:
...
config TUNER_TEA5761
tristate "TEA 5761 radio tuner (EXPERIMENTAL)"
...
drivers/media/video/Makefile:
...
ifneq ($(CONFIG_TUNER_TEA5761),)
tuner-objs += tea5761.o
endif
...
With this setup, TUNER_TEA5761=m is equivalent to TUNER_TEA5761=y.
This patch therefore changes TUNER_TEA5761 to a bool.
The missing dependency on EXPERIMENTAL the prompt text indicates also
gets added by this patch.
Additionally, the Makefile entry can now be written in a more compact way.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The Virtual Video driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The Philips webcam driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.
--
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The bttv driver has code to detect if a tda9887 is present, that was previous
used to auto-load the tda9887 driver. Now there is no tda9887 driver, so the
code is pointless; it just figures out if it should load the driver and then
does nothing.
For cards that are defined as having no tuner, the init code would still do
i2c probes for various tuner devices and auto-load the tuner module. That can
be skipped for cards that don't need it. The code is made to understand that
in addition to 'UNSET', 'TUNER_ABSENT' also means no tuner.
The tuner into printk()s are also made nicer. Levels are added, INFO or
WARNING, depending on the meaning. For cards with no tuner, or no tuner
defined, a more informative message is printed.
Card has no tuner, before patch:
bttv0: tuner type=-1
or
bttv0: tuner type=4
After patch:
bttv0: tuner absent
Card has a tuner, but the type isn't defined, before patch:
bttv0: tuner type=-1
After patch:
bttv0: tuner type unset [<- also warning now, as the tuner won't work right]
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
add analog video support for DViCO FusionHDTV 2
Thanks to Todd Ignasiak for donating the card.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The old description was "Philips 1236D ATSC/NTSC dual in", which can be
confused with other Philips tuner models. This patch corrects the name
to "Philips FCV1236D ATSC/NTSC dual in", and updates the range and params
array names to match the description.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add Trust Powerc@m 970Z (0x06d6:0x003b) to the list of supported devices.
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Potentially, all board types with I2C and IR support can use an i2c
based IR. Currently, the driver is selected only if bt848 or saa7134
boards are selected.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In the function, cx88_ir_handle_key:
- convert nested if statement to a switch..case block
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- add support for the I2C based IR transceiver of the Hauppauge HVR-1300
- remove bad code from cx88-input.c
Signed-off-by: Jan Frey <jfrey@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Closes the issue opened on Kernel bugzilla:
http://bugzilla.kernel.org/show_bug.cgi?id=8383
There's no need to print timeout without debug turned on:
Apr 27 23:02:14 video kernel: cx88[1]/2-mpeg: cx8802_timeout
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch removes all static dependencies on the dvb-pll module.
All exported dvb_pll_desc's have been UNexported, and the caller
will reference the individual dvb_pll_desc by it's index in the
pll_list array.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Sound recording doesn't work for this card because ACNI and ACPF
are not set before snd_card_saa7134_capture_prepare(). As a result
timeout occurs. These registers aren't poked because thread
never gets wake up signal. ACNI initialization is done in the
thread.
Sound is muted when capture stops. Shouldn't be because it may
be used during TV playback.
Signed-off-by: Rafal Bilski <rafalbilski@interia.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The following two pointers in struct cx8802_dev are unused - remove them:
void* fe_handle;
int (*fe_release)(void *handle);
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The old service_set_out setting was still tested, even though it no longer
was ever set and was in fact obsolete. This meant that everything that was
written to /dev/vbi16 was ignored. Removed the service_set_out variable
altogether and now it works again.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Make the driver depend on V4L2 only (KConfig)
- Better and safe locking mechanism of the device structure on open(), close()
and disconnect()
- Use kref for handling device deallocation
- Generic cleanups
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Make the driver depend on V4L2 only (KConfig)
- Better and safe locking mechanism of the device structure on open(),
close() and disconnect()
- Use kref for handling device deallocation
- Generic cleanups
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Add support for pair OV7630+SN9C120
- Better and safe locking mechanism of the device structure on open(),
close() and disconnect()
- Use kref for handling device deallocation
- Generic cleanups
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Move tuner callback function pointers out of struct tuner, into
struct tuner_operations.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Procfs support on V4L were converted to sysfs support by a pre-2.6 patch:
http://www.ussg.iu.edu/hypermail/linux/kernel/0307.1/2356.html
There's no sense on keeping the dead code inside vicam.c. Also,it won't
work anyway, as part of proc_fs support were previously inside
videodev.c.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
CONFIG_BIGPHYS_AREA is an out-of-tree kernel patch. It makes no sense to
keep supporting this on mainstream.
The out-of-tree compilation with CONFIG_BIGPHYS_AREA will still be
preserved at the v4l-dvb development tree at:
http://linuxtv.org/hg/v4l-dvb
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The line, "#include <media/tuner.h>" appears twice.
This patch removes the second occurance.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Although it is safe to kfree(NULL), We only need to kfree(priv)
if the release callback is undefined. As it stands now, there
is some redundancy in the operation of releasing the priv data
structures. This patch will call kfree(priv) and set priv to NULL,
if the release callback isnt defined. Otherwise, let the release
callback handle this itself.
Thanks to Mauro Carvalho Chehab for suggesting this.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Define tuner release callbacks for mt20xx, tda9887 and tda8290, so that
these drivers can release their own private structures themselves.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Individual tuner drivers are now allocating memory themselves for
their own private data structures. This changeset adds a release
callback to the tuner operations, so that newer drivers that may
require more complex data structures may release this private data
themselves.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Due to a typo the tea5761 tuner support was dead code.
This patch also fixes a bug in the no longer dead code:
A void function can't return anything.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Now that cx88-blackbird is only accepting the official firmware image,
we no longer have any need to store the size of the firmware inside the
cx88 data structure.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Remove temporary support for older 256 kB firmwares.
ivtv, pvrusb2 and blackbird can now all handle the newer larger firmwares,
so support for the older (buggier) firmware can be removed.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
For backwards compatibility firmware files of 256 Kb were allowed: all
drivers have now been updated to support the newer larger firmwares so
remove this compatibility code and only support the newer firmware.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
vivi scatter method were used as a proof of concept. It can be
safelly removed from mainstream, since the current method is
faster and better than the previous solution.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Create private data struct for device specific private data.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Remove the long-dead references to the obsolete MODULE_PARM macro.
Given that the first one of those is actually misspelled as
"MODULE_PARAM", it's clear that they can't have been doing any good.
Acked-by: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In preparation for struct class_device -> struct device input
core conversion switch to using input_dev->dev.parent when
specifying device position in sysfs tree.
Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
Acked-by: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch fixes several return value related problems in zr364xx.
- return -ENOMEM instead of -ENODEV on out of memory
- zr364xx checks video_register_device() error only when
its return value is -1. But video_register_device() doesn't
always return -1 on error.
- If usb_register() returns error, module_init() wrongly returns 1:
retval = usb_register(&zr364xx_driver) < 0;
...
return retval;
And it allows the module to be loaded. Because sys_init_module() doesn't
see positive return value as error.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Now that dvb-pll is being used properly in all cx88-dvb instances,
the cx88 driver no longer needs to store pll_desc nor pll_addr.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enhance the dvb-pll definition of the fmd1216 tuner by adding an init sequence
and a sleep sequence.
The init sequence sets the AGC control register to 0xa0, selecting the fast
time constant and 112 dBuV take-over point. This the recommended value for
DVB-T operation.
The sleep sequence sets bit P4 (which is believed to turn the analog
demodulator on), turns off the tuning voltage, and sets the AGC control
register to 0x60 (external AGC voltage, the recommended value for analog
operation).
The existing dvb-pll users in the cx88 driver, listed below, will gain these
init and sleep sequences.
CX88_BOARD_HAUPPAUGE_HVR1100 Hauppauge WinTV-HVR1100 DVB-T/Hybrid
CX88_BOARD_HAUPPAUGE_HVR1100LP Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profi
CX88_BOARD_WINFAST_DTV2000H WinFast DTV2000 H
CX88_BOARD_HAUPPAUGE_HVR3000 Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DV
CX88_BOARD_HAUPPAUGE_HVR1300 Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encod
This non-dvb-pll user in the cx88 driver should only gain the sleep sequence,
as it already had an equivalent init sequence. The non-dvb-pll code for this
user is removed.
X88_BOARD_DNTV_LIVE_DVB_T_PRO digitalnow DNTV Live! DVB-T Pro
In these saa7134 driver, these non-dvb-pll users are converted to use dvb-pll:
SAA7134_BOARD_MD7134 Medion 7134
SAA7134_BOARD_ASUS_EUROPA2_HYBRID Asus Europa2 OEM
The saa7134 functions philips_fmd1216_tuner_init(),
philips_fmd1216_tuner_sleep(), and philips_fmd1216_tuner_set_params() are
deleted and the dvb-pll versions are used.
This should result in equivalent sleep, init, and tuning sequences being sent
to the tuner.
For the cxusb driver, only one board is effected:
USB_PID_MEDION_MD95700 Medion MD95700
This board used dvb_usb_tuner_init_i2c() and dvb_usb_tuner_set_params_i2c()
for init and tuning, respectively. These functions are effectively the same
as the dvb-pll versions. They call a tuner pass control function defined at
the dvb-usb level, but this does not matter, as this card does not have a
tuner pass control function (only the dib3000mb does). This board will gain
the sleep sequence, while init and tuning should be unchanged.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Using Encore's key codes, we needn't add any additional key table.
Signed-off-by: Tony Wan <wankai@sjtu.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Support the 10moons TM300 TV card (so called TV Master 3), which is a
10moons saa7130 based board. Here not include features for the
IR-remote.
It has been tested using TVTIME. The card was auto-detected and all the
input sources worked correct with sound.
Signed-off-by: Tony Wan <wankai@sjtu.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The ioctl entry point, a big switch/case, is splitted in little
functions.
These functions are set as callbacks for the video_ioctl2 video4linux
facility.
This improves the driver memory consumption and enables the v4l1
compatibility as a side effect.
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Acked-by: Dwaine P. Garden <dwainegarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Radio and video ioctls are the same,
delete the usbvision_do_radio_ioctl function
add the special cases for radio in usbvision_v4l2_do_ioctl
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
usbvision_set_video_format: add comment that VO_MODE is also being set.
Signed-off-by: David Warman <dwarman@davidwarman.net>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch removes duplicate code from cx88-dvb and saa7134-dvb that handles
rf input switching for the TUV1236d tuner.
The functionality is added to dvb-pll, where all the other code that
handles the TUV1236d is kept.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Rename dvb_pll_desc.setbw() to set(), and accept struct dvb_frontend_parameters
instead of passing both freq and bandwidth, so that this may be used as a
generic function.
In order to do this, dvb_pll_configure must also be altered in the same manner,
to take struct dvb_frontend_parameters instead of freq and bandwidth.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If cx88 support is compiled into the kernel while vp3054 is left as a module,
the kernel will fail to link. Adjust the existing "#if" code in cx88 so
that it won't consider vp3054 to be supported in this case.
It might make sense to move vp3054 selection into the "customisation" menu
instead of a cx88 sub-option (though this is a cx88 feature, there is no extra
chip involved).
It might also make sense to use dvb_attach() to load vp3054 support.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Currently, the freezer treats all tasks as freezable, except for the kernel
threads that explicitly set the PF_NOFREEZE flag for themselves. This
approach is problematic, since it requires every kernel thread to either
set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
care for the freezing of tasks at all.
It seems better to only require the kernel threads that want to or need to
be frozen to use some freezer-related code and to remove any
freezer-related code from the other (nonfreezable) kernel threads, which is
done in this patch.
The patch causes all kernel threads to be nonfreezable by default (ie. to
have PF_NOFREEZE set by default) and introduces the set_freezable()
function that should be called by the freezable kernel threads in order to
unset PF_NOFREEZE. It also makes all of the currently freezable kernel
threads call set_freezable(), so it shouldn't cause any (intentional)
change of behaviour to appear. Additionally, it updates documentation to
describe the freezing of tasks more accurately.
[akpm@linux-foundation.org: build fixes]
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Instead of all drivers reading pci config space to get the revision
ID, they can now use the pci_device->revision member.
This exposes some issues where drivers where reading a word or a dword
for the revision number, and adding useless error-handling around the
read. Some drivers even just read it for no purpose of all.
In devices where the revision ID is being copied over and used in what
appears to be the equivalent of hotpath, I have left the copy code
and the cached copy as not to influence the driver's performance.
Compile tested with make all{yes,mod}config on x86_64 and i386.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
v4l-info and other programs would loop indefinitely while querying the
tuners for cx88-blackbird cards.
The cause was that vidioc_g_tuner didn't return an error value for
qctrl->id != 0, making the application think there is a never ending
list of tuners...
This patch adds the same index check as done in vidioc_g_tuner() in
cx88-video.
Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as
the first user after the driver is loaded, the driver wedges itself and will
never capture properly. Even if one uses a V4L2 application later, it still
won't work.
If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2
driver, then the driver will be ok. One can then run a V4L1 application, and
it will work.
It turns out the problem is with norm changing and the crop support that was
added in 2.6.21. The driver defaults to PAL, and keeps the last norm it was
set too across opens. If one changes the norm via V4L1, the cropping
parameters are not reset like they should be, and they'll remain broken across
device opens.
This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl
VIDIOCSCHAN handler. The norm is set via the existing call to set_input(),
which calls set_tvnorm(), which will reset the cropping values now that it is
able to detect the norm change.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch changes the test for the thread pid from >= 0 to > 0.
When the saa8134 driver initialization fails after a certain point, it goes
through the complete shutdown process for the driver. Part of shutting it
down includes tearing down the thread for tv audio.
The test for tearing down the thread tests for >= 0. Since the dev
structure is kzalloc'd, the test will always be true if we haven't tried to
start the thread yet. We end up waiting on pid 0 to complete, which will
never happen, so we lock up.
This bug was observed in Novell Bugzilla 284718, when request_irq() failed.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
If one has a dependency chain (tristate)FOO depends on (bool)BAR depends on
(tristate)BAZ, build problems will result. If BAZ=m, then BAR can be set
y, which allows FOO=y. It's possible to have FOO=y && BAZ=m, which
wouldn't be allowed if FOO depended directly on BAZ. In effect, the bool
promotes the tristate from m to y.
This ends up causing a problem with several menuconfigs that look like:
menuconfig BAR
bool
depends on BAZ [tristate]
if BAR
config FOO
tristate
endif
The solution used here is to add the dependencies of BAR to the if
statement, so that items in the if block will gain a direct
non-bool-promoted dependency on BAZ. This is how it would work if a menu
was used instead of an if block.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The VIDIOC_CROPCAP ioctl was missing in ivtv.
The handling of output video cropping was wrong. This has now been fixed.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L2_CAP_VIDEO_OUTPUT_POS was initially introduced for 2.6.22 but never
actually used: remove it before the final 2.6.22 is made.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- fixed the urb allocation part that was not taking into account the current alternate setting
this fixes usb_submit_urb returning -90 errno in isocIrq.
- fixed usb_submit_urb returning -1 errno in isocIrq (need to ignore usb urb with status==-ENOENT)
Acked-by: Dwaine P. Garden <dwainegarden@rogers.com>
Signed-off-by: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Sliced VBI transfers use PIO instead of DMA. This was done inside the
interrupt handler, but since PIO accesses are very slow this meant that
a lot of time was spent inside the interrupt handler. All PIO copies are
now moved to a workqueue. This should fix various issues with missing time
ticks and remote key hits.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If the SAA7111 device is powered down, and requires re-initialisation when
the V4L device is opened (as on the NetWinder), the SAA7111 driver gets
completely confused about the current settings.
The problem is centred around the way the driver keeps _two_ cached copies
of the current settings - one of the struct video_picture settings, and one
of the registers.
When the decoder is re-initailised, the cached register settings are
overwritten, as are the values in the hardware registers. However, the
cached video_picture settings are not.
Resolve this by removing the useless and buggy second level of caching for
video_picture. Instead, provide a function which updates register values
if and only if the value we are going to write to the register has changed.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The recent changes on Kconfig broke compilation when VIDEO_DEV is compiled
as module. On some cases, drivers like VIDEO_BUF are compiled with 'y' option
instead of 'm':
...
Thanks to: Toralf Forster <toralf.foerster@gmx.de> for pointing this issue.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
A bug in the ov7670 sensor causes it to introduce noise unless the CLKRC
register is rewritten *after* setting the image mode. Naturally,
resetting CLKRC in this way will cause other modes to fail. So
carefully poke the register only when indicated.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The proper method for powering down the sensor on OLPC systems has
changed somewhat; in particular, the sensor must be powered down
completely (rather than simply told to power down) or the associated
"camera active" LED will stay on.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Allow to use SECAM-BG with the FI1216MF tuner.
The selection is done with the secam=B module argument.
The default behaviour should be the same as before.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Reverted the change to struct v4l2_pix_format. I completely missed that
this struct was used by existing ioctls so that changing it broke the ABI.
I will have to think of another way of setting the top/left coordinates
but for now this change is reverted to preserve compatibility.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
.. 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>
* '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)
...
Among other things, VIDIOCSPICT sets the pixel format. Some drivers
don't support all formats, e.g. cx88 doesn't support the planar formats.
The compat code that translates VIDIOCSPICT into V4L2 ioctls doesn't pass
on any errors, so a userspace program doesn't know if it has selected an
unsupported pixel format.
VIDIOCSPICT sets both the memory capture and overlay formats, and it's
possible that one will be set while the other will fail, e.g. cx88
doesn't even support overlay. Also, trying to set the overlay format
will fail for non-root users.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Drop the generic client declared in cx88-vp3054-i2c: it's not used
anywhere. This shrinks cx88-vp3054-i2c.o by 29% on x86_64. Unless it
was there for later use?
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
videobuf_qbuf queues buffers to q->stream but does not properly check
the state of the buffer before queueing. It was possible to queue
buffers that already were in the queue.
Only buffers that are in states STATE_NEEDS_INIT and STATE_IDLE can be
queued.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
Replace the call to MINOR() with a call to the inline iminor()
routine.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Maintainer's notice: I needed to re-number the board, since the board
number conflicted with a patch committed previously.
Signed-off-by: James T Klaas <jklaas@appalachian.dyndns.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add support for the "Elitegroup ECS TVP3XP FM1246", the "KWorld DVB-T
210", and the Animation Technologies LR214 Rev F onwards (SAA7131) to
the saa7134 driver.
Also rename the LR214WF to the LR214 Rev E or ealier (SAA7135), to match
what we've seen on boards in the field.
Changed the comment on the Lifeview cards to indicate Rev E and earlier
versus Rev F and later, together with a chip indicator, following
feedback from Peter Missel <peter.missel@onlinehome.de>.
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This causes the cx25840 module to treat V4L2_STD_PAL_60 similar to
other 60Hz timings, and it fixes a wrongly-named variable (timings are
independant of color system).
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Anyone using multiple PVR USB2 devices really only want one of them
acting as the actual IR receiver.
Implemented here is a new per-instance module option (ir_mode) which is
a flag to enable the IR receiver. The default is enabled.
IR reception is disabled by blocking access to the IR receiver chip in
the device.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch originated with Servaas Vandenberghe <vdb128@picaros.org>
and has been further developed a bit (to preserve saa7115 behavior).
These changes allow for correct operation of PAL-60 video (Servaas
tested this against a PAL-B/G tuner with the video standard overridden
as a module option).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
sysfs is now completely out of driver/module lifetime game.
After deletion, a sysfs node doesn't access anything outside sysfs
proper, so there's no reason to hold onto the attribute owners.
Note that often the wrong modules were accounted for as owners leading
to accessing removed modules.
This patch kills now unnecessary attribute->owner.
Note that with this change, userland holding a sysfs node does not
prevent the backing module from being unloaded.
For more info regarding lifetime rule cleanup, please read the following
message:
http://article.gmane.org/gmane.linux.kernel/510293
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pvrusb2 driver use a semaphore as mutex. use the mutex API instead
of the (binary) semaphore.
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Mark the palette2pixelformat lookup table as const
pixelformat is unsigned, adjust the palette2pixelformat table and
pixelformat_to_palette()
palette_to_pixelformat() is a pure function
pixelformat_to_palette() is a const function
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Correct handling of VIDIOCGMBUF in video_ioctl2().
Signed-off-by: Sam Revitch <samr7@cs.washington.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes two needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix various typos in kernel docs and Kconfigs, 2.6.21-rc4.
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
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>
Ingo Molnar's semaphore to mutex conversions left some noise on a few
trylock calls. Clean it up.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.
Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
alpha:
drivers/media/video/cx88/cx88-video.c: In function 'cx8800_initdev':
drivers/media/video/cx88/cx88-video.c:1782: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
drivers/media/video/cx88/cx88-video.c:1782: error: (Each undeclared identifier is reported only once
drivers/media/video/cx88/cx88-video.c:1782: error: for each function it appears in.)
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (59 commits)
PCI: Free resource files in error path of pci_create_sysfs_dev_files()
pci-quirks: disable MSI on RS400-200 and RS480
PCI hotplug: Use menuconfig objects
PCI: ZT5550 CPCI Hotplug driver fix
PCI: rpaphp: Remove semaphores
PCI: rpaphp: Ensure more pcibios_add/pcibios_remove symmetry
PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically
PCI: rpaphp: Document is_php_dn()
PCI: rpaphp: Document find_php_slot()
PCI: rpaphp: Rename rpaphp_register_pci_slot() to rpaphp_enable_slot()
PCI: rpaphp: refactor tail call to rpaphp_register_slot()
PCI: rpaphp: remove rpaphp_set_attention_status()
PCI: rpaphp: remove print_slot_pci_funcs()
PCI: rpaphp: Remove setup_pci_slot()
PCI: rpaphp: remove a call that does nothing but a pointer lookup
PCI: rpaphp: Remove another wrappered function
PCI: rpaphp: Remve another call that is a wrapper
PCI: rpaphp: remove a function that does nothing but wrap debug printks
PCI: rpaphp: Remove un-needed goto
PCI: rpaphp: Fix a memleak; slot->location string was never freed
...
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>
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (105 commits)
sonypi: use mutex instead of semaphore
sony-laptop: remove user visible camera controls as platform attributes
meye: make meye use sony-laptop instead of sonypi
sony-laptop: add a meye-usable include file for camera ops
sony-laptop: complete the motion eye camera support in sony-laptop
sonypi: try to detect if sony-laptop has already taken one of the known ioports
sonypi: suggest sonypi users to try sony-laptop instead
sony-laptop: add edge modem support (also called WWAN)
sony-laptop: add locking on accesses to the ioport and global vars
sony-laptop: add camera enable/disable parameter, better handle possible infinite loop
thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static
ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers
ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver
ACPI: thinkpad-acpi: improve dock subdriver initialization
ACPI: thinkpad-acpi: improve debugging for acpi helpers
ACPI: thinkpad-acpi: improve fan control documentation
ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs
ACPI: thinkpad-acpi: fix a fan watchdog invocation
ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work
ACPI: thinkpad-acpi: add a fan-control feature master toggle
...
Change sonypi_camera_command() calls to sony_pic_camera_command() and use
the renamed macros.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Set the length of the v4l2 buffer to the length of the mapped memory.
This should fix the problem with amsn.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch add support for the VIDIOC_ENUM_FRAMESIZES and
VIDIOC_ENUM_FRAMEINTERVALS ioctl.
* check if the maximum native framesize for raw mode is correct
* raw mode framerates for all three chipset types
Signed-off-by: Gregor Jasny <gjasny@web.de>
Signed-off-by: Luc Saillard <luc@saillard.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
usbvision has a module parameter that ables the user to add a new USB
entry at driver load. This functionality is useless by experience
(adding statically the entry is easy).
Furthermore, the USB_DEVICE(0xfff0, 0xfff0) USB entry caused
usbvision_probe to be called for all unclaimed devices.
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
usbvision_i2c: remove TUNER_SET_TYPE_ADDR call in attach_inform
since it is done by tuner_core.
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
usbvision-i2c.c: reverting some i2c cleanups in order to recover a safe state.
Acked-by: Dwaine Garden <DwaineGarden@rogers.com>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The code was testing an 8-bit address against a 7-bit address. Will the
confusion of the two never cease?
Biggest flaw of the I2C protocol: the R/W bit is the LSB instead of the
MSB. No one can ever agree if addresses are 7-bits and the R/W bit
follows them, or if they are 8-bit and the R/W bit is OR-ed into the
address byte. If the R/W bit was first, it wouldn't make any difference!
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- change a printk to PDEBUG when USB probe detects an unknown device.
This will avoid a message log from usbvision when an unclaimed device is inserted.
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
One bit wide bitfields need to declared unsigned to have the range 0 to
1, or they have the range -1 to 0.
A few techniques to reduce the driver's size by about 1700 bytes on ia32,
probably more on x86-64.
Put the biggest fields first, less padding is necessary that way.
Put fields with a limited range into a smaller type. For example
VideoChannels will fit in 3 bits, and TunerType can use 8 bits.
Vin_Reg1, Vin_Reg2, and Dvi_yuv define values for 8-bit registers, but
they can't just go into an 8-bit field with no changes, since -1 was used
as a flag to indicate a value was not present. So what we do is create a
one-bit flag for each one to indicate if a value is or is not present.
This only takes 9 bits and has the added advantage that when the register
isn't overridden (Vin_Reg[12] never are) it doesn't need to appear in the
structure definition since the default value for the flag will be zero.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch reduces usbvision driver on about 1Kb on i386 over the
original version with the old struct:
text data bss dec hex filename
52312 11848 60 64220 fadc old/usbvision.ko
52474 10708 60 63242 f70a new/usbvision.ko
Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Changed usbvision cards table to allow:
1) Not repeat USB ID on two structs;
2) Not need to specify both usb and card description tables at
the same order, removing some magic;
Some cards had duplicated names. Fixed.
A test for an specific board were doing by using a string comparation.
The comparation were wrong. Also, it is not a good practice to recognize
a board based on his string name.
Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The V4L2 API requires a unique bus_info string returned as part of the
v4l2_capability structure. These changes gather up the USB address
information, from the underlying device, into a string and report that
out through v4l2 and via sysfs (for completeness).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
sn9c102 is a v4l2 driver, except it used a couple v4l1 helper functions.
Stop using those functions and depend on V4L2 in Kconfig.
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There were many places in the driver which had long sequences of constant
register initializations. These were done with one function call per
register. The register address and value were immediate values in the
function calls.
This is very inefficient, as each register and value take twice the space
when they are code, as each includes a push instruction to put it on
the stack. There there is the overhead, both size and time, for a
function call for each register. It's also quite a few lines of C code
to do this.
The patch creates a function that writes multiple registers from a list,
and a macro that makes it easy to construct a such a list as a const
static local to send to the function.
This gets rid of quite a bit of C code, and shrinks the driver by around
8k, while at the same time being more efficient.
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
SSAI (www.ssai.us) makes several Bt878-based capture cards that get used in our
surveillance, conferencing, and medical imaging systems. The attached
relatively small patch adds support for these cards, which fall into two broad
* boards with one or more Bt878s, one or more composite inputs, and no S-video
or tuner inputs
* boards with one Bt878, one composite input, one S-video input, and no tuner
input
Signed-off-by: Scott Alfter <salfter@ssai.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The tda7432, tda9875 and tvaudio media drivers don't need to include
the linux/i2c-algo-bit.h header file.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add support for the S-Video and CVBS (composite) analog video inputs
of the Leadtek WinFast DTV1000 T adapter.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Check the return value of kmalloc() in function se401_start_stream(), in
file drivers/media/video/se401.c.
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch just defines the remote control type.
Signed-off-by: Ed Vipas <epvipas@gmail.com>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
When the tuner is attached, the tda10046 is not initilized yet, so it
is searching for its firmware. If the tuner is attached to the tda10046
silent i2c port, a bus collision can occur. Now the version is probed
during the first init or sleep call.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Set tda8290 to analog mode after init, otherwise the tuner driver will
not accept i.e. the standby command.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch causes the bttv driver to automatically load the dvb-bt8xx module
for bttv/dvb hybrid cards. Successfully tested with a pcHDTV HD-2000 card.
This patch is based on the recent patches to enable autoloading of cx88-dvb,
cx88-blackbird and saa7134-dvb.
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
cx88_print_irqbits were expecting a string pointer with 32 bytes. Better
to pass the string size and use ARRAY_SIZE on its calls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ATI HDTV Wonder needs to initialize some registers before allowing the
tuner to start working.
The current logic have lots of magic. This patch makes the code cleaner,
using ARRAY_SIZE() for the initialization array and using a
bidimensional array, instead of doing some stuff like:
&buffer[i+2]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
there were several "magic" for loops, addressing gpiomux array size (4).
Adrian Bunk showed that one of the loops were wrong, going from 0 to 4.
This patch provides the right fix for this trouble, by using ARRAY_SIZE
on all places where we have a for loop using gpiomux.
Thanks to: Adrian Bunk <bunk@stusta.de> for pointing me about this trouble.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
@ 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
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
Add raw bayer support to the ov7670 driver
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Don't mirror ov7670 images by default.
The ov7670 sensor driver sets the mirror bit by default, which is not
the desired mode. OLPC has been running with this patch for a while.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add suspend/resume support to the Cafe CCIC driver.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
Remove an obsolete PCI ID.
The CAFE driver includes three PCI IDs, one of which corresponds to
a development board which is no longer in use.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
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.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The new name fits to what it is and what is on the box.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are 2 new entries for p7131 boards and one correction for a board
with LNA.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Static locals should not be changed - the original contents gets lost.
Thanks to Trent Piepho for pointing me to this.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
The TV standard should be set AFTER the TV output is fully initialized.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
The ADS Tech InstantTV DVB-S is a clone of the KWorld DVB-S 100.
This patch adds autodetection support for this card based on
pci subsystem id.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
ivtv_remove which is called by pci_unregister_driver was still using
memory that was already freed. Ouch.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>