summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/stb0899_drv.c
AgeCommit message (Collapse)Author
2012-03-19[media] stb0899: fix the limits for signal strength valuesKlaus Schmidinger
stb0899: fix the limits for signal strength values stb0899_read_signal_strength() adds an offset to the result of the table lookup. That offset must correspond to the lowest value in the lookup table, to make sure the result doesn't get below 0, which would mean a "very high" value since the parameter is unsigned. 'strength' and 'snr' need to be initialized to 0 to make sure they have a defined result in case there is no "internal->lock". Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] stb0899: fixed reading of IF_AGC_GAIN registerAndreas Regel
When reading IF_AGC_GAIN register a wrong value for the base address register was used (STB0899_DEMOD instead of STB0899_S2DEMOD). That lead to a wrong signal strength value on DVB-S2 transponders. Signed-off-by: Andreas Regel <andreas.regel@gmx.de> Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] stb0899: set FE_HAS_SIGNAL flag in read_statusAndreas Regel
In stb0899_read_status the FE_HAS_SIGNAL flag was not set in case of a successful carrier lock. This change fixes that. Signed-off-by: Andreas Regel <andreas.regel@gmx.de> Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb: Remove ops->info.type from frontendsMauro Carvalho Chehab
Now that this field is deprecated, and core generates it for DVBv3 calls, remove it from the drivers. It also adds .delsys on the few drivers where this were missed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: don't require a parameter for get_frontendMauro Carvalho Chehab
Just like set_frontend, use the dvb cache properties for get_frontend. This is more consistent, as both functions are now symetric. Also, at the places get_frontend is called, it makes sense to update the cache. Most of this patch were generated by this small perl script: while (<>) { $file .= $_; } if ($file =~ m/\.get_frontend\s*=\s*([\d\w_]+)/) { my $get = $1; $file =~ s/($get)(\s*\([^\,\)]+)\,\s*struct\s+dtv_frontend_properties\s*\*\s*([_\d\w]+)\)\s*\{/\1\2)\n{\n\tstruct dtv_frontend_properties *\3 = &fe->dtv_property_cache;/g; } print $file; Of course, the changes at dvb_frontend.[ch] were made by hand, as well as the changes on a few other places, where get_frontend() is called internally inside the driver. On some places, get_frontend() were just a void function. Those occurrences were removed, as the DVB core handles such cases. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: remove the track() fopsMauro Carvalho Chehab
This callback is not used anywhere. Maybe it were used in the past to optimize the custom algo, but, as it is not used anymore, let's just remove it. If later needed, some patch may re-add it with a proper implementation. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: don't pass a DVBv3 parameter for search() fopsMauro Carvalho Chehab
Just like the other DVB algorithms, drivers should use the DVBv5 way to retrieve parameters: via the cache struct. Actually, several drivers were partially using the DVBv3 struct and partially using the DVBv5 way, with is confusing and may lead into troubles. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] stb0899: convert get_frontend to the new structMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb-core: add support for a DVBv5 get_frontend() callbackMauro Carvalho Chehab
Creates a DVBv5 get_frontend call, renaming the DVBv3 one to get_frontend_legacy(), while not all frontends are converted. After the conversion for all drivers, get_frontend_legacy() will be removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12[media] STB0899: Query DVB frontend delivery capabilitiesManu Abraham
Override default delivery system information provided by FE_GET_INFO, so that applications can enumerate delivery systems provided by the frontend. Signed-off-by: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25[media] Increase a timeout, so that bad scheduling does not accidentially ↵Hans Petter Selasky
cause a timeout --HPS >From 18faaafc9cbbe478bb49023bbeae490149048560 Mon Sep 17 00:00:00 2001 Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] TT-budget S2-3200 cannot tune on HB13E DVBS2 transponderLutz Sammer
The FEC fix patch fixed locking on 11,681 Ghz, but not on 12,692 Ghz for me. Reviewed-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] stb0899: fix diseqc messages getting lostManu Abraham
- Some badly written applications in conjuction with certain SEC devices do send too many messages causing the DiSEqC bus to get congested. As a result, the end devices do get confused and hence do not respond. The issue was found by Julian Scheel. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2009-12-04tree-wide: fix assorted typos all over the placeAndré Goddard Rosa
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-13V4L/DVB (10974): Use Diseqc 3/3 mode to send dataSigmund Augdal
Signed-off-by: Sigmund Augdal <sigmund@snap.tv> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07V4L/DVB (10180): drivers/media: Fix a number of sparse warningsMauro Carvalho Chehab
anysee.c:44:5: warning: symbol 'dvb_usb_anysee_delsys' was not declared. Should it be static? cx24116.c:378:3: warning: symbol 'CX24116_MODFEC_MODES' was not declared. Should it be static? stb0899_algo.c:57:5: warning: symbol 'stb0899_get_srate' was not declared. Should it be static? stb0899_algo.c:766:6: warning: symbol 'Log2Int' was not declared. Should it be static? stb0899_drv.c:137:20: warning: symbol 'stb0899_quant_tab' was not declared. Should it be static? stb0899_drv.c:180:20: warning: symbol 'stb0899_est_tab' was not declared. Should it be static? stb0899_drv.c:220:5: warning: symbol '_stb0899_read_reg' was not declared. Should it be static? budget-ci.c:1348:23: warning: symbol 'tt3200_stb6100_config' was not declared. Should it be static? /home/v4l/master/v4l/cx25840-core.c:190:6: warning: symbol 'cx25840_work_handler' was not declared. Should it be static? /home/v4l/master/v4l/m5602_s5k83a.c:116:6: warning: symbol 's5k83a_dump_registers' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2Klaus Schmidinger
Report to userspace that cx24116 and stv0899 drivers support DVB-S2. Signed-off by: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> Acked-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9520): stb0899 Remove double .read_status assignmentIgor M. Liplianin
Currently in stb0899 code it appears double .read_status assignment Send patch to fix it. Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9469): Port STB0899 and STB6100Manu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9467): Fix runtime verbosityReinhard Nissl
Signed-off-by: Reinhard Nissl <rnissl@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9464): Remove unreferenced deliveryManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9463): Make delivery system standalone.Manu Abraham
Eventhough the delivery system is made standalone, DVBFE_SET_DELSYS needs to be set as the very first operation, for a multistandard frontend Splitting delivery system out as a new ioctl, makes things a bit more easier to understand. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9462): Allow specifying clock per deviceManu Abraham
Optimizations galore: Blistering barnacles! The KNC1 and friends like 90 Mhz clock much better rather than running at a higher throttle, for almost similar hardware. he exact cause unknown, possibly due to a lower voltage applied for the demod power supply. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9460): Code SimplificationManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9459): We can now reduce the debug levels, just need to look at ↵Manu Abraham
errors only. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9457): Optimization, Fix a BugManu Abraham
* cut down some I/O operations by disabling "disable gate" * budget_av was left with the gate open, thereby more susceptible to RF interference due to I/O operations Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9454): Fix a compile warningManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9453): stb0899: fix compilation warningsManu Abraham
Cleanup/Optimization: * Fix compile warnings * The compile warnings helped to identify 2 unnecessary I/O operations Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9451): Bug! F/3 Clock domain was incorrectly usedManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9448): Bug: fix array sizeReinhard Nissl
Bug: a string which contains 4 digits needs an array of size 5. The fifth character will hold the terminating '\0' Signed-off-by: Reinhard Nissl <rnissl@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9446): Bug Fix an overflow in bandwidth calculationReinhard Nissl
Signed-off-by: Reinhard Nissl <rnissl@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9444): Initialize post process events to NULLManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9443): Bug: Bandwidth calculationManu Abraham
Bug #1: The 5 tap equaliser is set to correct simple perturbations like reflections on the IF cable for DVB-S. In the case of DVB-S2 a more powerful equalizer is used to correct the filter group delay allowing the bandwidth to be reduced by a factor of 1/3 Bug #2: The ZIF tuner takes badwidth to be set in Hz Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9442): Revert back previous change to 90MHzManu Abraham
Note: * At High Symbol Rates we do not have enouph machine cycles to handle the incoming symbols and hence might run into problems at the very end of the specified definition * Most of the equations have been calculated for a master clock of 99 MHz, running at 90MHz, raises lot of issues such as the need to recalculate all of them , which is eventually very painful. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9441): Code simplification: clock is already initialized, no need ↵Manu Abraham
to initialize again. Thanks to Marko Schluessler <marco@lordzodiac.de> for pointing it out Signed-off-by: Marko Schluessler <marco@lordzodiac.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9436): Fix a typo in the previous commitManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9435): Add post process interfacesManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9428): Fix: assignment of wrong valuesMarko Schluessler
Signed-off-by: Marko Schluessler <marco@lordzodiac.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9423): Though insignificant, removes an unnecessary read of the ↵Manu Abraham
LOCK_LOSS register, which should have happenend in the DVB-S2 mode only, but reading it as it is for the other delivery systems causes nothing to say but LOCK_LOST, which just causes confusion amongst users. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9420): return -EINVAL for invalid parametersManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9416): Hmmph, a proper calculation broke the working behaviour.Manu Abraham
Need some thoughts, temporary for now .. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9414): Initialize DiSEqCManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9413): Bug: Set Auxilliary Clock Register correctlyManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9411): Bug! Timing recovery was calculated for 99MHz not 90 MHzManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9407): Optimizations Reduce capture range from 10MHz to 3MhzManu Abraham
* Reduces szapping time a lot * increased stability at Low Symbol rates * overall increases reliability in tuning Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9402): TT S2 3200 shouldn't need Inversion ON and Inversion AUTO at ↵Manu Abraham
the same time This is a racy situation. Inversion is default OFF on the TT S2 3200 hardware, unlike the KNC1 where it is default Inverted Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9396): Fix clocks at stb0899Manu Abraham
Really silly! Disabled all clocks and expected it to run. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9386): FIX: Add in missing inversion (should be ideally in the ↵Manu Abraham
config struct) Thanks to Marco Schluessler <marco@lordzodiac.de> for pointing it out Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9383): Let's neither sleep nor wakeup for nowManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>