Commit Graph

133 Commits (fad9fbe8651e8abd9794d4b4c4133241aa3093b5)

Author SHA1 Message Date
Steven Toth 363c35fc44 V4L/DVB (9222): S2API: Add Multiple-frontend on a single adapter support.
A detailed description from the original patches 2 years ago:

"The WinTV-HVR3000 has a single transport bus which is shared between
a DVB-T and DVB-S modulator. These patches build on the bus acquisition
cx88 work from a few weeks ago to add support for this.

So to applications the HVR3000 looks like this:
/dev/dvb/adapter0/fe0 (cx24123 DVB-S demod)
/dev/dvb/adapter0/fe1 (cx22702 DVB-T demod)

Additional boards continue as before, eg:
/dev/dvb/adapter1/fe0 (lgdt3302 ATSC demod)

The basic change is removing the single instance of the videobuf_dvb in
cx8802_dev and saa7134_dev(?) and replacing it with a list and some
supporting functions.

*NOTE* This branch was taken before v4l-dvb was closed for 2.6.19 so
two or three current cx88 patches appear to be reversed by this tree,
this will be cleaned up in the near future. The patches missing change
the mutex handing to core->lock, fix an enumeration problem."

It should be recognised that a number of people have been maintaining
this patchset. Significant levels of Kudos to everyone one involved,
including but not limited to:

Darron Broad
Fabio M. Di Nitto
Carlo Scarfoglio
Hans Werner

Without the work of these people, and countless others, my two year old
patches would of died on the Mercurial linuxtv.org vine a long time
ago.

TODO: Revise these patches a little further so that the need for
demux1 and dvr0 is optional, not mandatory on the HVR3000.

