summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-video.c
AgeCommit message (Collapse)Author
2009-07-28saa7134: fix lock imbalanceMauro Carvalho Chehab
From: Jiri Slaby <jirislaby@gmail.com> There seems to be one superfluos unlock in a poll function. Remove it. Priority: normal 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-07-10merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-rdsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-02remove redundant tests on unsignedDouglas Schilling Landgraf
From: Roel Kluin <roel.kluin@gmail.com> input, inp and i are unsigned. When negative they are wrapped and caught by the other test. Priority: normal Signed-off-by: Roel Kluin <roel.kluin@gmail.com> CC: Andy Walls <awalls@radix.net> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-06-20saa7134: set RDS capability if applicable.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-05-08saa7134-video.c: fix the block bugMauro Carvalho Chehab
From: figo.zhang <figo.zhang@kolorific.com> when re-open or re-start (video_streamon), the q->curr would not be NULL in saa7134_buffer_queue(), and all the qbuf will add to q->queue list,no one to do activate to start DMA,and then no interrupt would happened,so it will be block. In VIDEOBUF_NEEDS_INIT state, initialize the curr pointer to be NULL in the buffer_prepare(). Signed-off-by: Figo.zhang <figo.zhang@kolorific.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-01merge: 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-05-30saa7134: Use v4l bounding/alignment functionTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The v4l function has a better algorithm for aligning image size. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-05-31saa7134-video.c: Fix poll return conditionMauro Carvalho Chehab
From: Figo.zhang <figo.zhang@kolorific.com> In v2, when buf == NULL, it will goto err instead of returning "PULLERR" without unlocking. [mchehab@redhat.com: diff patch against v1 and v2 of saa7134-video.c: poll method lose race condition for capture video patch] Signed-off-by: Figo.zhang <figo.zhang@kolorific.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-05-18saa7134-video.c: poll method lose race conditionMauro Carvalho Chehab
From: figo.zhang <figo.zhang@kolorific.com> saa7134-video.c: poll method lose race condition Signed-off-by: Figo.zhang <figo.zhang@kolorific.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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-04-01v4l2-subdev: move s_standby from core to tuner.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> s_standby is only used to put the tuner in powersaving mode, so move it from core to tuner. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-29saa7134: add RDS support.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The Terratec Cinergy 600 TV MK3 supports the RDS decoder saa6588. Add support to saa7134 for such devices. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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-02-09saa7134: get rid of KBLMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> KBL is not needed on saa7134, so, let's remove it. However, we should take some care to avoid opening the module while initializing it. This issue exists with newer udev's that opens a device as soon as the driver is registered. So, a proper lock is needed on open. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-09saa7134-video: two int controls lack a stepMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Fix two broken controls where a step weren't specified. Without a step, userspace apps won't allow to adjust such controls. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-17saa7134: convert to the new v4l2 framework.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Register v4l2_device and switch to v4l2_subdev to access the i2c modules. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-30v4l2: debugging API changed to match against driver name instead of ID.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-30v4l2: introduce v4l2_file_operations.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-10-03v4l: remove vidioc_enum_fmt_vbi_capHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Remove the vidioc_enum_fmt_vbi_cap ops: it was scheduled for removal in 2.6.28 since the v4l2 specification says that V4L2_BUF_TYPE_VBI_CAPTURE should not support VIDIOC_ENUM_FMT. It's also pretty pointless. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-09-06saa7134-empress: fix changing the capture standard for non-tuner inputsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> When changing the standard the saa6752hs was not updated unless the input was the TV tuner. The saa6752hs should be updated regardless of the input. In addition the S_STD and G_STD ioctls for the mpeg video device didn't do anything. This is now fixed: they behave just like S_STD and G_STD on the video0 device. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-30v4l: move BKL down to the driver level.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The BKL is now moved from the video_open function in v4l2-dev.c to the various drivers. It seems about a third of the drivers already has a lock of some sort protecting the open(), another third uses video_exclusive_open (yuck!) and the last third required adding the BKL in their open function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-27merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-videodevMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26empress: fix control handling oopsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-26v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-21videodev: move all ioctl callbacks to a new v4l2_ioctl_ops structHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.13Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-16Add register get/set debug ioctls to saa7134Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-10New for I2S on for MPEG of saa7134_empressMauro Carvalho Chehab
From: Dmitry Belimov <d.belimov@gmail.com> Rework saa7134_enable_i2s function. Remove vendor specific data. Configure I2S output port specific for model of SAA7133/5-SAA7134. I think it is more good. Renamed definition of I2S audio output control register. It`s SAA7133/5 register Start video port after configuring procedure. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-28videodev: renamed the vidioc_*_fmt_* callbacksHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The naming for the callbacks that handle the VIDIOC_ENUM_FMT and VIDIOC_S/G/TRY_FMT ioctls was very confusing. Renamed it to match the v4l2_buf_type name. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-05-26Backport some miscelaneous trivial fixes from mainstreamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Summary of changes: linux/drivers/media/Makefile | 2 ++ linux/drivers/media/common/tuners/mxl5005s.c | 1 - linux/drivers/media/video/cx18/cx18-driver.c | 2 +- linux/drivers/media/video/saa7134/saa7134-video.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-16tda827x: fixed support of tuners with LNAHartmut Hackmann
From: Hartmut Hackmann <hartmut.hackmann@t-online.de> Tuner refactoring broke support of tuners with LNA configurations 1 and 2 for both, analog TV and DVB-T. Additionally, this patch initializes the saa713x gpios defined by the gpiomask at driver init to avoid undefined stated at dvb. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
2008-02-25From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>Mauro Carvalho Chehab
Subject: Convert videobuf-dma-sg to generic DMA API Date: Tue, 19 Feb 2008 13:40:54 +0100 (CET) videobuf-dma-sg does not need to depend on PCI. Switch it to using generic DMA API, convert all affected drivers, relax Kconfig restriction, improve compile-time type checking, fix some Coding Style violations while at it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-31Renames videobuf lock to vb_lockMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This helps to identify where vb_lock is being used, and find missusages of the locks. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-12-11Add EXPORT_SYMBOL_GPL to the saa7134 video control routinesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Those newer functions are used by saa7134-empress. Adds export for them: +EXPORT_SYMBOL_GPL(saa7134_g_ctrl); +EXPORT_SYMBOL_GPL(saa7134_s_ctrl); +EXPORT_SYMBOL_GPL(saa7134_queryctrl); Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11Convert saa7134-empress to video_ioctl2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> saa7134 were converted to video_ioctl2, but saa7134_empress weren't. This broke saa7134-empress, since it were dependent of saa7134_common_ioctl. With the conversion, the module had a size decrease of 436 bytes on x86_64: text data bss dec hex filename 5196 4912 4 10112 2780 old/saa7134-empress.ko 4760 4912 4 9676 25cc new/saa7134-empress.ko Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11Fix VBI supportMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> VBI were broken, since there weren't any function handlers for it. This patch fixes it, by removing the vbi_template, using, instead video_template. This also saves some extra BSS data. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11Rename all vidioc_ to saa7134_Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Some functions are used also by saa7134-empress, and need to be exported. To avoid namespace confusion, rename all of them to saa7134_ Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-07Fix some errors at the video_ioctl2 conversionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-07Reorder functions to make easier to compare with the previous codeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> After this patch, the order of the functions will be the same as before the patch converting the driver to user video_ioctl2. This makes easier to diff between the previous version and the newer one. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-07Converted saa7134-video to use video_ioctl2Mauro Carvalho Chehab
From: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-13V4L: Convert videobuf drivers to videobuf_stopBrandon Philips
Drivers were using cookie cutter code for stopping the read/stream. Use the new videobuf_stop function which is lock safe. Signed-off-by: Brandon Philips <bphilips@suse.de>
2007-11-06V4L: videobuf: don't chew up namespace STATE_.*, convert to VIDEOBUF_Brandon Philips
s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g s/STATE_PREPARED/VIDEOBUF_PREPARED/g s/STATE_QUEUED/VIDEOBUF_QUEUED/g s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g s/STATE_DONE/VIDEOBUF_DONE/g s/STATE_ERROR/VIDEOBUF_ERROR/g s/STATE_IDLE/VIDEOBUF_IDLE/g Signed-off-by: Brandon Philips <bphilips@suse.de>
2007-10-24 saa7134/: make 2 functions staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@kernel.org> saa7134_buffer_requeue() and set_tvnorm() can become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-18Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIGMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Currently, the only tuner-specific device that allows special configurations is tda9887. However, tea5767 also may require some special configurations (for example, to specify a different Xtal freq). This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl (TUNER_SET_CONFIG). The newer one allows specifying what tuner is appliable to a configuration set, and allows an arbitrary configuration struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-12 Additional Fixes for saa7134 suspend/resumeMauro Carvalho Chehab
From: Maxim Levitsky <maximlevitsky@gmail.com> Fixes few more problems I found in my saa7134 resume code: * Race between IRQ handler and .suspend()/.resume() functions * Removes timeout timers on active buffers - those buffers will be recaptured after resume * Adds suspend/resume for IR code - probably necessary if using polling mode * Adds #ifdef CONFIG_PM overs suspend code * Runs a quirk in set_tvnorm in suspend/resume too * Rearranges the order of calls in saa7134_resume to be exactly as in saa7134_initdev thus the card is initialized in exactly the same way * Since DMA audio capture suspend/resume isn't yet supported, avoid re-enabling it on resume for now Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-15v4l core: remove the unused .hardware V4L1 fieldMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> struct video_device used to define a .hardware field. While initialized on severl drivers, this field is never used inside V4L. However, drivers using it need to include the old V4L1 header. This seems to cause compilation troubles with some random configs. Better just to remove it from all drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10saa7134: Replace list_for_each+list_entry with list_for_each_entryTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> A couple loops weren't changed because they expected the loop iterator to be left as NULL if the list was empty. Maybe the code should just check for that first, then loop? Adjust some of the loop logic to be simpler. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-09-27V4L: properly fix support for capturing interlaced video in saa7134Maxim Levitsky
By "capturing interlaced video" I mean that card ensures that top field is really top and vice versa (I think it takes the filed ID from signal) Properly turn on/off that support depending on signal state Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-09-27V4L: Add basic support for suspend/resume for saa7134Maxim Levitsky
This adds support for suspend/resume for core of saa7134 Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>