Age | Commit message (Collapse) | Author |
|
The v4l function has a better algorithm for aligning image size.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Fix Leadtek TV2000 XP Global entries and add missing PCI ID's.
Thanks to Terry Wu <terrywu2009@gmail.com> for pointing us for the proper settings.
Cc: Terry Wu <terrywu2009@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
bttv-driver.c,cx23885-video.c,cx88-video.c: poll method lose race condition for capture video.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
cx88-dsp: fixing 64bit math on 32bit kernels
Some gcc versions report the missing of __divdi3
[mchehab.redhat.com: CodingStyle fixes]
Signed-off-by: Miroslav Sustek <sustmidown@centrum.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
stereo/mono change
This patch changes cx88_set_stereo to avoid resetting all of the audio
registers on stereo/mono change if the audio standard is A2, and set
only the AUD_CTL register. The benefit of this method is that it
eliminates the annoying clicking noise on setting the audio mode to
stereo or mono.
The driver had used the same method 1.5 years ago (and for FM radio it
still does), but a pretty big cleanup commit changed it to the
"complete audio reset" method, although the reason for this move was
not clear. (If somebody knows why it was necessary, please let me
know!)
The original commit: http://linuxtv.org/hg/v4l-dvb/rev/ffe313541d7d
Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
don't do it manually
The sole purpose of the audio thread is to detect if stereo transmission is
available, and if it is, then switch to stereo mode (and switch back, if it's
no longer available). This manual autodetection is useful for some audio
standards (e.g. A2) where cx88_get_stereo CAN detect stereo sound, but the
cx2388x chip CANNOT auto-detect stereo sound.
However, for other audio standards, the cx2388x chip CAN auto-detect the stereo
sound, so the manual autodetection in the audio thread is not needed. In fact,
it can cause serious problems because for some of these audio standards,
cx88_get_stereo CANNOT detect the presence of stereo sound. Besides that, if
the hardware automatically detects stereo/mono sound, you cannot set
core->audiomode_current to the real current audio mode on channel change.
With this patch, the manual autodetection is only used if audiomode_current is
known after a channel change (because of the initial mono mode), and
hardware-based stereo autodetecion is not applicable for the current audio
standard.
Signed-off-by: Marton Balint <cus@fazekas.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
A power management fix to properly put the xc5000 into low power mode
revealed a race condition where hald could detect the creation of the device
file and connect to the device while the initial device configuration is
still in progress.
Lock the core structure so that video_release cannot be called and put the
tuner to sleep in the middle of the initial call to cx88_set_tvnorm() in
cx8800_initdev()
Thanks to Michael Krufky for discovering the issue and providing an
environment to test in.
Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Add missing __devexit_p() to several drivers. Also add a few missing
__init, __devinit and __exit markers. These errors could result in
build failures depending on the kernel configuration.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
The variable minor have assigned value twice, the first time is in the
initial "video_device" data struct in those drivers, pls see
saa7134-video.c,line 2503.
---
Signed-off-by: Figo.zhang <figo.zhang@kolorific.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Let card drivers probe for IR receiver devices and instantiate them if
found. Ultimately it would be better if we could stop probing
completely, but I suspect this won't be possible for all card types.
There's certainly room for cleanups. For example, some drivers are
sharing I2C adapter IDs, so they also had to share the list of I2C
addresses being probed for an IR receiver. Now that each driver
explicitly says which addresses should be probed, maybe some addresses
can be dropped from some drivers.
Also, the special cases in saa7134-i2c should probably be handled on a
per-board basis. This would be more efficient and less risky than always
probing extra addresses on all boards. I'll give it a try later.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
According to the engineer at PCTV Systems, the xc5000 reset pin is supposed
to be on GPIO12. However, despite three nights of effort, pulling that GPIO
low didn't reset the xc5000. While pulling MO_SRST_IO low does reset the
xc5000, this also resets in the s5h1409 being reset as well. This causes
tuning to always fail since the internal state of the s5h1409 does not match
the driver's state.
Given that the only two conditions in which the driver performs a reset is
during firmware load and powering down the chip, I am taking out the reset.
We know that the chip is being reset when the cx88 comes online, and not being
able to do power management for this board is better than not having any
tuning at all.
Problem discovered when implementing proper power management for the xc5000,
which results in calls to the reset callback *after* s5h1409 is initialized.
Cc: Steven Toth <stoth@kernellabs.com>
Cc: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Adds support to the remote control of the Winfast TV2000 XP Global TV
capture card. A case statement was added in order to initialize the
GPIO data structures as well as a case statement for handling the keys
correctly when pressed.
Thanks to Hermann and Mauro for all the help
Signed-off-by: Pieter C van Schaik <vansterpc@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
It is no longer needed to use a struct pointer as argument, since v4l2_subdev
doesn't require that ioctl-like approach anymore. Instead just pass the input,
output and config (new!) arguments directly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
to new_(probed)_subdev
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on
i2c_get_adapdata to return the v4l2_device. However, this is not always
possible on embedded platforms. So modify the API to pass the v4l2_device
pointer explicitly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
s_std didn't belong in the tuner ops. Stricly speaking it should be part of
the video ops, but it is used by audio and tuner devices as well, so it is
more efficient to make it part of the core ops.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
tuner-core.c contains a hack for cx88 board to prevent probing of certain
addresses:
/* HACK: Ignore 0x6b and 0x6f on cx88 boards.
* FusionHDTV5 RT Gold has an ir receiver at 0x6b
* and an RTC at 0x6f which can get corrupted if probed.
*/
With the new i2c API this hack no longer works. So instead change the
list of tuner probe addresses in the cx88 driver itself, which is much
more clean.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
The ->vidioc_(s|g|try|enum)_fmt_vid_cap() methods are only called on
VIDEO_CAPTURE buffers. Thus, there is no need to check or set the 'type'
field since it must already be set to VIDEO_CAPTURE.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
The ioremap one was reported in October 2007 (Bug 9146), the kmalloc one
was blindingly obvious while looking at the ioremap one
The bug suggests some other configuration for lots of I/O memory (32MB per
device is ioremapped) but I'll leave that to the real maintainers
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
There are several Kconfig items using CUSTOMIZE. Yet, most use the English
writing CUSTOMISE. This generates lots of trouble, because people sometimes type
the Kbuild item different.
Let's standardise every occurrence using the same syntax.
The changes were generated by this small shell script:
for i in `find linux -type f`; do sed s,CUSTOMIZE,CUSTOMISE,g $i >/tmp/a && mv /tmp/a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
When unloading the cx8800 driver I sometimes get a general protection
fault. Analysis revealed a race in cx88_ir_stop(). It can be solved by
using a delayed work instead of a timer for infrared input polling.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
cx88: Add IR support to pcHDTV HD3000 & HD5500
Signed-off-by: Erik S. Beiser <erikb@bu.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
The v4l2 core code in v4l2_ioctl will zero out the structure the driver is
supposed to fill in for read-only ioctls. For read/write ioctls, all the
fields which aren't supplied from userspace will be zeroed out.
Zeroing code is removed from enum_input and g_tuner.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
Control arrays as are used with v4l2_ctrl_next must be sorted from
low to high. Add a comment at the top of all such arrays to warn
about this.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
|
|
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>
|
|
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>
|
|
Convert from snd_card_new() to the new snd_card_create() function.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
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>
|
|
instead of ID.
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.
Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.
Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
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>
|
|
In the function cx88_audio_initdev, the value card has been created using
snd_card_new. The other error handling code in this function frees the
value using snd_card_free. I have thus changed the first error case to do
the same. On the other hand, it may be that card is not sufficiently
initialized at this point to use snd_card_free, in which case something
else should be done to free the memory in the error case.
In the function snd_cx88_create the call kfree(chip) in one error case
looks suspicious, both because it is not done in the other error code, and
because chip points into the middle of the memory allocated by
snd_card_new, ie it is not itself associated with a separate kmalloc.
Therefore I have removed it.
The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S,S1;
position p1,p2,p3;
expression E,E1;
type T,T1;
expression *ptr != NULL;
@@
(
if ((x@p1 = snd_card_new(...)) == NULL) S
|
x@p1 = snd_card_new(...);
)
... when != snd_card_free(...,(T)x,...)
when != if (...) { <+... snd_card_free(...,(T)x,...) ...+> }
when != true x == NULL || ...
when != x = E
when != E = (T)x
when any
(
if (x == NULL || ...) S1
|
if@p2 (...) {
... when != snd_card_free(...,(T1)x,...)
when != if (...) { <+... snd_card_free(...,(T1)x,...) ...+> }
when != x = E1
when != E1 = (T1)x
(
return \(0\|<+...x...+>\|ptr\);
|
return@p3 ...;
)
}
)
@ script:python @
p1 << r.p1;
p3 << r.p3;
@@
print "* file: %s snd_card_new: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Please accept this patch to refer to my new email address
Signed-off-by: Jelle Foks <jelle@foks.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
Add support for the following inputs:
- radio tuner
- composite 1 & 2 (only 1 is physically available, but composite 2 is also
advertised by windows driver)
- svideo
Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
|
|
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>
|
|
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>
|