summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/zoran
AgeCommit message (Collapse)Author
2009-05-02zoran: Fix &&/|| typoMauro Carvalho Chehab
From: Roel Kluin <roel.kluin@gmail.com> Fix &&/|| typo Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-30zoran: fix bug when enumerating format -1Trent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> If someone requests a format at fmt->index == (unsigned)-1 and the first format in the array doesn't have the requested type then num will still be -1 when it's compared to fmt->index and there will appear to be a match. Restructure the loop so this can't happen. It's simpler this way too. The unnecessary check for (unsigned)fmt->index < 0 found by Roel Kluin <roel.kluin@gmail.com> is removed this way too. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-04-02v4l2-subdev: change s_routing prototypeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l: increase version numbers of drivers converted to v4l2_subdev.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-common: add explicit v4l2_device pointer as first arg to ↵Hans Verkuil
new_(probed)_subdev From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-subdev: move s_std from tuner to core.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-27Fix printk format warning:Mauro Carvalho Chehab
From: Randy Dunlap <randy.dunlap@oracle.com> drivers/media/video/zoran/zoran_driver.c:345: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-14zoran: fix incorrect return type of notify function.Mauro Carvalho Chehab
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-13merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-notifyMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-08zoran/bt819: use new notify functionality.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Bt819 needs the parent driver to drive a GPIO pin low and high in order to reset its fifo. Use the new notify callback for this. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-10zoran: replace functions names in strings with __func__Trent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> It reduces the size of the driver over all, and the function names in strings need to be manually kept up to date while __func__ doesn't. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-10zoran: Pass zoran_fh pointers instead of file pointersTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Many functions had a struct file pointer argument, but all they wants is the struct zoran_fh pointer from the file's private data. Since every caller of those functions already has the zoran_fh, just pass the that instead. This saves a dereference in each function change. While I'm at it, change the code formatting of affected functions to be kernel standard style. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-10zoran: Don't frighten users with failed buffer allocationTrent Piepho
From: Jean Delvare <khali@linux-fr.org> kmalloc() can fail for large video buffers. By default the kernel complains loudly about allocation failures, but we don't want to frighten the user, so ask kmalloc() to keep quiet on such failures. Priority: normal Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Cc: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-10zoran: Drop the lock_norm module parameterTrent Piepho
From: Jean Delvare <khali@linux-fr.org> The lock_norm module parameter doesn't look terribly useful. If you don't want to change the norm, just don't change it. As a matter of fact, no other v4l driver has such a parameter. Priority: normal Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Cc: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-10zoran: Unify buffer descriptorsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The zoran driver had two kinds of buffer descriptors, one for jpg buffers and one for raw buffers. They were mostly the same with only a couple different fields. A file handle had two sets of descriptors even though only one could be in use at once. I've combined the two kinds into a single buffer descriptor that has the different parts in a union. Each file handle (struct zoran_fh) now only has one set of buffers. The device itself (struct zoran) still has two since it can have both raw and jpg buffers in use at the same time. Along the way, I re-wrapped many lines that were ugly. Some code which was duplicated for both raw and jpg buffers is now merged. The code to setup buffers in zoran_open_init_session() can be merged, as can the code to delete the buffers in zoran_close_end_session(). Lots of code in zoran_vm_close() and zoran_mmap() is merged as well. Since there is now only one set of buffer size & count fields, it's important they get set correctly when changing modes. So I created helper functions to change fh->map_mode which also set the buffer size & count to the proper values. jpg_sync() should only be called in jpg mode, it used to be able to tell the difference between jpg mode active and raw mode, but now there is only one active field. In zoran_streamoff() the spin lock is held for the entire sequence of operations to disable streaming. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-10avoid loading the entire videodev.h header for drivers that are already V4L2 ↵Mauro Carvalho Chehab
only From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-09merge: http://linuxtv.org/hg/~tap/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-05zoran: Change first argument to zoran_v4l2_buffer_statusTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> It was a struct file *, but all that function wants is the struct zoran_fh from the file's private data. Since every caller already has this, just pass the zoran_fh instead. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-03-05zoran: auto-select bt866 for AverMedia 6 EyesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> AFAIK, the bt866 is only seen on AverMedia 6 Eyes. However, no module selects it. Adds a proper select for this driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-03v4l2: Move code to zero querybuf output struct to v4l2_ioctlTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> For VIDIOC_QUERYBUF only the first two fields, size and type, are used as input. The rest can be filled in by the driver as output. Most drivers do not actually use all the field and unused ones should be zeroed out. Some drivers have code to do this and some drivers should but don't. So put some zero out code in v4l2_ioctl so that all drivers using that system get it. The drivers that have zeroing code get that code removed. Some drivers checked that the type field was valid, but v4l2_ioctl already does this so those checks can be removed as well. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-02-20zoran: increase bufsize to a value suitable for 768x576.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-20zoran: s_jpegcomp should return a proper result, not 0.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-19v4l-dvb: cleanup obsolete references to v4l1 headers.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-19zoran: convert to v4l2_device/v4l2_subdev.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: TRY_FMT and S_FMT now do the same parameter checks.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: change buffer defaults to something that works with tvtimeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> By popular request increased the default number and size of the buffers to something that tvtime likes. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: clean up some old V4L1 left-overs and remove the MAP_NR macro.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran et al: convert zoran i2c modules to V4L2.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The zoran i2c modules were still using V4L1 internally. Replace this with V4L2. Also deleted saa7111.c and saa7114.c, we use saa7115.c instead. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: if reqbufs is called with count == 0, do a streamoff.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> count == 0 has a special meaning, implement this. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: fix G_FMTHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Returned height was really height / 2. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: fix TRY_FMT supportHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Actually try to turn the format into something usable rather than just rejecting it if it isn't perfect. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: cleanups in an attempt to make the source a bit more readable.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: set correct parent of the video device.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: remove old V4L1 ioctls, use v4l1-compat instead.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: set bytesperline to 0 when using MJPEG.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Remove bogus check on bytesperline in the try_fmt_vid_out call. Just set it to 0. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: fix field typo.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: use slider flag with volume etc. controls.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: remove broken BIGPHYS_AREA and BUZ_HIMEM code, and allow for kmallocs ↵Hans Verkuil
> 128 kB From: Hans Verkuil <hverkuil@xs4all.nl> Remove memory allocation madness. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-18zoran: convert to video_ioctl2 and remove 'ready_to_be_freed' hack.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-12zoran: fix printk formatMauro Carvalho Chehab
From: Randy Dunlap <randy.dunlap@oracle.com> Fix printk format warning: drivers/media/video/zoran/zoran_driver.c:345: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-12zoran: Get rid of extra module ref countTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The zoran driver does a module_get/put of THIS_MODULE on device open/close. This isn't necessary as the kernel does this automatically. Clean up the failure path of zoran_open() somewhat. Make the dprintk()s on open/close a higher debug level and make the user count printed take the current open/close into account. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org>
2009-01-12zoran: Remove zr36057_adr fieldTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The driver should only use the kernel mapped io address, zr36057_mem, and not the PCI bus address, zr36057_adr. Since the latter is only printed out once, there is no need to save it in the driver data structure. There was some old code that looked like it was for the Alpha architecture which would use the PCI bus address. It probably no longer applies to modern kernels. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org>
2009-01-12zoran: Use pci device table to get card typeTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Instead of using custom code, just let the device layer look it up for us from the pci device table. This requires extending the pci device table to list each known card, plus a catch-all entry for the cards that don't have sub-system vendor/device data. Improve some of the info and error messages too. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org>
2009-01-12zoran: Remove global device arrayTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The driver was keeping a global array with an entry for each zoran device probed. It was a leftover from when the driver didn't dynamically allocate the driver data for each device. There was only one use left, in the video device's ->open() method, looking up the struct zoran for the opened device from the minor number. This can be done better with video_get_drvdata(). Since zoran_num is now only used in the pci driver's ->probe() method, it doesn't need to be an atomic_t and be static. There is a race if multiple zoran cards could be probed at the same time, but currently the probe method for a given driver is single threaded. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org>
2009-01-12zoran: Better syntax for initializing array module paramsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> When initializing a module parameter that is a per-card array, use "{ [0 ... (BUZ_MAX-1)] = -1 }" instead of "{ -1, -1, -1, -1 }". This way all of the entries will be correctly set to -1 if someone changes BUZ_MAX to a value other than 4. Adjust some of the parameter help text too. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org>
2009-01-12fixup previous patchTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Commited patch 0a97a636c31e wasn't the latest version of the patch. This fixes some problems with it and should be folded into it. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-01-11zoran: Fix a few CodingStyle issues rised by the previous patchMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> CC: Jean Delvare <khali@linux-fr.org> CC: Trent Piepho <xyzzy@speakeasy.org>
2009-01-11Convert to be a pci driverMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> This is a really old and crufty driver that wasn't using the long established pci driver framework. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-09zoran: Re-adds udev entry removed by changeset 60b4bde4Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Changeset 60b4bde48b36c0315ef41fd38c339b9c7e68c46f removed an unused struct on zoran driver, when compiled with "Y". However, as pointed by Jean Delvare <khali@linux-fr.org>, this is neeeded when the driver is compiled as a module, since udev relies on it to auto-load the module. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30v4l2-ioctl: change to long return type to match unlocked_ioctl.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Since internal to v4l2 the ioctl prototype is the same regardless of it being called through .ioctl or .unlocked_ioctl, we need to convert it all to the long return type of unlocked_ioctl. Thanks to Jean-Francois Moine for posting an initial patch for this and thus bringing it to our attention. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Jean-Francois Moine <moinejf@free.fr>