aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-10-31368-5380/+34920
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (348 commits) [media] pctv452e: Remove bogus code [media] adv7175: Make use of media bus pixel codes [media] media: vb2: fix incorrect return value [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES [media] cx23885: Stop the risc video fifo before reconfiguring it [media] cx23885: Avoid incorrect error handling and reporting [media] cx23885: Avoid stopping the risc engine during buffer timeout [media] cx23885: Removed a spurious function cx23885_set_scale() [media] cx23885: v4l2 api compliance, set the audioset field correctly [media] cx23885: hook the audio selection functions into the main driver [media] cx23885: add generic functions for dealing with audio input selection [media] cx23885: fixes related to maximum number of inputs and range checking [media] cx23885: Initial support for the MPX-885 mini-card [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use [media] cx23885: Enable audio line in support from the back panel [media] cx23885: Allow the audio mux config to be specified on a per input basis [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs [media] cx23885: Name an internal i2c part and declare a bitfield by name [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming [media] cx23885: remove channel dump diagnostics when a vbi buffer times out ... Fix up trivial conflicts in drivers/misc/altera-stapl/altera.c (header file rename vs add)
| * [media] pctv452e: Remove bogus codeIgor M. Liplianin2011-10-191-15/+1
| | | | | | | | | | | | | | | | | | Currently, usb_register calls two times with cloned structures, but for different driver names. Let's remove it. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Acked-by: André Weidemann<Andre.Weidemann@web.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] adv7175: Make use of media bus pixel codesChristian Gmeiner2011-10-191-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ADV7175A/ADV7176A can operate in either 8-bit or 16-bit YCrCb mode. * 8-Bit YCrCb Mode This default mode accepts multiplexed YCrCb inputs through the P7-P0 pixel inputs. The inputs follow the sequence Cb0, Y0 Cr0, Y1 Cb1, Y2, etc. The Y, Cb and Cr data are input on a rising clock edge. * 16-Bit YCrCb Mode This mode accepts Y inputs through the P7–P0 pixel inputs and multiplexed CrCb inputs through the P15–P8 pixel inputs. The data is loaded on every second rising edge of CLOCK. The inputs follow the sequence Cb0, Y0 Cr0, Y1 Cb1, Y2, etc. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] media: vb2: fix incorrect return valueMarek Szyprowski2011-10-191-1/+1
| | | | | | | | | | | | | | | | | | This patch fixes incorrect return value. Errors should be returned as negative numbers. Reported-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] em28xx: implement VIDIOC_ENUM_FRAMESIZESMauro Carvalho Chehab2011-10-191-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pidgin uses gstreamer (and libv4l) to work. Without implementing this ioctl, it won't detect properly the size range, and driver will fail. So, this patch is required, in order to use an em27xx webcam, like Silvercrest. The pigdin/gstreamer/libv4l needs to be fixed, as it shouldn't assume that all drivers will implement this optional ioctl, but, at least now, devices with em28xx have a better chance of working with pidgin. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Stop the risc video fifo before reconfiguring itSteven Toth2011-10-141-0/+3
| | | | | | | | | | | | | | | | Safety reasons. We shouldn't be trying to reconfigure a risc processor instruction queue unless it's stopped. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Avoid incorrect error handling and reportingSteven Toth2011-10-141-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous driver over-reported errors and stopped the video fifo (causing video to stop) if 1) A risc error occured 2) The risc processor detected that it has missing lines in the video frame 3) The risc fifo is about to overflow. The previous driver reported all three of these cases as risc errors when this is technically not correct. So, the function was cleaned up. 1. Ensure that risc opcode related errors are correctly shown as such, and not overly reported for non-risc-opcode cases. 2. Ensure that line sync and overflow errors are not reported as opcode errors. 3. Ensure that only the risc-op-code case can stop the fifo and dump channel / risc processor information. The net result is that if video becomes unstable, cable disconnect, this will not trigger a stop of the video firmware (due to missing lines errors). Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Avoid stopping the risc engine during buffer timeoutSteven Toth2011-10-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | 1. Removed the verbose 'dump channel state to console', very noisy in weak signal conditions. 2. No need for the video buffer timeout to stop the risc engine here. Clearer and easier to maintain if start_video_dma() is the single place that this is done. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Removed a spurious function cx23885_set_scale()Steven Toth2011-10-141-8/+0
| | | | | | | | | | | | | | Unused function removed. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: v4l2 api compliance, set the audioset field correctlySteven Toth2011-10-141-0/+5
| | | | | | | | | | | | | | | | Inform applications that multiple audio inputs are available on non-tv inputs. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: hook the audio selection functions into the main driverSteven Toth2011-10-141-15/+25
| | | | | | | | | | | | | | | | | | | | Ensure audio is established at driver start. Ensure the correct defaults are established for the audio path if the cards struct has nothing defined. Allow the caller to select one of the two baseband input paths. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: add generic functions for dealing with audio input selectionSteven Toth2011-10-142-0/+82
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: fixes related to maximum number of inputs and range checkingSteven Toth2011-10-141-2/+5
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Initial support for the MPX-885 mini-cardSteven Toth2011-10-143-1/+29
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband useSteven Toth2011-10-141-1/+2
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Enable audio line in support from the back panelSteven Toth2011-10-142-0/+79
| | | | | | | | | | | | | | | | Add code to program the flatiron internal i2c ADC and pass the appropriate audio mux enums to the cx25840 driver. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Allow the audio mux config to be specified on a per input basisSteven Toth2011-10-141-0/+1
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputsSteven Toth2011-10-142-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change effects cx23885 boards only and preserves support for existing boards. Essentially, if we're using baseband audio into the cx23885 AV core then we have to patch registers. The cx23885 driver will call with either CX25840_AUDIO8 to signify tuner audio or AUDIO7 to signify baseband audio. If/When we become more comfortable with this change across a series of products then we may decide to relax the cx23885 only restriction. [liplianin@netup.ru: fix missing state declaration] Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Name an internal i2c part and declare a bitfield by nameSteven Toth2011-10-142-0/+2
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs ↵Steven Toth2011-10-141-2/+2
| | | | | | | | | | | | | | during streaming Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: remove channel dump diagnostics when a vbi buffer times outSteven Toth2011-10-141-2/+0
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: ensure video is streaming before allowing vbi to streamSteven Toth2011-10-141-0/+8
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Ensure the VBI pixel format is established correctlySteven Toth2011-10-141-3/+25
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: add vbi buffer formatting, window changes and video core ↵Steven Toth2011-10-144-6/+62
| | | | | | | | | | | | | | changes Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: vbi line window adjustmentsSteven Toth2011-10-141-3/+16
| | | | | | | | | | | | | | Coding style and printk's cleaned up in following patches. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx25840: enable raw cc processing only for the cx23885 hardwareSteven Toth2011-10-141-0/+7
| | | | | | | | | | | | | | | | This change is probably good for other boards also, but the change has limited scope and is reasonably safe. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: minor printk cleanups and device registrationSteven Toth2011-10-141-1/+14
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: initialize VBI support in the core, add IRQ support, ↵Steven Toth2011-10-141-13/+55
| | | | | | | | | | | | | | | | | | register vbi device Coding style and printk's are cleaned up in subsequent patches Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: initial support for VBI with the cx23885Steven Toth2011-10-144-6/+47
| | | | | | | | | | | | | | A handlful of coding style issue cleaned up in the following patches. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: add two additional defines to simplify VBI register bitmap ↵Steven Toth2011-10-141-0/+2
| | | | | | | | | | | | | | handling Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: setup the dma mapping for raw audio supportSteven Toth2011-10-141-1/+0
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: minor function renaming to ensure uniformitySteven Toth2011-10-143-6/+7
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: convert call clients into subdevicesSteven Toth2011-10-141-0/+2
| | | | | | | | | | Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Don't use memset on vidioc_ callbacksMauro Carvalho Chehab2011-10-141-1/+0
| | | | | | | | | | | | | | | | | | | | vidioc_g_tuner should not do any memset for the parameters. Core already does that. In particular, V4L2 core now does some handling for the tuner type, and the tuner-core module relies on that. So, doing any memset there is a very bad idea. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: hooks the alsa changes into the video subsystemMijhail Moreyra2011-10-141-7/+16
| | | | | | | | | | | | Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com> Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: correct the contrast, saturation and hue controlsMijhail Moreyra2011-10-141-6/+6
| | | | | | | | | | | | Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com> Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: add definitions for HVR1500 to support audioMijhail Moreyra2011-10-141-0/+24
| | | | | | | | | | | | Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com> Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] cx23885: Add ALSA supportMijhail Moreyra2011-10-144-16/+611
| | | | | | | | | | | | | | | | | | | | [stoth@kernellabs.com: add it to the makefile and fix snd_card binding] [liplianin@netup.ru: videobuf: Remove the videobuf_sg_dma_map/unmap functions] Signed-off-by: Mijhail Moreyra <mijhail.moreyra@gmail.com> Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] stb0899: Fix slow and not locking DVB-S transponder(s)Lutz Sammer2011-10-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In stb0899_status stb0899_check_data the first read of STB0899_VSTATUS could read old (from previous search) LOOP status bit and the search fails on a good frequency. With the patch more transponder could be locked and locks about 2* faster. Signed-off-by: Lutz Sammer<johns98@gmx.net> Reviewed-by: Manu Abraham<manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] rc/ir-lirc-codec: cleanup __user tagsDan Carpenter2011-10-111-4/+5
| | | | | | | | | | | | | | | | The code here treated user pointers correctly, but the __user tags weren't used correctly so it caused Sparse warnings: Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] it913x-fe changes to power up and down of tunerMalcolm Priestley2011-10-082-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the tuner is constantly powered causing these effects. 1. Remembering last tune channel causing corruptions of changing channel. 2. Causing corruption on other frontend. 3. Higher current in standby of demodulator with clock running. Power sequence now follows; Power Up Tuner on -> Frontend suspend off -> Tuner clk on Power Down Frontend suspend on -> Tuner clk off -> Tuner off Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tvp5150: Add video format registers configuration valuesJavier Martinez Canillas2011-10-081-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tvp5150 video decoder has two operation modes to configure the video standard used. If auto-switch mode is enable, the device can sense the signal and detect which video standard the device is operating. Also the device can be forced to use a user defined video standard. Each operation mode uses a different register and the bitmask values to represent each standard is different. So we add video standard constants for both autoswitch and no-autoswitch mode. Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] drivers/media: fix dependencies in video mt9t001/mt9p031Paul Gortmaker2011-10-083-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both mt9t001.c and mt9p031.c have two identical issues, those being that they will need module.h inclusion for the upcoming cleanup going on there, and that their dependencies don't limit selection of configs that will fail to compile as follows: The related config options are CONFIG_MEDIA_CONTROLLER and CONFIG_VIDEO_V4L2_SUBDEV_API. Looking at the code, it appears that the driver was never intended to work without these enabled, so add a dependency on CONFIG_VIDEO_V4L2_SUBDEV_API, which in turn already has a dependency on CONFIG_MEDIA_CONTROLLER. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] em28xx: Add VIDIOC_QUERYSTD supportMauro Carvalho Chehab2011-10-081-0/+16
| | | | | | | | | | | | Allow subdevs to return the detected standards Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] msp3400: Add standards detection to the driverMauro Carvalho Chehab2011-10-083-23/+85
| | | | | | | | | | | | | | | | | | As msp3400 allows standards detection, add support for it. That efectivelly means that devices with msp3400 can now implement VIDIOC_QUERYSTD, and it will provide very good detection for the standard, specially if combined with a video decoder detection. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] pvrusb2: initialize standards mask before detecting standardMauro Carvalho Chehab2011-10-081-0/+1
| | | | | | | | | | Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] saa7115: Trust that V4L2 core will fill the maskMauro Carvalho Chehab2011-10-081-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using V4L2_STD_ALL when no standard is detected, trust that the maximum allowed standards are already filled by the V4L2 core. It is better this way, as the bridge and/or the audio decoder may have some extra restrictions to some video standards. This also allow other devices like audio and tuners to contribute to standards detection, when they support such feature. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] v4l2-ioctl: Fill the default value for VIDIOC_QUERYSTDMauro Carvalho Chehab2011-10-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | According with the V4L2 API spec: "When detection is not possible or fails, the set must contain all standards supported by the current video input or output." The V4L2 core has the mask with all supported standards already. So, apply it. Driver and subdevs can then just remove standards from the mask, as they're able of detecting audio, video and frames frequency. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] pvrusb2: implement VIDIOC_QUERYSTDMauro Carvalho Chehab2011-10-083-0/+17
| | | | | | | | | | Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] saa7115: Fix standards detectionMauro Carvalho Chehab2011-10-081-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several bugs at saa7115 standards detection: After the fix, the driver is returning the proper standards, as tested with 3 different broadcast sources: On an invalid channel (without any TV signal): [ 4394.931630] saa7115 15-0021: Status byte 2 (0x1f)=0xe0 [ 4394.931635] saa7115 15-0021: detected std mask = 00ffffff With a PAL/M signal: [ 4410.836855] saa7115 15-0021: Status byte 2 (0x1f)=0xb1 [ 4410.837727] saa7115 15-0021: Status byte 1 (0x1e)=0x82 [ 4410.837731] saa7115 15-0021: detected std mask = 00000900 With a NTSC/M signal: [ 4422.383893] saa7115 15-0021: Status byte 2 (0x1f)=0xb1 [ 4422.384768] saa7115 15-0021: Status byte 1 (0x1e)=0x81 [ 4422.384772] saa7115 15-0021: detected std mask = 0000b000 Tests were done with a WinTV PVR USB2 Model 29xx card. Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>