Commit Graph

2943 Commits

Author SHA1 Message Date
Hans Verkuil 26e9d59956 V4L/DVB (6115): ivtv/ivtv-fb: improve locking to avoid initialization problems
ivtv/ivtv-fb: improve locking to prevent ivtv/ivtv-fb initialization problems

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:13 -03:00
Hans Verkuil 49ebf14e24 V4L/DVB (6113): ivtv: udelay for the i2c bus was set too high
An udelay of 5 is sufficient for standard speed i2c busses, 10 make it
too slow.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:12 -03:00
Hans Verkuil 21340ae03a V4L/DVB (6112): cx25840: use a workqueue to load the firmware
Loading the firmware using the i2c bit-banging code blocks the kernel.
Move the firmware load code into a workqueue so that it plays well with
other processes.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:09 -03:00
Mauro Carvalho Chehab f58db9590f V4L/DVB (6111): Fix a warning when compiling on x86_64
tcm825x.c: In function 'ioctl_try_fmt_cap':
tcm825x.c:639: warning: format '%d' expects type 'int', but argument 4
                                        has type 'long unsigned int'

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:09 -03:00
Hans Verkuil 3eaeef5742 V4L/DVB (6109): ivtv: use new videodev2.h pixel formats
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:04 -03: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
Marco Schluessler 226835d7e0 V4L/DVB (6104): dvb_ca_en50221: decrement module use count on error
decrement module use count on error

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:58 -03:00
Marco Schluessler 0c12c1bfc4 V4L/DVB (6103): dvb_ca_en50221: return correct error code value
return correct error code value

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:58 -03:00
Jesper Juhl d9bf2c0377 V4L/DVB (6102): dvb: remove some unneeded vmalloc() return value casts from av7110
vmalloc() returns void * - no need to cast it.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:57 -03:00
Michael Krufky 71be258bd9 V4L/DVB (6100): dvb_net: whitespace cleanup
Clean whitespace brain-damage caused by previous patch,
"Fix a warning at dvb_net"

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:54 -03:00
Jesper Juhl 6327e952cd V4L/DVB (6098): ivtv: kzalloc() returns void pointer, no need to cast
Since kzalloc() returns a void pointer, we don't need to cast the
return value in drivers/media/video/ivtv/ivtv-queue.c

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:53 -03:00
Hans Verkuil 2d4d5f11ec V4L/DVB (6097): ivtv: set correct pixel format and alpha properties
ivtv: set correct pixel format and alpha properties in VIDIOC_G_FBUF

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:53 -03:00
Hans Verkuil 559e196a56 V4L/DVB (6096): ivtv: fix V4L2_ENC_CMD_STOP_AT_GOP_END support
Support for V4L2_ENC_CMD_STOP_AT_GOP_END was broken. While the driver
correctly waited for the card to capture until the GOP was complete,
afterwards the driver buffers were just flushed instead of waiting
for the application to read all the pending data.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:49 -03:00
Hans Verkuil a158f35593 V4L/DVB (6094): ivtv: more ivtv-driver.h cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:48 -03:00
Hans Verkuil fd8b281a28 V4L/DVB (6093): ivtv: reorganized and cleanup ivtv struct
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:48 -03:00
Hans Verkuil 33c0fcad21 V4L/DVB (6092): ivtv: more cleanups, merged ivtv-audio.c and ivtv-video.c into ivtv-routing.c
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:47 -03:00
Hans Verkuil 612570f2c4 V4L/DVB (6091): ivtv: header cleanup
- add guards
- remove unused header includes
- move card-specific stuff from ivtv-driver.h to ivtv-cards.h
- move YUV-specific stuff from ivtv-driver.h to ivtv-yuv.h

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:44 -03:00
Hans Verkuil 459a52fab2 V4L/DVB (6090): ivtv-fb: correct transparency bit reporting
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:43 -03:00
Hans Verkuil d2a35fb172 V4L/DVB (6089): ivtv: log in status if framebuffer uses YUV instead of RGB
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:42 -03:00
Hans Verkuil 01f1e44fe8 V4L/DVB (6088): cx2341x: some controls can't be changed while the device is busy
The driver should now pass the 'busy' state of the device to the cx2341x 
module whenever controls are set or tried. -EBUSY will be returned if 
the device is busy and the user attempts to modify certain 'dangerous' 
controls. It concerns controls that change the audio or video 
compression mode and bitrates.

The cx88-blackbird and pvrusb2 drivers currently always pass '0' (not busy)
to the cx2341x, effectively keeping the old behavior for now.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:42 -03:00
Hans Verkuil ea115d54bc V4L/DVB (6087): ivtv: prevent changing VBI format while capture is in progress
Changing the VBI format requires a CX2341X_ENC_INITIALIZE_INPUT firmware
call. This can only be done if no capture is in progress. So return
-EBUSY if the encoder is busy.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:38 -03:00
Hans Verkuil ad8ff0f10b V4L/DVB (6086): ivtv: fix output mode processing: UDMA_YUV wasn't cleared
- Always clear when stopping the decoder
- Clear if the filehandle that is being close was used for UDMA_YUV output.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:38 -03:00
Trent Piepho f6210c9160 V4L/DVB (6085): cx88-alsa: Fix mmap support
The driver has long claimed to support mmap, but it didn't work at all.  Some
of the dma buffer parameters weren't set, and since video_buf uses vmalloc to
allocate the buffer, a page callback is needed too.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:37 -03:00
Trent Piepho ffb7394d51 V4L/DVB (6084): cx88-alsa: Eliminate snd_cx88_cards
The driver kepts a static global array of snd_card pointers for each card
probed, which was never used.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:36 -03:00
Trent Piepho 05b2723387 V4L/DVB (6083): cx88-alsa: Rework buffer handling
Rework the way the DMA buffer is handled and IRQs are generated.

ALSA uses a ring-buffer of multiple periods.  Each period is supposed to
corrispond to one IRQ.

