aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2009-03-11Enable camera interface clockWerner Almesberger
This patch explicitly enabled to "camif" clock, to make the driver work again with Qi commit a24b5fcf84d2cf633a3f660edd23fa4c2a3da231. Note that this is not fully tested since the Qi change also broke the LCM driver. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-10add primitive camera power controlWerner Almesberger
This dirty hack adds camera activation/deactivation on open/close. This code will have to move to a machine/platform area later. The general driver is the wrong place for it. It also removes the unconditional activation and moves the domain setting to the rest of the power control code. (Thanks, Andy !) Note that opening the camera now always takes about 20 seconds until the settings are downloaded, not just on the first open. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-09Clean up camera driverWerner Almesberger
This patch does some light cleanup on the camera driver: - removed unused return values or unused initializations - remove backslashes at regular line ends (Python-style ?) - removed redundant casts - remove redundant parentheses - wrapped long lines - general whitespace cleanup - fixed broken logic in s3c_camif_v4l2_g_input and s3c_camif_v4l2_g_output - let mutex that really really wants to be a semaphore have its way Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-09Adjust MCLK for use with PLLWerner Almesberger
The PLL converts a 26.6 MHz input clock to 87.8 MHz, which is later divided by two and becomes PCLK. (See comments below for details.) All this looks like a textbook example for platform stuff, but let's take it one step a time. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-09Clean up camera sensor driverWerner Almesberger
This patch does some light cleanup on the S5K4BA driver: - change structure initializers from field: to .field = syntax - exlicitly name fields in structure initializers - added proper error handling to sensor_read - use ARRAY_SIZE - remove redundant parentheses and braces - change // to /* ... */ - remove non-ASCII characters - general whitespace cleanup - removed an unused variable warning (4xa_sensor.h is only partially cleaned up.) Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-09Clean up camera interface driverWerner Almesberger
This patch does some cleanup on the camera interface driver: - remove backslashes at regular line ends (Python-style ?) - removed unused return values or unused initializations - combined duplicated or otherwise highly redundant code - remove redundant parentheses - wrapped long lines - general whitespace cleanup - s3c_camif_input_msdma_codec, s3c_camif_input_msdma_preview, s3c_camif_set_target_format: fixed clearing of old register values Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-07Increase camera IO drive strength from 2 mA to 8 mAWerner Almesberger
The camera driver reduced all IO drivers from their reset defaults of 6 mA to only 2 mA, which caused severe signal distortion at higher speeds. This patch sets them to 8 mA and also removes apparently useless repetitions of the setting. Note that the correct setting of the I2C pullups still needs to be verified. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-05Dirty hacks to make it all workWerner Almesberger
A few dirty hacks to make the camera driver work: - because V4L no longer guarantees that minor numbers provided by the client are actually used, the preview/codec selection mechanism falls apart. We work around this by defaulting to preview when we don't know better. - power up the camera in platform code, not cleanly via power control device. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-05Samsung S3C camera subsystem config and MakefileWerner Almesberger
Add Samsung S3C camera subsystem to kernel configuration and build process. Original code is from Samsung's BSP. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-05Fix Samsung S5K4BA camera driver.Werner Almesberger
This patch makes the Samsung S5K4BA driver work in 2.6.29 and also solves a few minor issues, such as trailing whitespace. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-05Add Samsung S5K4BA camera driverWerner Almesberger
This is the original Samsung S5K4BA camera driver code from the 2.6.21 BSP. The changes that are needed to make this work in 2.6.29 are in the next patch. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-05Update Samsung S3C camera interface driverWerner Almesberger
Update the camera interface driver from 2.6.21 to 2.6.29 and fix some trivial issues. There are still a few ugly spots, marked with "@@@". Only tested on S3C6410. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-03-05Add Samsung S3C camera driver for V4LWerner Almesberger
This is the original Samsung S3C camera driver code from the 2.6.21 BSP. The changes that are needed to make this work in 2.6.29 are in the next patch. Signed-off-by: Werner Almesberger <werner@openmoko.org>
2009-01-22MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatc ↵merge
hes-tracking-fix-stray-endmenu-patch-1232632040-1232632141 pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040-1232632141 / fdf777a63bcb59e0dfd78bfe2c6242e01f6d4eb9 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 stable-tracking-hist top was MERGE-via-mokopatches-tracking-fix-stray-endmenu-patch-1232632040 / 90463bfd2d5a3c8b52f6e6d71024a00e052b0ced ... parent commitmessage: From: merge <null@invalid> MERGE-via-mokopatches-tracking-hist-fix-stray-endmenu-patch mokopatches-tracking-hist top was fix-stray-endmenu-patch / 3630e0be570de8057e7f8d2fe501ed353cdf34e6 ... parent commitmessage: From: Andy Green <andy@openmoko.com> fix-stray-endmenu.patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-10-21V4L/DVB (9336): cx88: always de-alloc frontends on fault conditionDarron Broad
De-alloc frontends on fault condition. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9335): videobuf: split unregister bus creating self-contained ↵Darron Broad
frontend de-allocator This creates a self contained frontend de-allocator for the instances where an adapter has not been registered yet frontend de-allocation may be required. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9334): cx88: dvb_remove debug outputDarron Broad
Add debug output for dvb_remove enter. Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9333): cx88: Not all boards that requires cx88-mpeg has frontendsMauro Carvalho Chehab
The multifrontend changes on cx88 assumed that all boards that use cx88-mpeg supports DVB. This is not true. There also a few analog-only boards based on Blackboard design that also uses cx88-mpeg. For those boards, there's no need to allocate dvb frontends. This patch fixes videobuf allocation for those devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9332): cx88: initial fix for analogue only compilationDarron Broad
Initial fix for when analogue only is selected for compilation (ie, !CX88_DVB) Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9331): Remove unused inode parameter from video_ioctl2Mauro Carvalho Chehab
inode is never used on video_ioctl2. Remove it and rename the function to __video_ioctl2. This allows its usage directly as a callback at fops.unlocked_ioctl. Since we still need a callback with inode to be used with fops.ioctl, this patch adds video_ioctl2() that is just a call to __video_ioctl2(). Also, this patch adds some comments about video_ioctl2 and __video_ioctl2 usage at v4l2-ioctl.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9330): Get rid of inode parameter at v4l_compat_translate_ioctl()Mauro Carvalho Chehab
The inode parameter at v4l_compat_translate_ioctl() were just passed over several places just to keep compatible with fops.ioctl. However, it weren't used anywere. This patch gets hid of this unused parameter. Cc: Laurent Pinchart <laurent.pinchart@skynet.be> Cc: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9328): ivtvfb: FB_BLANK_POWERDOWN turns off video outputIan Armstrong
When using FBIOBLANK, FB_BLANK_POWERDOWN will now switch off the video output. Since some televisions turn themselves off after a while with no signal, this is the closest we can get to power-saving. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9327): v4l: use video_device.num instead of minor in video%dHans Verkuil
The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now independent of the minor number. So instead of using the minor field of the video_device struct one has to use the num field: this always contains the kernel number of the device node. I forgot about this when I did the v4l2 core change, so this patch converts all drivers that use it in one go. Luckily the change is trivial. Cc: michael@mihu.de Cc: mchehab@infradead.org Cc: corbet@lwn.net Cc: luca.risolia@studio.unibo.it Cc: isely@pobox.com Cc: pe1rxq@amsat.org Cc: royale@zerezo.com Cc: mkrufky@linuxtv.org Cc: stoth@linuxtv.org Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9326): ivtv: avoid green flashing when loading ivtvMartin Dauskardt
When loading ivtv the TV-out of the PVR-350 will flash green since the saa712x is activated before the MPEG decoder has been initialized. Deactivate the saa712x until the MPEG decoder has been initialized. Signed-off-by: Martin Dauskardt <martin.dauskardt@gmx.de> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9325): ivtv: switch to unlocked_ioctl.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9324): v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.Hans Verkuil
Based on an older patch from Sakari Ailus. Cc: Sakari Ailus <sakari.ailus@nokia.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9322): v4l2-int-if: Export more interfaces to modulesSakari Ailus
Export v4l2_int_device_try_attach_all. This allows initiating the initialisation of int if device after the drivers have been registered. Also allow drivers to call ioctls if v4l2-int-if was compiled as module. Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9316): s5h1411: Power down s5h1411 when not in useDevin Heitmueller
Power down the s5h1411 demodulator when not in use (on the Pinnacle 801e, this brings idle power from 123ma down to 84ma). Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Acked-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9315): s5h1411: Skip reconfiguring demod modulation if already at ↵Devin Heitmueller
the desired modulation If we are already at the desired modulation, there is no need to reconfigure the demod (at a tuning time cost) Note that this change revealed that although the datasheet says the demod starts out in VSB-8 mode, the first tuning was failing consistently unless we went through the work of setting the registers. So add a field to denote this case so we always do the enable_frontend call, even if the first tuning request is for VSB-8. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9314): s5h1411: Perform s5h1411 soft reset after tuningDevin Heitmueller
If you instruct the tuner to change frequencies, it can take up to 2500ms to get a demod lock. By performing a soft reset after the tuning call (which is consistent with how the Pinnacle 801e Windows driver behaves), you get a demod lock inside of 300ms Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9313): s5h1411: Add the #define for an existing supporting I/FSteven Toth
s5h1411: Add the #define for an existing supporting I/F Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9312): s5h1411: Remove meaningless codeSteven Toth
s5h1411: Remove meaningless code Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9311): s5h1411: bugfix: Setting serial or parallel mode could ↵Steven Toth
destroy bits Adding a serialmode function to read/and/or/write the register for safety. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9310): s5h1411: read_status() locking detection fixes.Steven Toth
This includes new bit definitions for previously unknown bits. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9309): s5h1411: I/F related bugfix for 3.25 and remove spurious defineSteven Toth
This should improve performance. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9308): s5h1411: Improvements to the default registersSteven Toth
s5h1411: Improvements to the default registers Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9306): dsbr100: Add frequency checkAlexey Klimov
Add checking for frequency and printk if -1 returned. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9305): radio-mr800: Add BKL for usb_amradio_open()Alexey Klimov
Added BKL for usb_amradio_open() Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9304): dsbr100: CodingStyle issueAlexey Klimov
Fixed few coding style issues in dsbr100 Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9303): dsbr100: Correct bus_info stringAlexey Klimov
Replaced bus_info string from ISA to USB Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9301): pvrusb2: Keep MPEG PTSs from drifting awayBoris Dores
(Mike Isely) This change was empirically figured out by Boris Dores after empirically comparing against behavior in the Windows driver. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9300): pvrusb2: Fix deadlock problemMike Isely
Fix deadlock problem in 2.6.27 caused by new USB core behavior in response to a USB device reset request. With older kernels, the USB device reset was "in line"; the reset simply took place and the driver retained its association with the hardware. However now this reset triggers a disconnect, and worse still the disconnect callback happens in the context of the caller who asked for the device reset. This results in an attempt by the pvrusb2 driver to recursively take a mutex it already has, which deadlocks the driver's worker thread. (Even if the disconnect callback were to happen on a different thread we'd still have problems however - because while the driver should survive and correctly disconnect / reconnect, it will then trigger another device reset during the repeated initialization, which will then cause another disconect, etc, forever.) The fix here is simply to not attempt the device reset (it was of marginal value anyway). Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9299): cx18: Don't mask many real init error codes by mapping them ↵Andy Walls
to ENOMEM Changes to let error return codes bubble up to the user visible error message on card initialization. A number of them were being remapped to ENOMEM when no memory or array resource shortage existed. That hampered diagnosis of user trouble reports. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9298): cx18: Add __iomem address space qualifier to ↵Andy Walls
cx18_log_*_retries() argument cx18: Add __iomem address space qualifier to cx18_log_*_retries() addr argument to clean up sparse build warnings. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21V4L/DVB (9297): cx18: Fix memory leak on card initialization failureAndy Walls
On error exit, the cx18_probe() function did not use the proper entry in cx18_cards[] with kfree() when card init failed; leaking memory. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-20byteorder: remove direct includes of linux/byteorder/swab[b].hHarvey Harrison
A consolidated implementation will provide this generically through asm/byteorder, remove direct includes to avoid breakage when the changeover to the new implementation occurs. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (94 commits) USB: remove err() macro from more usb drivers USB: remove err() macro from usb misc drivers USB: remove err() macro from usb core code USB: remove err() macro from usb class drivers USB: remove use of err() in drivers/usb/serial USB: remove info() macro from usb mtd drivers USB: remove info() macro from usb input drivers USB: remove info() macro from usb network drivers USB: remove info() macro from remaining usb drivers USB: remove info() macro from usb/misc drivers USB: remove info() macro from usb/serial drivers USB: remove warn macro from HID core USB: remove warn() macro from usb drivers USB: remove warn() macro from usb net drivers USB: remove warn() macro from usb media drivers USB: remove warn() macro from usb input drivers usb/fsl_qe_udc: clear data toggle on clear halt request usb/fsl_qe_udc: fix response to get status request fsl_usb2_udc: Fix oops on probe failure. fsl_usb2_udc: Add a wmb before priming endpoint. ...
2008-10-17USB: remove warn() macro from usb media driversGreg Kroah-Hartman
USB should not be having it's own printk macros, so remove warn() and use the system-wide standard of dev_warn() wherever possible. In the few places that will not work out, use a basic printk(). Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17V4L/DVB (9296): Patch to remove warning message during cx88-dvb compilationIgor M. Liplianin
Remove warning message during cx88-dvb compilation. Also fixes double underline in function and struct names. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17V4L/DVB (9294): gspca: Add a stop sequence in t613.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>