Commit Graph

40247 Commits (2e214e0fa21465cf2749ca7d5a072cf8591f3213)

Author SHA1 Message Date
Matthias Schwarzott 111221fb67 V4L/DVB (7573): mt312: Supports different xtal frequencies
Do not hardcode xtal frequency but allow different values
for future zl10313 support.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:40 -03:00
Matthias Schwarzott 82cd2dff4a V4L/DVB (7572): mt312: Fix diseqc
Correct the frequency of the emitted diseqc signal to 22kHz.
Adds sleep(100) to wait for message to be transmitted.

For now the only user of mt312 is b2c2-flexcop, and it
does overwrite all diseqc related functions with own code.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Matthias Schwarzott 1881ee89e0 V4L/DVB (7571): mt312: Cleanup buffer variables of read/write functions
Change type of buffer variables from void* to u8* to save some casts.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Patrick Boettcher dbad108bdc V4L/DVB (7568): Support for DVB-S demod PN1010 (clone of S5H1420) added
This device is a clone of the PN1010 used by SkyStar2 rev2.7 .

This patch adds support for the flexcop-device and makes the driver look a little bit nicer.

It needs to be checked whether the driver is still ok for the budget-cards.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Mauro Carvalho Chehab 44dc733cd9 V4L/DVB (7567): em28xx: Some cleanups
Removes some fields from data structs.

There are some fields that are just caching some calculus for buffer
size. The calculus were moved to the places it were needed and the now
unused fields were removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Mauro Carvalho Chehab 59d3448995 V4L/DVB (7566): videobuf-dvb: allow its usage with videobuf-vmalloc
videobuf-dvb were still using a function that were videobuf-dma-sg
dependent. This patch creates a generic handler for this function. This
way, videobuf-dvb can now work with all videobuf implementations.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Aidan Thornton 3b5fa928a6 V4L/DVB (7565): em28xx: fix buffer underrun handling
This patch fixes three related issues and a fourth trivial one:

- Use buffers even if no-one's currently waiting for them (fixes
  underrun issues);

- Don't return incomplete/mangled frames at the start of streaming and
  in the case of buffer underruns;

- Fix an issue which could cause the driver to write to a buffer that's
  been freed after videobuf_queue_cancel is called (exposed by the
  previous two fixes - for some reason, ignoring buffers that weren't
  being waited on worked around the issue);

- Fix a bug which could cause only one field to be filled in the first
  buffer (or first few buffers) after streaming is started.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Mauro Carvalho Chehab b4916f8ca1 V4L/DVB (7564): em28xx: Some fixes to display logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Mauro Carvalho Chehab dbecb44c11 V4L/DVB (7563): em28xx: Add missing checks
There are some cases where nobody is waiting for a buffer. Due to the
lack of check, if you try to abort the userspace app, machine were
hanging, since IRQ were trying to use a buffer that were disallocated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:39 -03:00
Brandon Philips 0cf4daee31 V4L/DVB (7562): videobuf: Require spinlocks for all videobuf users
A spinlock is necessary for queue_cancel to work with every driver in the tree.
Otherwise a race exists between IRQ handlers removing buffers from the queue
and queue_cancel invalidating the queue.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:16 -03:00
Mauro Carvalho Chehab aa9479ed50 V4L/DVB (7561): videobuf-vmalloc: stop streaming before unmap
Before the patch, there were a risk of freeing and unmapping userspace memory,
while there were pending requests.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:58 -03:00
Mauro Carvalho Chehab d684965262 V4L/DVB (7560): videodev: Some printk fixes
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab cb7847249f V4L/DVB (7559): em28xx: Fills the entire buffer, before getting another one
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab 5e28e00964 V4L/DVB (7558): videobuf: Improve command output for debug purposes
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab e9e6040df6 V4L/DVB (7557): em28xx: honour video_debug modprobe parameter
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Aidan Thornton 0ea13e6e59 V4L/DVB (7556): em28xx: fix locking on vidioc_s_fmt_cap
Currently, vidioc_s_fmt_cap is allowed even if streaming is running on some
other fh. This is likely to cause issues.

Block use of vidioc_s_fmt_cap if someone else has claimed access to the device.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab b957dfdc31 V4L/DVB (7555): em28xx: remove timeout
It seems that we don't need a timeout for em28xx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab a9dbbeb7d6 V4L/DVB (7554): videobuf-dma-sg: Remove unused flag
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab aaea56afc3 V4L/DVB (7553): videobuf-vmalloc: fix STREAMOFF/STREAMON
There were a small bug on videobuf-vmalloc that were preventing STREAMOFF to
work. The issue is that vmalloc'ed mmaped memory should only be freed after
being sure that there aren't any mmap usage. Otherwise, the memory remap will
stop working, and the userspace won't receive any frames.

This bug were affecting some userspace applications, like tvtime.

After this patch, tvtime started to work again with the drivers that use
videobuf-vmalloc.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab 968ced78a5 V4L/DVB (7552): videbuf-vmalloc: Corrects mmap code
There were some bugs on videobuf-vmalloc.

Basically, remap were called with a wrong parameter. Due to that, a later remap
were needed, generating the need of some hacks on videobuf-vmalloc and
videobuf-core.

This patch fixes the remap and removes the hacks.

TODO:

- V4L2_MEMORY_USERPTR is not implemented yet. This method should be
  properly implemented, in order to work with a few userspace applications.

- The driver also doesn't implement V4L2_MEMORY_OVERLAY. This method is used
  only by a few applications, and are becaming obsolete, due to the increment
  of cpu performance. So, most apps prefer to retrieve data to an internal
  buffer, doing some processing like de-interlacing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab fbde31d54b V4L/DVB (7551): vivi: Add a missing \n
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Brandon Philips 0561297501 V4L/DVB (7550): em28xx: Fix a possible memory leak
I did notice a possible memory leak since iolock is could possibly be
called before a buffer has been freed.

This ensure s_fmt isn't called while the queue is busy thereby avoiding
iolock on already allocated buffers.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:48 -03:00
Mauro Carvalho Chehab 78bb3949a9 V4L/DVB (7549): em28xx: some small cleanups
- Remove dead code;
- Fix a few CodingStyle issues;
- Prints frame number, if debug is enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:47 -03:00
Aidan Thornton e0fadfd34d V4L/DVB (7548): Various fixes for the em28xx videobuf code
- Aborting buffer_filled if no-one's waiting on the waitqueue probably isn't
  what we want, since just because no-one's waiting for it now doesn't mean they
  wouldn't dequeue it in time. (vivi gets away with this, possibly because it
  can fill each buffer much faster.)

