summaryrefslogtreecommitdiff
path: root/linux/drivers
AgeCommit message (Collapse)Author
2008-11-16cx18: Propagate staleness of mailbox and mdl ack data to work handlerAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Propagate staleness of mailbox and mdl ack data to work handler to let the work handler know that the data from the encoder may not be coherent. Allows for smarter handling of buffers in future, to deal with MDLs that fall out of rotation due to irq handler being late in collecting mailbox and mdl ack info. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Convert per stream queue spinlocks into mutexesAndy Walls
From: Andy Walls <awalls@radix.net> Convert the per stream queue spinlocks into mutexes. All queue manipulation happens via the work queue or system calls into the driver, and not in an interrupt context. This reduces the amout of time the cx18 driver keeps interrupts disabled. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Change to singlethreaded global work queue thread for deferable workAndy Walls
From: Andy Walls <awalls@radix.net> Change to singlethreaded global work queue thread for deferable work, instead of the kernel default multithreaded work queue. This ensures execution of deferable work is always in the proper order, so caputred buffers don't get reordered. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-15cx18: Major rewrite of interrupt handling for incoming mailbox processingAndy Walls
From: Andy Walls <awalls@radix.net> A major rewrite of interrupt handling for incoming mailbox processing, to split the timing critical steps from the the deferrable steps as the sending XPU on the CX23418 will time out and overwrite our incoming mailboxes rather quickly. Setup a pool of work "order forms" for the irq handler to send jobs to the new work handler routine which uses the kernel default work queue to do the deferrable work. Started optimizing some of the cx18-io calls as they are now the low hanging fruit for recoving microseconds back from the timeline. Future optimizations will get rid of mmio read retries, mmio stats logging, and combine smaller functions in the irq path into the larger ones to save ~2 us each. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-14Fix a small mistake on the previous patchMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-14tvaudio: fix OOPS when controlling bass/trebleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Not all tvaudio chips allow controlling bass/treble. So, the driver has a table with a flag to indicate if the chip does support it. Unfortunately, the handling of this logic were broken for a very long time (probably since the first module version). Due to that, an OOPS were generated for devices that don't support bass/treble. This were the resulting OOPS message before the patch, with debug messages enabled: tvaudio' 1-005b: VIDIOC_S_CTRL BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [<00000000>] *pde = 22fda067 *pte = 00000000 Oops: 0000 [#1] SMP Modules linked in: snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_hwdep snd soundcore tuner_simple tuner_types tea5767 tuner tvaudio bttv bridgebnep rfcomm l2cap bluetooth it87 hwmon_vid hwmon fuse sunrpc ipt_REJECT nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables x_tables ipv6 dm_mirrordm_multipath dm_mod configfs videodev v4l1_compat ir_common 8139cp compat_ioctl32 v4l2_common 8139too videobuf_dma_sg videobuf_core mii btcx_risc tveeprom i915 button snd_page_alloc serio_raw drm pcspkr i2c_algo_bit i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support sr_mod cdrom sg ata_generic pata_acpi ata_piix libata sd_mod scsi_mod ext3 jbdmbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: soundcore] Pid: 15413, comm: qv4l2 Not tainted (2.6.25.14-108.fc9.i686 #1) EIP: 0060:[<00000000>] EFLAGS: 00210246 CPU: 0 EIP is at 0x0 EAX: 00008000 EBX: ebd21600 ECX: e2fd9ec4 EDX: 00200046 ESI: f8c0f0c4 EDI: f8c0f0c4 EBP: e2fd9d50 ESP: e2fd9d2c DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process qv4l2 (pid: 15413, ti=e2fd9000 task=ebe44000 task.ti=e2fd9000) Stack: f8c0c6ae e2ff2a00 00000d00 e2fd9ec4 ebc4e000 e2fd9d5c f8c0c448 00000000 f899c12a e2fd9d5c f899c154 e2fd9d68 e2fd9d80 c0560185 e2fd9d88 f8f3e1d8 f8f3e1dc ebc4e034 f8f3e18c e2fd9ec4 00000000 e2fd9d90 f899c286 c008561c Call Trace: [<f8c0c6ae>] ? chip_command+0x266/0x4b6 [tvaudio] [<f8c0c448>] ? chip_command+0x0/0x4b6 [tvaudio] [<f899c12a>] ? i2c_cmd+0x0/0x2f [i2c_core] [<f899c154>] ? i2c_cmd+0x2a/0x2f [i2c_core] [<c0560185>] ? device_for_each_child+0x21/0x49 [<f899c286>] ? i2c_clients_command+0x1c/0x1e [i2c_core] [<f8f283d8>] ? bttv_call_i2c_clients+0x14/0x16 [bttv] [<f8f23601>] ? bttv_s_ctrl+0x1bc/0x313 [bttv] [<f8f23445>] ? bttv_s_ctrl+0x0/0x313 [bttv] [<f8b6096d>] ? __video_do_ioctl+0x1f84/0x3726 [videodev] [<c05abb4e>] ? sock_aio_write+0x100/0x10d [<c041b23e>] ? kmap_atomic_prot+0x1dd/0x1df [<c043a0c9>] ? enqueue_hrtimer+0xc2/0xcd [<c04f4fa4>] ? copy_from_user+0x39/0x121 [<f8b622b9>] ? __video_ioctl2+0x1aa/0x24a [videodev] [<c04054fd>] ? do_notify_resume+0x768/0x795 [<c043c0f7>] ? getnstimeofday+0x34/0xd1 [<c0437b77>] ? autoremove_wake_function+0x0/0x33 [<f8b62368>] ? video_ioctl2+0xf/0x13 [videodev] [<c048c6f0>] ? vfs_ioctl+0x50/0x69 [<c048c942>] ? do_vfs_ioctl+0x239/0x24c [<c048c995>] ? sys_ioctl+0x40/0x5b [<c0405bf2>] ? syscall_call+0x7/0xb [<c0620000>] ? cpuid4_cache_sysfs_exit+0x3d/0x69 ======================= Code: Bad EIP value. EIP: [<00000000>] 0x0 SS:ESP 0068:e2fd9d2c Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: Improve debug msg by printing something more humanMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: Improve comments and remove a unneeded prototypeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13Avoid writing outside shadow.bytes[] arrayMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> There were no check about the limits of shadow.bytes array. This offers a risk of writing values outside the limits, overriding other data areas. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: use a direct reference for chip descriptionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Instead of storing the pointer for the proper entry at chip description table, the driver were storing an indirect reference, by using an index. Better to reference directly the data. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: update initial commentsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> A driver used on several bttv boards since 2000 is not experimental anymore ;) Remove it from the comments. While there, update copyrights addind a quick note about the "recent" updates since 2005. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: add additional logic to avoid OOPSMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> This patch checks for volume, bass, treble, set mode and get mode callbacks before actually enabling the code that would use them. Instead of aborting the driver for load, this patch will allow it to load with a reduced number of functionatities. This prevents OOPS if some board entry is missing a needed callback. Priority: high Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvtime: avoid OOPS at generic_checkmode()Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> generic_checkmode() were called, via a callback, for some tvaudio chips. There's just one callback code used on all those boards. So, it makes no sense on keeping this as a callback. Since there were some OOPS reported on tvaudio on kerneloops.org, this patch removes this callback, adding the code at the only place were it is called: inside chip_tread. A flag were added to indicate the need for a kernel thread to set stereo mode on cards that needs it. Priority: high Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: cleanup - group all callbacks togetherMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: instead of using a magic number, use ARRAY_SIZEMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Also, the default standard is the first one. So, fix the comment at the array. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: Make sure that we don't overflow name bufferMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13tvaudio: fix a memory leakMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Fix key repetition with HVR-950 IRMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12em28xx: experimental support for HVR-950 IRMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12merge: http://linuxtv.org/hg/~pinchartl/uvcvideoMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11Fix section mismatch warning for dm1105 during makeMauro Carvalho Chehab
From: Igor M. Liplianin <liplianin@tut.by> -- Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12em28xx: Properly implement poll support for IR'sMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> The first em28xx were based on i2c IR's. However, some newer designs are coming with a polling-based IR. Those are done by reading a register set at em28xx. This patch adds core polling support for those devices. Later patches will add support for some device-specific IR's. This patch adds the same basic IR polling code used by bttv, cx88 and saa7134, and shares the common getkey masks defined at ir-common. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12merge: http://linuxtv.org/hg/~dougsland/dvb-fixMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12merge: http://linuxtv.org/hg/~awalls/cx18-bugfixMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12v4l core: fix debug printk for enumberating frameratesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Add registration for Pinnacle 80e ATSC tunerMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Add registration for Pinnacle 80e ATSC tuner Register the em2874 based Pinnacle 80e device. Note that support for this device also requires the new drx-j driver (which is not available yet) Thanks for Ray Lu from Empia for providing the em2874 datasheet. Thanks to Joerg Schindler from Pinnacle for providing sample hardware. Thanks to Rainer Miethling from Pinnacle for providing engineering support. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Properly support capture start on em2874Mauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Properly support capture start on em2874 The transport stream enable register moved in the em2874, so make it work properly. Thanks for Ray Lu from Empia for providing the em2874 datasheet. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Don't load em28xx audio module for digital-only devicesMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Don't load em28xx audio module for digital-only devices Rework the logic so that the em28xx-alsa module does not get loaded for devices that don't support analog audio (such as the em2874) Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Handle changes to endpoint layout in em2874Mauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Handle changes to endpoint layout in em2874 Empia moved around their endpoint configuration in newer chips, so accommodate the changes Thanks for Ray Lu from Empia for providing the em2874 datasheet. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Fix possible null pointer dereference in info messageMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Fix possible null pointer dereference in info message Fix case where we could end up dereferencing a NULL pointer if dev->vdev or dev->vbi_dev were not set properly. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Skip reading eeprom in newer Empia devicesMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Skip reading eeprom in newer Empia devices Empia switched to a 16-bit addressable eeprom in newer devices. While we could certainly write a routine to read the eeprom, there is nothing of use in there that cannot be accessed through registers, and there is the risk that we could corrupt the eeprom (since a 16-bit read call is interpreted as a write call by 8-bit eeproms). So just be safe and bail out of the function. Thanks for Ray Lu from Empia for providing the em2874 datasheet. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Support different GPIO/GPO registers for newer devicesMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Support different GPIO/GPO registers for newer devices Empia moved the location of the GPIO/GPO registers in newer devices. Add the ability to specify the relocated registers (including caching of register contents). Thanks for Ray Lu from Empia for providing the em2874 datasheet. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Remember chip id of devices at initializationMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Remember chip id of devices at initialization When setting up the device, remember the chip id, so we can control behavior in the future without having to read the register continuously. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Add a EM28XX_NODECODER option to the list of available decodersMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Add a EM28XX_NODECODER option to the list of available decoders Add a EM28XX_NODECODER option to the list of available decoders. This option becomes important for devices that do not have analog support. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Remove unused variable from em28xx-audio.cMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Remove unused variable from em28xx-audio.c Fix warning for unused "ret" variable Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12Add chip id for em2874 to list of known chipsMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Add em2874 chip id Add chip id for em2874 to list of known chips Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-12usb-urb: fix memory leakDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Free allocated memory Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-12ttusb_dec: fix memory leakDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Free allocated memory Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-12dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbsDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Added validation for ttusb_alloc_iso_urbs Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-12dvb-ttusb-budget: Add NULL pointer validationDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Added validation for NULL pointer Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-12ttusb_dec: Add NULL pointer validationDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Added validation for NULL pointer Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-11v4l core: a few get ioctls were lacking memory cleanMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11v4l core: add support for enumerating frame sizes and intervalsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> video_ioctl2 lacks implementation of those two ioctls: - VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS Adds implementation for those. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11uvcvideo: Enable compilation on kernels older than 2.6.22Laurent Pinchart
From: Laurent Pinchart <laurent.pinchart@skynet.be> The uvcvideo driver makes use of the usb_endpoint_* functions as well as the list_first_entry and uninitialized_var macros. Add them to v4l/compat.h and update the driver with kernel version-based conditional compilation sections. Priority: normal Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
2008-11-11saa7134-dvb: MFE attachment clean-up for saa-7134 dvbMauro Carvalho Chehab
From: Darron Broad <darron@kewl.org> This cleans-up MFE attachment for saa-7134 dvb devices. note: MFE is not fully implemented here yet. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11cx88-dvb: MFE attachment clean-up for HVR-3000/4000Mauro Carvalho Chehab
From: Darron Broad <darron@kewl.org> This cleans-up MFE attachment for these cards plus two cases of potential memory leak on attachment failure. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11Backport a few minor changes from upstreamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-10Whitespace cleanupMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Some recent patches added a few bad whitespaces. Remove that. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-10merge: http://linuxtv.org/hg/~pinchartl/uvcvideoMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-10merge: http://linuxtv.org/hg/~jfrancois/gspca/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>