Commit Graph

2455 Commits

Author SHA1 Message Date
Michael Krufky
3ba71d2194 V4L/DVB (6900): cx23885: enable EZ-QAM mode for Hauppauge WinTV HVR-1800
Add module option 'alt_tuner' disabled by default.

When set to one, the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + tda18271 tuner

When set zero (default), the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + mt2131 tuner

If the tda18271 is used in digital mode, you will not be able to
tune an analog channel at the same time.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:16 -02:00
Michael Krufky
4cd8a7bd65 V4L/DVB (6899): Kconfig: VIDEO_CX23885 must select TUNER_XC2028 if !DVB_FE_CUSTOMIZE
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:16 -02:00
Michael Krufky
07b4a835d4 V4L/DVB (6898): cx23885: add support for Hauppauge WinTV HVR-1500
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:16 -02:00
Chris Pascoe
ef207feddf V4L/DVB (6897): xc2028: ignore HAS_IF during specific S-Code type searches
If we are selecting the S-Code firmware to load by name, then we must mask
off the HAS_IF bit during the search.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:15 -02:00
Hans Verkuil
0e614cd1a5 V4L/DVB (6896): ivtv: add XC2028 support for Club3D cards
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:15 -02:00
Michael Krufky
7972f9880c V4L/DVB (6893): tuner-xc2028: fix xc2028_attach function
xc2028_attach was returning an integer when disabled from the build, where it
should instead be returning NULL.  Declare xc2028_attach as type dvb_frontend *
instead of void *.

The prototype declaration must be marked as extern in the header.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:14 -02:00
Steven Toth
2800b439e0 V4L/DVB (6888): Add Hauppauge tuner type 150 defintion
Add Hauppauge tuner type 150 defintion.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:13 -02:00
Steven Toth
6df9366857 V4L/DVB (6887): Avoid 'unknown model' message for the HVR1500-Q
Avoid 'unknown model' message for the HVR1500-Q

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:13 -02:00
Steven Toth
e12671cf0c V4L/DVB (6886): xc5000: Cleanups of types, result codes etc
This translates much of the xceive coding style, adds
some result codes and generally cleans up whitespace
and function arguments.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:12 -02:00
Steven Toth
d1987d55a1 V4L/DVB (6885): Add support for the Hauppauge HVR1500Q
The express card ATSC/QAM tuner.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:12 -02:00
Michael Krufky
bc3e5c7fc2 V4L/DVB (6881): include struct analog_demod_ops directly inside struct dvb_frontend
Rather than using a pointer, include struct analog_demod_ops directly
inside struct dvb_frontend.  This will allow us to use dvb_attach in
the future, along with removing the need to check the ops structure
before having to check the pointer to the method being called.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:11 -02:00
Michael Krufky
9ad89f0104 V4L/DVB (6880): kill tuner-driver.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:10 -02:00
Michael Krufky
807ffe8df2 V4L/DVB (6879): move struct analog_tuner_ops into dvb_frontend.h
struct analog_tuner_ops no longer has any dependencies specific
to v4l2, so we can move this into dvb_frontend.h with the rest
of the tuning structures.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:10 -02:00
Michael Krufky
b624aa86cd V4L/DVB (6878): tuner: remove extraneous variable declaration
tuner_count is already declared as "extern unsigned const int"
in <media/tuner-types.h>  -- Remove it from tuner-driver.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:10 -02:00
Michael Krufky
d536c9df41 V4L/DVB (6875): tuner-xc2028: ATSC requires 1.75 MHz tuning offset
In my testing yesterday, I was using a scan file tailored specifically
for a unique test situation -- As it turns out, this scan file was bad,
and I will use the one included inside dvb-apps for testing for now on.

I've tested with other ATSC tuners just to confirm, using:

us-ATSC-center-frequencies-8VSB

Anyhow, as it turns out, the tuner-xc2028 *does* require a tuning offset
for ATSC.  Even though the linux-dvb api passes in center frequencies
from userspace, apparantly the xceive firmware is already factoring in
the tuning offset to center.

In order to make the device function using the same scan files /
channels.conf configurations as other atsc devices, we must offset by
1.75 MHz.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:09 -02:00
Hans Verkuil
6fb377f85c V4L/DVB (6869): cs5345: new i2c driver
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:08 -02:00
Hans Verkuil
9fad368b6d V4L/DVB (6867): saa7127: CodingStyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:06 -02:00
Hans Verkuil
d52c7385ec V4L/DVB (6866): msp3400: CodingStyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:06 -02:00
Hans Verkuil
35df38c015 V4L/DVB (6865): vp27smpx: CodingStyle cleanup
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:06 -02:00
Hans Verkuil
79f998a71b V4L/DVB (6864): upd64031a: CodingStyle cleanup
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:05 -02:00
Hans Verkuil
8c9fc8de54 V4L/DVB (6863): upd64083: CodingStyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:05 -02:00
Hans Verkuil
f69d419a0b V4L/DVB (6862): ivtv: really remove i2c legacy support from drivers that no longer need it
For some reason the include header wasn't changed from v4l2-i2c-drv-legacy.h
to v4l2-i2c-drv.h in the previous patch. This is now corrected.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:05 -02:00
Hans Verkuil
ea48c13ad0 V4L/DVB (6861): cx2341x: command argument should be u32 instead of int
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:04 -02:00
Hans Verkuil
f19a73d620 V4L/DVB (6860): tveeprom: CodingStyle cleanup
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:04 -02:00
Hans Verkuil
5412c8204f V4L/DVB (6859): tveeprom: add support for Hauppauge models 74xxx
Thanks to Steve Toth from Hauppauge with providing me with the information
needed to add support for these models.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:04 -02:00
Mauro Carvalho Chehab
3ac510e609 V4L/DVB (6858): Fix offset for ATSC
ATSC works with offset=0

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:03 -02:00
Chris Pascoe
5e3c5967da V4L/DVB (6857): cx23885: correctly join I2C writes and reads from same address
When an I2C message specifies a write then a read from the same I2C address,
we need to tell the chip to not release the bus between the message parts.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:03 -02:00
Chris Pascoe
3dfefc50ff V4L/DVB (6855): xc2028: select DTV78 firmware if tuning 7MHz VHF / 8MHz UHF
It seems that the DTV78 firmware is intended for use in locations where
VHF channels have 7MHz bandwidth and UHF channels have 8MHz bandwidth.
If we switch to DTV78 firmware when we detect this condition, we can
avoid firmware reloads when switching between VHF and UHF transponders.