- The first BUG_ON(lencopy <= 0); really isn't worth causing a kernel panic
  over, especially since there are some reasons why it could trigger in normal use.

- The top and botom frames are actually the wrong way around.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:47 -03:00
Mauro Carvalho Chehab e74153d44a V4L/DVB (7547): em28xx: Fix a broken lock
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:10 -03:00
Mauro Carvalho Chehab f245e549f0 V4L/DVB (7545): em28xx: Fix CodingStyle errors and most warnings introduced by videobuf
The last videobuf changes introduced several CodingStyle errors. Fixes all those
errors, as reported by checkpatch.pl

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Mauro Carvalho Chehab ca21d2dc94 V4L/DVB (7544): em28xx: Fix timeout code
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Mauro Carvalho Chehab 47625da2ab V4L/DVB (7543): Fix capture start/stop and timeout
Also removes the dead restart_video_queue() function

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Mauro Carvalho Chehab ea8df7e09d V4L/DVB (7542): em28xx: Fix some warnings
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Aidan Thornton d7aa80207b V4L/DVB (7541): em28xx: Some fixes to videobuf
It fixes a couple of minor bugs, comments out a bogus BUG_ON, sets fh->type
correctly, uses dev->width and dev->height for now, and adds a missing spinlock
init (nasty - caused a system lockup). It also adds some debug code which
probably isn't all that useful. I haven't tested this version of the patch yet,
though, so I'm not sure what you can expect if you try it.

Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Mauro Carvalho Chehab ad0ebb96c2 V4L/DVB (7540): em28xx: convert to use videobuf-vmalloc
The usage of videobuf-vmalloc allows to cleanup em28xx logic.

Also, it reduced its size by about 5.42% on i386 arch (and about 7.5% on x86_64):

  39113    4876      40   44029    abfd old/em28xx.ko
  36731    4868      40   41639    a2a7 /home/v4l/master/v4l/em28xx.ko

Also, the preliminary tests, made on a single core 1.5 MHz Centrino showed
that CPU usage reduced from 42%-75% to 28%-33% (reports from "top") command.

A test with time command presented an even better result:

This is the performance tests I did, running code_example to get 1,000 frames
@29.995 Hz (about 35 seconds of stream), tested on a i386 machine, running at
1,5GHz:

	The old driver:

$ time -f "%E: %Us User time, %Ss Kernel time, %P CPU used" ./capture_example
0:34.21: 8.22s User time, 25.16s Kernel time, 97% CPU used

	The videobuf-based driver:

$ time -f "%E: %Us User time, %Ss Kernel time, %P CPU used" ./capture_example
0:35.36: 0.01s User time, 0.05s Kernel time, 0% CPU used

	Conclusion:

The time consumption to receive the stream where reduced from about 33.38
seconds to 0.05 seconds.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Janne Grunau 78e92006f4 V4L/DVB (7538): Adds selectable adapter numbers as per module option
The adapter_nr module options can be used to allocate static adapter
numbers on a driver level. It avoids problems with changing DVB apapter
numbers after warm/cold boot or device unplugging and repluging.

Each driver holds DVB_MAX_ADAPTER long array of the preferred order of
adapter numbers.

options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
reversed allocation of adapter numbers.

With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If
both are already in use it will allocate the lowest free adapter number.

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Acked-by: Hermann Pitton <hermann.pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Mauro Carvalho Chehab 9950c1b5b4 V4L/DVB (7537): cx88/saa7134: Fix: avoid OOPS on module unload
If frontend is not attached, both cx88-dvb and saa7134-dvb don't
register DVB. However, dvb unregister were inconditionally called.

Due to that, an OOPS is generated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Hans Verkuil fb7b37cf91 V4L/DVB (7535): saa717x: add new audio/video decoder i2c driver
Added the last remaining out-of-tree kernel driver from the ivtv project.
The saa717x is used in several Japanese cards and a Russian card. The
driver is not complete in that only NTSC is supported and no PAL/SECAM.

Hopefully this will be added in the future.

Signed-off-by: Takahiro Adachi <tadachi@tadachi-net.com>
Signed-off-by: Kyuma Ohta <whatisthis@jcom.home.ne.jp>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Hans Verkuil b38bf410fe V4L/DVB (7534): ivtv: the upd* modules have to be probed to properly autodetect some cards
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Oliver Endriss faea4d2ab2 V4L/DVB (7532): budget: Add support for Fujitsu Siemens DVB-T Activy Budget
Implement support for Fujitsu Siemens DVB-T Activy Budget, sub-system id 0x1131:0x5f61.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Christoph Pfister c4e3bcb688 V4L/DVB (7531): budget-av: Fix CI interface on (some) KNC1 DVBS cards
Quoting the commit introducing reinitialise_demod (3984 / by adq):
"These cards [KNC1 DVBT and DVBC] need special handling for CI - reinitialising the frontend
device when the CI module is reset."
Apparently my 1894:0010 also needs that fix, because once you initialise CI/CAM you lose lock.

Signed-off-by: Christoph Pfister <pfister@linuxtv.org>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Christoph Pfister 8727073bef V4L/DVB (7530): budget-av: Fix support for certain cams
The current ci implementation doesn't accept 0xff when reading data bytes (address == 0),
thus breaks cams which report a buffer size of 0x--ff like my orion one.
Remove the 0xff check altogether, because validation is really the job of a higher layer.

