This driver supports cameras with USB ID 174f:a311 or 05e1:0501,
and the ov965x sensors. These devices are found in some Asus laptops
and probably somewhere else.
It is based on the stk11xx driver written by Nicolas Vivien
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Thanks go to Mark Schultz for the initial contribution and to
Dean Hilkewich for testing it again.
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
saa7134: remove the Avermedia Super 007 from eeprom detection
The card made it into the Philips' Tigers eeprom detection and falls through.
Since it has attracted already others to follow, which are wrongly identified
as TIGER_S then, move it to the usual analog initialization.
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Setting force_init=1 bypasses the friendly auto-detection by polling the
status register, and instead attempts to initialize the qcam directly. Not
friendly to other parallel devices, but much more reliable than the
auto-detection.
Signed-off-by: Brett T. Warden <brett.warden@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If not it impacts on analog tuner quality.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This enabled basic preview NTSC and PAL support for the HVR1800.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The cx23885/6/8 all have different clock rates, this patch allows
the core to compensate, and developers to allow vendor specific
overrides. This patches will be used by future analog video
and encoder patches.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We need to clear space large enough for the video and encoder fifos.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Failure to do this means that a full system reboot is required if the
part hangs.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Each version of the cx23885/7/8 silicon has different build revs.
We'll use this internal revision to work around bugs and known
issues in the video and encoder related patches.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The cx23885/7/8 PCIe bridge has an internal AVCore modelled on
the cx2584x family. Many of the registers positions are identical
but some moved. The register values are also different because
the different bridges run at different clock rates.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In order to videobuf_iolock to work, mmap_mapper should be called first.
Otherwise, an OOPS is generated.
On some cases, .mmap file handler used to took some time to be called. On those
situations, mmap_mmapper() were called after iolock.
This patch properly waits for mmap_mapper to be called, otherwise generating an
error.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add adjust_X_Offset/adjust_Y_Offset module parameters to allow users
to tune X and Y picture offsets for their almost-working tuners without
repetitive recompilation.
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add the "Pinnacle Studio PCTV USB (NTSC) FM" device.
This is the third occurrence of the same device designation...
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
As in the past, we should not allow to auto detect like this,
since all saa7130 and saa7134 cards without eeprom will be detected
as such Beholder cards then.
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We don't usually want to see the calibration debug messages, but sometimes
it is useful. Assign it to a separate debug mask.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
IR were not working for Winfast XP 2000 TV.
Gabor Nyekhelyi <n0gabor@vipmail.hu> wrote a hack some time ago:
http://marc.info/?l=linux-video&m=116362609323281&w=2
This patch fixes CodingStyle and commits the hack. I suspect that the proper
solution would be to find the proper mask_keydown for this IR. Anyway, better
to have this patch as a workaround.
Thanks to Stafan Talpalaru <stefantalpalaru@yahoo.com> for pointing the issue.
CC: Gabor Nyekhelyi <n0gabor@vipmail.hu>
CC: Stafan Talpalaru <stefantalpalaru@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Store last tuned frequency & bandwidth after successful tune.
Clean up tune functions -- remove pointer to tune function in
state structure, instead call tune function based on priv->id.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Always initialize registers during attach.
Perform IR Calibration during init if needed.
Perform RF Calibration during init if needed for C2, only.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch updates cardlist for Beholder TV tuners:
old models (with GPIO ir) 401, 403, 405, 407, 409, 505, 507
and add support for 607, 609, M6 cards with new i2c-ir.
Signed-off-by: Igor Kuznetsov <igk72@yandex.ru>
Signed-off-by: Andrey J. Melnikov <temnota@kmv.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Before this patch, only Vendor Class audio support were loaded. This means that
older em28xx devices won't have digital audio support loaded.
This patch changes the logic to auto load eighter snd-usb-audio, for devices
with USB Audio Class or em28xx-alsa, for devices with USB Vendor Class.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Only HVR950 has analog_gpio configured. It makes no sense to set gpio to 0 for
other boards. Better to add a test, while this var is not set for all xc3028
devices.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Create a device description and enable autodetection for
Hauppauge WinTV PVR-USB2 Model 75xxx
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
An earlier patch, "tda18271: fail table lookups if frequency is out of range"
broke analog support on certain hardware. This patch fixes that problem, by
allowing the RF_CAL byte to be set to the maximum value, in cases of the
frequency being out of range.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Store IF Frequency in a u16 instead of a u32. Multiply by 1000 before use.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Allow drivers to pass device-specific configuration parameters during attach.
If these parameters are omitted, default values will be used.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Move some common code to a new file to make this easier to look at.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Tested successfully with QAM256 digital cable.
Analog television is limping, needs more work.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
make set_analog_params function look consistent with set_params function
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Older em28xx devices does implement standard Audio Class.
However, on newer devices, this were replaced by a Vendor Class. This
patch autodetects that an em28xx lacks Audio Class and auto-loads
em28xx-alsa, for the devices that implements only a Vendor Class.
For devices with Audio Class, snd-usb-audio module will provide an ALSA
interface.
This patch uses the request_module_async function as defined on cx88-mpeg.c,
originally wrote by Markus Rechberger.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
em28xx-audio module exports em28xx Vendor Class audio as an -alsa
driver. This module were written based on usbaudio driver by Markus
Rechberger. Recently, he acked to allow us to merge it on kernel:
http://lists-archives.org/video4linux/20408-supporting-prolink-pixelview-405-dvd-maker.html
Thanks to Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Thanks to Markus Rechberger <mrechberger@gmail.com> for retriving those
commands.
Also, MTS firmware is required for audio to work on HVR950.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
It is possible to select audio inputs via em28xx or via ac97 functions.
This patch allows configuring a board to use either one way.
It also do some cleanups at audio setup configurations.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Break out the following new functions from tda18271_tune:
tda18271_calc_bp_filter
tda18271_calc_km
tda18271_calc_rf_band
tda18271_calc_gain_taper
tda18271_calc_ir_measure
tda18271_calc_rf_cal
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We don't need to do a dbg_info during tda18271_attach anymore, since
the tda18271_get_id function will call dbg_info with the same information
and more.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
tuner-core was checking if analog_ops->set_config is set. If set, it would
complain that it isn't. Fix this backwards logic to the proper behavior.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Everybody forgets to add the Kconfig stuff after they add new card support :-/
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
bttv driver is working as previously. An additional gain of about 1,5Kb were
obtained with the driver conversion to vidioc_ioctl2:
text data bss dec hex filename
89208 40244 57556 187008 2da80 old/bttv.ko
88960 38740 57556 185256 2d3a8 new/bttv.ko
(measured on a x86_64)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Since there are a few vidioc_ functions that were exported, rename those
functions to bttv_ in order to avoid poluting namespace.
The other functions were also renamed, to standardize inside the driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Don't allow the tda8290 module to probe and attach the tuner module,
causing incorrect use counts when using dvb_attach.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Prevent the tda8290 module from probing for tuners during tda829x_attach,
by passing:
.probe_tuner = TDA829X_DONT_PROBE,
...in struct tda829x_config
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Identify the silicon during attach, return NULL if unsupported device.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Bit 7 of both Main Divider byte 1 and Cal Divider byte 1 is always zero.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fixes all occurences of assignment in if
checkpatch marks them as ERROR.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Reviewed-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add module option 'alt_tuner' disabled by default.
When set to one, the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + tda18271 tuner
When set zero (default), the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + mt2131 tuner
If the tda18271 is used in digital mode, you will not be able to
tune an analog channel at the same time.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If we are selecting the S-Code firmware to load by name, then we must mask
off the HAS_IF bit during the search.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix the following build warning:
xc5000.c:560: warning: format '%d' expects type 'int',
but argument 2 has type 'size_t'
On many architectrues size_t is unsigned long, and may not be printed with %d.
Use %Zu instead.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
xc2028_attach was returning an integer when disabled from the build, where it
should instead be returning NULL. Declare xc2028_attach as type dvb_frontend *
instead of void *.
The prototype declaration must be marked as extern in the header.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We want to set bits 1 & 2 on easy programming byte 4, not extended byte 4.
Thanks to David Wong for pointing this out.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: David Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This translates much of the xceive coding style, adds
some result codes and generally cleans up whitespace
and function arguments.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This is an all formats tuner, QAM, ATSC, DVB-T and others.
Only ATSC and QAM have been tested.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Rather than using a pointer, include struct analog_demod_ops directly
inside struct dvb_frontend. This will allow us to use dvb_attach in
the future, along with removing the need to check the ops structure
before having to check the pointer to the method being called.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
struct analog_tuner_ops no longer has any dependencies specific
to v4l2, so we can move this into dvb_frontend.h with the rest
of the tuning structures.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>