summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/tda1004x.c
AgeCommit message (Collapse)Author
2008-07-17backport commit bc179153ae2334efe28cf4f3300e024da7d83753Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Author: David Woodhouse <dwmw2@infradead.org> Date: Sat May 24 00:12:23 2008 +0100 dvb frontends: treat firmware data as const kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-14Improve error message at tda1004x_attachMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> When an error occurs at firmware loading, sometimes, tda1004x stops answering. Instead of reporting such error, attach code were assuming that the device were answering an invalid ID (0xff). This can be seen when enabling debug options: tda1004x: tda1004x_read_byte: reg=0x0 tda1004x: tda1004x_read_byte: error reg=0x0, ret=-5 Now, instead of reporting an invalid ID, it will report the correct error: tda10046: chip is not answering. Giving up. saa7133[0]/dvb: failed to attach tda10046 saa7133[0]/dvb: frontend initialization failed A possible improvement would be trying to reset the device. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-14Improve error messages for tda1004x attachMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> A fresh copy of v.29 firmware, using get_firmware, is leading to an invalid firmware: DVB: registering new adapter (saa7133[0]) DVB: registering frontend 0 (Philips TDA10046H DVB-T)... tda1004x: setting up plls for 48MHz sampling clock tda1004x: found firmware revision ff -- invalid tda1004x: trying to boot from eeprom tda1004x: found firmware revision ff -- invalid tda1004x: waiting for firmware upload... tda1004x: Error during firmware upload tda1004x: found firmware revision ff -- invalid tda1004x: firmware upload failed Sometimes, loading/unloading this firmware makes tda1004x to return an invalid ID. However, there were no printk messages to help to identify what were the cause for the error. With this patch, it will now print: Invalid tda1004x ID = 0xff. Can't proceed saa7133[0]/dvb: failed to attach tda10046 saa7133[0]/dvb: frontend initialization failed Tested with LifeView FlyDVB-T Hybrid Cardbus/MSI TV @nywhere A/D NB Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-08media/dvb/frontends 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>
2007-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-18tda1004x: add ts_mode option to config structMichael Krufky
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> The struct tda1004x_config has a new entry: .ts_mode Possible values are TDA10046_TS_PARALLEL or TDA10046_TS_SERIAL There always is only one interface active, default is parallel. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-02-27Fixed 1 byte too short buffer in tda827x.cHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> - The i2c data buffer in tda827xa_set_params was 1 byte too short - saa7134-dvb now gives an error mesage if tda827x could not be attached - coding style fix in tda1004x.c Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2007-02-04set tda827x to sleep mode after attachHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> This change sets the tda827x to sleep mode right after attach in dvb mode. It is just to save power. For the same reason, the ADC of the tda10046 gets turned off in sleep mode. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2007-01-25tda1004x: check request firmware for NULL ponter againHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> In older versions, this was used to decide whether to boot from eeprom or file. This is no longer necessary but the check helps to avoid an oops with misconfigured cards. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2007-01-22tda1004x driver updatesHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> There are the following changes: - separate configuration of IF and GPIOs. - set GPIOs before firmware load. This helps to avoid I2C address collisions. - if desired invert GPIOs at sleep (automatic return to analog mode of card). - added 3 tuner configuration bytes to config stuct. - added i2c gate address to config struct. - moved _state struct declaration to header file to make it accessible on board layer. - added "conf_probed" to the state struct to allow i.e. probing for correct tuner version. - changed firmware load mechanism to always: + check if already loaded + try to boot from eeprom + try downlad from host - corrected name of tda10046 firmware image (backward compatible). Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2006-11-16Added support for the Terratec Cinergy HT PCMCIA moduleHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> This is a hybrid cardbus module. Besides the card support, i modified the definition names for AGC and GPIO of the tda10046. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2006-07-28Remove duplication _release() op.Andrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> I added a duplicate method during one of the previous dvb_attach attempts. This removes the unnecessary duplication. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> 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-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-19Fix tda10046 tuningAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> I'd missed the i2c gate ctrl function out of the tda10046, so tuning didn't work Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-04-18Convert tda1004x to refactored tuner codeAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Convert to tuner_ops calls. Remove pll function pointers from structure. Remove unneeded tuner calls. Add i2c gate control function. Remove europa specific hack (moved into appropriate card driver) Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-03-30Fix budget-av CAM resetAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Unfortunately on the budget-av board, the CAM reset line is tied to the frontend reset line, so resetting the CAM also zaps the frontend. This breaks the tda1004x at least, and causes it to fail to tune until the budget-av module is reloaded. This patch adds an exported function to dvb_frontend that allows a card to forcibly reinitialise a frontend. The budget-av now does this on CAM reset, which corrects this problem. Note: other CA interface implementations (e.g. budget-ci) do not need this since they do not tie the CAM reset line to the frontend reset line. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-02-03TDA10046 Driver updateHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> - Set outputs to tristate in sleep mode - Reduce dangerously high firmware download speed with 16MHz xtal - added tda827x configuration with GPIOs low - added comments to stupid looking IIC reads that work around bugs in the tda10046. - some minor updates Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2005-12-27make the firmware dir documentation and comments consistent in the v4l-dvb tree.Michael Krufky
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-11-26Whitespaces cleanups.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-07[PATCH] fix missing includesMichael Krufky
I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-11-02 - fixed oddities at firmware downloadHartmut Hackmann
- more tolerant vs crystal frequency offset - lower sampling clock Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
2005-09-12strip trailing whitespaceMichael Krufky
2005-09-11- leave I2C bride open at pll_sleep to support Philips EUROPA based cards.Hartmut Hackmann
- give an error message if the communication with the pll fails. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2005-07-24Fix SNR readingAndrew de Quincy
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2005-06-13- added preliminary support for tda827x tunersHartmut Hackmann
- set parameters for drift compensation to 0 makes no sense for DVB-T but can prevent lock Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2005-05-28add missing release_firmware() calls to fix memory leakJohannes Stezenbach
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
2005-05-23bugfix: limit for firmware version check was too low for tda10045Hartmut Hackmann
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2005-05-18- added config options for IF frequency and AGCHartmut Hackmann
- support DSP boot from on board eeprom - added pll sleep call
2005-04-25added support for different tda10046 firmware versions.Andreas Oberritter
tested with v20, v21 and v25.
2005-04-25allow N_I2C to be overridden by the card driverAndreas Oberritter
2005-03-26mostly formatting cleanups, no functional changeAndreas Oberritter
2005-03-09 - kfree(NULL) is safeKenneth Aafloy
2005-03-02whitespace cleanup (remove ws at eol, sync with changes in mainline kernel)Johannes Stezenbach
2005-01-25clarify firmware upload messagesJohannes Stezenbach
2004-12-02Forgot to include tune_settings for tda1004xAndrew de Quincy
2004-11-20Fixed firmware upload problems.Andrew de Quincy
2004-11-20Added setting to allow inversion of OCLKAndrew de Quincy
2004-11-19Only hardcode to AUTO for tda10045Andrew de Quincy
2004-11-09Fixed chipid for tda10046Andrew de Quincy
2004-11-09Forgot to unset initialised flag after sleepAndrew de Quincy
2004-10-28Imported FE_REFACTORING to HEADAndrew de Quincy
2004-08-26Added comment about forcing AUTO on 'cos of TDA10045 problemsAndrew de Quincy
2004-08-26Update everything to point to the new firmware download scriptAndrew de Quincy
2004-08-24- replace dvb_unregister_frontend_new() with dvb_unregister_frontend()Michael Hunold
2004-08-18- forgot to remove all occurences of "#include "dvb_functions.h" which is ↵Michael Hunold
included just everywhere - remove dvb_i2c.[ch], it's not needed anymore - rename dvb_register_frontend_new() to dvb_register_frontend() -
2004-08-18- nuke dvb functions stuffMichael Hunold
2004-07-31merge back various cleanups from mainline kernel:Johannes Stezenbach
- sparse annotiations (viro) - NULL noise removal (viro) - #if where #ifdef should've been (saa7146) (viro) - convert private ABS() to kernel's abs() (rddunlap) - dvb_register_i2c_device() locking fix for -ENOMEM (akpm) - dvb_register_i2c_bus() locking fix for -ENOMEM (akpm)
2004-07-17 - Add missing #include <linux/moduleparam.h>Kenneth Aafloy
2004-07-16 - Adding I2C_DRIVERID for all frontends to dvb_i2c.hKenneth Aafloy
- dvb_dummy_fe conversion to Kernel I2C - Conversion from deprecated MODULE_PARM* to module_param* - Adding/renaming existing *debug* parameter to debug. - Common naming scheme for debug/I2C: dvbfe_*