Signed-off-by: Christoph Pfister <pfister@linuxtv.org>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison d5a50e4986 V4L/DVB (7529): media/video/zc0301 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 4126a8f5c2 V4L/DVB (7528): media/video/usbvideo replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison a79d13b3aa V4L/DVB (7527): media/video/sn9c102 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 5016381c33 V4L/DVB (7526): media/video/saa7134 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 645635b002 V4L/DVB (7525): media/video/pwc replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 12aa67a63d V4L/DVB (7524): media/video/ovcamchip replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 22cc065bad V4L/DVB (7523): media/video/et61x251 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison d80e134dc8 V4L/DVB (7522): media/video/em28xx replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 32d83efc1c V4L/DVB (7521): media/video/cx88 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 22b4e64f0a V4L/DVB (7520): media/video/cx23885 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 94205c7a48 V4L/DVB (7519): media/video/cpia2 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison 7e28adb249 V4L/DVB (7518): media/video/ replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Harvey Harrison e9815ceea9 V4L/DVB (7517): media/dvb/ttusb-dec replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
Harvey Harrison fb9393b519 V4L/DVB (7516): media/dvb/ttusb-budget replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
Harvey Harrison 3ca7fc84e3 V4L/DVB (7515): media/dvb/ttpci 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
Harvey Harrison 271ddbf702 V4L/DVB (7514): media/dvb/frontends 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
Harvey Harrison 708bebdd39 V4L/DVB (7513): media/dvb/dvb-usb replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
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
Harvey Harrison 0592e8d348 V4L/DVB (7511): media/dvb/cinergyT2 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
Harvey Harrison b2e62e7cdb V4L/DVB (7510): media/dvb/bt8xx replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
Harvey Harrison 7bca4498f6 V4L/DVB (7509): media/dvb/b2c2 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
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
Harvey Harrison 536a0b1195 V4L/DVB (7508): media/common/ 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
Matthias Schwarzott fc9d8ed418 V4L/DVB (7507): saa7134: add analog support for Avermedia A700 cards
Add support for composite and s-video inputs on
Avermedia DVB-S Pro and DVB-S Hybrid+FM cards
(both labled A700) to the saa7134 driver.

XC2028 support for Hybrid+FM is still missing.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Reviewed-by: Hermann Pitton <hermann.pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Dâniel Fraga ba928034df V4L/DVB (7506): Powercolor Real Angel 330 (remote control support)
The attached patch adds complete remote control support for Powercolor Real 
Angel 330.

Signed-off-by: Daniel Fraga <fragabr@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Dâniel Fraga ab36498308 V4L/DVB (7505): Powercolor Real Angel 330 (fixes gpio references)
The attached patch fixes gpio references for Powercolor Real Angel 330.

Signed-off-by: Daniel Fraga <fragabr@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Thierry MERLE df18c3196a V4L/DVB (7503): usbvision: rename __PRETTY_FUNCTION__ occurrences
__PRETTY_FUNCTION__ has no sense in C lang context. Rename it as __func__

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Harvey Harrison d2db42dd4e V4L/DVB (7502): v4l: video/usbvision replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Guennadi Liakhovetski 1a0063a985 V4L/DVB (7501): soc-camera: use a spinlock for videobuffer queue
All drivers should provide a spinlock to be used in videobuf operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Guennadi Liakhovetski b8d9904c35 V4L/DVB (7500): soc-camera: extract function pointers from host object into operations
Function pointers and the driver owner are not expected to change
throughout soc-camera host's life. Extract them into an operations struct.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips ce54093cef V4L/DVB (7494): videobuf-dma-sg.c: Avoid NULL dereference and add comment about backwards compatibility
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips 137d1cb19d V4L/DVB (7493): videobuf: Avoid deadlock with QBUF and bring up to spec for empty queue
Add a waitqueue to wait on when there are no buffers in the buffer queue.
DQBUF waits on this queue without holding vb_lock to allow a QBUF to happen.
Once a buffer has been queued we recheck that the queue is still streaming and
wait on the new buffer's waitqueue while holding the vb_lock.  The driver
should come along in a timely manner and put the buffer into its next state
finishing the DQBUF.

By implementing this waitqueue it also brings the videobuf DQBUF up to spec and
it now blocks on O_NONBLOCK even when no buffers have been queued via QBUF:

"By default VIDIOC_DQBUF blocks when no buffer is in the outgoing queue."
 - V4L2 spec

Signed-off-by: Brandon Philips <bphilips@suse.de>
CC: Trent Piepho <xyzzy@speakeasy.org>
CC: Carl Karsten <carl@personnelware.com>
CC: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips 78718e5d44 V4L/DVB (7492): vivi: Simplify the vivi driver and avoid deadlocks
vivi previously had a very complex queuing system and held spinlocks while
doing copy_to_user, kmalloc, etc.  This caused the driver to easily deadlock
when a multi-threaded application used it and revealed bugs in videobuf too.

This replaces the copy_to_user with memcpy since we were never copying to user
space addresses.  And makes the kmalloc atomic.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips aa9dbac426 V4L/DVB (7491): vivi: make vivi openable only once
vivi currently doesn't have the infrastructure to handle being opened more than
one time and will crash if it is.  So, make it openable only once.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips cbcb565f74 V4L/DVB (7489): videobuf-vmalloc.c: Remove buf_release from videobuf_vm_close
Remove the buf_release on vm_close because it will lead to a buffer being
released multiple times since all buffers are already freed under the two
possible cases: device close or STREAMOFF.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips 009a90597e V4L/DVB (7488): videobuf: Simplify videobuf_waiton logic and possibly avoid missed wakeup
Possible missed wakeup- use kernel helpers for wait queues
  http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg27983.html

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Brandon Philips b608f4323a V4L/DVB (7487): videobuf: Wakeup queues after changing the state to ERROR
The waitqueues must be woken up every time state changes.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Michael Krufky 8eb8ff3870 V4L/DVB (7483): tuner-simple: fix broken build dependency
tuner-simple is the only module that uses tuner-types - these will be
merged to a single module in the future.  For now, build both of them
if TUNER_SIMPLE is selected.

This fixes the following build warning, if tuner-simple is selected
without tuner-types:

WARNING: "tuner_count" [tuner-simple.ko] undefined!
WARNING: "tuners" [tuner-simple.ko] undefined!

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Michael Krufky c735372f5d V4L/DVB (7481): tda18271: fix standard map debug
Show IF level and rf agc top settings in standard map dumps.

Dump standard map during attach if DBG_MAP or DBG_ADV is set.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Adrian Bunk 762250f884 V4L/DVB (7480): make sn9c102_i2c_try_write() static
This patch makes the needlessly global sn9c102_i2c_try_write() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
CC: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Adrian Bunk d9aedf1fe8 V4L/DVB (7479): proper prototype for zoran_device.c:zr36016_write()
This patch adds a proper prototype for zr36016_write() in
drivers/media/video/zoran_card.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Darryl Green 5da4e2c645 V4L/DVB (7476): New USB ID for Leadtek DVB-T USB
Detect Leadtek Winfast USB DTV Dongle with ID of 0x6f01