Place the state for this in the control structure so that card drivers
can hint to us to use DTV78 firmware from the first tuning attempt.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:01 -02:00
Chris Pascoe
897b842296 V4L/DVB (6854): xc2028: be more specific about when applying offset for 7MHz channels
We have been inserting a mystery 500kHz offset for tuning 7MHz channels,
however some experimentation reveals it is only needed under certain
conditions with specific firmware combinations.  Document these and only
apply the offset when we know it is required.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:01 -02:00
Chris Pascoe
9ca01e780f V4L/DVB (6853): xc2028: check HAS_IF flag against table
When searching for the right S-Code table to load, check the HAS_IF flag
against the firmware we are checking instead of against the the "type"
requested.  We already ignore the scode type requested if the caller passed
an int_freq; this makes the search by frequency consistent with that behaviour.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:00 -02:00
Chris Pascoe
ad35ce9e3e V4L/DVB (6852): xc2028: s-code offset should not modify internal control structure
Don't modify the control structure that was provided at attach when applying
an offset to the S-Code, otherwise it will be incorrect on subsequent tunes.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:59 -02:00
Chris Pascoe
e026268870 V4L/DVB (6851): xc2028: include int_freq in firmware version display
Add "int_freq" to the debugging output when selecting firmware and the
HAS_IF flag when dumping firmware during load.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:59 -02:00
Aurelien Jarno
aec2aef267 V4L/DVB (em28xx): Add support for Pinnacle Dazzle DVC 100
The patch below adds the "Pinnacle Dazzle DVC 100" to the list of
cards supported by the em28xx driver. As the configuration is the same
as the DVC 90 one, it simply adds a new USB ID to the list of devices
supported by the DVC 90 configuration.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:58 -02:00
Akinobu Mita
9e7e85ebae V4L/DVB (6848): bttv: check pci_register_driver() error
Check pci_register_driver() error in module_init.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:57 -02:00
Michael Krufky
71021d2601 V4L/DVB (6846): tda9887: initialize mode to T_STANDBY at startup
Ensure that the audio is muted at attach-time

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:57 -02:00
Michael Krufky
dabe61565e V4L/DVB (6845): tuner: remove unneeded #includes from tuner-driver.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:56 -02:00
Michael Krufky
f7f427e4cc V4L/DVB (6844): tuner: remove struct tuner from tuner-driver.h
struct tuner holds state for tuner-core, only -- move it into tuner-core.c

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:56 -02:00
Michael Krufky
790ba18ec7 V4L/DVB (6843): tda9887: use printk macros from tuner-i2c.h
replace tda9887_info and tda9887_dbg printk macros with
tuner_info and tuner_dbg, defined in tuner-i2c.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:56 -02:00
Michael Krufky
8ca4083b50 V4L/DVB (6842): tda9887: remove dependency on struct tuner
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:55 -02:00
Michael Krufky
91c9d4a167 V4L/DVB (6841): tda9887: maintain private state independent of struct tuner
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:55 -02:00
Michael Krufky
710401b837 V4L/DVB (6840): tuner: convert tda9887 to use TUNER_SET_CONFIG
Use TUNER_SET_CONFIG to set configuration in tda9887's private state
structure, rather than storing tda9887-specific configuration within
struct tuner.

Update handling of TUNER_SET_CONFIG by tuner-core, to call
&t->fe.ops.analog_demod_ops rather than &t->fe.ops.tuner_ops

analog_demod_ops.set_config passes the request to tuner_ops.set_config,
so this does not break other drivers.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:54 -02:00
Michael Krufky
f1c9a28100 V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:53 -02:00
Michael Krufky
daae58956b V4L/DVB (6838): tda9887: remove references to struct tuner from printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:52 -02:00
Michael Krufky
35e420357b V4L/DVB (6837): Convert cx88_input.audioroute to a bitfield
Prevent us from wasting some extra bytes of memory

