Commit Graph

133 Commits (83905c134571642d7e8a1e51ae9f26bd3a3ad82a)

Author SHA1 Message Date
Laurent Pinchart 63b0d5ad20 V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers
Fix all device drivers to use the video_drvdata function instead of
maintaining a local list of minor to private data mappings. Call
video_set_drvdata to register the driver private pointer when not
already done.

Where applicable, the local list of mappings is completely removed when
it becomes unused.

[mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:56 -02:00
Igor M. Liplianin b699c2712b V4L/DVB (13407): Add Prof 7301 PCI DVB-S2 card
Add Prof 7301 PCI DVB-S2 card

The card based on stv0903 demod, stb6100 tuner.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:43 -02:00
Vlastimil Labsky 4d14c833c0 V4L/DVB (12439): cx88: add support for WinFast DTV2000H rev. J
I updated and simplyfied patch from Zbynek Hrabovsky for recent kernel.
It enables autodetection of card, sound in analog TV , sound in FM radio
and switching between antenna and cable RF input.  Radio tuner still
doesn't work, I don't even know how it works.  Some guys wrote me that FM
radio works with TV tuner used instead of radio part (symlink video0 ->
radio0).

Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Vlastimil Labsky <vlasta.labsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:50 -03:00
Marton Balint e878cf3a47 V4L/DVB (11394): cx88: Add support for stereo and sap detection for A2
The patch implements reliable stereo and sap detection for the A2 sound
standard.  This is achieved by processing the samples of the audio RDS fifo of
the cx2388x chip. A2M, EIAJ and BTSC stereo/sap detection is also possible with
this new approach, but it's not implemented yet. Stereo detection when alsa
handles the sound also does not work yet.

Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:17 -03:00
Miroslav Sustek 3047a17639 V4L/DVB (11879): Adds support for Leadtek WinFast DTV-1800H
Enables analog/digital tv, radio and remote control (gpio).

Tested-by: Marcin Wojcikowski <emtees.mts@gmail.com>
Tested-by: Karel Juhanak <karel.juhanak@warnet.cz>
Tested-by: Andrew Goff <goffa72@gmail.com>
Tested-by: Jan Novak <novak-j@seznam.cz>
Signed-off-by: Miroslav Sustek <sustmidown@centrum.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:21:15 -03:00
Steven Toth 501d8cd4e2 V4L/DVB (11665): cx88: Add support for the Hauppauge IROnly board.
cx88: Add support for the Hauppauge IROnly board.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:50 -03:00
Hans Verkuil 3ff4ad815c V4L/DVB (11377): v4l: increase version numbers of drivers converted to v4l2_subdev.
With all the v4l2_subdev changes that were made to these drivers it is a
good idea to increase the version number of each driver.

It's just the patch level that is increased, except for the zoran and saa7146
drivers where the minor number was increased due to the more substantial
changes that were made to those two drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:26 -03:00
Hans Verkuil b8341e1d2a V4L/DVB (11300): cx88: convert to v4l2_subdev.
Convert cx88 to use v4l2_subdev since the old i2c autoprobing mechanism
will be removed.

Added code to explicitly load tvaudio where needed. Also fix the rtc-isl1208
support: since that driver no longer supports autoprobing it has to be
loaded using the new i2c API.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:48 -03:00
Hans Verkuil 9467fe1264 V4L/DVB (11047): cx88: convert to v4l2_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Stephan Wienczny 70101a2785 V4L/DVB (10949): Add support for Terratec Cinergy HT PCI MKII
This patch adds support for Terratec Cinergy HT PCI MKII with card id 79.
Its more or less a copy of Pinnacle Hybrid PCTV.
Thanks to k1ngf1sher on forum.ubuntuusers.de for the idea to copy that card.

Signed-off-by: Stephan Wienczny <stephan@wienczny.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:18 -03:00
Trent Piepho 86b5aeacab V4L/DVB (10792): cx88: remove unnecessary forward declaration of cx88_core
A recent patch added a forward declaration of cx88_core right before the
main definition of that structure, which is obviously unneeded.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:03 -03:00
Mauro Carvalho Chehab 77f56279f7 V4L/DVB (10201): Fixes cx88 compilation bug
Randy Dunlap <randy.dunlap@oracle.com> wrote:

> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c: In function 'cx88_call_i2c_clients':
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:122: error: 'struct cx88_core' has no member named 'gate_ctrl'
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:123: error: 'struct cx88_core' has no member named 'gate_ctrl'
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:127: error: 'struct cx88_core' has no member named 'gate_ctrl'
> linux-next-20090108/drivers/media/video/cx88/cx88-i2c.c:128: error: 'struct cx88_core' has no member named 'gate_ctrl'

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:37 -02:00
Mauro Carvalho Chehab e32fadc4c2 V4L/DVB (10190): cx88: Fix some Kbuild troubles
As Randy Dunlap <randy.dunlap@oracle.com> reported, cx88 has some compilation issues:

drivers/built-in.o: In function `cx88_call_i2c_clients':
(.text+0x20af17): undefined reference to `videobuf_dvb_get_frontend'
drivers/built-in.o: In function `cx8802_probe':
cx88-mpeg.c:(.devinit.text+0x268c4): undefined reference to `videobuf_dvb_alloc_frontend'
cx88-mpeg.c:(.devinit.text+0x268ea): undefined reference to `videobuf_dvb_dealloc_frontends'

With those configs:

CONFIG_VIDEO_CX88=y
CONFIG_VIDEO_CX88_BLACKBIRD=y
CONFIG_VIDEO_CX88_DVB=m
CONFIG_DVB_CORE=m

After carefully examining the code, with the current code, several cx88 drivers
(cx8800, cx8802, cx88_dvb and cx88_blackbird) should be compiled as a module,
if one of them is marked as such. Just fixing Kconfig could create a very complex
set of rules. Also, this hides a problem with the current approach where the dvb
functionality weren't confined inside dvb module.

What happens is that:
	- cx88-i2c (part of cx8800) has some special rules if DVB;
	- cx88-mpeg (cx8802 module) has also part of DVB init code;
	- cx88-dvb has the rest of the dvb code;
	- cx88-blackbird can be used with cx88-mpeg, having cx88-dvb or not.

So, instead of doing some tricks at Kconfig and wait for a next breakage,
this patch moves the dvb code inside cx88-i2c and cx88-mpeg into cx88-dvb.

Another problem is that cx8802 were being compiled, even without cx88-dvb
and cx88-blackbird modules.

While on this code, let's fix also a reported problem:
http://www.linuxtv.org/pipermail/linux-dvb/2009-January/031225.html

A solution for the issue were proposed here:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg00021.html

Thanks to Randy, Andy, Gregoire and Thomas for helping us to detect
and solve the issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07 22:18:56 -02:00
Hans Verkuil bec43661b1 V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Introduce a struct v4l2_file_operations for v4l2 drivers.

Remove the unnecessary inode argument.

Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.

Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:12 -02:00
Igor M. Liplianin cd3cde1271 V4L/DVB (9534): cx88: Add support for Prof 6200 DVB-S PCI card
The card based on stv0299 or stv0288 demodulators.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Igor M. Liplianin 4b29631db3 V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card
The card based on stv0299 or stv0288 demodulators.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:28 -02:00
Mauro Carvalho Chehab 5910e820cd V4L/DVB (9498): Simplify video standards enumeration
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Frederic CAND b84ca9f2a0 V4L/DVB (9497): tda9887/cx88: Adds SECAM/BGH standards
Adds secam bgh support

Signed-off-by: Frederic CAND <frederic.cand@anevia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:25 -02:00
Frederic CAND 9c8e0a260e V4L/DVB (9496): cx88-blackbird: bugfix: cx88-blackbird-mpeg-users
Allows multiple access to the mpeg device

Signed-off-by: Frederic CAND <frederic.cand@anevia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:27 -02:00
Darron Broad 430189da04 V4L/DVB (9269): cx88: add I2S-ADC tvaudio method
This adds I2S-ADC tvaudio mode as a formal method of audio
delivery.

This fixes one bug and adds fm audio via I2S-ADC on cards
that support it.

The bug occured before when I2S-ADC mode was initiated on
composite/s-video open but was then reset within 500ms
by the audio thread which used any previous audio tuning
details.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:29:14 -03:00
Darron Broad 923ac7f7d7 V4L/DVB (9228): cx88: Add audio routing for the hvr-3000/4000
This adds audio routing on the hvr-3000/4000

This is a preliminary patch for later routing
requirements.

This adds line-in support on the 2 cards mentioned.
It is also apparent that there is an initial open
fault for line-in when opening composite/s-video.
This will be fixed later.

It was also noticed that the bit-field for audio
routing which was 2 bits needs an increase as
the WM8775 for example, allows a value 4 bits
wide for it's audio mux.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:24:22 -03:00
Steven Toth 363c35fc44 V4L/DVB (9222): S2API: Add Multiple-frontend on a single adapter support.
A detailed description from the original patches 2 years ago:

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

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

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

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

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

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

Darron Broad
Fabio M. Di Nitto
Carlo Scarfoglio
Hans Werner

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

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

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

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:23:10 -03:00
Oleg Roitburd 57f51dbc45 V4L/DVB (9186): Added support for Prof 7300 DVB-S/S2 cards
Added support for Prof 7300 DVB-S/S2 card. The card
based on cx24116 demodulator.

Signed-off-by: Oleg Roitburd <oroitburd@gmail.com>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
[mchehab@redhat.com: fixed CARDLIST.cx88 entry]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:41:21 -02:00
Darron Broad 3e01084519 V4L/DVB (9069): cx88: Bugfix: all client disconnects put the frontend to sleep.
From the author:

"This fixes the problem where previously all client disconnects
put the analogue frontend into standby.

In the following example, the first command is succesfully
watching TV but the second command which returns EBUSY
detunes the receiver by entering it into the standby state.

tvtime -d /dev/video0 &
cat /dev/video0
"

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:11 -02:00
Mauro Carvalho Chehab a31d2bb773 V4L/DVB (9062): Add support for Prolink Pixelview Global Extreme
Thanks to Sidney Matias <sidney.matias@gmail.com> for getting GPIO
values and testing on this device.

Cc: Sidney Matias <sidney.matias@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:10 -02:00
Michael Krufky d7cba043d7 V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:09 -02:00
Igor M. Liplianin e4aab64cb7 V4L/DVB (9026): Add support for ST STV0288 demodulator and cards with it.
Add support for ST STV0288 demodulator and cards with it,
such as TeVii S420.
Patch is co-authored with Georg Acher <acher@baycom.de>

Signed-off-by: Georg Acher <acher@baycom.de>
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:07 -02:00
Oleg Roitburd ee73042c00 V4L/DVB (9020): Added support for TBS 8920 DVB-S/S2 card
Added support for TBS 8920 DVB-S/S2 card. The card
based on cx24116 demodulator.

Signed-off-by: Oleg Roitburd <oroitburd@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:07 -02:00
Oleg Roitburd 4cd7fb876c V4L/DVB (9019): Added support for Omicom SS4 DVB-S/S2 card
Added support for Omicom SS4 DVB-S/S2 card. The card
based on cx24116 demodulator.

Signed-off-by: Oleg Roitburd <oroitburd@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:06 -02:00
Igor M. Liplianin af832623c2 V4L/DVB (8989): Added support for TeVii S460 DVB-S/S2 card
Added support for TeVii S460 DVB-S/S2 card. The card
based on cx24116 demodulator.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Steven Toth 5bd1b66359 V4L/DVB (8987): cx88: Add support for the Hauppauge HVR4000 and HVR4000-LITE (S2) boards
Adding support for Hauppauge's cx88 S2 based products, based on the
cx24116 DVB-S2 demodulator.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Hans Verkuil 38f9d30859 V4L/DVB (8477): v4l: remove obsolete audiochip.h
Converted the last users of audiochip.h to the v4l2-chip-ident.h header
and remove the now unused audiochip.h header.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:40 -03:00
Frej Drejhammar 6d04203c7f V4L/DVB (7451): cx88: Add user control for chroma AGC
The cx2388x family has support for chroma AGC. This patch implements a
the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default
chroma AGC is disabled, as in previous versions of the driver.

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

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

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

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

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

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Steven Toth 1117d6ba13 V4L/DVB (7287): cx88: add analog support for DVICO FusionHDTV7 Gold
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Chris Pascoe b3fb91d20c V4L/DVB (7258): Support DVB-T tuning on the DViCO FusionHDTV DVB-T Pro
Add support for tuning DVB-T channels on DViCO's FusionHDTV DVB-T Pro board.

The IR remote and analog tuner are not supported at this time.

Some changes made by Mauro Chehab to allow merging it with some other xc3028
patches.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 9507901ef3 V4L/DVB (7257): cx88: Add xc2028/3028 boards
This patch ports a patch from Markus Rechberger to work with tuner-xc2028.
It adds entries for several cx88 boards with xc2038/3028 tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Steven Toth 5c00fac0ba V4L/DVB (7252): cx88: Add support for the Dvico PCI Nano
ATSC is known to work.
SVideo / Composite should work (I have no cable to test).
Analog tuner support does not work.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Roland Stoll 27d0fe1894 V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
It currently isn't possible to open the frontend device of cx88-mpeg devices
(DVB or Blackbird) multiple times concurrently. (for instance, to attach a
signal monitoring tool while reading a stream, or to send a frequency change
ioctl) This patch fixes that condition.

Signed-off-by: Roland Stoll <roland@xindex.de>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:19 -03:00
Steven Toth 60464da8b1 V4L/DVB (7043): New card supported(partially): Pinnacle 800i
From Zhang: This patch continues the support for the Pinnacle HD 800i.

Patch committed as-is, cleanups to follow ... Steve

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:06 -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
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 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
Adrian Bunk a2fbaa519b V4L/DVB (6576): cx88-mpeg.c: make 4 functions static
This patch makes the following needlessly global functions static:
- cx8802_init_common()
- cx8802_fini_common()
- cx8802_suspend_common()
- cx8802_resume_common()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:05 -02:00
Trent Piepho 081c2fc8b9 V4L/DVB (6334): cx88: Change (struct cx8802_dev)->drvlist to a list_head and fix bugs
It was a struct cx8802_driver for no apparent reason.  Nothing uses a
cx8802_driver in the cx8802_dev struct.  The only field that was used was
devlist, a list_head.

The code in cx8802_remove() that removed any loaded sub-drivers was broken.
It would delete the current list entry, but didn't use list_for_each_safe.  It
also called list_del() on the list _head_ inside the list_for_each loop?  It
would crash if it was run, which I don't think can ever happen.

Since the cx8802 sub-drivers use the cx8802 driver, they have to be unloaded
first.  So there isn't any way for a sub-driver to still be loaded when
cx8802_remove() is called...  Except maybe with PCI hot-plug, if one removes
the PCI card while the drivers are loaded?

So I left some code in to handle that if it's actually possible.  It will
remove the sub-drivers from the device cx8802_remove() was called on, and only
that device.  If one has two DVB cards and unplugs one, there is no reason to
unload the DVB drivers for both cards.  I have no way to test this, but it
can't be worse than what was there before.

cx8802_get_driver() is passed a cx8802_dev pointer and looks for the requested
driver on that device.  It first loops over the cx8802 device list looking for
the device it was passed, which is pointless.  It doesn't need to find the
device pointer in the list, as it already has the pointer.

The list_head in the cx8802_driver struct, which joins all the _drivers_
attached to a device, was named devlist.  Changed that to drvlist, since the
devlist is used for a list of _devices_ in other cx8802 structs.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22 12:01:43 -02:00
Trent Piepho f0ad90975b V4L/DVB (6333): cx88: Change void* card_priv to struct vp3054_i2c_state
card_priv was only used to store a pointer to the vp3054 state struct.
There's no need to use a void * since it doesn't have multiple types.

Make the field conditional on VP3045 support.  It was already conditional on
DVB support, but it's only used if VP3045 support is on, so that makes for a
better option to check.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22 12:01:42 -02:00
Trent Piepho 7717cbedd9 V4L/DVB (6332): cx88: Only include the blackbird fields if blackbird is selected
Add some ifdefs around fields only used for blackbird support, similar to the
way the dvb fields are only included with dvb support.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22 12:01:42 -02:00
Trent Piepho 5a3ebe8755 V4L/DVB (6283): videobuf: Remove references to old Kconfig option name
CONFIG_VIDEO_BUF_DVB became CONFIG_VIDEOBUF_DVB.

But in these cases, it makes more sense to use CONFIG_VIDEO_SAA7134_DVB
or CONFIG_VIDEO_CX88_DVB_MODULE depending on the driver.

The reference in cx23885.h should just be removed, as the code there needs to
be included if DVB is on or off.  I do not think you can even compile the
cx23885 driver without DVB.  It's clearly just leftover from when the file was
obvious copied from the cx88 driver (which is not mentioned in the copyright
BTW).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:08 -03:00
Mauro Carvalho Chehab ba366a23b6 V4L/DVB (6257): Rename video-buf-dvb to videobuf-dvb to be consistent with the other patches
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:46 -03:00