Signed-off-by: Darryl Green <darryl.green@aanet.com.au>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:57 -03:00
Alexander Simon dc88807ed6 V4L/DVB (7475): Added support for Terratec Cinergy T USB XXS
Alexander Simon found out that the Terratec Cinergy T USB XXS is just a clone of another DiB7070P-based device.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Patrick Boettcher 58e6f95e61 V4L/DVB (7474): support key repeat with dib0700 ir receiver
This patch enables support for repeating last event when a key is holded
down with dib0700 devices. It works with rc5 and nec remotes.
It also fixes an annoying bug that floods kernel log with "Unknown key"
messages after each keypress. This happened because the driver was not
resetting infrared register after each poll so it kept polling last key
even if nothing was being pressed. Fixing this, (calling rc_setup after
each poll), permits to implement key repeat.

Signed-off-by: Filippo Argiolas <filippo.argiolas at gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Albert Comerma 6ca8f0b974 V4L/DVB (7473): PATCH for various Dibcom based devices
This patch introduces support for dvb-t for the following DiBcom based cards:

- Terratec Cinergy HT USB XE (USB-ID: 0ccd:0058)
- Terratec Cinergy HT Express (USB-ID: 0ccd:0060)
- Pinnacle 320CX (USB-ID: 2304:022e)
- Pinnacle PCTV72e (USB-ID: 2304:0236)
- Pinnacle PCTV73e (USB-ID: 2304:0237)
- Yuan EC372S (USB-ID: 1164:1edc)

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Felix Apitzsch <F.Apitzsch@soz.uni-frankfurt.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Albert Comerma <albert.comerma@gmail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Andre Weidemann 8c899bce2a V4L/DVB (7472): reworked patch to support TT connect S-2400
Added support for Technotrend connect S-2400.

Signed-off-by: Andre Weidemann <Andre.Weidemann@web.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Patrick Boettcher ca06fa79a5 V4L/DVB (7470): CX24123: preparing support for CX24113 tuner
To support a new device based on CX24123 (using the CX24113-tuner) the following was done:

- added two parameters to de-select the internal PLL-driver (for CX24108) and a AGC-function callback.
- added a virtual i2c-adapter which allow simple access behind the i2c-gate
- cleanup up some code

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Patrick Boettcher 6394cf53ab V4L/DVB (7469): Preparation for supporting new devices, cleanup and saneness
To prepare the support for new device to the flexcop-family some preparation and cleanups was done + some saneness:

- created an i2c-adapter for each i2c-port available. Easier usage for devices with several device on different i2c-busses
- initialize i2c before doing the eeprom read
- changed the way to attach the different frontends, easier to read now
- enabled support for i2c-devices having no register address (1-byte access)

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Frej Drejhammar 0b5afdd2ea V4L/DVB (7463): cx88: Enable color killer by default
An enabled color killer will not degrade picture quality for color
input signals, only suppress bogus color information on
black-and-white input. Therefore enable it by default.

Signed-off-by: Frej Drejhammar <frej.drejhammar@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Mauro Carvalho Chehab d69b2e41a5 V4L/DVB (7462): bttv: Fix some API non-compliances for some audio/input V4L2 calls
Thanks to Cyrill Gorcunov <gorcunov@gmail.com> for pointing this
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Roel Kluin 7bf9746d93 V4L/DVB (7459): Test cmd, not definition in decoder_command(), drivers/media/video/zoran_device.c
include/linux/video_decoder.h:
34:#define DECODER_SET_NORM	_IOW('d', 3, int)
35:#define DECODER_SET_INPUT	_IOW('d', 4, int)

untested, please confirm it's right.

Test cmd value, not definition of DECODER_SET_INPUT

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Mauro Carvalho Chehab 95a2fdb6f7 V4L/DVB (7458): saa7134: Adds analog support for Avermedia A16D
Thanks to timf <timf@iinet.net.au>, "Richard (MQ)" <osl2008@googlemail.com> and
gian luca rasponi <lucarasp@inwind.it> for their tests.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Mauro Carvalho Chehab cf8267ff10 V4L/DVB (7456): vivi: Add 32bit compatibility to the module
Thanks to Jiri Slaby <jirislaby@gmail.com> for pointing this issue.


Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Mauro Carvalho Chehab 0b86755f57 V4L/DVB (7455): cx88_dvb: qam doesn't apply on Kword ATSC 120
Thanks to Michael Krufky for pointing this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Frej Drejhammar 1b879c4381 V4L/DVB (7454): cx88: Add user control for color killer
The cx2388x family has a color killer. This patch implements the
V4L2_CID_COLOR_KILLER control for the cx2388x family. By default the
color killer is disabled, as in previous versions of the driver.

Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Frej Drejhammar 87a1738919 V4L/DVB (7452): cx88: Enable chroma AGC by default for all non-SECAM modes
An enabled chroma AGC will not degrade picture quality if enabled on a
color PAL or NTSC signal with nominal signal levels. It will give a
significant color reproduction improvement if the chroma signals
diverge from nominal levels. Therefore enable chroma AGC by default
for PAL and NTSC standards.

Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Frej Drejhammar 6d04203c7f V4L/DVB (7451): cx88: Add user control for chroma AGC
The cx2388x family has support for chroma AGC. This patch implements a
the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default
chroma AGC is disabled, as in previous versions of the driver.

Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Marton Balint b12203d253 V4L/DVB (7449): cx88: fix oops on module removal caused by IR worker
If the IR worker is not stopped before the removal of the cx88xx module,
an OOPS may occur, because the worker function cx88_ir_work gets called.
So stop the ir worker.

Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Mauro Carvalho Chehab 99e09eac25 V4L/DVB (7448): Add support for Kworld ATSC 120
This board has a s5h1409 demod, plus a xc30x8 tuner (probably, xc3018).

This patch adds proper support for radio, video, s-video, composite and ATSC.
However, support for radio and video depends on having s5h1409 i2c gate open,
otherwise, xc30x8 chip won't be visible.

For a better support, some rework is needed on cx88 driver, to allow adding
xc30x8 to i2c bus without sending i2c 0 byte reading to 0xc2 address.

Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com> for helping to figure
out the proper parameters for s5h1409 and the GPIO pins used by each
configuration.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Mike Isely a2401d9eed V4L/DVB (7447): pvrusb2: Fix compilation warning
Fix use of a non-int (size_t) being passed in a printf width field.
This benign issue has apparently been around for a long time, but went
undetected until now.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 2c4963d4fb V4L/DVB (7441): kconfig fixes for tuner-simple
Update Kconfig for the hybrid devices recently converted
to use tuner-simple rather than dvb-pll.