The existing driver was generating one interrupt per ring-buffer, as opposed
to per period.  This meant that as soon as the IRQ was generated, the hardware
was already starting to re-write the beginning of the buffer.  Since the DMA
happens on a per-line basis, there was only a narrow window to copy the data
out before the buffer was overwritten.

The cx88 core RISC program generator is modified so that it can set the IRQ
and counter flags to count every X lines of DMA transfer.  This way we can
generate an interrupt every period instead of every full ring-buffer.  Right
now only period of one line are supported, but it should be possible to
support longer periods.  Note that a WRITE instruction generates an IRQ when
it starts, not when the transfer is finished.  Thus to generate an IRQ when
line X is done, one must set the IRQ flag on the instruction that starts line
X+1, not the one that ends line X.

Change the line size so that there are four lines in the SRAM FIFO.  If there
are not four lines, the analog output from the cx88's internal DACs is full of
clicks and pops.

Try to handle FIFO sync errors.  Sometimes the chip generates many of these
errors before audio data starts.  Up to 50 sync errors will be ignored and the
counter reset.

Have the IRQ handler save the RISC counter to the chip struct, and then have
the pointer callback use this to calculate the pointer position.  We could
read the counter from the pointer callback, but sometimes the sync errors on
start up cause the counter to go crazy.  ALSA sees this and thinks there has
been an overrun.  The IRQ hander can avoid saving the counter position on
sync errors.

The chip "opened" flag wasn't necessary.  ALSA won't try to open the same
substream multiple times.  Probably this code was cut&pasted from the bt87x
driver, which has multiple sub-streams for one chip.

Do error checking for the videobuf mapping functions.

snd_card_cx88_runtime_free() is useless and can be deleted.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:34 -03:00
Trent Piepho 16cf1d0c5d V4L/DVB (6082): cx88: Improve risc instruction printing in sram channel dump
When the risc instrunctions from the CMDS were printed, instruction arguments
weren't taken into account.

This changes output like:
cx88[0]:   risc0: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc1: 0x0cac2800 [ INVALID sol eol 23 21 19 18 13 count=2048 ]
cx88[0]:   risc2: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc3: 0x0cac2c00 [ INVALID sol eol 23 21 19 18 13 count=3072 ]