Thanks to Trent Piepho, for pointing this out.


Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:50 -02:00
Mauro Carvalho Chehab
d8f69971d8 V4L/DVB (6836): Fix CodingStyle troubles caused by the previous cx88 commits
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:50 -02:00
Frej Drejhammar
36e05a4475 V4L/DVB (6834): cx88-video: Enable selection of the WM8775 for cx88 cards
The auto selection of pertinent helper chips (VIDEO_HELPER_CHIPS_AUTO)
should select the wm8775 driver, which is used by at least one
Conexant 2388x based card (Hauppauge HVR-1300), if VIDEO_CX88 is
selected.

Signed-off-by: Frej Drejhammar <frej.drejhammar@gmail.com>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:49 -02:00
Ricardo Cerqueira
66e6fbdf99 V4L/DVB (6833): Don't limit cx88 audio routing to blackbird boards
All cx2388 boards need the line-in audio to be routed from an external ADC
(refered to as "ADC mode" in the spec sheet), since the chip is uncapable
of dealing with baseband audio directly.
So... this patch enables normal mode when using the tuner (TV or Radio), and
enables ADC mode with any other source. It'll probably only work with boards
that have supported ADCs (such as the Wolfson wm9775)

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:49 -02:00
Michael Krufky
6a0bc9a016 V4L/DVB (6832): cx88-blackbird: don't mute audio when stopping the codec
We should not mute the audio input when we stop the codec,
because it will interfere with the live uncompressed stream.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:49 -02:00
Ricardo Cerqueira
7b27d45bb5 V4L/DVB (6831): Audio routes fix for blackbird boards with the wm8775 ADC
Fix lack of audio on the MPEG-2 stream of wm8775 based blackbirds.

The wm8775 module initializes the audio input at "route 2", which doesn't
hold true for all boards. The HVR-1300, for example, uses route 1 for
tuner audio, and route 2 for baseband. So we must route the audio to the
proper input depending on what video input is being used.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:48 -02:00
Jelle Foks
4423a9a339 V4L/DVB (6830): cx88-blackbird: remove unnecessary encoder unmute
Remove the unnecessary BLACKBIRD_UNMUTE calls to the mpeg encoder in
cx88-blackbird.c

The encoder is never muted, hence unmuting should then only be necessary
once after hardware initialization.

I tested this from warm boots and cold boots (with long power down time
to ensure the sram in the chip is emptied), and found that after the
firmware upload the encoder is apparently not muted, making the unmutes
unnecessary.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:48 -02:00
Jelle Foks
e21a5c68de V4L/DVB (6829): cx88-blackbird: remove unnecessary msleep()'s
Remove the unnecessary msleep()'s in cx88-blackbird.c

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:48 -02:00
Jelle Foks
f9e54e0c84 V4L/DVB (6828): cx88-blackbird: audio improvements
This patch should fix the 'muted audio' and 'raspy audio' problem for
mpeg2 streams out of cx88-blackbird devices.

Especially mythtv users would find that the audio would often sound bad
(aliased, or 'raspy'), mainly related to channel changes, many (all?)
other users would find that there was no audio at all in the mpeg data
from the encoder chip, unless the audio was manually unmuted.

The patch includes the following modifications:

Don't actually start the mpeg2 encoder until the device is read from
by the application.

Wait until the audio is stable for at least 400ms before starting the
mpeg encoder.

Mute/Unmute the audio when starting/stopping the mpeg encoder.

Stop the mpeg encoder when changing parameters and when changing tuner
frequency.

Add a variable 'mpeg_active' to struct cx8802_dev to allow tracking of
whether or not the mpeg2 encoder is active.

Load the firmware on cx88-blackbird driver load.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:47 -02:00
Mauro Carvalho Chehab
4bfae52b69 V4L/DVB (6827): Auto-selects D2633 for ATSC
ATSC standard-specific firmware is D2633 on both v2.5 and v2.7. Better to
auto-select this firmware, overriding ctrl.d2633.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:47 -02:00
Michael Krufky
2b03238a79 V4L/DVB (6821): s5h1409: fix IF frequency configuration
On the s5h1409 demod, the IF frequency for VSB is limited to 44 / 5.38 MHz.

Hardcode VSB IF frequency within the driver to 44 / 5.38 MHz.
QAM IF frequency remains configurable via attach-time configuration.

Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:44 -02:00
Mauro Carvalho Chehab
6594ad829a V4L/DVB (6817): Cleanup kernel thread and provide overrun detection
The previous code were a little bit messy. Cleans it up.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:42 -02:00
Mauro Carvalho Chehab
55862ac9b2 V4L/DVB (6816): Add proper locking for buffer filling
Avoids de-alocating buffers before finishing to fill a buffer

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:39 -02:00
Mauro Carvalho Chehab
6c2f990105 V4L/DVB (6815): Fix vivi internal debug messages
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:38 -02:00
Daniel Walker
1fe934ddfc V4L/DVB (6812): media: video: usbvision: remove ctrlUrbLock
The ctrlUrbLock has all it's users commented out, and so it's unused.  This
patch removes it.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:38 -02:00
Andrew Morton
544e617533 V4L/DVB (6811): media-video-usbvision-add-mutex_unlock-to-error-paths-fix
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:37 -02:00
Daniel Walker
0991112c1c V4L/DVB (6810): media: video: usbvision: add mutex_unlock() to error paths
There are a few error paths which don't unlock the usbvision->lock.