dvb-bt8xx no longer uses dvb-pll at all, so remove all
references to dvb-pll within that driver.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky a03402d8ad V4L/DVB (7440): dvb-bt8xx: fix build error
Fix the following build error:

In file included from dvb-bt8xx.c:35:
dvb-bt8xx.h:42:26: error: tuner-simple.h: No such file or directory
dvb-bt8xx.c: In function 'frontend_init':
dvb-bt8xx.c:612: error: 'simple_tuner_attach' undeclared (first use in this function)
dvb-bt8xx.c:612: error: (Each undeclared identifier is reported only once
dvb-bt8xx.c:612: error: for each function it appears in.)
dvb-bt8xx.c:612: warning: type defaults to 'int' in declaration of '__a'
dvb-bt8xx.c:612: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:612: warning: cast from pointer to integer of different size
dvb-bt8xx.c:612: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:612: warning: cast from pointer to integer of different size
dvb-bt8xx.c:612: error: called object '__a' is not a function
dvb-bt8xx.c:696: warning: type defaults to 'int' in declaration of '__a'
dvb-bt8xx.c:696: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:696: warning: cast from pointer to integer of different size
dvb-bt8xx.c:696: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:696: warning: cast from pointer to integer of different size
dvb-bt8xx.c:696: error: called object '__a' is not a function

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Mauro Carvalho Chehab 5c913c0571 V4L/DVB (7439): tuner-xc2028: Adds an option to allow forcing to load an specific firmware name
There are a number of different firmware versions and variants, shipped
together with boards.

This patch adds an extra parameter to the tuner-xc2028 to allow specifying for
an specific firmware name to be loaded. This helps to test for a firmware that
better fits some board.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 5ec96b0c80 V4L/DVB (7437): tda18271: increment module version minor
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 868f5ccd64 V4L/DVB (7436): tda18271: add basic support for slave tuner configurations
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 4efb0ca5d0 V4L/DVB (7435): tda18271: add function tda18271_charge_pump_source
Force the main pll charge pump or cal pll charge pump to source current
to the main pll loop filter or cal pll loop filter, respectively.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 40194b2b1b V4L/DVB (7434): tda18271: set rfagc modes during channel configuration
Set rfagc to high speed mode before setting the pll.
Set rfagc to normal speed mode at the end of the function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky e7809a0766 V4L/DVB (7433): tda18271: fix comparison bug in tda18271_powerscan
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky c0dc0c1122 V4L/DVB (7432): tda18271: allow device-specific configuration of rf agc top
allow device-specific configuration of rf agc rf top and if top

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 14c74b23b6 V4L/DVB (7431): tda18271: allow device-specific configuration of IF level
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky ae07d042f6 V4L/DVB (7430): tda18271: fix typo in tda18271_calibrate_rf
The internal calibration signal must be set on the cal pll.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky e83ebb64ef V4L/DVB (7429): tda18271: write EP3 thru MD3 for image rejection low band initialization
Both the tda18271 c1 and c2 parts only need EP3 through MD3 to be written for
the image rejection calibration's low band initialization.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 0c3ea9941c V4L/DVB (7427): dvb-pll: remove rf input module options
The ability to select RF input was a supported feature only available on
Philips TUV1236d and Philips FCV1236d.

This feature, along with support for the tuners that used it,
was moved into the tuner-simple module.

This can now be removed from dvb-pll.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky b6fd549e50 V4L/DVB (7426): dvb-pll: renumber remaining description id's
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 5e8556de79 V4L/DVB (7425): dvb-pll: remove dead code
remove #if 0'd support for:

Philips TUV1236D
Philips TD1316
Philips FMD1216ME
LG TDVS-H06xF
Philips FCV1236D
Thomson FE6600
Microtune 4042 FI5
Thomson dtt761x

Support for these tuners has been moved into the 'tuner-simple' module.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky b7f81b2058 V4L/DVB (7424): dvb-pll: remove support for Philips TUV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky ad561caafa V4L/DVB (7423): dvb-pll: remove support for Philips TD1316
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 92d1069f3c V4L/DVB (7422): dvb-pll: remove support for Philips FMD1216ME
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 75a791925d V4L/DVB (7421): dvb-pll: remove support for LG TDVS-H06xF
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 89418750f7 V4L/DVB (7420): dvb-pll: remove support for Philips FCV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 7b844d75dc V4L/DVB (7419): dvb-pll: remove support for Thomson FE6600
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 53f2dd3314 V4L/DVB (7418): dvb-pll: remove support for Microtune 4042 FI5
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 15b3feb735 V4L/DVB (7417): dvb-pll: remove support for Thomson dtt761x
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 24d3980c3a V4L/DVB (7416): dvb-pll: remove support for Thomson dtt7610
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 62ff817a04 V4L/DVB (7415): use tuner-simple for Philips TUV1236D digital tuning support
Convert cx88-dvb and saa7134-dvb to use tuner-simple instead of dvb-pll
for Philips TUV1236D

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky fb147e9755 V4L/DVB (7414): use tuner-simple for Philips TD1316 digital tuning support
Convert saa7134-dvb to use tuner-simple instead of dvb-pll for Philips TD1316

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky cb89cd332d V4L/DVB (7413): use tuner-simple for Philips FMD1216ME digital tuning support
Convert cxusb, cx88-dvb and saa7134-dvb to use tuner-simple instead of
dvb-pll for Philips FMD1216ME

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 827855d397 V4L/DVB (7412): use tuner-simple for LG TDVS-H06xF digital tuning support
Convert cx88-dvb, dvb-bt8xx, b2c2-flexcop, cxusb and cx23885 to use
tuner-simple instead of dvb-pll for LG TDVS-H06xF

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 967be9a9cd V4L/DVB (7411): use tuner-simple for Philips FCV1236D digital tuning support
Convert dvb-bt8xx to use tuner-simple instead of dvb-pll for Philips FCV1236D

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 0efad8127a V4L/DVB (7410): use tuner-simple for Thomson FE6600 digital tuning support
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Thomson FE6600

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 7e35c9ff13 V4L/DVB (7409): use tuner-simple for Microtune 4042 FI5 digital tuning support
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Microtune 4042 FI5

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 0df31f8330 V4L/DVB (7408): use tuner-simple for Thomson DTT 761X digital tuning support
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Thomson DTT 761X

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 65511611dd V4L/DVB (7407): tuner-simple: add module options to specify rf input
Add module options to tuner-simple, called "atv_input" and "dtv_input"
to specify which rf input to use on devices with multiple rf inputs.
If the module option is not specified, then the driver will autoselect
the rf input, as per previous behavior.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Guennadi Liakhovetski 26f1b94215 V4L/DVB (7406): soc-camera: improve separation between soc_camera_ops and soc_camera_device
In case of muliple cameras, handled by the same driver, they can support

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Douglas Schilling Landgraf 8be38c815e V4L/DVB (7404): saa7134.h: Remove unnecessary validation
Removed unnecessary VIDIOC_G_PRIORITY validation.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Douglas Schilling Landgraf 078ff79534 V4L/DVB (7402): add macro validation for v4l_compat_ioctl32
Added macro CONFIG_COMPAT for v4l_compat_ioctl32.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Tobias Lorenz 03dea86de2 V4L/DVB (7401): radio-si470x: unplugging fixed
This patch fixes several kernel oops, when unplugging device while it is in
use:

