summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-core/dvb_frontend.c
AgeCommit message (Collapse)Author
2008-04-29Rename common tuner Kconfig names to use the sameMauro Carvalho Chehab
namespace for all of them.
2008-04-24V4L/DVB (7512): media/dvb/dvb-core replace remaining __FUNCTION__ occurrencesHarvey Harrison
__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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6882): dvb_frontend: release analog demod in dvb_frontend_detachMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-18freezer: introduce freezer-friendly waiting macrosRafael J. Wysocki
Introduce freezer-friendly wrappers around wait_event_interruptible() and wait_event_interruptible_timeout(), originally defined in <linux/wait.h>, to be used in freezable kernel threads. Make some of the freezable kernel threads use them. This is necessary for the freezer to stop sending signals to kernel threads, which is implemented in the next patch. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@nigel.suspend2.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-09V4L/DVB (6107): dvb_frontend: clean-up shutdown handlingOliver Endriss
Now dvb_powerdown_on_sleep controls whether - whether LNB power is turned off - whether the tuner/frontend enters sleep mode Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6106): dvb_frontend: Default for dvb_shutdown_timeout set to 0Oliver Endriss
Default for dvb_shutdown_timeout set to 0. dvb_shutdown_timeout > 0 is used for debugging only. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6105): dvb_frontend: ts_bus_ctrl() handling fixedOliver Endriss
ts_bus_ctrl() should only be called by - the first open - the last release call. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
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-10-09V4L/DVB (5986): dvb_frontend: Fixed GET_INFO ioctl and check of frequency limitsOliver Endriss
The calculation of frequency limits ignored tuner-specific frequency limits. Range checks and GET_INFO ioctl updated accordingly. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (5965): Frontend_ioctl(): fix check-after-useAdrian Bunk
The Coverity checker spotted that we have already oops'ed if "fe" was NULL. Since "fe" being NULL seems impossible at this point this patch removes the NULL check. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (5946): Use mutex instead of semaphore in the DVB frontend tuning ↵Matthias Kaehlcke
interface The DVB frontend tuning interface uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (5935): dvb_frontend: Range check of frequency and symbol rateOliver Endriss
Add range check of frequency and symbol rate to the FE_SET_FRONTEND ioctl. This will also avoid a divide-by zero exception in the stv0297 driver, if symbol rate is set to 0. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-17Freezer: make kernel threads nonfreezable by defaultRafael J. Wysocki
Currently, the freezer treats all tasks as freezable, except for the kernel threads that explicitly set the PF_NOFREEZE flag for themselves. This approach is problematic, since it requires every kernel thread to either set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't care for the freezing of tasks at all. It seems better to only require the kernel threads that want to or need to be frozen to use some freezer-related code and to remove any freezer-related code from the other (nonfreezable) kernel threads, which is done in this patch. The patch causes all kernel threads to be nonfreezable by default (ie. to have PF_NOFREEZE set by default) and introduces the set_freezable() function that should be called by the freezable kernel threads in order to unset PF_NOFREEZE. It also makes all of the currently freezable kernel threads call set_freezable(), so it shouldn't cause any (intentional) change of behaviour to appear. Additionally, it updates documentation to describe the freezing of tasks more accurately. [akpm@linux-foundation.org: build fixes] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-27V4L/DVB (5511): Fix 2/3 for bug 7819: demux and dvrMarkus Rechberger
fixing hotplug issue for demux[n] and dvr[n] Signed-off-by: Michal CIJOML Semler <cijoml@volny.cz> Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5510): Fix 1/3 for bug 7819: fixed frontend hotplug issueMarkus Rechberger
fixed frontend hotplug issue Signed-off-by: Michal CIJOML Semler <cijoml@volny.cz> Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5209): Kthread api conversion for dvb_frontend and av7110 fixakpm@linux-foundation.org
avoid double-up(), pointed out by Oliver. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5208): Kthread API conversion for dvb_frontend and av7110Herbert Poetzl
dvb kernel_thread to kthread API port. It is running fine here, including module load/unload and software suspend (which doesn't work as expected with or without this patch :). I didn't convert the dvb_ca_en50221 as I do not have such an interface, but if the conversion process is fine with the v4l-dvb maintainers, it should not be a problem to send a patch for that too ... Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Herbert Poetzl <herbert@13thfloor.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-17Fix typos concerning hierarchyUwe Kleine-König
heirarchical, hierachical -> hierarchical heirarchy, hierachy -> hierarchy Signed-off-by: Uwe Kleine-König <zeisberg@informatik.uni-freiburg.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-12-07[PATCH] Add include/linux/freezer.h and move definitions from sched.hNigel Cunningham
Move process freezing functions from include/linux/sched.h to freezer.h, so that modifications to the freezer or the kernel configuration don't require recompiling just about everything. [akpm@osdl.org: fix ueagle driver] Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-26V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzagAndrew de Quincey
Spotted by coverity/Adrian Bunk. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03V4L/DVB (4665): Add frontend structure callback for bus acquisition.Steven Toth
This patch enables generic bus arbitration callbacks enabling dvbcore frontend_open and frontend_release to pass 'acquire' and 'release' hardware messages back into the DVB bridge frameworks. Frameworks like cx88 can then implement single bus multiple demod card sharing features, which would prohibit two frontends from attempting to use a single transport bus at the same time. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26V4L/DVB (4492): [dvb_attach] dvb_frontend_detach fixOliver Endriss
dvb_frontend_detach() used invalid config option CONFIG_DVB_DETACH, so dvb_frontend_detach() did not call symbol_put_addr(). Replaced CONFIG_DVB_DETACH by CONFIG_DVB_CORE_ATTACH. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26V4L/DVB (4391): Refactor dvb_detach calls into a single dvb_frontend_detach ↵Andrew de Quincey
function. 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26V4L/DVB (4385): Add dvb_attach() macro and supporting routinesAndrew de Quincey
Add dvb_attach() macro and supporting routines Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26V4L/DVB (4383): Convert SEC drivers to new frontend APIAndrew de Quincey
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-29V4L/DVB (4292): Fix DISEQC regressionAndrew de Quincey
The changes to add frontend reinitialisation moved the position where the init() op is called into the frontend thread. Unfortunately, since DISEQC operations do not use the frontend thread, this meant that DISEQC could be called against an uninitalised frontend, leading to all sorts of trouble. Patch fixes this by reinstating the original fronted intialisation call. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30V4L/DVB (4282): Fix: use swzigzag for swalgoManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30V4L/DVB (4275): The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPPTrent Piepho
When someone added the front-end ioctl FE_SET_FRONTEND_TUNE_MODE, they forgot to set the return value to 0. It always returns EOPNOTSUPP, causing problems for programmers who actually check for error conditions. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-26V4L/DVB (4217): Fix a misplaced closing bracket/else, which caused swzigzag ↵Manu Abraham
not to be called Thanks to Oliver Endriss for spotting this. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-26V4L/DVB (4211): Fix an Oops for all fe that have get_frontend_algo == NULLManu Abraham
Thanks to Johannes Stezenbach for pointing it out Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4160): Use device specific algorithmsManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4155): ATSC frontend supportManu Abraham
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4028): Change dvb_frontend_ops to be a real field instead of a ↵Patrick Boettcher
pointer field inside dvb_frontend 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3845): DVB core changes for PLL refactoringAndrew de Quincey
Add tuner_ops structure. Add calls into dvb_frontend to support the new tuner architecture. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3769): Fix a type error in dvb_frontend.cUwe Bugla
Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12V4L/DVB (3742): Set tone/voltage again if the frontend was reinitialisedAndrew de Quincey
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-02V4L/DVB (3673): Fix budget-av CAM resetAndrew de Quincey
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. since they do not tie the CAM reset line to the frontend reset line. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-02-27V4L/DVB (3390): Fix module parametersManu Abraham
Now, root may change parameters while module is running. Thanks to Edgar Toerning Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-02-07V4L/DVB (3318b): sem2mutex: drivers/media/, #2Ingo Molnar
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)allocPanagiotis Issaris
Conversions from kmalloc+memset to k(z|c)alloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-09V4L/DVB (3194): Revert one 64-bit fix and improved other 64-bit fixesPeter Beutner
- Reverted objectionable fix in saa7146_hlp.c - Merged in improved dvb 64-bit fixes from Peter Beutner. Signed-off-by: Peter Beutner <p.beutner@gmx.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09V4L/DVB (3179): Fix 64-bit compile warningsHans Verkuil
- Fix 64-bit compile warnings Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09DVB (2444): Implement frontend-specific tuning and the ability to disable zigzagAndrew de Quincey
- Implement frontend-specific tuning and the ability to disable zigzag Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-12[PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3Mauro Carvalho Chehab
Clean up whitespaces at v4l/dvb files Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] dvb: Remove DEBUG_LOCKLOSS stuffAndrew de Quincey
Remove DEBUG_LOCKLOSS stuff - as the problem has been found and resolved Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] dvb: let other frontends support FE_DISHNETWORK_SEND_LEGACY_CMDNooneImportant
Add support to FE_DISHNETWORK_SEND_LEGACY_CMD code to support other frontends besides stv0299. The generic code is a fallback in the case that it doesn't work for some specific frontends (again stv0299 being a good example). Signed-off-by: NooneImportant <nxhxzi702@sneakemail.com> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07[PATCH] dvb: core: add workaround for tuning problemAndrew de Quincey
Add workaround for signal lock loss issue, where the frontend loses the signal after some hours without any visible reason. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07[PATCH] dvb: core: fix race condition in FE_READ_STATUS ioctlPeter Beutner
Fix a race condition where an application which issued a FE_READ_STATUS ioctl directly after FE_SET_FRONTEND would see an old status, i.e. FE_READ_STATUS would be executed before the frontend thread has even seen the tungin request from FE_SET_FRONTEND. Signed-off-by: Peter Beutner <p.beutner@gmx.net> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25[PATCH] Cleanup patch for process freezingChristoph Lameter
1. Establish a simple API for process freezing defined in linux/include/sched.h: frozen(process) Check for frozen process freezing(process) Check if a process is being frozen freeze(process) Tell a process to freeze (go to refrigerator) thaw_process(process) Restart process frozen_process(process) Process is frozen now 2. Remove all references to PF_FREEZE and PF_FROZEN from all kernel sources except sched.h 3. Fix numerous locations where try_to_freeze is manually done by a driver 4. Remove the argument that is no longer necessary from two function calls. 5. Some whitespace cleanup 6. Clear potential race in refrigerator (provides an open window of PF_FREEZE cleared before setting PF_FROZEN, recalc_sigpending does not check PF_FROZEN). This patch does not address the problem of freeze_processes() violating the rule that a task may only modify its own flags by setting PF_FREEZE. This is not clean in an SMP environment. freeze(process) is therefore not SMP safe! Signed-off-by: Christoph Lameter <christoph@lameter.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24[PATCH] dvb: dvb_frontend: use time_after()Johannes Stezenbach
Use time_after() macro. Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>