So I've added mutex_unlock() calls to fix those paths.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:36 -02:00
Andrew Morton
7cd355e7c0 V4L/DVB (6809): git-dvb: drivers/media/video/et61x251/et61x251_core.c: fix warnings
drivers/media/video/et61x251/et61x251_core.c:390: warning: 'et61x251_i2c_read' defined but not used
drivers/media/video/et61x251/et61x251_core.c:397: warning: 'et61x251_i2c_write' defined but not used

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:35 -02:00
Mauro Carvalho Chehab
8996b3f3cf V4L/DVB (6807): fix debug enable
The changes at vivi_template make debug option to not work properly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:33 -02:00
Mauro Carvalho Chehab
784c668b24 V4L/DVB (6806): Allow emulating changes of video std by vivi
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:33 -02:00
Mauro Carvalho Chehab
63736784f7 V4L/DVB (6805): video std is a bitmask. Better to print in hexa
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:32 -02:00
Mauro Carvalho Chehab
225ba90088 V4L/DVB (6804): __videobuf_read_start is static
Thanks to Jean Delvare <khali@linux-fr.org> for pointing this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:32 -02:00
Michael Krufky
e435f95ce6 V4L/DVB (6801): tda18271: pass i2c gate configuration into tda18271_attach()
If we pass TDA18271_GATE_DIGITAL into tda18271_attach(), it will always try to
use the digital demodulator's i2c gate.

If we pass TDA18271_GATE_ANALOG into tda18271_attach(), it will always try to
use the analog demodulator's i2c gate.

If we pass TDA18271_GATE_AUTO into tda18271_attach(), it will try to use the
analog demodulator's i2c gate when tuning in analog mode, and it will try to
use the digital demodulator's i2c gate when tuning in digital mode.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:32 -02:00
Mauro Carvalho Chehab
f6e90a66cd V4L/DVB (6795): Add EXPORT_SYMBOL_GPL to the saa7134 video control routines
Those newer functions are used by saa7134-empress. Adds export for them:
+EXPORT_SYMBOL_GPL(saa7134_g_ctrl);
+EXPORT_SYMBOL_GPL(saa7134_s_ctrl);
+EXPORT_SYMBOL_GPL(saa7134_queryctrl);

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:31 -02:00
Mauro Carvalho Chehab
2c10e8a898 V4L/DVB (6793): Convert saa7134-empress to video_ioctl2
saa7134 were converted to video_ioctl2, but saa7134_empress weren't. This broke
saa7134-empress, since it were dependent of saa7134_common_ioctl.

With the conversion, the module had a size decrease of 436 bytes on x86_64:

   text    data     bss     dec     hex filename
   5196    4912       4   10112    2780 old/saa7134-empress.ko
   4760    4912       4    9676    25cc new/saa7134-empress.ko

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:31 -02:00
Mauro Carvalho Chehab
a9622391ac V4L/DVB (6792): Fix VBI support
VBI were broken, since there weren't any function handlers for it. This patch
fixes it, by removing the vbi_template, using, instead video_template.

This also saves some space at the data segment.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:30 -02:00
Mauro Carvalho Chehab
bfb12e38a8 V4L/DVB (6791): Rename all vidioc_ to saa7134_
Some functions are used also by saa7134-empress, and need to be exported. To
avoid namespace confusion, rename all of them to saa7134_

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:30 -02:00
Michael Krufky
bd2b19a78c V4L/DVB (6789): tuner: use char *name instead of 128 byte fixed array for demod info
Don't waste 128 bytes of memory for a name that might not actually need it.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:30 -02:00
Michael Krufky
2dcf84b36c V4L/DVB (6788): tda8290: fix codingstyle, open brace following struct on the same line
Fix codingstyle issue discovered after using new checkpatch.pl

 ERROR: open brace '{' following struct go on the same line
 396: FILE: linux/drivers/media/video/tda8290.h:24:
