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>
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>
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>
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>
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>
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>
It seems that on this board, the demodulator provides the pullup on the I2C
bus, which means that calling i2c_gate_ctrl crashes the bus. Turn this off
and the xc3028 can talk OK. Also fix some GPIO related settings that
became more clear through working on this.
Some changes made by Mauro Chehab to allow merging it with some
other xc3028 patches.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add support for tuning DVB-T channels on DViCO's FusionHDTV DVB-T Pro board.
The IR remote and analog tuner are not supported at this time.
Some changes made by Mauro Chehab to allow merging it with some other xc3028
patches.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch ports a patch from Markus Rechberger to work with tuner-xc2028.
It adds entries for several cx88 boards with xc2038/3028 tuners.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
load ir-kbd-i2c for IR remote control support on DViCO FusionHDTV 5 PCI nano
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ATSC is known to work.
SVideo / Composite should work (I have no cable to test).
Analog tuner support does not work.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Previous patches assume the tuner was on a different gpio. This patch
corrects this.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
xc5000: Small amount of cleanup and commenting, just for clarification.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
From Zhang: This patch continues the support for the Pinnacle HD 800i.
Patch committed as-is, cleanups to follow ... Steve
Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix lack of audio on the MPEG-2 stream of wm8775 based blackbirds.
The wm8775 module initializes the audio input at "route 2", which doesn't
hold true for all boards. The HVR-1300, for example, uses route 1 for
tuner audio, and route 2 for baseband. So we must route the audio to the
proper input depending on what video input is being used.
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This board has some special tea5767 configuration. Basically, radio
XTAL uses a different frequency than the other supported radios. It
uses a 13 MHz XTAL.
This patch adds the proper radio gpio and tea5767 configurations for
the board.
Also, with PAL/BG, the board requires some special init for tda9887:
port1=0 port2=0 qss=1
Thanks to Serge Kolotylo and MIDImaster for their help on identifying
the proper needs for this driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Used for the PCI_INTMSK and PCI_INT_STAT registers.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Get rid of the "CORE" prefix from cx88 printks. It was only used a few times,
and it makes it look like they're coming from the kernel core or something.
Fix the message, "TV tuner 60 at 0x1fe, Radio tuner -1 at 0x1fe", by adding a
"cx88[0]" prefix to be consistent, and to keep people who grep their dmesg
output for cx88 from missing it. Get rid of the addresses, which are always
wrong. The addresses are always set to -1, but because it's an unsigned 8-bit
value, the left shift converts it to the nonsense address 0x1fe.
In the cx8802 driver, some cut and pasted code prefixed lines with "CORE
cx88[0]:", which has been changed to "cx88[0]/2:" like the other printks from
the cx8802 driver.
Also fix some ugly printks in the cx8802 driver that used __FUNCTION__ for
KERN_INFO and KERN_ERR messages.
The changed printks in cx88-mpeg.c also needed lots of whitespace and
80-column fixes.
A bunch of misc changes in cx88-dvb.c and cx88-video.c to add message levels
or a consistent "cx88[?]/2" or "cx88[?]/0" prefix.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
A lot of code in cx88-cards.c was only used by cx88-core.c when the core state
is first allocated and initialized. Moving that task to cx88-cards makes the
driver simpler and the files more self contained.
- Module parameters tuner, radio, card, and latency move to cx88-cards.c
- cx88_boards is made static
- cx88_subids is made static and const
- cx88_bcount is eliminated
- cx88_idcount is eliminated
- cx88_card_list() is made static
- cx88_card_setup_pre_i2c() is made static
- cx88_card_setup() is made static
- cx88_pci_quirks() is moved from cx88-core to cx88-cards
The function argument "char *name" is made const too
- get_ressources() is moved from cx88-core to cx88-cards, and renamed to
cx88_get_resources()
- The code to allocate and initialize the core state struct and the chip is
moved out of cx88-core.c:cx88_get_core() and into a new function in
cx88-cards.c, cx88_core_create(). This makes both functions simpler.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The cx88 driver state stored the ID of the board type in core->board. Every
time the driver need to get some information about the board configuration, it
uses the board number as an index into board configuration array.
This patch changes it so that the board number is in core->boardnr, and
core->board is a copy of the board configuration information. This allows
access to board information without the extra indirection. e.g.
cx88_boards[core->board].mpeg becomes core->board.mpeg.
This has a number of advantages:
- The code is simpler to write.
- It compiles to be smaller and faster, without needing the extra array lookup
to get at the board information.
- The cx88_boards array no longer needs to be exported to all cx88 modules.
- The boards array can be made const
- It should be possible to avoid keeping the (large) cx88_boards array around
after the module is loaded.
- If module parameters or eeprom info override some board configuration
setting, it's not necessary to modify the boards array, which would
affect all boards of the same type.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
After some tedious work with a logic probe and a magnifying glass, I've
determined that GPIO 7 is used to switch between the DTT7612's Sound 4.5 MHz
IF output on pin 12 and the FM 10.7MHz If output on pin 11. GPIO 2 is used to
switch the card's analog sound output from from the analog input connector to
the CX23883's audio DACs.
So, in radio mode GPIO2 = 1 and GPIO7 = 0.
Add some comments about how the HD-3000's GPIOs are connected.
Delete the vmux setting for the radio, as vmux doesn't apply to radio mode.
Also delete the lines setting unused gpio words to zero; it's not necessary as
0 is the default value for uninitialized fields.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.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>
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>
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>
Adds support for the combined S-Video/Composite input of the
Terratec Cinergy 1400 DVB-T.
Signed-off-by: Heiko Baums <heiko@baums-on-web.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
reference to .init.text: from .text between 'cx88_card_setup'
(at offset 0x68c) and 'cx88_risc_field'
Caused by leadtek_eeprom() being declared __devinit and called from
a non-devinit context.
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>
Add subvendor/device of the ADSTech Instant TV Deluxe PTV-305 to the
card list as card=45 (KWORLD_HARDWARE_MPEG_TV_XPERT).
Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
For the ASUS PVR-416, the external adc must be used for
the rca audio inputs, but television / radio inputs use
the internal adc.
Thanks to Alex Deucher for lending his card to me.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
For the KWorld HardwareMpegTV XPert, the external adc must be used for
svideo / composite inputs, but television / radio inputs use the internal adc.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Some cx88-blackbird boards use an external adc, but not necessarily
for all inputs. Thus, this needs to be configurable on the card level
for each input.
This patch allows for the usage of the external adc to be determined
by a bit setting in the cx88_input struct for cards based on the cx88
blackbird design.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
A series of patches to change the cx88 framework to allow the
PCI mpeg port to be shared dynamically between different
types of drivers or applications. This patch changes the cx88-dvb
and cx88-blackbird drivers to become 'sub drivers' of a higher
single cx88-mpeg driver.
The cx88-mpeg driver is a superset of the previous cx88-mpeg/blackbird
drivers and now owns the IRQ. cx88-dvb/blackbird now become mini drivers,
registering themselves with cx88-mpeg through a standard interface with
callbacks.
Sub drivers request access to hardware via the cx88-mpeg driver. In turn
the cx88-mpeg driver determines whether the hardware is busy and accepts
or refuses the request, grant access using callbacks into the sub drivers.
The net effect is that you are no longer able to tamper with the mpeg port
from multiple different applications at the same time, potentially breaking
a live mpeg2 hardware encoding or dvb stream.
The mechanism extends to enable multiple dvb frontends to be registered
and share the single resource.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The WinTV-HVR3000 is currently defined for analog support only. This
patch adds full DVB-T support. (DVB-S support will be added soon)
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adding support for Nova-T-PCI PCI ID 0070:9000
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>