summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/ves1820.c
AgeCommit message (Collapse)Author
2009-08-21compat: Fix build for older kernels using DIV_ROUND_CLOSESTMauro Carvalho Chehab
From: Andy Walls <awalls@radix.net> DIV_ROUND_CLOSEST() is not available on older kernels. Include compat.h in a few files to fix building v4l-dvb from mercurial on older kernels. Reported-by: Lou Otway <lotway@nildram.co.uk> Reported-by: Avo Aasma <Avo.Aasma@webit.ee> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-01Use DIV_ROUND_CLOSESTMauro Carvalho Chehab
From: Julia Lawall <julia@diku.dk> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ @depends on haskernel@ expression x,__divisor; @@ - (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-10Use kzalloc for frontend states to have struct dvb_frontend properlyDouglas Schilling Landgraf
From: Matthias Schwarzott <zzam@gentoo.org> This patch changes most frontend drivers to allocate their state structure via kzalloc and not kmalloc. This is done to properly initialize the embedded "struct dvb_frontend frontend" field, that they all have. The visible effect of this struct being uninitalized is, that the member "id" that is used to set the name of kernel thread is totally random. Some board drivers (for example cx88-dvb) set this "id" via videobuf_dvb_alloc_frontend but most do not. So I at least get random id values for saa7134, flexcop and ttpci based cards. It looks like this in dmesg: DVB: registering adapter 1 frontend -10551321 (ST STV0299 DVB-S) The related kernel thread then also gets a strange name like "kdvb-ad-1-fe--1". Priority: normal Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> CC: Michael Krufky <mkrufky@linuxtv.org> CC: Steven Toth <stoth@linuxtv.org> CC: Timothy Lee <timothy.lee@siriushk.com> CC: Igor M. Liplianin <liplianin@me.by> Acked-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
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-11-19 drivers/media/dvb: Add missing "space"Mauro Carvalho Chehab
From: Joe Perches <joe@perches.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-31ves1820: Change the acquisition range for clock recovery from 120 ppm to 240ppmOliver Endriss
From: Oliver Endriss <o.endriss@gmx.de> Change the acquisition range for clock recovery from 120 ppm to 240ppm. Apparently, some cable providers in Germany are playing with their parameters, and the capture range of the ves1820 is too small to acquire a lock with the current setting... ;-( Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2007-08-09Fix the min/max frequencies of some DVB-C frontendsOliver Endriss
From: Hartmut Birr <e9hack@googlemail.com> The min frequencies of the DVB-C frontends are wrong. In Europe, the center frequency of the lowest channel is 50.5MHz and not 51MHz. All known cards with the stv0297/tda0002x/ves1820 frontend are able to tune to this frequency. I've changed the range to the lowest channel - 1/2 bandwidth and the highest channel + 1/2 bandwidth. For the design of the dvb driver, the frequency ranges must be part of the tuner and not of the frontend itself. The same frontend may be used for different tuners. The attached patch does only fix the ranges and not the design. Signed-off-by: Hartmut Birr <e9hack@googlemail.com> Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
2006-07-19Remove obsolete #include <linux/config.h>Mauro Carvalho Chehab
From: Jörn Engel <joern@wohnheim.fh-wedel.de> kernel-sync: Kernel adds "-include include/linux/autoconf.h" for every file to be compiled, so, including config.h is not required. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.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-18Convert ves1820 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. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2005-11-21From: Denis Vlasenko <vda@ilport.com.ua>Johannes Stezenbach
Remove stray semicolons after if (foo); in ves1820_set_symbolrate(). Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
2005-07-24Reset acgconf register after tuning to improve locking, as suggestedJohannes Stezenbach
by Marco Schluessler. Minor cleanups in ves1820_init(). Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
2005-04-07 - remove msleep(10) in writereg (suggested by Tony Glader)Kenneth Aafloy
2005-04-05 - remove unnecessary casts in frontendsKenneth Aafloy
2005-03-09 - kfree(NULL) is safeKenneth Aafloy
2005-03-02whitespace cleanup (remove ws at eol, sync with changes in mainline kernel)Johannes Stezenbach
2004-11-16 - MODULE_PARM -> module_paramKenneth Aafloy
2004-10-28Imported FE_REFACTORING to HEADAndrew 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-08-18- remove dvb i2c code (all drivers are ported to kernel i2c)Michael Hunold
- remove dvb i2c frontend (un)register code (all drivers use non-i2c frontend calls now) - add i2c driver ids for all frontends to dvb_frontend.h (should be submitted to i2c-id.h) - fix usage of i2c driver ids in dst, ves1x93, nxt6000 drivers - remove dvb i2c functionality from av7110 and budget drivers - remove dvb i2c functionality from Skystar2 driver - fix up kernel Makefile - add a FE_ATSC case to avoid compiler warning (print warning message instead)
2004-08-18- don't invent new return codes, but pass through the return code of the ↵Michael Hunold
function that failed
2004-08-09- add back per-device pwm setting support, now done via sysfs attributesMichael Hunold
1. Locate the pwm setting > find /sys/|grep "pwm" /sys/devices/platform/i2c-0/0-0061/pwm 2. Set your desired value echo "0x5c" > /sys/devices/platform/i2c-0/0-0061/pwm 3. Read the current value more /sys/devices/platform/i2c-0/0-0061/pwm
2004-08-09- convert to kernel i2cMichael Hunold
- whitespace and coding style cleanup - temporarily removed the possibility to set the initial pwm value via module parameters
2004-05-03Overhaul frontend i2c subsystem because of the recent discussion aboutMichael Hunold
the usage of the syscall interface to load binary firmware used by some frontend drivers. - add dvb_register_frontend_new() and dvb_unregister_frontend_new() which register a frontend driver using the kernel i2c interface instead of the dvb i2c interface. - register kernel i2c interface in av7110/budget driver properly - port stv0299 and ves1x93 to kernel i2c api Other DVB drivers and frontend drivers still can use the old DVB i2c interface.
2004-03-11Checked in experimental frontend patchAndrew de Quincy
Also some minimal budget-ci CI support implemented (just detection+IRQs)
2004-03-01remove FE_CAN_RECOVER as suggested by Torbjörn JanssonJohannes Stezenbach
2004-02-15- change AFC handling as suggested by Robert SchlabbachJohannes Stezenbach
- use bit 1 of the SYNC register for FE_HAS_SIGNAL
2004-02-15verbose-print AFC only if carrier has been recoveredJohannes Stezenbach
2004-02-13turn off ves1820 test output pins (don't know if this makesJohannes Stezenbach
any difference, but why have them turned on if nothing is connected to them?)
2004-02-07gcc-3.5 compatibilty patch from 2.6.3-rc1Johannes Stezenbach
2003-12-20increase mdelay from 30 to 50 to be more reliable with bad reception qualityAndreas Oberritter
2003-11-27- completed nokia board supportAndreas Oberritter
- increased delay before inversion change to 30ms to get constant results - added 30ms delay after FE_SET_FRONTEND for quick and stable tuning. don't know why it is that much faster with it, I noticed it by pure luck after adding a printk which delayed for about 4 jiffies. ;) maybe it avoids a bug or delay in some other part of the code (maybe dvb_frontend.c?). feedback by pci card users would be appreciated. - changed a c++ comment to c style
2003-11-27- set default pwm value to 0x48 for boards which don't have an eeprom at i2c ↵Andreas Oberritter
address 0x50 instead of using a random value of an uninitialized local variable. - don't bail out if no tuner could be detected, for compatibility with boards which don't have a tuner on the same bus as the demod.
2003-10-08- allow private data to be associated with i2c devicesAndreas Oberritter
- fixed some return values in i2c device attach functions
2003-09-24allow PWM (tuner calibaration) value from EEPROM to be overriddenJohannes Stezenbach
on command line (based on patch by Peter Bieringer) New module paramters: "pwm" (max 4 ints, range -1..0xff) and "verbose" (to print AFC value aftger tuning).
2003-09-24- patch by Peter Bieringer: nicer log outputJohannes Stezenbach
- removed whitespace at eol
2003-09-10C99 initializer fixes backported from 2.6.0-test5Michael Hunold
2003-08-21Patch from Lauri Pesonen: Use correct IF for TT-Budget card.Johannes Stezenbach
2003-06-19use Robert's suggestions for CLKCONF (0x03) and CARCONF (0x04)Holger Waechtler
please test in your local networks and report problems
2003-06-18When I submitted the last patchset for the 2.5 kernel series,Michael Hunold
Alan Cox reformatted the code to follow his coding style when he fixed the merge bugs. This patch now introduces these coding style changes, so that we don't wipe out his changes with the next patchset.
2003-05-27fixed c99 initializersAndreas Oberritter
2003-05-27- remove enumeration typedefsMichael Hunold
- change some includes
2003-05-27Use C99 initializers.Michael Hunold
2003-05-20changed AFC debug printk to output frequency offset in HzJohannes Stezenbach
2003-05-19patch from Jaakko Hyvatti http://hyvatti.iki.fi/~jaakko/dvb/dvb7.diffJohannes Stezenbach
to implement FE_GET_FRONTEND
2003-05-19more 64bit compile time warning fixesHolger Waechtler
2003-05-19apply patch by <jaakko@hyvatti.iki.fi> to distinguish different PLL/SynthesizerHolger Waechtler
combinations used by Siemens and Technotrend on their DVB-C cards
2003-05-13patch from Jaakko Hyvatti http://hyvatti.iki.fi/~jaakko/dvb/dvb6.diff:Johannes Stezenbach
- Makes zigzag to not change frequency for DVB-c at all. It only resets the parameters over and over again. - The IF of 35937500 might be better to be 36000000. This might be what the card designer meant. My card shows the AFC fine tuning offset to be closest to zero with 35937500 (one step below 36MHz). Some other cards might be different. I have not heard of any complaints about my patch not working for someone in this respect. - Has anyone ever tested this auto inversion thing? DVB-c is far too slow to tune and lock for this auto inversion code to work. Therefore you need to manually set it. Maybe zigzag changes above allow the auto inversion to work. - QAM registers have been tweaked to non-specification values. I do not know if someone has counterexamples, but this works for a lot of people.