+struct tda829x_config
+{

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:29 -02:00
Michael Krufky
864a6b813a V4L/DVB (6787): tuner: bug-fix: default mode was set to bogus value
Fix type inconsistency in t->mode value, causing the following:

tuner' 1-0043: freq set: unknown mode: 0x0004!

(only visible with tuner debug enabled)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:29 -02:00
Michael Krufky
a55db8cd7f V4L/DVB (6786): tuner: add struct analog_demod_info to struct analog_tuner_ops
Store the analog demodulator name in fe.ops.analog_demod_ops.info.name

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:28 -02:00
Michael Krufky
ab1660503a V4L/DVB (6785): tda8290: remove dependency on struct tuner
- remove dependency of tda8290 module on struct tuner
- move tuner_foo printk macros from tuner-driver.h into tuner-core.c
- clean up #includes of tuner-i2c.h / tuner-driver.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:28 -02:00
Michael Krufky
fa746aee33 V4L/DVB (6784): tda8290: prevent possible memory leak
Always call tda829x_release if tda829x_attach fails for a reason
other than failure to allocate memory for private structure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:27 -02:00
Michael Krufky
c7919d520f V4L/DVB (6783): tuner: combine set_tv_freq and set_radio_freq into a single set_params method
We can tell whether we are tuning television or radio by testing for
struct analog_parameters *params->mode == V4L2_TUNER_RADIO

There is no longer any need for separate set_tv_freq and
set_radio_freq functions in the analog tuner demodulator modules.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:27 -02:00
Michael Krufky
6881647cce V4L/DVB (6782): tda8290: access frontend structure directly, where possible
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:27 -02:00
Richard Knutsson
14d5deba27 V4L/DVB (6776): ivtv: Some general fixes
Fix "warning: Using plain integer as NULL pointer".
Convert 'x < y ? x : y' to use min() instead.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:26 -02:00
Mike Isely
d130fa8a05 V4L/DVB (6773): pvrusb2: rework device descriptor layout
The pvrusb2 driver tries to keep all device specific attributes in a
single data structure in one source file.  This change further cleans
up how that table is set up.  We now try to group everything together
for each specific device, and the number of symbols exported from this
module has now been reduced to a single global.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:26 -02:00
Mike Isely
066bba2d1c V4L/DVB (6772): pvrusb2: Remove obsolete (and misleading) comment
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:26 -02:00
Mike Isely
577e4023df V4L/DVB (6771): pvrusb2: Remove old obsolete CONFIG flags for pvrusb2 driver
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:25 -02:00
Mike Isely
5edfded481 V4L/DVB (6770): pvrusb2: Device CONFIG flags for OnAir device support
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:25 -02:00
Mike Isely
4542783c37 V4L/DVB (6769): pvrusb2: Implement experimental support for OnAir Creator and USB2 devices
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:25 -02:00
Mike Isely
787f5abb95 V4L/DVB (6768): pvrusb2: Mark Gotview hardware as having a cx2584x part
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:25 -02:00
Hans Verkuil
2a2bfbff3d V4L/DVB (6766): ivtv: remove i2c legacy support from drivers that no longer need it
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil
d900920120 V4L/DVB (6765): ivtv: convert to bus-based i2c API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil
9d1a16a4fc V4L/DVB (6764): ivtv: select VIDEO_IR in Kconfig
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil
e08323f099 V4L/DVB (6763): ivtv: add AVerMedia EZMaker PCI Deluxe support
Add support for the AVerMedia EZMaker PCI Deluxe and update the ivtv cardlist.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:23 -02:00
Hans Verkuil
0170a48274 V4L/DVB (6762): ivtv: update version number to 1.2
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab
e2c77314c9 V4L/DVB (6759): CodingStyle fixes
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab
543323bcf4 V4L/DVB (6758): Miscelaneous cleanups
Manually fixed all pertinent checkpatch.pl errors inside the source code.

Also removed some unused code at the driver and a few minor cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab
025341d4f0 V4L/DVB (6755): Avoid troubles when using multiple devices
mv_count is a counter used to move the vertical bars. Before this patch, it
where a static var. This works fine for just one device. However, when using
multiple devices, every device would increment it.

This patch moves it to its correct place: struct vivi_dev. So, now, each device
has its own data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab
55712ff7e0 V4L/DVB (6754): Allow vivi to open multiple video devices
Now, it is possible to open multiple vivi devices, by using n_devs parameter.
This makes vivi driver closer to a real one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:21 -02:00
Mauro Carvalho Chehab
f905c442e5 V4L/DVB (6753): Fix vivi to support non-zero minor node
There were a trouble at vivi driver when using non-zero inodes. This where due
to not properly preserving the minor inode after calling video_register. Since
this driver is a reference for newer drivers, and it is possible to have more
than one video device inside the machine, this patch makes vivi to dynamically
allocate video_device struct.

Thanks to Gregor Jasny <jasny@vidsoft.de> for pointing the issue.

Also, this patch removes a very anoying (but useless) message of not having a
proper release call.

CC: Gregor Jasny <jasny@vidsoft.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:21 -02:00
Albert Graham
d2761f2271 V4L/DVB (6752): saa7134: Enable remote control support for Avermedia M102
This patch enabled the IR remote control for the Avermedia M102 (card=110),
which appears to be the same IR as the already supported device on the
Avermedia AVerTV GO 007 FM (card=57) model, the code is two one liners which
enable the IR for this device (subsystem: 1461:f31e)

Signed-off-by: Albert Graham <agraham@g-b.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:21 -02:00
Andrew Morton
d172b8bdab V4L/DVB (6749): v4l-nopage-fix
dont just copy-and-paste stuff.
(compile-tested this time)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:20 -02:00
Nick Piggin
105354a0f0 V4L/DVB (6748): Subject: v4l: nopage
Convert v4l from nopage to fault.
Remove redundant vma range checks.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:18 -02:00
Hans Verkuil
4a56eb3f53 V4L/DVB (6743): cx25840: fix endianness inconsistency
cx25840_read4 reads a little-endian 32-bit value whereas cx25840_write4 writes
the 32-bit value as big-endian. Convert write4 to use little-endian as well
(that's the correct endianness).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil
6b1e56763b V4L/DVB (6742): ivtv: fix incorrect debug message
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil
737bd410e7 V4L/DVB (6741): cx2341x: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil
574dec611f V4L/DVB (6740): tlv320aic23b: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil
4c05de9c97 V4L/DVB (6739): cs53l32a: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:16 -02:00
Hans Verkuil
099b8e7361 V4L/DVB (6738): wm8739: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:16 -02:00
Hans Verkuil
842441d42d V4L/DVB (6737): wm8775: codingstyle cleanup
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:16 -02:00
Mauro Carvalho Chehab
8c85454a59 V4L/DVB (6736): Fix some errors at the video_ioctl2 conversion
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:15 -02:00
Mauro Carvalho Chehab
90bdc14533 V4L/DVB (6735): Reorder functions to make easier to compare with the previous code
After this patch, the order of the functions will be the same as before the
patch converting the driver to user video_ioctl2. This makes easier to diff
between the previous version and the newer one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:15 -02:00
Douglas Schilling Landgraf
8f61ae2f4f V4L/DVB (6734): Converted saa7134-video to use video_ioctl2
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:15 -02:00
Richard Knutsson
e1ba33df0c V4L/DVB (6731): ivtv: Remove a invalid shadow-variable
Remove the shadowing 'struct v4l2_chip_ident *chip', since it already exists
and makes the if-statement useless.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:14 -02:00
Ian Armstrong
2b057e8dc6 V4L/DVB (6719): ivtv: ivtv-yuv clean-up + source cropping bug-fix
ivtv-yuv code clean up & reformat. Includes minor changes to some debug lines.

Also fixes a bug found during the reformatting, which would cause the
incorrect amount of yuv data to be sent to the card if source cropping
coordinates were used.

Apart from the bug-fix, there should be no functional difference to the
previous version.

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>
2008-01-25 19:03:11 -02:00
Ian Armstrong
368f080b68 V4L/DVB (6718): ivtv: ivtv yuv format description correction
The driver was incorrectly reporting that it supported YUV 4:2:2 output, when
it is actually YUV 4:2:0. Though I believe the hardware can be pushed to
4:2:2, we don't currently support that.

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>
2008-01-25 19:03:11 -02:00
Ian Armstrong
77aded6ba5 V4L/DVB (6717): ivtv: Initial merge of video48 yuv handling into the IVTV_IOC_DMA_FRAME framework
Previously, all yuv data written to /dev/video48 had only basic support with
no double buffering to avoid display tearing.

With this patch, yuv frames written to video48 are now handled by the existing
IVTV_IOC_DMA_FRAME framework. As such, the frames are hardware buffered to
avoid tearing, and honour scaling mode & field order options. Unlike the
proprietary IVTV_IOC_DMA_FRAME ioctl, all parameters are controlled by the
V4L2 API.

Due to mpeg & yuv output restrictions being different, their V4L2 output
controls have been separated. To control the yuv output, the V4L2 calls must
be done via video48.

If the ivtvfb module is loaded, there will be one side effect to this merge.
The yuv output window will be constrained to the visible framebuffer area. In
the event that a virtual framebuffer size is being used, the limit to the
output size will be the virtual dimensions, but only the portion that falls
within the currently visible area of the framebuffer will be shown.

Like the IVTV_IOC_DMA_FRAME ioctl, the supplied frames must be padded to 720
pixels wide. However the height must only be padded up the nearest multiple
of 32. This would mean an image of 102 lines must be padded to 128. As long
as the true source image size is given, the padding will not be visible in
the final output.

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>
2008-01-25 19:03:11 -02:00
Ian Armstrong
3b5c1c8e71 V4L/DVB (6716): ivtv: yuv interlace mode change
Interlace mode selection code moved into the frame setup phase, so it's now
run before the frame is loaded into a hardware buffer. Given that it can
affect how a new frame is displayed, it was a bit stupid running it after the
frame was already visible.

A few stray interlace related variables which were linked to individual frames
have now been moved into the yuv_frame_info struct. This means that all
variables linked to a specific frame are in the same place & not scattered.

Minor code reformatting in areas touched by the above changes.

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>
2008-01-25 19:03:10 -02:00
Ian Armstrong
406c8b0ff0 V4L/DVB (6715): ivtv: Remove unnecessary register update
To reduce the number of display register accesses, the yuv code keeps track of
the current video settings. Should there be a change in any single parameter,
it will update the associated display registers to ensure everything is
displayed correctly.

The existing check also looks at the field order for the video. This is not
required, since field reversal does not require any display register changes.

This patch removes the field order from the check.

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>
2008-01-25 19:03:10 -02:00
Ian Armstrong
166983cdfb V4L/DVB (6714): ivtv: yuv frame parameter fix
Inadvertently missed a line when converting code to new hardware buffering
method. In some circumstances, this would lead to a frame being displayed
using parameters belonging to another frame.

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>
2008-01-25 19:03:10 -02:00
Ian Armstrong
a3e5f5e2df V4L/DVB (6713): ivtv: ivtv_yuv_prep_frame breakup and yuv hardware buffer changes
ivtv_yuv_prep_frame is split in smaller code blocks.

Modified yuv buffer handling on the PVR350 itself. We now cycle through all 8
hardware buffers.

With this patch in place, driver behaviour should remain unchanged from the
existing release.

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>
2008-01-25 19:03:10 -02:00
Ian Armstrong
c240ad00af V4L/DVB (6712): ivtv: ivtv yuv stream handling change
Currently the yuv output stream buffer is divided into blocks whose size
depend on the broadcast standard selected during the driver init phase.
However, the standard can be changed after the init phase. This effectively
breaks the yuv output stream handler, since it relies on the different yuv
planes being block aligned.

This patch changes the setup, so that the block size is always the same. The
decoder dma function has been modified to cope with the fact that the second
yuv plane may no longer be block aligned. The start of the yuv frame must
still be at the beginning of a block, so the stream write function has also
been modified to ensure this is always true.

Also, the stream write function will now initiate a yuv dma transfer as soon
as a full frame is ready. It will not wait until the current write request
has completed, or the stream buffer becomes full.

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>
2008-01-25 19:03:09 -02:00
Mike Isely
9de982d311 V4L/DVB (6710): pvrusb2: Recognize ATSC video standard bit values
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:09 -02:00
Mike Isely
3d290bdb28 V4L/DVB (6709): pvrusb2: minor rework for default video standard handling
pvrusb2: When a per-device-type default video standard is declared,
handle it in such a way that it can be correctly and unambiguously
reported in the system log.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:08 -02:00
Mike Isely
4ca7f70928 V4L/DVB (6708): pvrusb2: Expand comment in device attributes description
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:07 -02:00
Mike Isely
e802c14b91 V4L/DVB (6707): pvrusb2: Remove use of volatile in pipeline control state machine
pvrusb2: Eliminate use of volatile in pipeline control state
variables.  These were all cases of paranoia; upon further review the
overall mechanism employed here should not require use of volatile.
This had originally been done out of paranoia, and I have since been
convinced that the paranoia is not required.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:07 -02:00
Mike Isely
26e33048aa V4L/DVB (6706): pvrusb2: Remove use of volatile in command sequencer
pvrusb2: Remove use of volatile for command sequencer; these variables
are set by interrupt-context code and we check their state in such a
manner that there should be no race conditions.  This had originally
been done out of paranoia, and I have since been convinced that the
paranoia is not required.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:07 -02:00
Mike Isely
6a54025496 V4L/DVB (6705): pvrusb2: Implement default standard selection based on device type
This adds a default video standard setting to the pvr2_device_desc
structure for describing device types.  With this change it is
possible to set a reasonable default standard based on device type.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Roel Kluin
ea2562d94f V4L/DVB (6703): pvrusb2: Change division to bit-or for tveeprom standards
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Michael Krufky
482cb9a75b V4L/DVB (6702): pvrusb2: fix typo in comments
Firmware file name(s) for 24xxx devices

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Mike Isely
9e2e3aeb2d V4L/DVB (6701): pvrusb2: Enable support for "GOTVIEW USB2.0 DVD2" hardware
This changeset allows the pvrusb2 driver to operate a new device type
("GOTVIEW USB2.0 DVD2").  Changes amount to defining a new routing
scheme for the device and adding appropriate table entries into
pvrusb2-devattr.c.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Mike Isely
65bd80fe18 V4L/DVB (6700): pvrusb2: Soften the crashed encoder warning message
The pvrusb2 driver has been successfully recovering from a crashed
encoder now for over 2 years.  I think it's time to reduce the
perceived severity of the warning message.  While I'd still very much
like to stop these crashes, the recovery logic is solid enough that
the problem is effectively benign.  No point in panicing the users
over it.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:05 -02:00
Mike Isely
056d1a8992 V4L/DVB (6699): pvrusb2: Use of virtual IR chip is a device-specific attribute
For Hauppauge 24xxx devices, the IR receiver is a custom piece of
logic that is very specific to the device.  The pvrusb2 driver can
virtualize this to make it look like a more normal IR receiver found
in other Hauppauge devices.  The decision of whether or not to enable
this virtualization however is a device-specific attribute, thus this
changeset.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:05 -02:00
Mike Isely
f5174af201 V4L/DVB (6698): pvrusb2: Implement signal routing schemes
The exact routing of video and audio signals within a device is a
device-specific attribute.  Hauppauge devices do it one way; other
types of device may route things differently.  Unfortunately it is
rather impractical to define chip-specific routing at the device
attribute level, so instead what happens here is that "schemes" are
defined.  Each chip level interface implements its part of a given
scheme and the scheme as a whole is made into a device specific
attribute controlled via a table entry in pvrusb2-devattr.c.  The only
scheme defined here is for Hauppauge devices, but clearly this opens
the door for other possibilities to follow.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:05 -02:00
Mike Isely
aaf7884db3 V4L/DVB (6697): pvrusb2: Existence of Hauppauge ROM is a device-specific attribute
Arrange so that the pvrusb2 driver can optionally work without a
Hauppauge ROM being present - which is fairly important for devices
that happen to not come from Hauppauge.  The expected existence of a
Hauppauge ROM is now a device attribute.  The tuner type is now also a
device attribute, which is consulted if there is no ROM.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:03 -02:00
Mike Isely
56dcbfa0d5 V4L/DVB (6696): pvrusb2: Miscellaneous tweaks for controlling tuner type and video standard
Correctly mark when a tuner type is set.  Report more faithfully
information about known supported device video standards.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:03 -02:00
Mike Isely
78a47101ac V4L/DVB (6695): pvrusb2: Implement functions to pass descriptive hardware info
Implement additional pvrusb2 device info table entries for a device
identifier and a device description.  Export this information via the
driver's internal API.  Make this information available via the sysfs
driver interface.  Also propagate this information into the v4l2
capability structure.  An app can now retrieve and report a
descriptive string about the particular type of hardware device it is
operating.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely
f66fbd71f2 V4L/DVB (6694): pvrusb2: Remove obsolete global hardware type enumeration
Device-specific driver behavior is now defined by generic device
characteristics rather than by specific device model information.
With this change, the hardware type field can go away, thus this
change.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely
f8bcec6d18 V4L/DVB (6693): pvrusb2: Add pvrusb2-devattr.o to driver build
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely
989eb154ea V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single place
The pvrusb2 driver currently supports two variants of the Hauppauge
PVR USB2.  However there are other hardware types potentially
supportable, but the driver at the moment is not structured to make it
easy to describe these minor variations.  This changeset is the first
set of changes to make such additional device support possible.
Device attributes are held in several tables all contained within
pvrusb2-devattr.c; all other device-specific driver behavior now
derives from these tables.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely
681c739944 V4L/DVB (6691): pvrusb2: Rework pipeline state control
This is a new implementation for video pipeline control within the
pvrusb2 driver.  Actual start/stop of the pipeline is moved to the
driver's kernel thread.  Pipeline stages are controlled autonomously
based on surrounding pipeline or application control state.  Kernel
thread management is also cleaned up and moved into the internal
control structure of the driver, solving a set up / tear down race
along the way.  Better failure recovery is implemented with this new
control strategy.  Also with this change comes better control of the
cx23416 encoder, building on additional information learned about the
peculiarities of controlling this part (this information was the
original trigger for this rework).  With this change, overall encoder
stability should be considerably improved.  Yes, this is a large
change for this driver, but due to the nature of the feature being
worked on, the changes are fairly pervasive and would be difficult to
break into smaller pieces with any semblence of step-wise stability.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:01 -02:00
Brandon Philips
493977f016 V4L/DVB (6688): V4L: fix copy and paste error in dprintk for videobuf-vmalloc.c
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:01 -02:00
Hermann Pitton
cc76466b31 V4L/DVB (6687): saa7134: add mute support for radio/analog-in on MD9717 and MD7134
Currently the saa7134 chips only have mute support for the TV input.

Cards with mute from external audio muxes are already fine on the
other inputs and some recent tuners mute at least the radio on exit.
But these mostly hybrid tuners are not fully backward compatible, since
they must power down and mute regardless.

For some included above, the MD7134 knows several, to switch on mute/automute
to the TV input is functional and backward compatible for the applications,
except that the tuners with tda9887 always mute on exit.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:01 -02:00
Mauro Carvalho Chehab
5c15648a42 V4L/DVB (6683): Fix DVB compatibility
DVB-S is not supported. Also, there are some QAM6 firmwares for xc3028, but it
is reported that this doesn't work fine.

Thanks to Manu Abraham, Michael Krufky and Patrick Boettcher for their
insights.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:00 -02:00
Michael Krufky
63c254805e V4L/DVB (6679): tda8290: force tuner init after attach
Force tuner init after attach, then sleep until use.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:59 -02:00
Mauro Carvalho Chehab
63806eeb61 V4L/DVB (6677): Fix xc2028 driver for non OFDM
A previous patch implemented support for non-OFDM digital TV. However, the
previous bandwidth ofdm parameter were left at the code by mistake.

Thanks to Michael Krufky and Patrick Boettcher for noticing this mistake.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:58 -02:00
Mauro Carvalho Chehab
66c2d53db2 V4L/DVB (6676): Improve s-code support
s-code tables are related to IF frequency used for video demodulation.

The s-codes for analog are automatically loaded, according with video standard.
However, for digital, they will depend on the IF of the demoduler chip. IF of
the demoduler.

Before this patch, only a few IF's where possible to use. This patch allows
selecting any IF defined at firmware file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:58 -02:00
Mauro Carvalho Chehab
b542dfdc9f V4L/DVB (6675): Allow selecting the proper SCode table for DTV
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:57 -02:00
Mauro Carvalho Chehab
d04aa54a27 V4L/DVB (6674): Add support for other DTV types
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:56 -02:00
Mauro Carvalho Chehab
d74cb25e42 V4L/DVB (6672): Add support for radio
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:54 -02:00
Mauro Carvalho Chehab
00deff1a07 V4L/DVB (6671): Avoids checking digital/analog at check_firmware
Since check_firmware is called via analog or digital set freq routines, move
type selection to those routines. This avoids having several if's at the code,
and simplifies the source code.

A sideback effect is that implementing radio and other dvb types will become
simpler.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:51 -02:00
Maxim Levitsky
f36224d399 V4L/DVB (6670): V4L: saa7134: tvaudio cleanups
move some tv-audio initialization code out of tvaudio thread,
and call it on resume too.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:46 -02:00
Maxim Levitsky
5c01203fd2 V4L/DVB (6669): Add few missing bits of code to saa7134_resume
First the saa7134_initdev waits between saa7134_hwinit1
and saa7134_hwinit2 , thus it is probably wise to do the same in saa7134_resume
some hardware probably needs this.

Call saa7134_irq_video_signalchange in .resume like in saa7134_resume to make
saa7134_resume mirror perfectly the saa7134_initdev although
this call isn't strictly necessary in the saa7134_initdev,
but it won't harm anyway.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:45 -02:00
Maxim Levitsky
3203cb86d2 V4L/DVB (6668): Fix theoretical races between IRQ handler and .suspend/resume
*dev->insuspend = 1 should be set before synchronize_irq
 *ACK interrupts after synchronize_irq, to make sure there aren't
 pending interrupts.
 *Add barrier before we restart interrupts so the handler will 100%
 see the dev->insuspend

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:44 -02:00
Maxim Levitsky
0d65cd4f2b V4L/DVB (6667): Fix access to configuration space while in D3
pci_save_state should be called before pci_set_power_state
and pci_restore_state after pci_set_power_state

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:43 -02:00