aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-core/dvb_frontend.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-08-13[media] dvb: move the dvb core one level upMauro Carvalho Chehab1-2553/+0
just like the V4L2 core, move the DVB core to drivers/media, as the intention is to get rid of both "video" and "dvb" directories. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb: get rid of fe_ioctl_override callbackMauro Carvalho Chehab1-12/+1
This callback were meant to allow overriding a FE callback, before its call, but it is not really needed, as the callback can be intercepted after tuner attachment. Worse than that, only DVBv3 calls are intercepted this way, so a DVBv5 application will produce different effects than a DVBv3 one. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi>
2012-08-13[media] add DTMB support for DVB APIAntti Palosaari1-3/+11
Cc: Patrick Boettcher <pboettcher@kernellabs.com> Cc: Andreas Oberritter <obi@linuxtv.org> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-12[media] dvb core: remove support for post FE legacy ioctl interceptMauro Carvalho Chehab1-7/+0
This DVB_FE_IOCTL_POST isn't used, so remove it. Also, intercepting ioctl's like that only works with legacy ioctl's, due to the way it was implemented. so this design is broken. Document it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20[media] DVB: remove "stats" property bits from ATSC-MH API property additionsMichael Krufky1-12/+0
Mauro is proposing a new API to handle statistics. This functionality will be returned after the statistics API is ready. Just remove them for now. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20[media] linux-dvb v5 API support for ATSC-MHMichael Krufky1-1/+91
Add the following properties for controlling an ATSC-MH frontend: DTV_ATSCMH_FIC_VER DTV_ATSCMH_PARADE_ID DTV_ATSCMH_NOG DTV_ATSCMH_TNOG DTV_ATSCMH_SGN DTV_ATSCMH_PRC DTV_ATSCMH_RS_FRAME_MODE DTV_ATSCMH_RS_FRAME_ENSEMBLE DTV_ATSCMH_RS_CODE_MODE_PRI DTV_ATSCMH_RS_CODE_MODE_SEC DTV_ATSCMH_SCCC_BLOCK_MODE DTV_ATSCMH_SCCC_CODE_MODE_A DTV_ATSCMH_SCCC_CODE_MODE_B DTV_ATSCMH_SCCC_CODE_MODE_C DTV_ATSCMH_SCCC_CODE_MODE_D DTV_ATSCMH_FIC_ERR DTV_ATSCMH_CRC_ERR DTV_ATSCMH_RS_ERR Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-08[media] dvb_frontend: fix a regression with DVB-S zig-zagMauro Carvalho Chehab1-0/+4
Changeset 5bfaadde broke zig-zag for DVB-S drivers that don't implement get_tune_settings() callback. Fix the code, in order to allow it to work as before, otherwise some channels may not be tuned anymore. Fix Fedora Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=814404 Cc: stable@kernel.org # for Kernel v3.3 Reported-by: Michael Heijenga <database.worker@googlemail.com> Tested-by: Michael Heijenga <database.worker@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-18[media] dvb_frontend: Fix a regression when switching back to DVB-SMauro Carvalho Chehab1-1/+24
There are some softwares (Kaffeine and likely xine) that uses a DVBv5 call to switch to DVB-S2, but expects that a DVBv3 call to switch back to DVB-S. Well, this is not right, as a DVBv3 call doesn't know anything about delivery systems. However, as, by accident, this used to work, we need to restore its behavior, in order to avoid regressions with those softwares. Reported on this Fedora 16 bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=812895 Reported-by: Dieter Roever <Dieter.Roever@gmx.de> Cc: stable@kernel.org # for version 3.3 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09[media] dvb_frontend: fix compiler warningHans Petter Selasky1-1/+1
has_get_frontend() should return a boolean, not a pointer. Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09[media] dvb_frontend: regression fix: userspace ABI broken for xineChris Rankin1-0/+10
The commit e399ce77e6e has broken the DVB ABI for xine: The problem is that xine is expecting every event after a successful FE_SET_FRONTEND ioctl to have a non-zero frequency parameter, regardless of whether the tuning process has LOCKed yet. What used to happen is that the events inherited the initial tuning parameters from the FE_SET_FRONTEND call. However, the fepriv->parameters_out struct is now not initialised until the status contains the FE_HAS_LOCK bit. You might argue that this behaviour is intentional, except that if an application other than xine uses the DVB adapter and manages to set the parameters_out.frequency field to something other than zero, then xine no longer has any problems until either the adapter is replugged or the kernel modules reloaded. This can only mean that the fepriv->parameters_out struct still contains the (stale) tuning information from the previous application. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Cc: stable@kernel.org # for kernel version 3.3 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14[media] dvb-core: fix DVBFE_ALGO_HW retune bugSimon Arlott1-0/+2
Commit 7e07222 breaks DVBFE_ALGO_HW tuning after a retune is requested, which causes bad tuning on my TBS 6920. [ 0.769091] pci 0000:06:00.0: [14f1:8852] type 0 class 0x000400 [ 19.733530] CORE cx23885[0]: subsystem: 6920:8888, board: TurboSight TBS 6920 [card=14,autodetected] [ 762.824912] cx24116_load_firmware: FW version 1.23.86.1 7e0722215a510921cbb73ab4c37477d4dcb91bf8 [media] dvb-core: Don't pass DVBv3 parameters on tune() fops Although re_tune is set to true when FESTATE_RETUNE occurs, it is never set back to false which the old code used to do when !FESTATE_RETUNE. This patch sets re_tune to false if !(state & FESTATE_RETUNE). $ szap-s2 -a 2 "Channel 5" reading channels from file '/home/simon/.szap/channels.conf' zapping to 247 'Channel 5': delivery DVB-S, modulation QPSK sat 0, frequency 10964 MHz H, symbolrate 22000000, coderate 5/6, rolloff 0.35 vpid 0x092a, apid 0x092b, sid 0x092d using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0' status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eb33 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cec0 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK status 1f | signal cec0 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] DVB-CORE: remove superfluous DTV_CMDsPatrick Boettcher1-19/+0
This small patch removes superfluous DTV_CMDs from dvb_frontend.c which were added in the initially when ISBD-T support was added. They were there unnoticed even though compilers should have warning about those duplicates. Finally they did and now we can remove them. Thanks to Dan Carpenter <dan.carpenter@oracle.com> for pointing that out. Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17[media] dvb_frontend: Don't call get_frontend() if idleMauro Carvalho Chehab1-2/+8
If the frontend is in idle state, don't call get_frontend. Calling get_frontend() when the device is not tuned may result in wrong parameters to be returned to the userspace. I was tempted to not call get_frontend() at all, except inside the dvb frontend thread, but this won't work for all cases. The ISDB-T specs (ABNT NBR 15601 and ARIB STD-B31) allow the broadcaster to dynamically change the channel specs at runtime. That means that an ISDB-T optimized application may want/need to monitor the TMCC tables, decoded at the frontends via get_frontend call. So, let's do the simpler change here. Eventually, the logic could be changed to work only if the device is tuned and has lock, but, even so, the lock is also standard-dependent. For ISDB-T, the right lock to wait is that the demod has TMCC lock. So, drivers may need to implement some logic to detect if the get_frontend info was retrieved or not. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-15[media] dvb-core: preserve the delivery system at cache clearMauro Carvalho Chehab1-0/+3
The changeset 240ab508aa is incomplete, as the first thing that happens at cache clear is to do a memset with 0 to the cache. So, the delivery system needs to be explicitly preserved there. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-15[media] dvb-core: fix a regression with MythTVMauro Carvalho Chehab1-0/+9
As reported by Lawrence[1], MythTV 0.24.1 does the wrong thing with a DVBv5 call: it fills the delivery system with SYS_UNDEFINED, expecting that the DVB core would work with that. This used to work by accident, as the DVB core were missing the check for the supported delivery systems. Yet, fixing it is easy, so let's add a logic to handle this case, to provide backward compatibility. [1] http://patchwork.linuxtv.org/patch/8314/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-10[media] [PATCH] don't reset the delivery system on DTV_CLEARMauro Carvalho Chehab1-1/+2
As a DVBv3 application may be relying on the delivery system, don't reset it at DTV_CLEAR. For DVBv5 applications, the delivery system should be set anyway. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-07[media] dvb: remove bogus modulation checkMauro Carvalho Chehab1-23/+0
This code is wrong as I should have coded it as SYS_DVBC, instead of SYS_DVBS & friends. Anyway, this check has other problems 1) it does some "magic" by assuming that all QAM modulations are below QAM_AUTO; 2) it checks modulation parameters only for one delivery system. Or the core should check invalid parameters for all delivery systems, or it should let the frontend drivers do it; 3) frontend drivers should already be checking for invalid parameters (most of them do it, anyway); 4) not all modulations are mapped at fe->ops.info.caps, so it is not even possible to check for the valid modulations inside the core for some delivery systems; 5) The core check is incomplete anyway: it only checks for a few parameters. If moved into the core other parameters like bandwidth and fec should also be checked; 6) 2nd gen DVB-C uses OFDM. So, that test would fail for it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05[media] dvb_frontend: improve documentation on set_delivery_system()Mauro Carvalho Chehab1-9/+18
While this patch change some things, the updated fields there are used just on printk, so it shouldn't cause any functional changes. Yet, this routine is a little complex, so explain a little more how it works. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05[media] dvb_frontend: Update the dynamic info->typeMauro Carvalho Chehab1-4/+9
Instead of changing the ops.info.type struct, updates only the data that will be returned to userspace. Also add some debug messages to help tracking such issues. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-05[media] dvb_frontend: regression fix: add a missing inc inside the loopMauro Carvalho Chehab1-0/+1
without it, the loop will run forever! Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb: get rid of fepriv->parameters_inMauro Carvalho Chehab1-25/+2
This var were used during DVBv3 times, in order to keep a copy of the parameters used by the events. This is not needed anymore, as the parameters are now dynamically generated from the DVBv5 structure. So, just get rid of it. That means that a DVBv5 pure call won't use anymore any DVBv3 parameters. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb-core: Fix ISDB-T defaultsMauro Carvalho Chehab1-28/+28
using -1 for ISDB-T parameters do the wrong thing. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb_frontend: Fix DVBv3 emulationMauro Carvalho Chehab1-1/+139
For frontends with ISDB-T, DVB-T2, CMDBTH, etc, some code is needed, in order to provide emulation. Add such code, and check if the desired delivery system is supported by the frontend. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb_frontend: Don't use ops->info.type anymoreMauro Carvalho Chehab1-275/+266
Get rid of using ops->info.type defined on DVB drivers, as it doesn't apply anymore. Currently, one driver (cxd2820) supports more than one different info.type, as it can be used for DVB-T/T2 and DVB-C. There are more drivers like that to come. So, the same frontend will have different DVBv3 types, depending on the current delivery system. This breaks the existing logic at dvb_frontend, that assumes that just one delivery system DVBv3 type is supported by all delsys. In order to easy the DVBv3->DVBv5 conversion, an ancillary function that maps DVBv3 delivery systems into DVBv5 were added. Also, on all places, except for the event logic, the DVBv5 cache will be used to check parameters, instead of the DVBv5 copy. This patch simplifies the cache sync logic, and warrants that the cache will be in a clear state at DVB frontend register. This way, ops->info.type will be filled to reflect the first delivery system, providing backward compatibility support for it. For example, in the cases like cxd2820, where the delivery systems are defined as: .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A }, A pure DVBv3 will be able to use both DVB-T and DVB-T2, as, at DVB cache clear, the ops->info.type will be equal to FE_OFDM. However, DVB-C won't be visible. A quick workaround would be to do a DVBv5 call to set the delivery system to SYS_DVBC_ANNEX_A. After such call, ops->info.type will be equal to FE_QAM, and a DVBv3 application will see the frontend as a DVB-C one. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb: move dvb_set_frontend logic into a separate routineMauro Carvalho Chehab1-89/+93
This change is there in order to prepare the code to avoid calling dvb_frontend_ioctl_legacy() from FE_SET_PROPERTY. A call to dvb_frontend_ioctl_legacy() would require to update the DVBv3 cache without need, mangling calls for newer delivery system without any reason. No functional changes here. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb_frontend: Handle all possible DVBv3 values for bandwidthMauro Carvalho Chehab1-13/+42
Due to DVB-T2, several new possible values for bandwidth were added. As the DVBv3 struct were updated to handle them, the core needs to handle all of them, as a DVBv3 application might try to use it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-04[media] dvb: Initialize all cache valuesMauro Carvalho Chehab1-5/+13
By default, initialize the frontend current delivery system with the first one. This warrants that a DVBv3 application will be able to tune to it, after the removal of ops->init.type filling at the drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: don't require a parameter for get_frontendMauro Carvalho Chehab1-23/+7
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_frontend: Fix inversion breakage due to DVBv5 conversionMauro Carvalho Chehab1-17/+21
On several places inside dvb_frontend, only the DVBv3 parameters were updated. Change it to be sure that, on all places, the DVBv5 parameters will be changed instead. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] s921: Properly report the delivery systemMauro Carvalho Chehab1-1/+0
Before this patch, a query for the delivery systems were returned SYS_UNDEFINED. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb-core: be sure that drivers won't use DVBv3 internallyMauro Carvalho Chehab1-0/+3
Now that all frontends are implementing DVBv5, don't export the DVBv3 specific stuff to the drivers. Only the core should be aware of that, as it will keep providing DVBv3 backward compatibility. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: remove the track() fopsMauro Carvalho Chehab1-4/+1
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 Chehab1-1/+1
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] dvb-core: Don't pass DVBv3 parameters on tune() fopsMauro Carvalho Chehab1-6/+3
As all parameters are passed via DVBv5 to the frontends, there's no need to pass them again via fops. Also, most drivers weren't using it anyway. So, instead, just pass a parameter to indicate if the hardware algorithm wants the driver to re-tune or not. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: simplify get_tune_settings() structMauro Carvalho Chehab1-3/+0
In the past, dvb_frontent_parameters were passed inside the struct where get_tuner_settings should store their result. This is not needed anymore, as all parameters needed are stored already at the fe property cache. So, use it, where needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb-core: remove get|set_frontend_legacyMauro Carvalho Chehab1-20/+4
Now that all drivers were converted, we can get rid of those emulation calls. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb-core: add support for a DVBv5 get_frontend() callbackMauro Carvalho Chehab1-24/+78
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-31[media] Rename set_frontend fops to set_frontend_legacyMauro Carvalho Chehab1-2/+6
Passing DVBv3 parameters to set_frontend is not fun, as the core doesn't have any way to know if the driver is using the v3 or v5 parameters. So, rename the callback and add a new one to allow distinguish between a mixed v3/v5 paramenter call from a pure v5 call. After having all frontends to use the new way, the legacy call can be removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb-core: allow demods to specify the supported delsysMauro Carvalho Chehab1-0/+13
The dvb were originally written for DVB-T/C/S and ATSC. So, the original frontend struct has fields to describe only those three standards. While 2nd gen standards are similar to these, new standards like DSS, ISDB and CTTB don't fit on any of the above types. While there's a way for the drivers to explicitly change whatever default DELSYS were filled inside the core, still a fake value is needed there, and a "compat" code to allow DVBv3 applications to work with those delivery systems is needed. This is good for a short term solution, while applications aren't using DVBv5 directly. However, at long term, this is bad, as the compat code runs even if the application is using DVBv5. Also, the compat code is not perfect, and only works when the frontend is capable of auto-detecting the parameters that aren't visible by the faked delivery systems. So, let the frontend fill the supported delivery systems at the device properties directly. The future plan is that the drivers will stop filling ops->info.type, filling, instead, ops->delsys. This will allow multi-frontend devices like drx-k to use just one frontend structure for all supported delivery systems. Of course, the core will keep using it, in order to keep allowing DVBv3 calls. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb_core: estimate bw for all non-terrestial systemsMauro Carvalho Chehab1-8/+27
Instead of just estimating the bandwidth for DVB-C annex A/C, also fill it at the core for ATSC and DVB-C annex B. This simplifies the logic inside the tuners, as all non-satellite tuners can just use c->bandwidth_hz for all supported delivery systems. It could make sense to latter use it also for satellite systems, as several DVB-S drivers have their own calculus. However, on DVB-S2 the bw estimation is a little more complex, and the existing drivers have some optimized calculus for bandwidth. So, let's not touch on it for now. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] dvb: replace SYS_DVBC_ANNEX_AC by the right delsysMauro Carvalho Chehab1-1/+1
SYS_DVBC_ANNEX_AC is an alias for SYS_DVBC_ANNEX_A. However, the first one is incorrect, as not all devices support both. So, replace its occurrences by the proper value (either SYS_DVBC_ANNEX_A or both SYS_DVBC_ANNEX_A and SYS_DVBC_ANNEX_C). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30[media] DVB: dvb_frontend: fix delayed thread exitAndreas Oberritter1-2/+5
There are some issues and miss-behaves at the dvb fe thread: 1) dvb_shutdown_timeout should be dvb_shutdown_timeout * HZ instead of (dvb_shutdown_timeout * HZ + 1); 2) add a memory barrier to warrant that all CPU's will consider the new value for release_jiffies; 3) wake up dvb thread also when fepriv->exit == DVB_FE_NO_EXIT. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-20[media] Remove Annex A/C selection via roll-off factorMauro Carvalho Chehab1-4/+21
Instead of using a roll-off factor, change DRX-K & friends to select the bandwidth filter and the Nyquist half roll-off via delivery system. This provides a cleaner support for Annex A/C switch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-12[media] DVB: Query DVB frontend delivery capabilitiesManu Abraham1-0/+36
Currently, for any multi-standard frontend it is assumed that it just has a single standard capability. This is fine in some cases, but makes things hard when there are incompatible standards in conjuction. Eg: DVB-S can be seen as a subset of DVB-S2, but the same doesn't hold the same for DSS. This is not specific to any driver as it is, but a generic issue. This was handled correctly in the multiproto tree, while such functionality is missing from the v5 API update. http://www.linuxtv.org/pipermail/vdr/2008-November/018417.html Later on a FE_CAN_2G_MODULATION was added as a hack to workaround this issue in the v5 API, but that hack is incapable of addressing the issue, as it can be used to simply distinguish between DVB-S and DVB-S2 alone, or another X vs X2 modulation. If there are more systems, then you have a potential issue. An application needs to query the device capabilities before requesting any operation from the device. Signed-off-by: Manu Abraham <abraham.manu@gmail.com> Acked-by: Andreas Oberritter <obi@linuxtv.org> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-11[media] dvb: Allow select between DVB-C Annex A and Annex CMauro Carvalho Chehab1-0/+2
DVB-C, as defined by ITU-T J.83 has 3 annexes. The differences between Annex A and Annex C is that Annex C uses a subset of the modulation types, and uses a different rolloff factor. A different rolloff means that the bandwidth required is slicely different, and may affect the saw filter configuration at the tuners. Also, some demods have different configurations, depending on using Annex A or Annex C. So, allow userspace to specify it, by changing the rolloff factor. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] dvb_frontend: fix compile warningHans Verkuil1-2/+1
Andreas Oberritter <obi@linuxtv.org> has looked at this and agreed that it is safe to remove the 'timeout' variable. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-04[media] DVB: dvb_frontend: check function pointers on reinitializeAndreas Oberritter1-4/+2
Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] DVB: dvb_frontend: remove static assignments from dtv_property_cache_sync()Andreas Oberritter1-5/+24
dtv_property_cache_init(). dtv_property_process_get(). overwritten with invalid values, leading to partially incorrect results when calling FE_GET_PROPERTY. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] DVB: dvb_frontend: Fix compatibility criteria for satellite receiversAndreas Oberritter1-8/+5
identify a satellite receiver by its 'delivery_system' instead of 'modulation', which may overlap between different delivery systems. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] DVB: dvb_frontend: update locking in dvb_frontend_{add, get_event}Andreas Oberritter1-17/+7
- fepriv->parameters_out isn't protected by events->mtx, so move the call to fe->ops.get_frontend out of the locked area. - move the assignment of e->status into the locked area. - use direct assignment instead of memcpy. - use mutex_lock instead of mutex_lock_interruptible, because all code paths protected by this mutex won't block. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>