The current code passes a context pointer in the xc5000_config struct.
This context pointer is used in the tuner_callback function, used to
reset the device after firmware download.
The xc5000_config struct is a static structure, whose .priv member was
being assigned before calling xc5000_attach(). If there are more than
one of the same device type installed on a single system, the last one
to assign xc5000_config.priv will "win", and all others will cease to
function properly.
This patch passes the context pointer in xc5000_attach() rather that
storing it within the static struct xc5000_config.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
cx88 doesn't need support for FW_LOADER. Instead, this is required only for
cx88-blackbird.
Also, cx88-blackbird depends on HOTPLUG, due to FW_LOADER dependency.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
VIDEO_TUNER is responsible for compilation of tuners.ko module. This were the
previous behaviour before the creation of MEDIA_TUNER.
Before this patch, tuner.ko were created even for drivers that don't need a
tuner (like webcam drivers).
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There were several issues in the past, caused by the hybrid tuner design, since
now, the same tuner can be used by drivers/media/dvb and drivers/media/video.
Kconfig items were rearranged, to split V4L/DVB core from their drivers.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Tuner setup were happening during i2c attach callback. This means that it would
happen on two conditions:
1) if tuner module weren't load, it will happen at request_module("tuner");
2) if tuner is not compiled as a module, or it is already loaded
(for example, on setups with more than one tuner), it will happen
when cx88 registers I2C bus.
Due to that, if tuner were loaded, tuner setup will happen _before_ reading
the proper values at tuner eeprom. Since set_addr refuses to change for a tuner
that were previously defined (except if the tuner_addr is set), this were making
eeprom tuner detection useless.
This patch removes tuner type setup from cx88-i2c, moving it to the proper
place, after taking eeprom into account.
Reviewed-by: Gert Vervoort <gert.vervoort@hccnet.nl>
Reviewed-by: Ian Pickworth <ian@pickworth.me.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (452 commits)
V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
V4L/DVB (7719): pvrusb2: Implement input selection enforcement
V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
V4L/DVB (7716): pvrusb2: clean up global functions
V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
V4L/DVB (7714): pvrusb2: Fix hang on module removal
V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
V4L/DVB (7712): pvrusb2: Close connect/disconnect race
V4L/DVB (7711): pvrusb2: Fix race on module unload
V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
...
This patch fixes several issues on SCODE:
1) The extracting tool weren't generating the proper tags for SCODE. This
has almost no effect, since those tags shouldn't be used;
2) DIBCOM52 were using a wrong IF. It should be 5200, instead of 5700;
3) seek_firmware were wanting an exact match for firmware type. This is
wrong. As result, no SCODE firmware were loaded;
4) A few files were including the wrong file for seeking demod firmwares;
5) XC3028_FE_DEFAULT can be used, if user doesn't want to load a firmware.
However, this weren't documentated. This feature require more testing.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The adapter_nr module options can be used to allocate static adapter
numbers on a driver level. It avoids problems with changing DVB apapter
numbers after warm/cold boot or device unplugging and repluging.
Each driver holds DVB_MAX_ADAPTER long array of the preferred order of
adapter numbers.
options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
reversed allocation of adapter numbers.
With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If
both are already in use it will allocate the lowest free adapter number.
Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Acked-by: Hermann Pitton <hermann.pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If frontend is not attached, both cx88-dvb and saa7134-dvb don't
register DVB. However, dvb unregister were inconditionally called.
Due to that, an OOPS is generated.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The attached patch adds complete remote control support for Powercolor Real
Angel 330.
Signed-off-by: Daniel Fraga <fragabr@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The attached patch fixes gpio references for Powercolor Real Angel 330.
Signed-off-by: Daniel Fraga <fragabr@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
An enabled color killer will not degrade picture quality for color
input signals, only suppress bogus color information on
black-and-white input. Therefore enable it by default.
Signed-off-by: Frej Drejhammar <frej.drejhammar@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The cx2388x family has a color killer. This patch implements the
V4L2_CID_COLOR_KILLER control for the cx2388x family. By default the
color killer is disabled, as in previous versions of the driver.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
An enabled chroma AGC will not degrade picture quality if enabled on a
color PAL or NTSC signal with nominal signal levels. It will give a
significant color reproduction improvement if the chroma signals
diverge from nominal levels. Therefore enable chroma AGC by default
for PAL and NTSC standards.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The cx2388x family has support for chroma AGC. This patch implements a
the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default
chroma AGC is disabled, as in previous versions of the driver.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If the IR worker is not stopped before the removal of the cx88xx module,
an OOPS may occur, because the worker function cx88_ir_work gets called.
So stop the ir worker.
Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This board has a s5h1409 demod, plus a xc30x8 tuner (probably, xc3018).
This patch adds proper support for radio, video, s-video, composite and ATSC.
However, support for radio and video depends on having s5h1409 i2c gate open,
otherwise, xc30x8 chip won't be visible.
For a better support, some rework is needed on cx88 driver, to allow adding
xc30x8 to i2c bus without sending i2c 0 byte reading to 0xc2 address.
Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com> for helping to figure
out the proper parameters for s5h1409 and the GPIO pins used by each
configuration.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Update Kconfig for the hybrid devices recently converted
to use tuner-simple rather than dvb-pll.
dvb-bt8xx no longer uses dvb-pll at all, so remove all
references to dvb-pll within that driver.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb and saa7134-dvb to use tuner-simple instead of dvb-pll
for Philips TUV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cxusb, cx88-dvb and saa7134-dvb to use tuner-simple instead of
dvb-pll for Philips FMD1216ME
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb, dvb-bt8xx, b2c2-flexcop, cxusb and cx23885 to use
tuner-simple instead of dvb-pll for LG TDVS-H06xF
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Thomson FE6600
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Microtune 4042 FI5
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Thomson DTT 761X
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The video_dev parameter, on tuner-xc2028 were used to pass i2c private data to
tuner_callback. Since the driver already have a pointer to i2c_adap->algo_data,
uses this instead.
This parameter were used also as a magic number to idenfity if two drivers are
trying to register the same xc3028 tuner. This occurs with boards with DVB
support, where both DVB and V4L drivers will share the same tuner.
Instead of using the algo_data as a private number, after this patch, the
driver will use i2c_adap->dev, with seems more consistent.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adds a consistency check to avoid OOPS, if tuner_callback priv argument is
NULL. Also, simplifies callback codes on cx88.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
tuner-xc2028 needs to know when a DVB module is sharing the same analog tuner.
This is done by comparing a magic number that needs to be the same on analog
and on digital. To make easier, this magic number is a pointer to some data
struct.
With the previous code, two different pointers were using, causing a
miss-detection.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The dev element of the struct videobuf_queue is now of type struct device
implicitly. Fix left-over casts.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
TV reception ok. S-video and Composite not tested. Audio not tested.
IR not implemented yet.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If dvb_attach fails, dev->dvb.frontend is NULL. This will produce an OOPS, as
reported.
Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix GPIO for FusionHDTV 7 Gold tv / s-video / composite input selection.
Fix card textual name to match other FusionHDTV device names.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
With this gpio, audio works properly.
Thanks to Daniel Fraga <fragabr@gmail.com> for helping on fixing the code for
Powerangel Real board.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This callback is specific to pci_nano, since supports only dvb. Renames it
to avoid future mistakes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>