Basically the patch delays freeing of the internal variables in
si470x_usb_driver_disconnect, until the the last user closed the device in
si470x_fops_release. This was implemented a while ago with the help of Oliver
Neukum.

I tested the patch five times (unplugging while in use) without oops coming
from the radio-si470x driver anymore. A remaining oops was coming from the
usbaudio driver, but this is someone else task. Hopefully this fixed all
unplugging issues.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Mauro Carvalho Chehab b412ba781a V4L/DVB (7399): Removes video_dev from tuner-xc2028 config struct
The video_dev parameter, on tuner-xc2028 were used to pass i2c private data to
tuner_callback. Since the driver already have a pointer to i2c_adap->algo_data,
uses this instead.

This parameter were used also as a magic number to idenfity if two drivers are
trying to register the same xc3028 tuner. This occurs with boards with DVB
support, where both DVB and V4L drivers will share the same tuner.

Instead of using the algo_data as a private number, after this patch, the
driver will use i2c_adap->dev, with seems more consistent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Mauro Carvalho Chehab 0be51b4671 V4L/DVB (7398): Adds an error if priv argument of tuner_callback is NULL
Adds a consistency check to avoid OOPS, if tuner_callback priv argument is
NULL. Also, simplifies callback codes on cx88.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Hartmut Hackmann 0fea03fbd3 V4L/DVB (7396): saa7134: fixed pointer in tuner callback
The pointer transferred directly points to the saa7134_dev
structure

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Hartmut Hackmann e9c1ac9d8d V4L/DVB (7395): saa7134: start 2nd LND supply of Medion cards only if needed
The ISL6405 LNB supply is used on several Creatix / Medion cards. But only
the MD8800 needs its second section. So don't start it unless it is needed.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Alan McIvor a4df8e1d6a V4L/DVB (7394): saa7134: add number of devices check
This patch fixes reported problems when trying to add a 9th device into a
system.

Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Hartmut Hackmann 7bff4b4d3a V4L/DVB (7393): tda827x: fixed support of tuners with LNA
Tuner refactoring broke support of tuners with LNA configurations 1 and 2
for both, analog TV and DVB-T.
Additionally, this patch initializes the saa713x gpios defined by the gpiomask
at driver init to avoid undefined stated at dvb.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Hartmut Hackmann 5823b3a63c V4L/DVB (7392): saa7134: support 2nd DVB-S section of the MD8800
There are some restrictions:
- The 2nd DVB-S section will only work if the 1st is configured for DVB-S too.
  so "options saa7134-dvb use_frontend=0,1" won't work.
- Currently it is not possible to set the higher LNB supply voltages, so
  14V instead of 13V in the 2nd section.
- It is not possibe to turn off the 2nd LNB supply independently.
This comes from the problem that the 2nd section can't access the i2c interface
of the LNB supply chip.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Hartmut Hackmann 637afdb563 V4L/DVB (7391): saa7134: Add DVB-S support for the MD 1734 cards with 2 saa7134
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Hartmut Hackmann 867bc6cccc V4L/DVB (7390): saa7134: clear audio DSP interface after access error
In the case of an access error to the high latency registers of
the audio DSP, the interface needs to be cleared, otherwise a cascade
of errors occurs.

This patch is closely modeled after a proposal by Mirek Slugen

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Andrew Morton c1e6393e24 V4L/DVB (7389): git-dvb: drivers/media/video/bt8xx/bttv-cards.c: fix warnings
drivers/media/video/bt8xx/bttv-cards.c:3030:38: warning: "/*" within comment
drivers/media/video/bt8xx/bttv-cards.c:3032:20: warning: "/*" within comment

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Mauro Carvalho Chehab 6e74171391 V4L/DVB (7388): saa7134: fix radio entry for xc2028/3028 boards
If left in blank, the driver will use value 0 (Temic PAL)

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Mauro Carvalho Chehab d9ae6dd763 V4L/DVB (7387): saa7134: Fix xc3028 entries
Tuner addresses were incorrect. Fix the entries.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Michael Krufky 7f7203df3f V4L/DVB (7385): tda18271: store agc_mode configuration independently of std_bits
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Michael Krufky c293d0a72e V4L/DVB (7384): tda18271: store FM_RFn setting in struct tda18271_std_map_item
All standard related configuration is stored within
struct tda18271_std_map_item.  Pass a pointer to this
structure rather than its individual members.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Michael Krufky 5555309c9a V4L/DVB (7383): tda18271: add attach-time parameter to limit i2c transfer size
Add attach-time parameter, "small_i2c" to limit i2c transfer size to write
at most 16 registers at a time during initialization.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Michael Krufky ab8b870e43 V4L/DVB (7381): tuner: rename TUNER_PHILIPS_ATSC to TUNER_PHILIPS_FCV1236D
TUNER_PHILIPS_ATSC is an ambiguous name for a tuner.  Rename it to
TUNER_PHILIPS_FCV1236D to be more descriptive.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Michael Krufky e827931e37 V4L/DVB (7380): tuner-simple: warn if tuner can't be probed during attach
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Michael Krufky cac2b0eb18 V4L/DVB (7379): tuner: prevent instance sharing if i2c adapter is NULL
We currently do not have a method to enable instance staring if i2c adapter
is NULL, in the cases of dvb demods that write to the tuner directly using
calc_regs.  Prevent possible wrong instance sharing for these cases until
a better solution can be found.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Guennadi Liakhovetski 7daa4a8897 V4L/DVB (7378): cleanup variable initialization
flags used for spinlocks don't need to be initialized, except where the
compiler has no way to see, that the spin_unlock_irqrestore is only called
if the spin_lock_irqsave has been called before. Local variable
initialization doesn't have to be protected.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Mauro Carvalho Chehab b2cb200f0d V4L/DVB (7377): radio-sf16fmr2.c: fix volume handling
As reported by  Roel Kluin <12o3l@tiscali.nl>:
in drivers/media/radio/radio-sf16fmr2.c:319:

