aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/hdpvr (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-21[media] hdpvr: add usb product id 0x4903Janne Grunau2-0/+2
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: decrease URB timeout to 90msAlan Young1-1/+1
Based on USB traces of the windows driver. Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: fix audio input setting for pre AC3 firmwaresJanne Grunau1-2/+1
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: use AC3 as default audio codec for SPDIFJanne Grunau1-1/+5
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: add two known to work firmware versionsJanne Grunau2-13/+18
refine the firmware version test and print the version only once Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: print firmware dateAlan Young1-0/+4
Hauppauge released different firmwares using the same version number. The firmware date can be used to identify the exact driver/firmware combination. Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: remove unecessary sleep in buffer drain loopAlan Young1-2/+0
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: remove unnecessary sleep in hdpvr_config_callAlan Young1-2/+0
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] hdpvr: Add missing URB_NO_TRANSFER_DMA_MAP flagJames M McLaren1-0/+1
Necessary on arm. Signed-off-by: Janne Grunau <j@jannau.net> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21[media] i2c: Stop using I2C_CLASS_TV_ANALOGJean Delvare1-1/+0
Detection class I2C_CLASS_TV_ANALOG is set by a few adapters but no I2C device driver is setting it anymore, which means it can be dropped. I2C devices on analog TV adapters are instantiated explicitly these days, which is much better. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: drivers/media: Remove unnecessary casts of private_dataJoe Perches1-2/+2
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jarod Wilson <jarod@redhat.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: hdpvr: Fixes probing functionPerceval Anichini1-0/+5
In the hdpvr_probe () function, when an error occurs while probing the device, the workqueue created by the create_single_thread () call is not properly destroyed. Signed-off-by: Perceval Anichini <perceval@trilogic.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: drivers/media: Eliminate a NULL pointer dereferenceJulia Lawall1-1/+1
In each case, the print involves dereferencing a value that is NULL or is near NULL. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds1-4/+4
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack1-4/+4
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-19V4L/DVB: hdpvr: fix disconnect sequenceHans Verkuil3-28/+28
Disconnecting the HDPVR caused a kernel oops if lockdep was enabled. In addition, if an app still had video0 open and attempted to call ioctl when the device was already disconnected the system would crash. Move the freeing and cleanup code to the release function: that is the right place for it since you know when you get there that nobody is using the device. Also removed usb_set_intfdata: v4l2_device_register sets this already to v4l2_dev. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-02-26V4L/DVB: add missing 'p' at card name 'Hauppauge HD PVR'Lars Hanisch1-1/+1
I don't know if there are applications which rely on this name, but after all it's a spelling mistake. Signed-off-by: Lars Hanisch <dvb@cinnamon-sage.de> CC: Janne Granau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: hdpvr: add new USB product idJanne Grunau2-0/+2
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: hdpvr-video: cleanup signednessMárton Németh1-1/+2
The fifth parameter of usb_bulk_msg() is a pointer to signed (see <linux/usb.h>) so also call this function with pointer to signed. This will remove the following sparse warning (see "make C=1"): * warning: incorrect type in argument 5 (different signedness) expected int *actual_length got unsigned int *<noident> Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB: hdpvr-core: make module parameters localMárton Németh1-2/+2
The default_video_input and default_audio_input module parameters are only used inside the hdpvr-core.c file so make them static. This will remove the following sparse warnings (see "make C=1"): * warning: symbol 'default_video_input' was not declared. Should it be static? * warning: symbol 'default_audio_input' was not declared. Should it be static? Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13685): Correct code taking the size of a pointerJulia Lawall1-3/+3
sizeof(print_buf) is just the size of the pointer. Change it to the size used in the allocation of print_buf earlier in the same function. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Cc: Janne Grunau <j@jannau.net> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13552): v4l: Replace video_is_unregistered with video_is_registeredLaurent Pinchart1-1/+1
Replace the video_is_unregistered function by a video_is_registered function. The V4L2_FL_UNREGISTERED flag is replaced by a V4L2_FL_REGISTERED flag. This change makes the video_is_registered function return coherent results when called on an initialize but not yet registered video_device instance. The function can now be used instead of checking video_device::minor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13550): v4l: Use the new video_device_node_name functionLaurent Pinchart1-6/+4
Fix all device drivers to use the new video_device_node_name function. This also strips kernel log messages from the "/dev/" prefix, has the device node location is a userspace policy decision unknown to the kernel. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13413): introduce missing kfreeJulia Lawall1-2/+6
Error handling code following a kzalloc should free the allocated data. Similarly for usb-alloc urb. 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; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[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>
2009-09-12V4L/DVB (12472): hdpvr-control: fix bad whitespacesMauro Carvalho Chehab1-12/+12
It were using 7 spaces instead of tab for indent. Cc: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12373): hdpvr: fix lock imbalancesJiri Slaby2-8/+10
There are many lock imbalances in this driver. Fix all found. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12343): Stop defining I2C adapter IDs nobody usesJean Delvare1-1/+0
There is no point in defining I2C adapter IDs when no code is using them. As this field might go away in the future, stop using it when we don't need to. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13V4L/DVB (12428): hdpvr: add missing initialization of current_normHans Verkuil1-0/+2
Drivers should either set current_norm or supply a g_std callback. The hdpvr driver does neither. Since it initializes to a 60 Hz format I've initialized the current_norm to NTSC | PAL_M | PAL_60 which is the 60 Hz subset of tvnorms. Cc: Janne Grunau <j@jannau.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-12trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)ableThadeu Lima de Souza Cascardo1-1/+1
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30V4L/DVB (11247): hdpvr: empty internal device buffer after stopping streamingJanne Grunau1-0/+26
Makes the next capturing starting faster and more reliable. Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11246): hdpvr: convert printing macros to v4l2_* with struct v4l2_deviceJanne Grunau3-64/+75
it gives us a nice and unique prefix per device Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11245): hdpvr: add struct v4l2_deviceJanne Grunau2-0/+13
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11231): hdpvr: locking fixesJanne Grunau2-1/+5
unlock io_mutex in hdpvr_stop_streaming hdpvr_disconnect to allow the streaming worker to stop before we flush the workqueue. do not return to user space with mutex held in vidioc_encoder_cmd with an unknown encoder command. Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11230): hdpvr: return immediately from hdpvr_poll if data is availableJanne Grunau1-12/+8
simplifies check for available data with hdpvr_get_next_buffer Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11229): hdpvr: set usb interface dev as parent in struct video_deviceJanne Grunau3-4/+6
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11228): hdpvr: use debugging macro for buffer statusJanne Grunau1-17/+10
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11152): hdpvr: Fix build with Config_I2C not setJanne Grunau2-1/+13
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11125): fix mispelled Hauppauge in HD PVR and PVR USB2 driver commentsJanne Grunau5-5/+5
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11097): use video_ioctl2 as ioctl handler directlyJanne Grunau1-44/+41
The encoder commands ioctls are available in v4l2_ioctl_ops. Use them and get rid of the custom ioctl handler and use video_ioctl2. Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30V4L/DVB (11096): V4L2 Driver for the Hauppauge HD PVR usb capture deviceJanne Grunau7-0/+2328
The device encodes component video up to 1080i to a MPEG-TS stream with H.264 video and stereo AAC audio. Newer firmwares accept also AC3 (up to 5.1) audio over optical SPDIF without reencoding. Firmware upgrade is unimplemeted but rather unimportant since the firmware sits on a flash chip. The I2C adapter to drive the integrated infrared receiver/sender is currently disabled due to a conflict with cx18-based devices. Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>