cx88[0]:   risc0: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc1: 0x0cac2800 [ arg #1 ]
cx88[0]:   risc2: 0x1d010400 [ write sol eol irq1 cnt0 count=1024 ]
cx88[0]:   risc3: 0x0cac2c00 [ arg #1 ]

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:28 -03:00
Jean Delvare aeb292d134 V4L/DVB (6081): ivtv: Fix static structure initialization
Convert the initialization of ivtv_i2c_algo_template to C99-style.
Otherwise a future change to struct i2c_algo_bit_data would break
this code.

Also declared that structure const - it's a template after all.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:24 -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
Michal Piotrowski f518b43c45 V4L/DVB (6078): Coding style fix drivers/media/video/zr36016.c
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:07 -03:00
Michal Piotrowski b9758dfe0a V4L/DVB (6077): Coding style fix drivers/media/video/zr36050.c
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:06 -03:00
Michal Piotrowski 5634f2ec80 V4L/DVB (6076): Coding style fix drivers/media/video/zr36060.c
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:05 -03:00
Michael Krufky ffbb807c13 V4L/DVB (6075): tuner: kernel headers go above subsystem headers
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:04 -03:00
Michael Krufky c996899d0b V4L/DVB (6074): tuner: fix ifdef tags to match actual file name
The file, tuner-driver.h was originally named tuner-hw.h, but we decided to
rename it.  At the time, I had forgotten to change the #ifdef __TUNER_HW_H__
to #ifdef __TUNER_DRIVER_H__ .  This patch corrects that.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:04 -03:00
Edgar Simo d90d9f5a0a V4L/DVB (6072): saa7134: add DVB-T support for Avermedia Super 007
Add DVB-T support for Avermedia Super 007

Analog television is untested.  The device lacks input adapters for radio,
svideo & composite -- seems to be a DVB-T ONLY device.

Signed-off-by: Edgar Simo <bobbens@gmail.com>
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>
2007-10-09 22:06:01 -03:00
Edgar Simo 261f5081a4 V4L/DVB (6071): saa7134-dvb: add missing newline
This is a simple whitespace cleanup.

Signed-off-by: Edgar Simo <bobbens@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:00 -03:00
Trent Piepho 19453bc188 V4L/DVB (6068): cx88-alsa: Use pci_dev->revision
The revision is part of the pci_dev struct, so there is no need to read it in.

Stop storing the revision and latency in the chip struct, since they're never
used after being printed out when the driver loads.

linux/pci.h wasn't included.  It was getting picked up something else,
probably cx88.h, but this file uses struct pci_dev so it should include pci.h.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:00 -03:00
Trent Piepho 5a5b3b5d4f V4L/DVB (6067): cx88-alsa: Hardware doesn't support mono audio
channels_min should be 2, not 1.  The hardware only supports stereo.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:59 -03:00
Trent Piepho 59fd8f8d8e V4L/DVB (6066): cx88-alsa: Change order of interrupt enabling, fix spurious IRQs
Currently the driver turns on audio interrupts, then sets the audio interrupt
mask to select which interrupts to get.  One could received unwanted
interrupts since the mask is set _after_ interrupts have already been turned
on.  Change the order of the operations, and clear any audio interrupt status
bits that are already set for good measure.

Before changing the SRAM FIFO parameters, make sure the FIFO isn't being used.
This shouldn't happen with just the ALSA driver, as it should never try to
turn on FIFO/RISC/DMA while they are already on.  However, the V4L driver
needs to turn the audio FIFO on for analog audio output to work (undocumented
cx88 bug).  The FIFO parameters are in an inconsistent state while they are
updated, and this results in many FIFO sync error IRQs if the FIFO is in use
while it's in this inconsistent state.

Also create and use a bunch of symbolic constants for audio interrupt mask
bits.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:55 -03:00
Trent Piepho 5ba862b77e V4L/DVB (6065): cx88-alsa: Call core irq handler when needed
When an irq handled by the cx88 core driver (currently IR and errors) occurs
and the cx88-alsa irq handler is the first called, it will claim to have
handled the irq but it doesn't call cx88_core_irq() to handle it.

The means loading cx88-alsa can disable the IR remote.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:55 -03:00
Trent Piepho 8ddac9ee4b V4L/DVB (6064): cx88: Add symbolic names for the PCI interrupt bits
Used for the PCI_INTMSK and PCI_INT_STAT registers.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:54 -03:00
Hans Verkuil 7c03a4488b V4L/DVB (6061): ivtv: add VIDIOC_OVERLAY
Add VIDIOC_OVERLAY to enable/disable the OSD. Also add the OSD state to the
log status report.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:53 -03:00
Hans Verkuil 8beb058f1e V4L/DVB (6060): ivtv: fix IVTV_IOC_DMA_FRAME bug introduced by highmem bugfix
The return value of ivtv_udma_fill_sg_list() was changed by the
highmem bugfix, but that return value was still used in ivtv-yuv.c.

Revert to the old return value, but in addition return -1 in case of
a memory allocation error.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:48 -03:00
Hans Verkuil 25e3f8f40e V4L/DVB (6059): ivtv: log stereo/bilingual audio modes
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:47 -03:00
Hans Verkuil 0989fd2c88 V4L/DVB (6058): ivtv: add support for highmem udma
When trying to DMA userspace buffers to the cx23415 you need to check
whether the page is in highmem. If this is the case, then bounce buffers
have to be used to allow DMA.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:46 -03:00
Hans Verkuil 3869c6a088 V4L/DVB (6057): ivtv-fb: remove unused header includes
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:46 -03:00
Hans Verkuil baa4072d84 V4L/DVB (6056): ivtv: move serialization to the fileops level
Serialization is now done on the open/close/ioctl level and also when the
read/write/poll start an encoder/decoder stream.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:43 -03:00
Hans Verkuil 1aa32c2ffd V4L/DVB (6055): ivtv: improve debug messages
- add FILE debug flag for open/close/read/write/poll.
- show cmd for encoder/decoder command ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:42 -03:00
Hans Verkuil 313e91e824 V4L/DVB (6054): ivtv: specify some stream sizes in kB instead of MB
Some streams (PCM, VBI decoding) do not need that much memory, so specify
the allocated memory in kB instead of MB to limit memory usage. E.g. 1 MB
is overkill for the VBI decoding stream, 64 kB is enough.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:41 -03:00
Hans Verkuil 2ce55b606b V4L/DVB (6053): ivtv: setup TV output standard on init to prevent flicker
The TV output standard was set only on first use, which meant that the saa7127
was set to NTSC until then, leading to flickering on PAL systems.

Since the saa7127 has no firmware it is OK to initialize it immediately.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:40 -03:00
Hans Verkuil 8267761881 V4L/DVB (6051): cx25840: make proper use of SOFT_RESET
Whenever the 0x80b register is used the microcontroller should be reset.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:38 -03:00
Hans Verkuil e17a06bada V4L/DVB (6050): ivtv: retry/timer improvements
- Give up frame after three retries.
- When the last capture/decode ends, make sure to delete the dma_timer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:37 -03:00
Hans Verkuil 51a99c0428 V4L/DVB (6049): ivtv: fix VBI reinsertion decoding
- Invalid VBI packets should result in an empty VBI frame, not
  in an zero-sized frame that causes the reader to incorrectly
  return a 0 (EOF) value.
- PIO completion should not reset the sg_pending_size field.
- The DMA offset detection code should be ignored for PIO transfers:
  it somehow messes up the data on the card and is not needed anyway
  for PIO.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:36 -03:00
Hans Verkuil de870b52be V4L/DVB (6048): ivtv: fix stop stream locking
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:36 -03:00
Hans Verkuil 37093b1ea6 V4L/DVB (6047): ivtv: Fix scatter/gather DMA timeouts
It turns out that the cx23415/6 DMA engine cannot do scatter/gather DMA
reliably. Every so often depending on the phase of the moon and your
hardware configuration the cx2341x DMA engine simply chokes on it and
you have to reboot to get it working again.

This change replaced the scatter/gather DMA by single transfers at a time,
where the driver is now responsible for DMA-ing each buffer.

UDMA is still done using scatter/gather DMA, that will be fixed soon.

Many thanks to Mark Bryars <mark.bryars@etvinteractive.com> for discovering
the link between scatter/gather and the DMA timeouts.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:32 -03:00
Hans Verkuil f4071b85ea V4L/DVB (6046): ivtv: always steal full frames if out of buffers.
When there are no more free buffers, then buffers are stolen from the
predma queue. Buffers should be stolen from the head of that queue (which
is where the most recently added buffers are) and all buffers belonging
to a frame should be stolen. Otherwise 'half-frames' would remain in the
queue, which leads to ugly playback and complete sync failure for YUV
buffers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:32 -03:00
Hans Verkuil 3562c43be8 V4L/DVB (6045): ivtv: fix handling of INITIALIZE_INPUT fw call
The CX2341X_ENC_INITIALIZE_INPUT firmware call requires careful handling,
otherwise the computer can freeze or the top-third of the screen can start
flickering. This patch ensures that CX2341X_ENC_INITIALIZE_INPUT is called
at the right time and in the right way.

In addition the stop capture handling was improved so that the last pending
DMA transfer is also processed. Otherwise this would be the first data that
arrived when a new capture was started which is not what you want.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:31 -03:00
Kazuhiko Kawakami da80be2136 V4L/DVB (6044): vp27smpx: clarify history of this source.
Signed-off-by: Kazuhiko Kawakami <kazz-0@mail.goo.ne.jp>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:30 -03:00
Hans Verkuil 33bc4dea0e V4L/DVB (6043): ivtv: fix incorrect round-robin implementation
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:27 -03:00
Darren Salt b1139e353c V4L/DVB (6040): Add IR support for Nova-T Stick
Working with Nova-T Stick (70001) with remote control model A415.
Untested with other dib0700m/dib0700p devices.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:26 -03:00
Darren Salt faebb91439 V4L/DVB (6039): Typo fix in Nova-TD description
Typo fix in Nova-TD description

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:26 -03:00
Michael Mauch e927b3fa59 V4L/DVB (6038): Trivial: repair mixed parm descs in dvb-usb-init.c
Repair modinfo parameter descriptions for force_pid_filter_usage and
disable_rc_polling.

Signed-off-by: Michael Mauch <michael.mauch@gmx.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:25 -03:00
Alan Nisota 458b634cd8 V4L/DVB (6037): Updated GenPix USB driver
There are now 4 different versions of the GENPIX USB adapter.  The 
newest 'Skywalker' models are fully self-contained, and need no 
additional hardware to be used.  A very reliable DVB-S card even without 
using any of the alternate modulatations (which this kernel module does 
not currently support)

The following patch adds support for all 4 versions of the genpix
adapter (www.genpix-electronics.com).

Signed-off-by: Alan Nisota alannisota@gmail.com
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:22 -03:00
Trent Piepho fa40b2237a V4L/DVB (6034): cx88: Add parameter to control radio deemphasis time constant
FM radio transmission use a preemphasis/deemphasis scheme to reduce
high-frequency noise.  The cx88 audio decoder is supposedly set to no
deemphasis by the current driver.

However, the "no deemphasis" setting doesn't work.  On my chip, cx23883, it
produces the same result as the 75 us time constant.  Maybe the default
settings on the cx23881 are for 50 us?

Since the deemphasis time constant varies by country, allow setting it via a
module parameter.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:21 -03:00
Trent Piepho 82e67246cd V4L/DVB (6031): Fix for bug 7819: fixed hotplugging for dvbnet
The first part of dvb_net_close() is just a cut&paste from
dvb_generic_release(), so maybe it would be better to just call
dvb_generic_release() instead?

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Markus Rechberger <mrechberger@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:21 -03:00
Adrian Bunk 89d969a39d V4L/DVB (6025): Net_ule(): fix check-after-use
The Coverity checker spotted that we'd have already oops'ed if "dev"
was NULL.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:20 -03:00
Trent Piepho 5772f81326 V4L/DVB (6023): cx88: Clean up some ugly and inconsistent printk()s
Get rid of the "CORE" prefix from cx88 printks.  It was only used a few times,
and it makes it look like they're coming from the kernel core or something.

Fix the message, "TV tuner 60 at 0x1fe, Radio tuner -1 at 0x1fe", by adding a
"cx88[0]" prefix to be consistent, and to keep people who grep their dmesg
output for cx88 from missing it.  Get rid of the addresses, which are always
wrong.  The addresses are always set to -1, but because it's an unsigned 8-bit
value, the left shift converts it to the nonsense address 0x1fe.

In the cx8802 driver, some cut and pasted code prefixed lines with "CORE
cx88[0]:", which has been changed to "cx88[0]/2:" like the other printks from
the cx8802 driver.

Also fix some ugly printks in the cx8802 driver that used __FUNCTION__ for
KERN_INFO and KERN_ERR messages.

The changed printks in cx88-mpeg.c also needed lots of whitespace and
80-column fixes.

A bunch of misc changes in cx88-dvb.c and cx88-video.c to add message levels
or a consistent "cx88[?]/2" or "cx88[?]/0" prefix.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:17 -03:00
Trent Piepho bbc83597df V4L/DVB (6022): cx88: Move card core creation from cx88-core.c to cx88-cards.c
A lot of code in cx88-cards.c was only used by cx88-core.c when the core state
is first allocated and initialized.  Moving that task to cx88-cards makes the
driver simpler and the files more self contained.

- Module parameters tuner, radio, card, and latency move to cx88-cards.c
- cx88_boards is made static
- cx88_subids is made static and const
- cx88_bcount is eliminated
- cx88_idcount is eliminated
- cx88_card_list() is made static
- cx88_card_setup_pre_i2c() is made static
- cx88_card_setup() is made static
- cx88_pci_quirks() is moved from cx88-core to cx88-cards
  The function argument "char *name" is made const too
- get_ressources() is moved from cx88-core to cx88-cards, and renamed to
  cx88_get_resources()
- The code to allocate and initialize the core state struct and the chip is
  moved out of cx88-core.c:cx88_get_core() and into a new function in
  cx88-cards.c, cx88_core_create().  This makes both functions simpler.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:16 -03:00
Trent Piepho 6a59d64c5c V4L/DVB (6021): cx88: Copy board information into card state
The cx88 driver state stored the ID of the board type in core->board.  Every
time the driver need to get some information about the board configuration, it
uses the board number as an index into board configuration array.

This patch changes it so that the board number is in core->boardnr, and
core->board is a copy of the board configuration information.  This allows
access to board information without the extra indirection.  e.g.
cx88_boards[core->board].mpeg becomes core->board.mpeg.

This has a number of advantages:
- The code is simpler to write.

- It compiles to be smaller and faster, without needing the extra array lookup
  to get at the board information.

- The cx88_boards array no longer needs to be exported to all cx88 modules.

- The boards array can be made const

- It should be possible to avoid keeping the (large) cx88_boards array around
  after the module is loaded.

- If module parameters or eeprom info override some board configuration
  setting, it's not necessary to modify the boards array, which would
  affect all boards of the same type.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:16 -03:00
Trent Piepho b09a79f584 V4L/DVB (6020): cx88: Fix use of uninitialized variable
An error message for PCI resource allocation failure used the board type
before it was set.  Just get rid of the error message, as get_ressources()
[sic] already prints one.  Format that error message better, and add the pci
function and subsystem information to better associate the error with what
caused it.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:15 -03:00
Trent Piepho c252b05115 V4L/DVB (6019): cx88: Make card database more memory efficient
The vmux setting is only two bits, but was taking up a whole 32 
in the input description struct.  By changing it to a two-bit 
bitfield, it can fit in what was padding space before and drop 
the input size by 4 bytes, from 28 to 24. This drops the board 
description struct, which has 9 inputs, from 280 to 244 bytes.  
Total driver size decreases by 2108 bytes.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:12 -03:00
Kay Sievers 5f553388b0 V4L/DVB (6015): DVB: convert struct class_device to struct device
The currently used "struct class_device" will be removed from the
kernel. Here is a trivial patch that converts DVB to use struct device.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:11 -03:00
Mauro Carvalho Chehab acb09af4e3 V4L/DVB (6014): vivi: use videobuf_read_stream()
videobuf_read_stream is more efficient than videobuf_read_one

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:10 -03:00
Kumar Gala e9f668dd12 V4L/DVB (6010): Use inline functions instead of inline asm for powerpc
Change io_st_le32() to use inline functions rather than
direct inline assembly code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:07 -03:00
Adrian Bunk fbd8af0706 V4L/DVB (6009): Bt8xx: "extern inline" -> "static inline"
"extern inline" will have different semantics with gcc 4.3.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:05 -03:00
Michael Krufky 6b1dde90de V4L/DVB (6006): tuner: move last_div to tuner-simple private data
tuner-simple is the only sub-driver that uses last_div, so we 
can free up two bytes of memory for all other tuners, by moving 
this into tuner-simple's private data area.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:01 -03:00
Rolf Eike Beer afa76b392e V4L/DVB (6005): Initialize filp->private_data only once in em28xx_v4l2_open
Some lines later filp->private_data is initialized to dev again.
Since there are some checks that might fail in the mean time
keep the later version.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:00 -03:00
Hans Verkuil be848fe39a V4L/DVB (6003): vp27smpx: correctly attribute the origin of the driver
Correctly attribute the origin of the driver to Kazuhiko 
Kawakami.

It took some time to get the S-O-B line from the original 
tvaudio patch author, but here it is.

Signed-off-by: Kazuhiko Kawakami <kazz-0@mail.goo.ne.jp>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:00 -03:00
Hans Verkuil 6af5a0394a V4L/DVB (6002): ivtv: remove unused struct field.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:59 -03:00
Hans Verkuil 39c4ad6ab3 V4L/DVB (5999): cx25840: add radio support.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:56 -03:00
Hans Verkuil 9085009683 V4L/DVB (5998): ivtv: no need to mute the audio input
When changing channels the audio has to be muted. This is done 
by calling CX2341X_ENC_MUTE_AUDIO and by muted the audio input. 
The latter is not necessary and is now removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:56 -03:00
Hans Verkuil 87410dab12 V4L/DVB (5997): cx25840: fix audio mute handling and reporting
Audio muting for the tuner input was implemented by stopping the 
audio microcontroller and restarting it on unmute. However, it 
appears that this method can actually crash the audio firmware. 
It's rare and seems to happen with NTSC only.

It has been reimplemented by setting to volume to 0. In addition, the
reporting of the mute state has been improved as well: it used to be
impossible to detect whether the audio was muted by the user or if it
was muted due to the microcontroller trying to detect the audio
standard. This is now clearly stated.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:55 -03:00
Hans Verkuil 372978055d V4L/DVB (5995): ivtv: add AverMedia M116
- Split Club3D card from Yuan PG600-2, GotView PCI DVD Lite
  (different composite input)
- Add AVerTV MCE 116 Plus (M116) card
- Allow Xceive cards to be used without Xceive support

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:54 -03:00
Hans Verkuil 2cc720957a V4L/DVB (5994): ivtv: make VIDIOC_INT_RESET support smarter.
Add support to optionally reset the IR and/or the video digitizer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:51 -03:00
Hans Verkuil 89fc4eb924 V4L/DVB (5993): cx25840: resetting also requires reloading the firmware
Resetting without reloading the firmware is not enough. Sometimes the
firmware is 'stuck' and needs to be reloaded.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:50 -03:00
Hans Verkuil 94104aa2a8 V4L/DVB (5992): ivtv: show card name as well in the LOG_STATUS output.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:49 -03:00
Oleg Nesterov 1597f1f676 V4L/DVB (5990): cinergyt2_suspend: don't forget to unlock cinergyt2->wq_sem
Restore unlock of cinergyt2->wq_sem, was deleted by accident.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:46 -03:00
Steven Walter 7963fa48da V4L/DVB (5989): V4L: Add additional ioctls to compat_ioctl32
With the addition of these ioctls, I'm able to watch TV with a 32-bit version
of tvtime on x86_64.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:45 -03:00
Simon Arlott 4ebcb48da1 V4L/DVB (5988): Fix OOP on videobuf-dvb when hibernating
Since videobuf_waiton is called with intr=1, it can return -EINTR and therefore
err may be non-zero. This happens when the system goes into the standby state.

Without the BUG() occurring, there's no problem with standby mode while DVB
is being used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:45 -03:00
Oliver Endriss 276e49a01a V4L/DVB (5987): saa7146: clean-up irq processing
Interrupt processing fixed: First handle interrupt, then acknowledge it.
Otherwise the same interrupt might occur twice.
Cleaned-up i2c interrupt handler and i2c error messages.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:44 -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
Hartmut Birr a18255bef2 V4L/DVB (5985): Fix the min/max frequencies of some DVB-C frontends
The min frequencies of the DVB-C frontends are wrong. 

In Europe, the center frequency of the lowest channel is 50.5MHz and not 
51MHz. All known cards with the stv0297/tda0002x/ves1820 frontend are 
able to tune to this frequency.

I've changed the range to the lowest channel - 1/2 bandwidth and the 
highest channel + 1/2 bandwidth. For the design of the dvb driver, the 
frequency ranges must be part of the tuner and not of the frontend 
itself. The same frontend may be used for different tuners. 

The attached patch does only fix the ranges and not the design.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:40 -03:00
Mariusz Kozlowski 8509a29ec6 V4L/DVB (5983): Arv.c: fix memset in ioctl
Looks like memset() is zeroing wrong nr of bytes.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:40 -03:00
Mariusz Kozlowski 473c653fff V4L/DVB (5982): Dev.c: memset fix
Looks like memset() is zeroing wrong nr of bytes.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:39 -03:00
Mariusz Kozlowski 5e76a1cb2c V4L/DVB (5981): Zoran_driver.c: fix memset in ioctl
Looks like memset() is zeroing wrong nr of bytes.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:38 -03:00
Oliver Endriss 4f76b672c4 V4L/DVB (5980): tda8083: fix frequency and symbolrate info
The TDA8083 supports a symbol rate from 12..30 MSym/s.
The Grundig 29504-451 tuner uses the TDA8060 down-converter,
which has a frequency range from 920..2200MHz.
Thanks-to: Lars Buerding <lindvb@metatux.net>

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:35 -03:00
Trent Piepho 5e082f1521 V4L/DVB (5978): tuner: Better tuner radio support
Add radio support for the Thomson DTT7612 tuner.

This tuner uses a different 1st intermediate frequency than the other radio
tuners supported (a lot of NTSC radio tuners probably need this change too).

Add a new tuner-simple parameter, radio_if.  It selects the 1st IF used for
radio reception.  The radio frequency setting code in tuner-simple now uses
this field, instead of a special case select() block for each tuner with radio
support.

The tuner parameters for tuners that used a 33.3 MHz RIF now set radio_if to 1
in tuner-types.c.

The Thomson DTT7612 gets radio_if = 2, also add has_tda9887 = 1 and
fm_gain_normal = 1.

Add some defines for tda9887 bits that control IF setting in radio mode.

Add a new tda9887 config option, TDA9887_RIF_41_3, that selects a 41.3 MHz
radio IF.

Fix the way tda9887 radio options work.  The driver was modifying the default
radio mode config templates based on the TDA9887_XXXX flags.  This means that
_all_ tuners would get the same settings.  If you had a one tuner than used
TDA9887_GAIN_NORMAL and one that didn't, both would get the setting.  Now the
tda9987 driver just checks if tuner mode is radio and then applies the config
settings directly to the data being sent, just like how all the TV mode
settings already work.

The PLL setting math is made a little more accurate.

And a grammar error in a printk is fixed.

Signed-off-by:  Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:34 -03:00
Trent Piepho a75d204860 V4L/DVB (5977): cx8800: Add register debug functions to radio device too
Add the advanced debug functions to the radio videodev template.  One could
already use them from the video and vbi devices.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:33 -03:00
Trent Piepho b97762ba18 V4L/DVB (5976): mt2131 s5h1409: correct frontend selection logic
If a card driver is compiled into the kernel and mt2131 or s5h1409 are
compiled as modules, the kernel won't link.

A compiled in driver can't use a module, so in this case the mt2131 or s5h1409
are effectively disabled w.r.t the compiled in driver and the stub attach
function should be used.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:33 -03:00
Trent Piepho 19dc74b7c5 V4L/DVB (5975): cx88: Wrong values used for HD-3000 radio mode
After some tedious work with a logic probe and a magnifying glass, I've
determined that GPIO 7 is used to switch between the DTT7612's Sound 4.5 MHz
IF output on pin 12 and the FM 10.7MHz If output on pin 11.  GPIO 2 is used to
switch the card's analog sound output from from the analog input connector to
the CX23883's audio DACs.

So, in radio mode GPIO2 = 1 and GPIO7 = 0.

Add some comments about how the HD-3000's GPIOs are connected.

Delete the vmux setting for the radio, as vmux doesn't apply to radio mode.
Also delete the lines setting unused gpio words to zero; it's not necessary as
0 is the default value for uninitialized fields.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:30 -03:00
Ian Armstrong bfd7beacff V4L/DVB (5973): ivtv: attach yuv field order to each frame
In the current driver, the field order is global. As soon as it's changed it
takes immediate effect. This is a problem when the video changes order mid
stream. Although it mostly works okay, the video may judder / flicker.

This patch attaches the field order to the frame, so that any buffered frames
will not be displayed until the correct field. In the event that the field
order is changed mid stream, the driver will ensure that the previous frame
is displayed for a minimum of 3 fields. These are the two original fields the
frame should have occupied, plus the one extra since the new frame still has
to wait for the correct field.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:29 -03:00
Ian Armstrong 943e8910db V4L/DVB (5972): ivtv: prevent yuv register updates from being missed
The yuv output code always compares the new frame position & size with those
of the previous frame. If they are different, a flag is set to request the
yuv output registers be updated when the new frame is displayed.

If the incoming frames are delivered too fast, exhausting the buffers, the
most recent frame already buffered will be discarded. Unfortunately, any
update request will also be discarded. If the new frame matches the size &
position of the now discarded frame, the yuv registers are not flagged for
update & will remain in their old state.

This patch preserves the register update flag in the event that a frame is
dropped.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:28 -03:00
Ian Armstrong 68a341a53a V4L/DVB (5971): ivtv-fb: framebuffer timings no longer locked on module load
Framebuffer timings are currently locked to the video format in use when the
module is loaded. If the video format is then changed, the timings returned
by the framebuffer will be for the original format.

This patch ensures that the timings returned reflect the current video format.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:27 -03:00
Ian Armstrong b4b38bd63c V4L/DVB (5970): ivtv: prevent vertical overflow of yuv output
When the video standard is changed, there's no guarantee the framebuffer
dimensions are still legal. The yuv output code uses these dimensions to
calculate the size & position for the video overlay. If the framebuffer
dimensions are now illegal, the output may exceed the vertical limit of the
display, causing distortion.

This patch adds an additional check to ensure the output doesn't exceed
the limits for the current video standard, cropping if required.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:25 -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
Janne Grunau 89f4267d6f V4L/DVB (5964): Fixed remote control for dib0700 with new firmware
The new firmware returns the data of the REQUEST_POLL_RC request in
reversed order. The default is RC5, but it can be adjusted using a
module parameter.

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:05 -03:00
Patrick Boettcher 8d99996b09 V4L/DVB (5963): Module parameter description for SFN workaround
Thanks to Matt Doran I found that there the module parameter description 
was not OK.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:04 -03:00
Janne Grunau 034d65ed20 V4L/DVB (5962): Fix line-break in err output
line-breaks in dib0700-remote-query function fixed.

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:02 -03:00
Patrick Boettcher 3db78e5950 V4L/DVB (5961): Fix support for DiB7000M-devices
Forgot to initialize the timf_default field.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:57 -03:00
Matt Doran 8f6956c7f9 V4L/DVB (5960): Add module parameter to enable SFN workaround
In some areas in the world the broadcasters are not using the same
cellid for each transmitter in a SFN. The DiBcom has problems with
that setup. The module parameter buggy_sfn_workaround makes it re-usable.

Signed-off-by: Matt Doran <matt.doran@papercut.biz>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:50 -03:00
Patrick Boettcher 8779737b8e V4L/DVB (5959): Fix for size of remote keys in DiB0700
Fix for size of remote control keys in DiB0700.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:49 -03:00
Patrick Boettcher 1f8ca4b373 V4L/DVB (5958): Add support Compro VideoMate 500 with DiB7000PC
Add support Compro VideoMate 500 with DiB7000PC. Another design of 
Compro uses the DiB7000PC and it has new USB ids.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org> 
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:49 -03:00
Janne Grunau 7161f27f2e V4L/DVB (5957): Add remote keymap for the Hauppauge Nova-TD Stick
Copied from drivers/media/dvb/dvb-usb/nova-t-usb2.c

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:45 -03:00
Janne Grunau 82f3d55942 V4L/DVB (5956): Add remote control support for the Hauppauge Nova-T 500
This patch adds remote control support for the Hauppauge Nova-T 500 
using the same keys as for STK7700PD.

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:45 -03:00
Patrick Boettcher 01373a5c97 V4L/DVB (5955): Add support for DiB7070-based devices
This changeset adds support for DiB7070P-based devices by adding the
dib0070-driver and putting the appropriate layouts into
dib0700_devices.c

It also includes a new firmware for the dib0700 which is necessary to
make the DiB7070-boards work and it also should fix the i2c-problems
on some boards.

Signed-off-by: Jean-Philippe Sibers <jpsibers@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:44 -03:00
Patrick Boettcher b6884a17fc V4L/DVB (5954): Sync with DiBcom Driver Release 2.1.3 + some improvements
This changesets syncs the OpenSource driver for DiBcom demodulators
with version 2.1.3 of DiBcom reference driver. There were some
improvements since the last release for linux-dvb, e.g.:

- stepped AGC startup
- less space for initialization
- diversity synchronization

Furthermore this changeset contains the following things:

- latest AGC settings for MT2266-based devices (namely Nova-TD and other) will improve the sensitivity
- support for STK7700D reference design in dib0700-devices
- remove some line-breaks when debugging is enabled
- getting rid of layer between frontend_parameters and ofdm_channel used in dib*-drivers

Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:43 -03:00
Mariusz Kozlowski b2a657603e V4L/DVB (5953): msp3400-driver.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:40 -03:00
Michael Krufky 3873dd0414 V4L/DVB (5950): whitespace cleanup for mt2131 and s5h1409
- trivial whitespace cleanups
- add "c-basic-offset: 8" to enforce tabbing style in emacs

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:40 -03:00
Michael Krufky a45c92756e V4L/DVB (5949): s5h1409: use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:39 -03:00
Steven Toth 89885558ad V4L/DVB (5948): Adding support for the S5H1409/CX24227 8VSB/QAM demodulator.
This patch adds support for the Samsung S5H1409 demodulator, also known
as the Conexant CX24227 demodulator. 8VSB mode has been tested and QAM
has been implemented based on the spec, although it's untested.

The S5H1409 / CX24227 appears on various Hauppauge boards.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:38 -03:00
Steven Toth f47623a04d V4L/DVB (5947): Adding support for the MT2131 tuner.
This adds support for the Microtune MT2131 tuner. 8VSB mode has been 
tested but QAM support will likely require more register work. Hauppauge 
have not announced any QAM devices using the MT2131 so QAM remains 
undone.

For legal reasons, Microtune allowed us to write a GPL driver providing 
we did not document in significant detail any of the registers. This 
explains the lack of comments or defined on register names.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:35 -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
Andi Drebes 667c7bc0af V4L/DVB (5942): Usb/vp7045.c: ARRAY_SIZE()
This patch replaces an array size calculation done using sizeof
with an invocation of the ARRAY_SIZE macro.

Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:34 -03:00
Andi Drebes af520a3478 V4L/DVB (5941): Ttpci/budget-av.c: ARRAY_SIZE()
This patch replaces an array size calculation done using sizeof
with an invocation of the ARRAY_SIZE macro.

Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:33 -03:00
Adrian Bunk 261efd12fc V4L/DVB (5940): Export v4l2_int_device_{, un}register
This patch fixes the following build error:

<--  snip  -->

...
  MODPOST 2135 modules
make[2]: *** [__modpost] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:30 -03:00
Oliver Endriss 92b3c1ec12 V4L/DVB (5936): tda10023: Remove range check of symbol rate
Remove incorrect range check of symbol rate, spotted by the coverity 
checker and reported by Adrian Bunk.

These range checks are performed by dvb_core now.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:29 -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
Oliver Endriss 36c15f8ee4 V4L/DVB (5934): dvb-ttpci/saa7146: Replace saa7146_i2c_transfer by generic i2c_transfer
Convert av7110_v4l.c to use i2c_transfer() instead of saa7146_i2c_transfer().
Make saa7146_i2c_transfer() static.

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
Hans Verkuil ac247433fe V4L/DVB (5929): Add vp27smpx driver
This device is internal to the Panasonic VP27S tuner and is used to set 
the mono/stereo/bilingual setting of the tuner.

It is used by two Japanese cx23416-based cards.

Signed-off-by: Takahiro Adachi <tadachi@tadachi-net.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:25 -03:00
Hans Verkuil b4c85248af V4L/DVB (5928): tuner: fix TOP values for the Panasonic VP27 tuner.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:24 -03:00
Hans Verkuil 469ba047c0 V4L/DVB (5927): ivtv: set correct crystal frequency of the GVMVPRX cards
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:23 -03:00
Hans Verkuil 6e5eb59102 V4L/DVB (5924): ivtv-fb: initializing the fb should trigger ivtv firmware load
ivtv-fb: initializing the framebuffer should trigger ivtv firmware load

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:23 -03:00
Hans Verkuil c976bc8233 V4L/DVB (5922): ivtv, cx25840: postpone fw load until first use
The firmware is now loaded when the driver is actually used for the first
time. This allows the driver to be compiled in-kernel instead of as a module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:20 -03:00
Hans Verkuil fa8a7529ba V4L/DVB (5921): ivtv: add missing composite input line for ivtv_pci_pg600v2
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:18 -03:00
Hans Verkuil 7bb2938494 V4L/DVB (5919): ivtv: remove dead code
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:14 -03:00
Olivier DANET 54d75ebaa0 V4L/DVB (5914): Add initial support for Dual-DVB-T stick
Add initial support for Dual-DVB-T stick based on DiB7700 and MT2266

- Microtune MT2266 driver.
- Preliminary support for these dual tuner devices :
  - Pinnacle Dual DVB-T diversity
  - Terratec Cinergy DT USB XS diversity
  - Hauppauge Nova TD USB

Signed-off-by: Olivier DANET <odanet@caramail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:14 -03:00
Jesper Juhl 915366da0c V4L/DVB (5912): Clean up duplicate includes in drivers/media/
This patch cleans up duplicate includes in
        drivers/media/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:12 -03:00
Hans Verkuil c6f95d16e0 V4L/DVB (5910): ivtv-fb: improve debug message
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:09 -03:00
Hans Verkuil f38a7982ad V4L/DVB (5909): ivtv: update version to 1.1 to mark ivtv-fb support
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:08 -03:00
Ian Armstrong aaf9fa21b6 V4L/DVB (5908): ivtv-fb: cleanups, prevent fw calls in some cases
Signed-off-by: Ian Armstrong <ian@iarmst.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:08 -03:00
Hans Verkuil 84149a0f70 V4L/DVB (5906): ivtv-fb: replace HZ with msecs_to_jiffies
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:04 -03:00
Hans Verkuil d715e766dd V4L/DVB (5905): ivtv-fb: Use proper ioctl value
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:04 -03:00
Hans Verkuil be383bd312 V4L/DVB (5904): ivtv-fb: cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:03 -03:00
Hans Verkuil 32db775452 V4L/DVB (5902): Add ivtv-fb framebuffer driver.
Add the ivtv-fb framebuffer driver for cx23415 devices (currently
only the Hauppauge PVR-350 cards). This makes it possible to use
the On-Screen Display functionality of these cards, either for menus
during MPEG playback, or as a console or X display.

Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com>
Signed-off-by: Chris Kennedy <c@groovy.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: John P Harvey <john.p.harvey@btinternet.com>
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:02 -03:00
Rasmus Rohde d3c35acf24 V4L/DVB (5897): dtt200u: add support for the Miglia TVMini USB DVB-T adapter
add code for autodetection and firmware download to the Miglia TVMini USB
DVB-T adapter.  After firmware download, the device re-registers using
the WT220U_ZL0353_WARM usb id.

Signed-off-by: Rasmus Rohde <rohde@duff.dk>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:59 -03:00
Trent Piepho 60e3cac47a V4L/DVB (5885): zr36067: Fix problems with module parameters
Add permissions to all the module parameters so they can be queried and set
(when possible) via sysfs.

Add description for the vidmem parameter.

Change the video_nr parameter to an array, so that the video number can be
specified when a user has more than one card.  The driver would try to give
all cards the same number otherwise, which will fail for all cards after the
first.

The default_input option would only allow values of 0 or 1, contrary to the
description.  Allow values up to the number of inputs defined for the card.

Add description of lock_norm's different behavior for 1 and >1.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:58 -03:00
Jean Delvare 18b548ca58 V4L/DVB (5884): zr36067: clean up debug function
Debugging cleanups to the zr36067 driver:

* Use module_param_named() to declare the debug parameter, so we can
  use a single global variable to handle the debug level. This makes
  the driver a bit smaller (by 648 bytes on x86_64), thanks to one
  less level of indirection on every use.

* Change the debug parameter sysfs permissions, so that the debug
  level can be adjusted at runtime, as is done in many other
  media/video drivers.

* The debug level is between 0 and 5, not 0 and 4.

* Move the zr_debug export and dprintk macro definition to a header
  file so that we don't have to define them in each source file.

* Simplify a duplicate test on zr_debug.

Note that zr_debug was subsequently renamed to debug_zr36067 to avoid
possible conflicts with other Zoran device drivers, on a suggestion
by Trent Piepho.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:57 -03:00
Sakari Ailus 63116febb9 V4L/DVB (5883): V4L: Fix a compile warning on non-32-bit machines.
Fix a compile warning on non-32-bit machines in v4l2-int-device.h.
Add internal ioctl interface fallback function for ioctls with one
argument.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:57 -03:00
Hans Verkuil baa05e4b45 V4L/DVB (5881): ivtv: init channel for NTSC_M_JP standard.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:54 -03:00