HISTORY (darron):
This is the last update to MFE prepared by Hans which is based
upon the `scratchpad' diff created by Carlo.
All MFE work prior to that point must be attributed to Fabio
who ported and maintained Steve's original patch up to that
time.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:23:10 -03:00
Manu Abraham 97854829b9 V4L/DVB (9195): Frontend API Fix: 32APSK is a valid modulation for the DVB-S2 delivery
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:15:37 -03:00
Steven Toth 6068f50638 V4L/DVB (9183): S2API: Return error of the caller provides 0 commands.
S2API: Return error of the caller provides 0 commands.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:28:21 -02:00
Steven Toth ef526f4246 V4L/DVB (9182): S2API: Added support for DTV_HIERARCHY
A user tuning DVB-T via the S2API reports that this was not implemented,
and his tuning was failing.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:28:12 -02:00
Steven Toth b87625f0cc V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and DTV_TRANSMISSION_MODE
Tuning DVB-T via the S2API was failing, missing some essential items.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:28:05 -02:00
Steven Toth a4de91be46 V4L/DVB (9180): S2API: Added support for DTV_CODE_RATE_HP/LP
Reports from users that using the new API for tuning DTV was failing,
and the cache was missing some essential items.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:27:55 -02:00
Steven Toth 0a6393ae21 V4L/DVB (9177): S2API: Change _8PSK / _16APSK to PSK_8 and APSK_16
... and cleanup any drivers using them.
I've also removed NBC_QPSK and modified the cx24116 driver to check
the delivery_type also, removing some excess namespace baggage.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:27:24 -02:00
Steven Toth 82d7669dc3 V4L/DVB (9173): S2API: Remove the hardcoded command limit during validation
This means that when developers add new commands then they'll be see
the DTV_MAX_COMMAND define and will be more likely to modify it, without
having to modify the command validation code.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:25:35 -02:00
Darron Broad e5cefa82ce V4L/DVB (9172): S2API: Bugfix related to DVB-S / DVB-S2 tuning for the legacy API.
Fixes switching from S2API to legacy where legacy params given to S2API
aware demods are cached ones and not those implied in the legacy API.

It was found (on an S2API aware demod at least) that after using
an S2API aware application and then switching to a legacy application
that prior S2API params were in effect were legacy has only
implied values. This fixes this.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:25:22 -02:00
Darron Broad 4aae8efb49 V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API.
Quick fix to stop an OOPS if illegal commands are dumped in S2API.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:25:10 -02:00
Steven Toth eacf8d8d6b V4L/DVB (9072): S2API: Add DTV_API_VERSION command
This allows application developers to query the dvb-core API version
dynamically, helping developers understand whether certain features
will be available.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:11 -02:00
Steven Toth d48cb402a1 V4L/DVB (9071): S2API: Implement result codes for individual commands
This allows application developers to determine which particular
command in a sequence is invalid, or failing with error.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:11 -02:00
Steven Toth 8316568930 V4L/DVB (9025): S2API: Deactivate the ISDB-T definitions
We don't want to push the ISDB-T definitions into the kernel until
we have a high level of confidence in the ISDB-T API. More testing
is required before this code is released.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:07 -02:00
Steven Toth 1d78cac477 V4L/DVB (9008): S2API: Bugfix related to syncing the cache when used with the old API.
Many thanks to Darron Broad for pointing out the obvious.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth 75b7f9437b V4L/DVB (9007): S2API: Changed bandwidth to be expressed in HZ
Also added some compat code for the older API.

Added more ISDB message/command suggestions, current not connected in dvb-core.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth 4dd88bec36 V4L/DVB (9006): S2API: Allow reliable use of old and new api on the same frontend, regardless.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Igor M. Liplianin e6f9ec8657 V4L/DVB (9005): Bug fix: ioctl FE_SET_PROPERTY/FE_GET_PROPERTY always return error
Bug fix: ioctl FE_SET_PROPERTY/FE_GET_PROPERTY always return error

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth bfbf2dae30 V4L/DVB (9004): S2API: Implement GET/SET handing to the demods
The frontends will be notified (if they chose) of all _get and _set commands
so they can help determine result or action. Results are now returned
to userspace correctly.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth 363429a089 V4L/DVB (9003): S2API: Remove the DTV_SET_ and DTV_GET_ prefixes
The API now assumes that ioctl calls for FE_SET_PROPERTY and all
set commands, and FE_GET_PROPERTY are get commands.

Simplification.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth 80a773c9bc V4L/DVB (9002): S2API: Ensure cache->delivery_system is set at all times.
This helps complex demods which support different modulation types
be better informed.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth d7c1500183 V4L/DVB (9001): S2API: ISDBT_SEGMENT_NUM -> ISDBT_SEGMENT_IDX
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth d5748f1079 V4L/DVB (9000): S2API: Cleanup code that prepares tuning structures.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth ee33c525c4 V4L/DVB (8999): S2API: Reduce demod driver complexity by using a cache sync
For demod drivers, we want a single tuning function (set_frontend) to have
access to the properly constructed dvb_frontend_parameters structure, or
the cache values - regardless of whether the legacy or new API is being used.

This cuts down on redundant code in the demod drivers and ensures the
tuning parameters are consistent regardless of the API entry type.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth 177b868d93 V4L/DVB (8997): S2API: Cleanup SYMBOLRATE, INNERFEC -> SYMBOL_RATE, INNER_FEC
This is now consistent with the existing API.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth e7fee0f3aa V4L/DVB (8996): S2API: typedefs replaced, _SEQ_'s removed, fixed 16 command arrays replaced
After discussion the following changes were made:
1. Removed the typedefs in frontend.h, use structures.
2. In the frontend.h, remove the 16 command limit on the API and
   switch to a flexible variable length API. For practical reasons
   a #define limits this to 64, this should be discussed.
3. Changed dvb-core ioctl handing to deal with variable sequences
   of commands.

tune-v0.0.3.c is required to use this API, it contains the interface changes.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth 56f0680a28 V4L/DVB (8995): S2API: tv_ / TV_ to dtv_ / DTV_ namespace changes
The group preferred dtv_ over tv_, this implements it.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth 2cf801e3e3 V4L/DVB (8990): S2API: DVB-S/S2 voltage selection bug fix
Thanks to Hans Werner for finding the problem.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth 13c97bf567 V4L/DVB (8988): S2API: Allow the properties to call legacy ioctls
SET_TONE and SET_VOLTAGE were not previously implemented. Two options
existed. Either cut/paste from the previous ioctl handler into the
process_properties function, which is code duplication. Or, split
the current ioctl handler into it's two major pieces.

Piece 1, responsible for input validation and semaphore acquiring
Piece 2 the processing of the previous ioctls

and finally, a new third pieces where the array of properties
is processed, and can freely call the legacy ioctl handler without
having to re-acquire the fepriv->sem semaphore. This is a clean approach
and ensures the existing legacy ioctls are processed as they were previously
(but with an extra function call) and allows the new API to share code
without duplication.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Steven Toth 6b73eeafbc V4L/DVB (8985): S2API: Added dvb frontend changes to support a newer tuning API
This is an experimental patch to add a new tuning mechanism for
dvb frontends. Rather than passing fixed structures across the
user/kernel boundary, which need to be revised for each new modulation
type (or feature the kernel developers want to add), this implements
a simpler message based approach, allowing fe commands to be broken
down into a series of small fixed size transactions, presented
in an array.

The goal is to avoid changing the user/kernel ABI in the future, by
simply creating new frontend commands (and sequencies of commands) that
help us add support for brand new demodulator, delivery system or
statistics related commmands.

known issues:
checkpatch voilations
feedback from various developers yet to be implemented, relating
to namespace conventions, variable length array passing conventions,
and generally some optimization.

This patch should support all existing tuning mechanisms through the
new API, as well as adding 8PSK, DVB-S2 NBC-QPSK and ISDB-T API support.

For testing and exercise purposes, see the latest tune.c tool
available from http://www.steventoth.net/linux/s2

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Hans Verkuil c6eb8eafdb V4L/DVB (8757): v4l-dvb: fix a bunch of sparse warnings
Fixed a lot of sparse warnings: mostly warnings about shadowed variables
and signed/unsigned mismatches.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:13 -03:00
Mauro Carvalho Chehab 149ef72dee Rename common tuner Kconfig names to use the same
namespace for all of them.
2008-04-29 18:41:38 -03:00
Harvey Harrison 46b4f7c176 V4L/DVB (7512): media/dvb/dvb-core replace remaining __FUNCTION__ occurrences
__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-04-24 14:07:58 -03:00
Michael Krufky 2426a27e4d V4L/DVB (6882): dvb_frontend: release analog demod in dvb_frontend_detach
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:11 -02:00
Rafael J. Wysocki e42837bcd3 freezer: introduce freezer-friendly waiting macros
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-18 14:37:19 -07:00
Oliver Endriss 608f62d6ff V4L/DVB (6107): dvb_frontend: clean-up shutdown handling
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-09 22:07:03 -03:00
Oliver Endriss 849be2cdf1 V4L/DVB (6106): dvb_frontend: Default for dvb_shutdown_timeout set to 0
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-09 22:07:02 -03:00
Oliver Endriss 48136e1e93 V4L/DVB (6105): dvb_frontend: ts_bus_ctrl() handling fixed
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-09 22:06:59 -03:00
Mauro Carvalho Chehab 9c12224a60 V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files
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-09 22:06:17 -03:00
Oliver Endriss c471b331dd V4L/DVB (5986): dvb_frontend: Fixed GET_INFO ioctl and check of frequency limits
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-09 22:04:43 -03:00
Adrian Bunk 813ce47cee V4L/DVB (5965): Frontend_ioctl(): fix check-after-use
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-09 22:04:22 -03:00
Matthias Kaehlcke 03b7612336 V4L/DVB (5946): Use mutex instead of semaphore in the DVB frontend tuning 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-09 22:03:34 -03:00
Oliver Endriss 1fab46f0de V4L/DVB (5935): dvb_frontend: Range check of frequency and symbol rate
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-10-09 22:03:28 -03:00
Rafael J. Wysocki 8314418629 Freezer: make kernel threads nonfreezable by default
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-07-17 10:23:02 -07:00
Markus Rechberger 57861b432b V4L/DVB (5511): Fix 2/3 for bug 7819: demux and dvr
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-27 15:45:31 -03:00
Markus Rechberger ca5be9cd05 V4L/DVB (5510): Fix 1/3 for bug 7819: fixed frontend hotplug issue
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-04-27 15:45:30 -03:00
akpm@linux-foundation.org 6591691b25 V4L/DVB (5209): Kthread api conversion for dvb_frontend and av7110 fix
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-21 13:35:20 -02:00
Herbert Poetzl 8eec14295e V4L/DVB (5208): Kthread API conversion for dvb_frontend and av7110
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-21 13:35:20 -02:00
Uwe Kleine-König 1b3c3714cb Fix typos concerning hierarchy
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>
2007-02-17 19:23:03 +01:00
Nigel Cunningham 7dfb71030f [PATCH] Add include/linux/freezer.h and move definitions from sched.h
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-12-07 08:39:27 -08:00
Andrew de Quincey 30d9464c76 V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag
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-11-26 08:52:37 -02:00
Steven Toth ba7e6f3e3e V4L/DVB (4665): Add frontend structure callback for bus acquisition.
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-10-03 15:13:46 -03:00
Oliver Endriss 7df0994d7b V4L/DVB (4492): [dvb_attach] dvb_frontend_detach fix
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-26 12:30:31 -03:00
Andrew de Quincey f52a838b74 V4L/DVB (4391): Refactor dvb_detach calls into a single dvb_frontend_detach 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-26 11:53:29 -03:00
Andrew de Quincey d995506062 V4L/DVB (4385): Add dvb_attach() macro and supporting routines
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-26 11:53:24 -03:00
Andrew de Quincey 13fef9335f V4L/DVB (4383): Convert SEC drivers to new frontend API
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-09-26 11:53:23 -03:00
Andrew de Quincey 04c56d0e5b V4L/DVB (4292): Fix DISEQC regression
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-07-29 17:22:09 -03:00
Manu Abraham 70d906354f V4L/DVB (4282): Fix: use swzigzag for swalgo
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30 15:59:43 -03:00
Trent Piepho 1b172e0c4e V4L/DVB (4275): The FE_SET_FRONTEND_TUNE_MODE ioctl always returns EOPNOTSUPP
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-30 15:59:37 -03:00
Manu Abraham 4a4edcca22 V4L/DVB (4217): Fix a misplaced closing bracket/else, which caused swzigzag 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-26 09:21:20 -03:00
Manu Abraham d772bd03bc V4L/DVB (4211): Fix an Oops for all fe that have get_frontend_algo == NULL
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-26 09:20:49 -03:00
Manu Abraham 0249ef16fa V4L/DVB (4160): Use device specific algorithms
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:05:15 -03:00
Manu Abraham 4821fb1d84 V4L/DVB (4155): ATSC frontend support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:05:14 -03:00
Patrick Boettcher dea74869f3 V4L/DVB (4028): Change dvb_frontend_ops to be a real field instead of a 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-25 02:00:42 -03:00
Andrew de Quincey 7eef5dd6da V4L/DVB (3845): DVB core changes for PLL refactoring
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-25 01:58:31 -03:00
Uwe Bugla a8558577ff V4L/DVB (3769): Fix a type error in dvb_frontend.c
Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 01:57:59 -03:00
Andrew de Quincey 6445401673 V4L/DVB (3742): Set tone/voltage again if the frontend was reinitialised
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:54:44 -03:00
Andrew de Quincey 86f40cc3c9 V4L/DVB (3673): Fix budget-av CAM reset
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-04-02 04:56:02 -03:00
Manu Abraham 6baad3f041 V4L/DVB (3390): Fix module parameters
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-27 00:09:32 -03:00
Ingo Molnar 3593cab5d6 V4L/DVB (3318b): sem2mutex: drivers/media/, #2
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-02-07 06:49:14 -02:00
Panagiotis Issaris 7408187d22 V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
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-11 19:40:56 -02:00
Peter Beutner 400b7083fb V4L/DVB (3194): Revert one 64-bit fix and improved other 64-bit fixes
- 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-09 15:32:43 -02:00
Hans Verkuil e18828e43a V4L/DVB (3179): Fix 64-bit compile warnings
- 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-09 15:25:28 -02:00
Andrew de Quincey 36cb557a2f DVB (2444): Implement frontend-specific tuning and the ability to disable zigzag
- 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>
2006-01-09 15:25:07 -02:00
Mauro Carvalho Chehab afd1a0c9ac [PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3
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-12-12 08:57:44 -08:00
Andrew de Quincey f7b67195ea [PATCH] dvb: Remove DEBUG_LOCKLOSS stuff
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 07:56:03 -08:00
NooneImportant 83b75b049b [PATCH] dvb: let other frontends support FE_DISHNETWORK_SEND_LEGACY_CMD
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-11-09 07:56:03 -08:00
Andrew de Quincey 4992775c82 [PATCH] dvb: core: add workaround for tuning problem
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 18:23:53 -07:00
Peter Beutner 6757ccc57d [PATCH] dvb: core: fix race condition in FE_READ_STATUS ioctl
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-07-07 18:23:53 -07:00
Christoph Lameter 3e1d1d28d9 [PATCH] Cleanup patch for process freezing
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-25 17:10:13 -07:00
Johannes Stezenbach cc89c229d9 [PATCH] dvb: dvb_frontend: use time_after()
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>
2005-06-24 00:05:30 -07:00
Johannes Stezenbach 0c53c70f6a [PATCH] dvb: remove unnecessary casts in dvb-core
remove unnecessary casts in dvb-core (Kenneth Aafloy)

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-05-17 07:59:28 -07:00
Johannes Stezenbach f4f009a776 [PATCH] dvb: dvb_frontend: fix module param
Remove incorrect "dvb_"-prefix from parameter description.  Error detected
with section2text.rb, see autoparam patch.

Signed-off-by: Magnus Damm <damm@opensource.se>
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-05-17 07:59:27 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00