for (i = 0; i < ARRAY_SIZE(radio_qctrl); i++) {
	if ((fmr2->card_type != 11)
        	        && V4L2_CID_AUDIO_VOLUME)
	        radio_qctrl[i].step = 65535;
        ...

I don't understand this '&& V4L2_CID_AUDIO_VOLUME'

While fixing this issue, I've revisited the volume control code and fixed
CodingStyle on the changed procedures.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Guennadi Liakhovetski e9bcf6675d V4L/DVB (7376): Improve compile-time type-checking in videobuf
Make the dev member of the struct videobuf_queue of type "struct device *"
to avoid future problems. Also change the prototype of the
videobuf_queue_core_init() function.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Mauro Carvalho Chehab 50407f99a1 V4L/DVB (7375): cx88/saa7134: fix magic number for xc3028 reusage detection
tuner-xc2028 needs to know when a DVB module is sharing the same analog tuner.
This is done by comparing a magic number that needs to be the same on analog
and on digital. To make easier, this magic number is a pointer to some data
struct.

With the previous code, two different pointers were using, causing a
miss-detection.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Guennadi Liakhovetski a920e42f61 V4L/DVB (7374): Fix left-overs from the videobuf-dma-sg.c conversion to generic DMA
The dev element of the struct videobuf_queue is now of type struct device
implicitly. Fix left-over casts.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Roel Kluin 33b4af918a V4L/DVB (7373): logical-bitwise & confusion in se401_init()
logical-bitwise & confusion

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Mauro Carvalho Chehab 7f0dd17913 V4L/DVB (7372): cx88: Add IR support for Pixelview MPEG 8000GT
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Mauro Carvalho Chehab ceb63a4fda V4L/DVB (7371): cx88: Fix audio on Prolink Pixelview Mpeg 8000GT
This board works only with non-mts firmware

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Mauro Carvalho Chehab 2422a9b3f4 V4L/DVB (7370): Add basic support for Prolink Pixelview MPEG 8000GT
TV reception ok. S-video and Composite not tested. Audio not tested.
IR not implemented yet.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Andrew Morton aba360d8cc V4L/DVB (7369): drivers/media/video/soc_camera.c: reads return size_t
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
CC: Guennadi Liakhovetski <kernel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Mauro Lacy e80faad3d7 V4L/DVB (7368): bttv: added support for Kozumi KTV-01C card
Signed-off-by: Mauro Lacy <mauro@lacy.com.ar>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Ernesto Hernández-Novich 97275ac514 V4L/DVB (7366): Support for a 16-channel bt878 card
I have what looks like a Geovision GV-600 (or 650) card. It has a large
chip in the middle labeled

CONEXANT
FUSION 878A
25878-13
E345881.1
0312 TAIWAN

It has an audio connector coming out from a chip labeled

ATMEL
0242
AT89C2051-24PI

It is identified as follows on my Debian GNU/Linux Etch (kernel 2.6.18)

...
01:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
01:0a.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
...
01:0a.0 0400: 109e:036e (rev 11)
        Subsystem: 008a:763c
        Flags: bus master, medium devsel, latency 64, IRQ 58
        Memory at dfffe000 (32-bit, prefetchable) [size=4K]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2

01:0a.1 0480: 109e:0878 (rev 11)
        Subsystem: 008a:763c
        Flags: bus master, medium devsel, latency 64, IRQ 58
        Memory at dffff000 (32-bit, prefetchable) [size=4K]
        Capabilities: [44] Vital Product Data
        Capabilities: [4c] Power Management version 2

It was being detected as a GENERIC UNKNOWN CARD both by the 2.6.18
kernel and the latest v4l-dvb drivers, but it did not work at all. The
card has sixteen (16) BNC video inputs, four of them on the board itself
and twelve on three daughter-cards. It has a single bt878 chip, no tuner
and what looks like and audio input. After doing some research I managed
to get only eight channels working by forcing card=125 and those DID NOT
match channels 0-7 on the card, and no audio.

Based on what was working for card=125, I added the card definition
block, added a specific muxsel routine and got the card working fully
with xawtv, where the sixteen channels show up as Composite0 to
Composite15, matching the channel labels in the card and daughter-cards.
I have made no efforts yet to get audio working, but would appreciate
any pointers.

Signed-off-by: Ernesto Hernández-Novich <emhn@usb.ve>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Marcin Slusarz 76e41e4851 V4L/DVB (7365): reduce stack usage of v4l1_compat_sync
poll_one allocated on stack struct poll_wqueues which is pretty big
structure (>500 bytes on x86_64). v4l1_compat_sync invokes poll_one
in a loop, so allocate struct poll_wqueues in v4l1_compat_sync (with
kmalloc) and pass it to poll_one.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Marcin Slusarz b524f7b02d V4L/DVB (7364): reduce stack usage of v4l_compat_translate_ioctl
v4l_compat_translate_ioctl used 1376 bytes of stack (x86_64),
so split this 800 lines long function into ~20 small noinline functions;
the biggest function takes now 712 bytes (v4l1_compat_sync)

fix VIDIOCSWIN handler which printked wrong errors

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Marcin Slusarz 8b3b90aca2 V4L/DVB (7363): fix coding style violations in v4l1-compat.c
fix most coding style violations found by checkpatch

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky a2a7f84b79 V4L/DVB (7360): tuner-simple: fix return value of simple_dvb_configure
simple_dvb_configure returns the actual tuned frequency to its caller, so
it must be declared as a u32 rather than an int.  As a result, we will
return 0 to indicate a failure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 26cd8972fb V4L/DVB (7359): tuner-simple: enable digital tuning support for Thomson FE6600
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 0e5d383b0a V4L/DVB (7358): tuner-simple: enable digital tuning support for Philips TD1316
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky a33b42c6bb V4L/DVB (7357): tuner-simple: enable digital tuning support for Microtune 4042 FI5
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 0db5fd4b06 V4L/DVB (7356): tuner-simple: enable digital tuning support for Thomson DTT 7610
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 02f5f44484 V4L/DVB (7355): tuner-simple: use separate inputs for vsb and qam on tuv1236d & fcv1236d
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky f4173d0f75 V4L/DVB (7354): tuner-simple: enable digital tuning support for Philips FCV1236D
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky dbe3127d72 V4L/DVB (7353): tuner-simple: enable digital tuning support for Philips TUV1236D
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 23a88108cf V4L/DVB (7352): tuner-simple: enable digital tuning support for Philips FMD1216ME
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 6f4a57292f V4L/DVB (7351): tuner-simple: add init and sleep methods
taken from dvb-pll

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky 22ef8fc945 V4L/DVB (7350): tuner-simple: enable digital tuning support for Thomson DTT 761X
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky bed6d189b9 V4L/DVB (7349): tuner-simple: enable digital tuning support for LG TDVS-H06xF
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:50 -03:00
Michael Krufky a81df36355 V4L/DVB (7348): tuner-simple: do not send i2c commands if there is no i2c adapter
if (priv->i2c_props.adap == NULL) then exit any function that would
send commands over the i2c bus.  We allow drivers to attach without an
i2c adapter for cases where the dvb demod accesses the tuner directly
via calc_regs.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Michael Krufky 62325497db V4L/DVB (7347): tuner-simple: add basic support for digital tuning of hybrid devices
Add entry points used for digital tuning via the dvb_frontend.

Share state data between multiple instances of the driver for hybrid
tuners.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Michael Krufky ac8b63b30a V4L/DVB (7346): tda9887: allow multiple driver instances for the same hardware to share state
Convert tda9887 to use the new hybrid_tuner_request_state and
hybrid_tuner_release_state macros to manage state sharing between
hybrid tuner instances.

Some ATSC/DVB cards need to put the analog demodulator into standby
before tuning digital.  This patch allows us to attach the tda9887
driver to the digital side of the bridge driver and be able to put
it into standby without jeopardizing the analog demod driver's state.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil 081b496a75 V4L/DVB (7344): cx25840: better PAL-M and NTSC-KR handling
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil 2fd3c14cf5 V4L/DVB (7343): msp3400: fix SECAM D/K handling
The 6.5 MHz carrier was interpreted as SECAM-L even if SECAM-D/K was
selected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil e0028027c6 V4L/DVB (7342): saa7115: fix PAL-Nc handling
Fsc 3.58 refers to Combination PAL-N (aka PAL-Nc), not to plain PAL-N (that
uses Fsc 4.43).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil 11305d5908 V4L/DVB (7341): ivtv: rename tunerhz to tunertype
There are two tuner types: those for M/N standards and those for all others.
However, M/N standards are not always 60 Hz (PAL-N/Nc are 50 Hz), so rename
the module option accordingly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil cd9fa02660 V4L/DVB (7340): ivtv: fix tunerhz bug: PAL-N(c) is 50 Hz, not 60
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil d00573bbe9 V4L/DVB (7339): ivtv: add support for Japanese variant of the Adaptec AVC-2410
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil c0038ce025 V4L/DVB (7338): ivtv: improve pal/secam module options, add tunerhz module option
Allow options like pal=bgh, improve description of those options.
Add tunerhz option: 50=card has 50Hz tuner, 60=card has 60Hz tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil 0358d7c580 V4L/DVB (7337): ivtv: fix polling bug
The q_io queue was never taken into account by the poll function. Thanks to
Andy Walls for finding this bug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Guennadi Liakhovetski ad5f2e859d V4L/DVB (7336): soc-camera: streamline hardware parameter negotiation
Improve hardware parameter negotiation between the camera host driver and
camera drivers. Parameters like horizontal and vertical synchronisation,
pixel clock polarity shall be set depending on capabilities of the
parties.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Andrew Morton 1c659689fe V4L/DVB (7335): usb-video: checkpatch fixes
Please run checkpatch prior to sending patches

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Jean Delvare d6f34d7add V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe
This saves an initialization and a comparison.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Sascha Sommer 2c4a07b2da V4L/DVB (7331): Fix em2800 altsetting selection
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Andreas Oberritter 4a24ce3a17 V4L/DVB (7329): add flag to allow software demux to recognize the output type
Previously, the macro DVR_FEED, which is used to recognize and filter
out duplicate packets going to the DVR device, used the TS_PAYLOAD_ONLY
flag to identify a packet's destination.

This kind of filtering was introduced by the following two changesets:

Now, that it is possible to record TS PIDs using the demux device by
setting the output type to DMX_OUT_TSDEMUX_TAP, checking TS_PAYLOAD_ONLY
is not sufficient anymore. Therefore another flag, TS_DEMUX, is added to
specify the output type of a feed.

This allows multiple clients to filter the same TS PID on a demux device
simultaneously.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mauro Carvalho Chehab a9317abfba V4L/DVB (7327): cx88: Fix memset for tuner-xc3028 control
Fix a cut-and-paste error

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mauro Carvalho Chehab 000e27a639 V4L/DVB (7326): Fix bad whitespaces
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mauro Carvalho Chehab ddd5441df4 V4L/DVB (7325): cx88-dvb: fix an OOPS for xc3028 devices, when dvb_attach fails
If dvb_attach fails, dev->dvb.frontend is NULL. This will produce an OOPS, as
reported.

Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Michael Krufky f0910c7443 V4L/DVB (7323): pvrusb2: set default video standard to NTSC for OnAir HDTV / Creator
The pvrusb2 driver normally picks up the default video standard from the
eeprom on Hauppauge devices, but the OnAir HDTV and OnAir Creator are not
Hauppauge devices, and do not store this information in any eeprom.

These devices support NTSC/ATSC, so we should use NTSC by default when in
analog mode.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Tobias Klauser ebff033039 V4L/DVB (7322): pvrusb2: Fix storage-class as per C99 spec
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00