summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/budget-ci.c
AgeCommit message (Collapse)Author
2008-08-30v4l: fix assorted compile warnings/errorsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> BIT define conflicts on kernels < 2.6.24, byteorder/swab.h doesn't need to be included at all. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-25V4L/DVB: follow lspci device/vendor styleMauro Carvalho Chehab
From: Bjorn Helgaas <bjorn.helgaas@hp.com> Use "[%04x:%04x]" for PCI vendor/device IDs to follow the format used by lspci(8). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-08v4l-dvb: remove support for kernels < 2.6.16Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 4 removes the compatibility support for kernels < 2.6.16. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.0Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-20budget-ci: Support the bundled remote control of the TT DVB-C 1501Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Support the bundled remote control of the TT DVB-C 1501 Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Thanks-to: SG <SiestaGomez@web.de>
2008-06-15budget-ci: Add support for Technotrend budget C-1501 dvb-c cardOliver Endriss
From: Sigmund Augdal <sigmund@snap.tv> The following experimental patch adds support for the technotrend budget C-1501 dvb-c card. The parameters used to configure the tda10023 demod chip are largely determined experimentally, but works quite for me in my initial tests. Signed-off-by: Sigmund Augdal <sigmund@snap.tv> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2008-04-21stv0299: Fixed some typosOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Fixed some typos. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2008-04-08media/dvb/ttpci replace remaining __FUNCTION__ occurrencesMichael Krufky
From: Harvey Harrison <harvey.harrison@gmail.com> __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-09-18budget-ci: select TT keymap for DVB-S TT 1500Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> DVB-S TT 1500 must use the TT keymap. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-05-23Input: drivers/media - switch to using input_dev->dev.parentMichael Krufky
From: Dmitry Torokhov <dtor at mail.ru> 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>
2007-05-03budget-ci: Fix tuning for TDM 1316 (160..200 MHz)Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Revert changeset http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=e7c424bbf9aa;style=gitweb Petri Helin found that this changeset broke tuning: 'Well, after going through the changes that might have had effect on tuning, I found out the one which had caused this problem. I do not know the actual reason behind the change, but the changelog says that it was meant to "Fix TD1316 tuner for DVBC". But at least in my case it seams to have broken the tuner instead.' Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Thanks-to: Petri Helin <phelin@googlemail.com> Acked-by: e9hack <e9hack@googlemail.com> Acked-by: Thomas Kaiser <linux-dvb@kaiser-linux.li>
2007-02-25budget-ci: Fixed compilation error for kernel < 2.6.19Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Fix compilation error introduced by changeset 6d08d71cbcfb. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-02-25budget-ci: Use the repeat handling of the input subsystemOliver Endriss
From: David Härdeman <david@hardeman.nu> The attached patch contains the last set of changes to the budget-ci IR handling which makes it use the repeat handling of the input subsystem. This allows some code simplification, makes sure that repeat key presses are reported as such and also allows the "debounce" hack to be removed altogether. In addition a couple of static variables were removed which would have confused the IR code if more than one card is used. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-02-13budget-ci: IR handling fixupsOliver Endriss
From: David Härdeman <david@hardeman.nu> Changeset 6562d27de0d7 by Oliver Endriss changed the budget-ci driver to use interrupt mode for i2c transfers. This also meant that a new bunch of IR bytes that were previously lost are now received, which allowed me to better understand how the MSP430 chip works. Unfortunately it also means that the current driver gets some assumptions wrong and might generate double keypresses for one IR command. The attached patch fixes this by throwing away the repeat bytes and by associating the correct command and device bytes. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-02-02budget-ci: Add separate configuration data for subsystem 0x13c2:0x1012Oliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Fixed problem reported by Teemu Suikki: After a device with subsystem 0x13c2:0x1012 has been installed, devices with subsystem id 0x13c2:0x1011 did not work anymore. Reason: The driver for 0x13c2:0x1012 modified shared configuration data. Fix: Use separate configuration data for those devices. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-01-30compat: Handle input_register_device() change and some othersTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> input_register_device() was changed to return an error code instead of being void in 2.6.15. Handle it with a macro wrapper in config.h. For this to work, linux/input.h must be included before config.h. This required some trivial header re-ordering in budget-ci.c and ttusb_dec.c. In kernel 2.6.15-rc1 a helper function called setup_timer() was added to linux/timer.h. Add to compat.h, but require that linux/timer.h be included first to give the definition of struct timer_list. A new 4GB DMA zone, __GFP_DMA32, was added in 2.6.15-rc2. Alias it to __GFP_DMA on older kernels. Handle another 2.6.15 "input_dev->dev to input_dev->cdev.dev" change for some recently added code in cinergyT2.c. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-01-12budget-ci: add support for the Technotrend 1500 bundled remoteMichael Krufky
From: Ville-Pekka Vainio <vpivaini@cs.helsinki.fi> The keymap is based on a previous patch by Jussi Kukkonen. This remote is identified by subsystem_device id 0x1010. Signed-off-by: Ville-Pekka Vainio <vpivaini@cs.helsinki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-12-04budget-av, budget-ci: Fix MC1 register programmingOliver Endriss
From: Hartmut Birr <e9hack@gmail.com> Remove bogus read during MC1 programming. A '1' bit could never be cleared using the old code. Use MASK_xx macros. Signed-off-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-12-03budget-ci: Use SAA7146_IER_ENABLE/DISABLE to enable or disable a hardware ↵Oliver Endriss
interrupt From: Hartmut Birr <e9hack@gmail.com> Use SAA7146_IER_ENABLE/DISABLE to enable or disable a hardware interrupt. Signed-off-by: Hartmut Birr <e9hack@gmail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-11-01av7110,budget,budget-ci,budget-av: Use interrupt mode for I2C transfersOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Use interrupt mode for I2C transfers. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-11-28gentree.pl script can't handle # if. Should be, instead #ifMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-24Remove stray IR code left from patchsetAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> This caused compilation to fail - completely replaced by new style functions, so can be removed. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22Fix TD1316 tuner for DVBCAndrew de Quincey
From: Thomas Kaiser <linux-dvb@kaiser-linux.li> If your device is using the philips tda1316 tuner, i think there is a problem in setting the correct Band. 162 MHz and above should be band 2 (Mid-Band). But in dvbc_philips_tdm1316l_tuner_set_params band 1 is set for frequencies below 200 MHz. Signed-off-by: Thomas Kaiser <linux-dvb@kaiser-linux.li> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 8/8] budget-ci IR: make debounce logic conditionalAndrew de Quincey
Change the debounce logic so that it is not used at all unless the debounce parameter has been set. This makes for a much "snappier" remote for most users as there is no timeout to wait for (the debounce logic has a 350ms timer for the next repeat, but with the RC5 protocol, one event per ~110ms is possible) Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 7/8] budget-ci IR: add IR debugging informationAndrew de Quincey
This adds a ir_debug parameter which is useful in tracking down IR decoding problems. Based on Darren Salt's dvb-ir patchset. Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 6/8] budget-ci IR: decode rc5 device byteAndrew de Quincey
Decode the RC5 device byte as well as the command byte. Introduce a parameter to set the device events to listen for. Default to try to auto-detect the proper device code, otherwise, listen to any device as the old code did. Based on Darren Salt's dvb-ir patchset. Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 5/8] budget-ci IR: integrate with ir-commonAndrew de Quincey
This converts the budget-ci driver so that it uses ir-common for some of its IR processing. In particular, the keymap for the Nova-T (sub 13c2:1011) is switched to the Hauppauge grey/black keymap, of which the keys on the supplied R808 remote control form a subset. The old budget-ci keymap is moved to ir-keymaps.c and is used for other remotes. The debounce logic for buggy remotes (i.e. Zenith) is made conditional the new debounce parameter and defaults to off (so that repeat keypresses aren't ignored for all working remotes). Some parts are based on Darren Salt's dvb-ir patchset. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 4/8] budget-ci IR: be more verbose in case of init failureAndrew de Quincey
Trivial change to help the user understand what went wrong. Taken from Darren Salt's dvb-ir patchset. Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 3/8] budget-ci IR: improve error checking in init and deinit functionsAndrew de Quincey
Improve the error checking in the IR init and deinit functions. Based on Darren Salt's dvb-ir patchset. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 2/8] budget-ci IR: support EVIOCGPHYSAndrew de Quincey
This patch adds a 'phys' string, of the same form as used by various other DVB cards' IR drivers, for access by any program which uses the EVIOCPHYS ioctl or may read /sys/class/input/*/phys (e.g. udev) to identify input device nodes. Taken from Darren Salt's dvb-ir patchset. Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-22[PATCH 1/8] budget-ci IR: groundwork for following patchesAndrew de Quincey
This patch lays down some groundwork for later budget-ci patches. The bulk of this consists of moving a few members into a new struct and renaming a few of them. It also allocates extra space for the device name (the "name" field in /proc/bus/input/devices and in the relevant sysfs dir) to avoid truncation and uses snprintf rather than sprintf in case the extra space shouldn't be enough. Taken from Darren Salt's dvb-ir patchset Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-11-20Handle errors from input_register_device()Mauro Carvalho Chehab
From: Dmitry Torokhov <dtor@insightbb.com> Also sprinkled some input_sync() throughout the code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Ricardo Cerqueira <v4l@cerqueira.org> Acked-by: Oliver Endriss <o.endriss@gmx.de> Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-31budget-ci: Inversion setting fixed for Technotrend 1500 TOliver Endriss
From: Raymond Mantchala <raymond.mantchala@streamvision.fr> Technotrend 1500 T card have "inverted inversion". This patch fixes that. Many thanks to Martin Zwickel from Technotrend for his confirmation and correction proposal. Signed-off-by: Raymond Mantchala <raymond.mantchala@streamvision.fr> Signed-off-by: Perceval Anichini <perceval.anichini@streamvision.fr> Thanks-to: Martin Zwickel <martin.zwickel@technotrend.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-10-28budget-ci: Change DEBIADDR_IR to a safer defaultOliver Endriss
From: David Härdeman <david@hardeman.nu> The IR chip has no address decoding, so the IR data is always present in the high byte when doing a read from the saa7146 chip. This means that the DEBI address used is irrelevant to the IR decoding logic. DEBI addresses 0x1XXX are mapped to the registers on the CI module itself, but only the lowest two bits are actually used (see EN50221, section A.2.2.1), meaning that 0x1234 is equivalent to 0x1000 which maps to register 0 (the data register). A read from the data register is supposed to be preceded by a read from the size register, so some CI modules will be confused (the AlphaCrypt CAM will hang completely). The attached patch changes the address used when reading the IR data to use 0x4000 instead. This is the CI version address, which is a safer default, works with the AlphaCrypt CAM and matches the behaviour of the Windows driver (AFAIK). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-08-07remove null chars from dvb namesMauro Carvalho Chehab
From: Dave Jones <davej@redhat.com> DVB null terminates its device names, which seems odd, and should be unnecessary. Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-30Fix budget-ci to use dvb_frontend_detach()Andrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> I missed one call during the dvb_attach() development. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-07-28Refactor dvb_detach calls into a single dvb_frontend_detach function.Andrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Remove buggy dvb_detach() macro and replace with unified dvb_frontend_detach() call. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-28Convert DVB devices to use dvb_attach()Andrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-28Remove remaining static function callsAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Rewrote _write() calls to use write() op. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-28Convert SEC drivers to new frontend APIAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Convert SEC drivers to new frontend API Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-19[budget/budget-av/budget-ci/budget-patch drivers] fixed DMA start/stop codeOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Fix bug reported by Andrew de Quincey: After cold boot the saa7146 DMA did not start if the demuxer was opened before the frontend has locked to the signal. DMA transfers will be started now if (and only if) the frontend is locked and data should be sent to the demuxer. Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-05-14Change dvb_frontend_ops to be a real field instead of a pointer field inside ↵Patrick Boettcher
dvb_frontend From: Patrick Boettcher <pb@linuxtv.org> The dvb_frontend_ops is a pointer inside dvb_frontend. That's why every demod-driver is having a field of dvb_frontend_ops in its private-state-struct and using the reference for filling the pointer-field in dvb_frontend. - It saves at least two lines of code per demod-driver, - reduces object size (one less dereference per frontend_ops-access), - be coherent with dvb_tuner_ops, - makes it a little bit easier for newbies to understand how it works and - avoids stupid mistakes because you would have to copy the dvb_frontend_ops always, before you could assign the static pointer directly, which was dangerous. Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
2006-04-28Support new dvb-ttusb-budget boards with stv0297Andrew de Quincey
From: Thomas Kaiser <linux-dvb AT kaiser-linux.li> Added config switch to stv0297 to control i2c STOP during write behaviour. Update frontend init in dvb-ttusb-budget. Enable i2c STOP on other users of stv0297. Signed-off-by: Thomas Kaiser <linux-dvb AT kaiser-linux.li> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-04-28Convert lnbp21 to a moduleAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Convert lnbp21.h into a linux kernel module. Fix up previous users to use it. Convert dvb-ttusb-budget to use it. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-04-18Convert ttpci/budget-ci to refactored tuner codeAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Rename pll calls to appropriate tuner calls. Remove pll functions from demod structures. Hook tuner call into tuner_ops. Add pll gate control calls where appropriate. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-04-05Fix TT budget-ci 1.1 CI slotsAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> It turns out the firmware on the TT budget-ci 1.1 slots doesn't generate interrupts. This patch adds support for this using polling mode on these slots. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-03-16Moved duplicated code of ALPS BSRU6 tuner to a standalone file.Oliver Endriss
From: Perceval Anichini <perceval.anichini@streamvision.fr> Moved duplicated code of ALPS BSRU6 tuner to a standalone file. Modified av7110 and budget drivers to include the new file. Signed-off-by: Perceval Anichini <perceval.anichini@streamvision.fr> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-02-28TechnoTrend S-1500 card handling moved from budget.c to budget-ci.cOliver Endriss
From: Perceval Anichini <perceval.anichini@streamvision.fr> TechnoTrend S-1500 card handling moved from budget.c to budget-ci.c. Signed-off-by: Perceval Anichini <perceval.anichini@streamvision.fr> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2005-12-04Backport of Dmitry Torokhov's input layer changes at mainline kernelRicardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> kernel-sync Ported changes by Dmitry Torokhov <dtor_core@ameritech.net> and added backwards compatibility checks for kernels < 2.6.15 Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>