summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx88/cx88-dvb.c
AgeCommit message (Collapse)Author
2012-01-06[media] cx88: Fix radio support for Leadtek DTV2000H JMiroslav Slugen
Leadtek DTV2000H J has Philips a FMD1216MEX tuner, and not a FMD1216ME. Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] tuners: remove dvb_frontend_parameters from set_params()Mauro Carvalho Chehab
This is a big patch, yet trivial: now that all tuners use the DVBv5 way to pass parameters (e. g. via fe->dtv_property_cache), the extra parameter can be removed from set_params() call. After this change, very few DVBv3 specific stuff are left at the tuners. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-31[media] cx88: use DVBv5 parameters on set_params()Mauro Carvalho Chehab
Instead of using DVBv3 parameters, rely on DVBv5 parameters to set the tuner Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-12-30[media] cx88-dvb avoid dangling core->gate_ctrl pointerDavid Fries
dvb_register calls videobuf_dvb_register_bus, but if that returns a failure the module will be unloaded without clearing the value of core->gate_ctrl which will cause an oops in macros called from video_open in cx88-video.c Signed-off-by: David Fries <David@Fries.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Istvan Varga <istvan_v@mailbox.hu> Cc: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] Stop using linux/version.h on most video driversMauro Carvalho Chehab
All the modified drivers didn't have any version increment since Jan, 1 2011. Several of them didn't have any version increment for a long time, even having new features and important bug fixes happening. As we're now filling the QUERYCAP version with the current Kernel Release, we don't need to maintain a per-driver version control anymore. So, let's just use the default. In order to preserve the Kernel module version history, a KERNEL_VERSION() macro were added to all modified drivers, and the extraver number were incremented. I opted to preserve the per-driver version control to a few pwc, pvrusb2, s2255, s5p-fimc and sh_vou. A few drivers are still using the legacy way to handle ioctl's. So, we can't do such change on them, otherwise, they'll break. Those are: uvc, et61x251 and sn9c102. The rationale is that the per-driver version control seems to be actively maintained on those. Yet, I think that the better for them would be to just use the default version numbering, instead of doing that by themselves. While here, removed a few uneeded include linux/version.h Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] cx88: added support for Leadtek WinFast DTV1800 H with XC4000 tuneristvan_v@mailbox.hu
This patch implements support for the Leadtek WinFast DTV1800 H card with XC4000 tuner (107d:6f38). Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] cx88: added support for Leadtek WinFast DTV2000 H Plusistvan_v@mailbox.hu
This patch implements support for the Leadtek WinFast DTV2000 H Plus card with XC4000 tuner (107d:6f42). Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] cx88: added XC4000 tuner callback and DVB attach functionsistvan_v@mailbox.hu
Added functions for XC4000 tuner reset and attaching DVB frontend. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cx88: fix locking of sub-driver operationsJonathan Nieder
The BKL conversion of this driver seems to have gone wrong. Loading the cx88-blackbird driver deadlocks. The cause: mpeg_ops::open in the cx2388x blackbird driver acquires the device lock and calls the sub-driver's request_acquire, which tries to acquire the lock again. Fix it by clarifying the semantics of request_acquire, request_release, advise_acquire, and advise_release: now all will rely on the caller to acquire the device lock. Based on work by Ben Hutchings <ben@decadent.org.uk>. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=31962 Reported-by: Andi Huber <hobrom@gmx.at> Tested-by: Andi Huber <hobrom@gmx.at> Tested-by: Marlon de Boer <marlon@hyves.nl> Cc: stable@kernel.org Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cx88: protect per-device driver list with device lockJonathan Nieder
The BKL conversion of this driver seems to have gone wrong. Various uses of the sub-device and driver lists appear to be subject to race conditions. In particular, some functions access drvlist without a relevant lock held, which will race against removal of drivers. Let's start with that --- clean up by consistently protecting dev->drvlist with dev->core->lock, noting driver functions that require the device lock to be held or not to be held. After this patch, there are still some races --- e.g., cx8802_blackbird_remove can run between the time the blackbird driver is acquired and the time it is used in mpeg_release, and there's a similar race in cx88_dvb_bus_ctrl. Later patches will address the remaining known races and the deadlock noticed by Andi. This patch just makes the semantics clearer in preparation for those later changes. Based on work by Ben Hutchings <ben@decadent.org.uk>. Tested-by: Andi Huber <hobrom@gmx.at> Tested-by: Marlon de Boer <marlon@hyves.nl> Cc: stable@kernel.org Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] cx88: add support for TeVii S464 PCI cardIgor M. Liplianin
The card uses ds3000 demod from Montage. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29[media] cx88-dvb.c: DVB net latency using Hauppauge HVR4000Ang Way Chuang
A Hauppauge HVR 4000 is used on a School On Internet Asia (SOI Asia) project in order to carry IP traffic over ULE. However, there is an issue with high latency jitter. My boss, Husni, identified the problem and provided a patch for it. The default buffer size of 32 TS frames on cx88 causes the high latency, so our deployment changes that to 6 TS frames. This patch made the buffer size tunable, while keeping the default buffer size of 32 TS frames unchanged. Signed-off-by: Achmad Husni Thamrin <husni@ai3.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] Twinhan 1027 + IR Port supportSergey Ivanov
Patch add support of TwinHan 1027 DVB-S card. Refreshed version of https://patchwork.kernel.org/patch/79753/ patch. (adapted for the new IR system), still works. DVB-S support come from a patch originally authored by Manu Abraham (abraham.manu@gmail.com). IR Port support were added by Sergey. Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21V4L/DVB: videobuf: add ext_lock argument to the queue init functionsHans Verkuil
Add an ext_lock argument to the videobuf init functions. This allows drivers to pass the vdev->lock pointer (or any other externally held lock) to videobuf. For now all drivers just pass NULL. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21V4L/DVB: drivers/media: Make static data tables and strings constlawrence rust
Making static data const avoids allocation of additional r/w memory and reduces initialisation time. It also provides some additional opportunities for compiler optimisations. Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: cx88-dvb: fix on switch identationRicardo Maraschini
[dougsland@redhat.com: fixed reject due changes in cx88-dvb.c] Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L-DVB: cx88-dvb: remove extra attribution for coreMauro Carvalho Chehab
This is not needed, since the function already do it. Also, it causes a warning at the compilation, since a new var is declared in the middle of the code. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: Add support for SMT7020 to cx88Dirk Herrendoerfer
This patch adds support for the built-in dvb device of a Samsung SMT7020s (x86 based STB) to the cx88 family. Signed-off-by: Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name> Signed-off-by: Helmut Auer <helmut@helmutauer.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13407): Add Prof 7301 PCI DVB-S2 cardIgor M. Liplianin
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-05V4L/DVB (13238): v4l2_subdev: rename tuner s_standby operation to core s_powerLaurent Pinchart
Upcoming I2C v4l2_subdev drivers need a way to control the subdevice power state from the core. This use case is already partially covered by the tuner s_standby operation, but no way to explicitly come back from the standby state is available. Rename the tuner s_standby operation to core s_power, and fix tuner drivers accordingly. The tuner core will call s_power(0) instead of s_standby(). No explicit call to s_power(1) is required for tuners as they are supposed to wake up from standby automatically. [mchehab@redhat.com: CodingStyle fix] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13103): create a standard method for dvb adapter drivers to ↵Michael Krufky
override frontend ioctls Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-21trivial: media/video/cx88: add __init/__exit macros to cx88 driversPeter Huewe
Trivial patch which adds the __init and __exit macros to the module_init / module_exit functions to several files in drivers/media/video/cx88/ Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-12V4L/DVB (12469): fix bad whitespaces at cx88_geniatech_x8000_mtMauro Carvalho Chehab
It were using 7 spaces instead of tab for indent. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12486): cx88: fix TBS 8920 card supportIgor M. Liplianin
It does matter to set explicitly gpio0 value in cx88_board structure for TBS 8920 card. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12439): cx88: add support for WinFast DTV2000H rev. JVlastimil Labsky
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-08-13V4L/DVB (12393): cx88: fix regression in tuning for Geniatech X8000 MTDevin Heitmueller
The introduction of the zl10353 i2c gate control broke support for the Geniatech board (which is not behind an i2 gate). Add the needed parameter. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11879): Adds support for Leadtek WinFast DTV-1800HMiroslav Sustek
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-04-06V4L/DVB (11368): v4l2-subdev: move s_standby from core to tuner.Hans Verkuil
s_standby is only used to put the tuner in powersaving mode, so move it from core to tuner. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11300): cx88: convert to v4l2_subdev.Hans Verkuil
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-30V4L/DVB (10949): Add support for Terratec Cinergy HT PCI MKIIStephan Wienczny
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-01-29V4L/DVB (10229): cx88-dvb: Fix order of frontend allocationsAndy Walls
On Fri, 2009-01-09 at 15:40 +0300, Goga777 wrote: > hI > > With today v4l-dvb I couldn't run my hvr4000 card on 2.6.27 kernel > [ 14.555162] cx88/2: cx2388x dvb driver version 0.0.6 loaded > [ 14.555231] cx88/2: registering cx8802 driver, type: dvb access: shared > [ 14.555303] cx88[0]/2: subsystem: 0070:6900, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68] > [ 14.555374] cx88[0]/2: cx2388x based DVB/ATSC card > [ 14.555446] BUG: unable to handle kernel NULL pointer dereference at 00000000 > [ 14.555560] IP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4 > [ 14.555652] *pde = 00000000 > [ 14.555735] Oops: 0002 [#1] SMP > [ 14.555851] Modules linked in: cx88_dvb(+) cx88_vp3054_i2c videobuf_dvb wm8775 dvb_core tuner_simple tuner_types snd_seq_dummy tda9887 snd_seq_oss(+) snd_intel8x0(+) tda8290 snd_seq_midi snd_seq_midi_event snd_ac97_codec cx88_alsa(+) snd_seq ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_rawmidi snd_timer tuner snd_seq_device psmouse snd serio_raw ivtv(+) cx8800 cx8802 cx88xx soundcore cx2341x ir_common ns558 i2c_i801 v4l2_common videodev i2c_algo_bit gameport v4l1_compat snd_page_alloc tveeprom pcspkr floppy videobuf_dma_sg videobuf_core btcx_risc i2c_core parport_pc parport button intel_agp agpgart shpchp pci_hotplug rng_core iTCO_wdt sd_mod evdev usbhid hid ff_memless ext3 jbd mbcache ide_cd_mod cdrom ide_disk ata_piix libata dock 8139too usb_storage scsi_mod piix 8139cp mii ide_core uhci_hcd ehci_hcd usbcore thermal processor fan thermal_sys > [ 14.557013] > [ 14.557013] Pid: 2310, comm: modprobe Not tainted (2.6.27.1-custom-default1 #1) > [ 14.557013] EIP: 0060:[<c02e6bff>] EFLAGS: 00010246 CPU: 1 > [ 14.557013] EIP is at __mutex_lock_common+0x3c/0xe4 > [ 14.557013] EAX: de653e98 EBX: de739118 ECX: de739120 EDX: 00000000 > [ 14.557013] ESI: dd4209e0 EDI: de73911c EBP: de653eb0 ESP: de653e88 > [ 14.557013] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 > [ 14.557013] Process modprobe (pid: 2310, ti=de652000 task=dd4209e0 task.ti=de652000) > [ 14.557013] Stack: 3535352e 5d343733 00000002 de739120 de739120 00000000 c044a6c0 de739110 > [ 14.557013] de739118 00000001 de653ebc c02e6d38 c02e6b88 de653ec4 c02e6b88 de653ed8 > [ 14.557013] e1ac7115 de6a9000 00000001 00000000 de653f0c e1aeca62 de739004 de739000 > [ 14.557013] Call Trace: > [ 14.557013] [<c02e6d38>] ? __mutex_lock_slowpath+0x17/0x1a > [ 14.557013] [<c02e6b88>] ? mutex_lock+0x12/0x14 > [ 14.557013] [<c02e6b88>] ? mutex_lock+0x12/0x14 > [ 14.557013] [<e1ac7115>] ? videobuf_dvb_get_frontend+0x19/0x40 [videobuf_dvb] > [ 14.557013] [<e1aeca62>] ? cx8802_dvb_probe+0xc9/0x1945 [cx88_dvb] > [ 14.557013] [<e09ee41e>] ? cx8802_register_driver+0xbd/0x1ac [cx8802] > [ 14.557013] [<e09ee467>] ? cx8802_register_driver+0x106/0x1ac [cx8802] > [ 14.557013] [<e1aee37f>] ? dvb_init+0x22/0x27 [cx88_dvb] > [ 14.557013] [<c0101132>] ? _stext+0x42/0x11a > [ 14.557013] [<e1aee35d>] ? dvb_init+0x0/0x27 [cx88_dvb] > [ 14.557013] [<c013d2ca>] ? __blocking_notifier_call_chain+0xe/0x51 > [ 14.557013] [<c014970b>] ? sys_init_module+0x8c/0x17d > [ 14.557013] [<c0103b42>] ? syscall_call+0x7/0xb > [ 14.557013] [<c013007b>] ? round_jiffies_relative+0x14/0x16 > [ 14.557013] ======================= > [ 14.557013] Code: 78 04 89 f8 89 55 e0 64 8b 35 00 30 3f c0 e8 2e 0c 00 00 8d 43 08 89 45 e4 8b 53 0c 8d 45 e8 8b 4d e4 89 43 0c 89 4d e8 89 55 ec <89> 02 89 75 f0 83 c8 ff 87 03 48 74 55 8a 45 e0 8b 4d e0 83 e0 > [ 14.557013] EIP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4 SS:ESP 0068:de653e88 > [ 14.565211] ---[ end trace 94d8b014e067ac7b ]--- Tested and confirmed to work by several users at linux-media@vger.kernel.org Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07V4L/DVB (10190): cx88: Fix some Kbuild troublesMauro Carvalho Chehab
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>
2008-12-30V4L/DVB (9918): cx88: advise/acquire clean-up for HVR-1300/3000/4000Darron Broad
This cleans-up the advise/acquire methods. This has been tested on the hvr-1300/4000 and assumed to be correct on the hvr-3000. This update also fixes analogue tuning on the hvr-1300 when in blackbird mode. Signed-off-by: Darron Broad <darron@kewl.org> Cc: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9576): cx88-dvb: MFE attachment clean-up for HVR-3000/4000Darron Broad
This cleans-up MFE attachment for these cards plus two cases of potential memory leak on attachment failure. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9572a): Whitespace cleanupMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9535): cx88-dvb: Remove usage core->prev_set_voltage from cx24116 ↵Igor M. Liplianin
based cards. Remove usage core->prev_set_voltage from cx24116 based cards, as it does not make sense for the demod. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29V4L/DVB (9534): cx88: Add support for Prof 6200 DVB-S PCI cardIgor M. Liplianin
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-29V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI cardIgor M. Liplianin
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-29V4L/DVB (9500): cx88-dvb: MFE attachment fix-upDarron Broad
MFE attachment fix-up Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11V4L/DVB (9357): cx88-dvb: Fix Oops in case i2c bus failed to registerMatthias Schwarzott
There already is an report at kernel bugzilla about this issue: http://bugzilla.kernel.org/show_bug.cgi?id=9455 When enabling extra checks for the i2c-bus of cx88 based cards by loading i2c_algo_bit with bit_test=1 this may trigger an oops when loading cx88_dvb. This is caused by the extra check code that detects that the sda-line is stuck high and thus does not register the i2c-bus. cx88-dvb however does not check if the i2c-bus is valid and just uses core->i2c_adap to attach dvb frontend modules. This leads to an oops at the first call to i2c_transfer: $ modprobe i2c_algo_bit bit_test=1 $ modprobe cx8802 cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.6 loaded cx88[0]: quirk: PCIPCI_NATOMA -- set TBFX cx88[0]: subsystem: 0070:9202, board: Hauppauge Nova-S-Plus DVB-S [card=37,autodetected], frontend(s): 1 cx88[0]: TV tuner type 4, Radio tuner type -1 cx88[0]: SDA stuck high! cx88[0]: i2c register FAILED input: cx88 IR (Hauppauge Nova-S-Plus as /class/input/input5 cx88[0]/2: cx2388x 8802 Driver Manager cx88-mpeg driver manager 0000:00:10.2: enabling device (0154 -> 0156) cx88-mpeg driver manager 0000:00:10.2: PCI INT A -> Link[LNKD] -> GSI 9 (level, low) -> IRQ 9 cx88[0]/2: found at 0000:00:10.2, rev: 5, irq: 9, latency: 64, mmio: 0xfb000000 cx8802_probe() allocating 1 frontend(s) cx88/2: cx2388x dvb driver version 0.0.6 loaded cx88/2: registering cx8802 driver, type: dvb access: shared cx88[0]/2: subsystem: 0070:9202, board: Hauppauge Nova-S-Plus DVB-S [card=37] cx88[0]/2: cx2388x based DVB/ATSC card BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [<e084d4ef>] :i2c_core:i2c_transfer+0x1f/0x80 *pde = 00000000 Modules linked in: cx88_dvb(+) cx8802 cx88xx ir_common i2c_algo_bit tveeprom videobuf_dvb btcx_risc mga drm ipv6 fscpos eeprom nfsd exportfs stv0299 b2c2_flexcop_pci b2c2_flexcop cx24123 s5h1420 ves1x93 dvb_ttpci dvb_core saa7146_vv saa7146 videobuf_dma_sg videobuf_core videodev v4l1_compat ttpci_eeprom lirc_serial lirc_dev usbhid rtc uhci_hcd 8139too i2c_piix4 i2c_core usbcore evdev Pid: 4249, comm: modprobe Not tainted (2.6.27-gentoo #3) EIP: 0060:[<e084d4ef>] EFLAGS: 00010296 CPU: 0 EIP is at i2c_transfer+0x1f/0x80 [i2c_core] EAX: 00000000 EBX: ffffffa1 ECX: 00000002 EDX: d6c71e3c ESI: d80cd050 EDI: d8093c00 EBP: d6c71e20 ESP: d6c71e0c DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9336): cx88: always de-alloc frontends on fault conditionDarron Broad
De-alloc frontends on fault condition. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9334): cx88: dvb_remove debug outputDarron Broad
Add debug output for dvb_remove enter. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9296): Patch to remove warning message during cx88-dvb compilationIgor M. Liplianin
Remove warning message during cx88-dvb compilation. Also fixes double underline in function and struct names. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9250): cx88: Convert __FUNCTION__ to __func__Steven Toth
cx88: Convert __FUNCTION__ to __func__ Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9227): MFE: Add multi-frontend mutual exclusionDarron Broad
This add frontend R/W mutual exclusion. Prior to this point in time it was possible to open both frontends simultaneously which an MFE card cannot support. In order to stop this, a delayed open is performed which has the following function: - Return EBUSY after a configurable amount of time if a frontend is unavailable due to the other being in use. - Only allow opening of a frontend if the kernel thread of the other has stopped. This solution was chosen to allow switching between frontends to work as seamlessly as possible. When both frontends are actually opened simultaneously then one will only open, but if quick switching is performed between one of many then the new open will succeed in a clean fashion rather than interrupting a kernel thread. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9225): MFE: Add configurable gate controlDarron Broad
This adds a configurable (one per card) gate control option for multi-frontend. Prior to this point gate control was assumed to be on the primary frontend, this is a fault when the gate to the analogue section is on the secondary which is the default for both the HVR-3000 and HVR-4000 in MFE. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9223): MFE: Fix a number of bugs and some tidying upDarron Broad
A number of reference to videobuf_dvb_get_frontend used an invalid index. This has been fixed. The section for the HVR3000 in advise_acquire was redundant as the same logic is used on the HVR4000. This has been removed and both cards now use the same function. A number of small errors and whitespace errors are also fixed. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9222): S2API: Add Multiple-frontend on a single adapter support.Steven Toth
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-13V4L/DVB (9186): Added support for Prof 7300 DVB-S/S2 cardsOleg Roitburd
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-12V4L/DVB (9066): Pinnacle Hybrid PCTV Pro (pctv310c) DVB-T supportStéphane Voltz
This patch against latest mercurial makes DVB-T working on Pinnacle Hybrid PCTV Pro (pctv310c). In cx88-dvb.c, a specific zl10353_config is created with the if2 inferred from the old comment in the currently used config. It is then used for attach, and i2c_gate_ctrl is set to NULL. The entry in cx88-cards.c is modified with GPIO gathered from windows with regspy, and DVB enabled. The frontend is set to XC3028_FE_ZARLINK456 to match the zl10353_config. It is working great with the freeview channels I can receive. Signed-off-by: Stéphane Voltz <stef.dev@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>