get_user_pages() may return -errno, such as -EFAULT. So don't blindly use
its return value as an offset into dma->map[] for the next get_user_pages()
call. Since we'll give up and return an error if either fails, don't even
make the second call if the first failed to give us exactly what we were
looking for.
The old code would also call put_page() on as many elements of dma->map[]
as we'd asked for, regardless of how many were valid.
[Andy Walls modified this patch to return -EFAULT instead of -EINVAL
as Paul's observation "I'm not sure -EINVAL is the best return code vs
-EFAULT or -ENOMEM, [...]" was correct. The return value bubbles up
as a return code for write(), for which the V4L2 API spec indicates
EINVAL is incorrect and EFAULT is correct.]
Signed-off-by: Paul Cassella <fortytwo-ivtv@maneteren.bigw.org> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Wed, 9 Feb 2011 01:39:28 +0000 (22:39 -0300)]
[media] ivtv: Fix sparse warning regarding a user pointer in ivtv_write_vbi_from_user()
Fix the first, botched attempt at preventing direct use of a user pointer in
ivtv_write_vbi().
Reported-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Paul Cassella [Wed, 9 Feb 2011 01:22:52 +0000 (22:22 -0300)]
[media] ivtv: udma: handle get_user_pages() returning fewer pages than we asked for
get_user_pages() may return fewer page than we ask for. As we give up and
return an error in this case, we need to put_page() each of the pages we
did get.
[Andy Walls modified the patch, only removing the braces in the 'for'
statement, to eliminate a checkpatch warning.]
Signed-off-by: Paul Cassella <fortytwo-ivtv@manetheren.bigw.org> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
MarkusF wrote:
I accidently got a Terratec Cinergy S2 USB HD (instead of a Terratec Cinergy S2 PCI HD).
I found in the windows driver, that the driver is for the usb ids:
0CCD:00A8
1F4D:3000
The dvb-s2 usb adapter has the id 0CCD-00A8.
So I patches your driver and added the usb id, where the 1F4D:3000 is
and it worked (after I downloaded the firmware dvb-fe-ds3000.fw).
w_scan found the channels and vdr is working fine.
Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] dw2102: use separate firmwares for Prof 1100, TeVii S630, S660
Before this patch we can use only one card type from list due to
sharing one firmware name. Now it's fixed.
Also driver tries to attach only appropriate demod for this cards.
Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jesper Juhl [Sun, 6 Feb 2011 20:49:02 +0000 (17:49 -0300)]
[media] TTUSB DVB: ttusb_boot_dsp() needs to release_firmware() or it leaks memory
In drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c:ttusb_boot_dsp() we
need to call release_firmware(fw) before returning or we'll leak - no
matter if we succeed or fail.
pvrusb2: The origin of the capability bounds rectangle may differ from
(left=0,top=0) so the calculation should use absolute coordinates,
here below, or use relative coordinates like
cropl_val-cap->bounds.left and cropt_val-cap->bounds.top.
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mike Isely [Sun, 13 Feb 2011 20:31:55 +0000 (17:31 -0300)]
[media] pvrusb2: Handle change of mode before handling change of video standard
pvrusb2: Recognize and handle mode change before dealing with changes
related to the video standard. Even though the video standard should
only matter when in analog mode, doing this way is technically cleaner
in case there's other stuff that might depend on both.
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Richter [Sun, 6 Feb 2011 14:41:44 +0000 (11:41 -0300)]
[media] firedtv: drop obsolete backend abstraction
Since the drivers/ieee1394/ backend was removed from firedtv, its I/O no
longer needs to be abstracted as exchangeable backend methods.
Also, ieee1394 variants of module and device probe and removal are no
longer there. Move module probe and removal into firedtv-fw.c where
device probe and removal are implemented.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Fri, 18 Feb 2011 01:11:05 +0000 (22:11 -0300)]
[media] tm6000: add radio support to the driver
Changes:
Add function tm6000_set_reg_mask for change some bits in regs. Very usefull, simplify some code with this function.
Add control mute
Add control volume
Add control audio input MUX
Add support radio
Radio works well. TV works too
Known bugs:
The programm gnomeradio can't set freq for radio, it use old v4l API. Audio over USB works via arecord.
The programm mplayer can set freq but no any audio
mplayer -v -rawaudio rate=48000 radio://105.2/capture driver=v4l2:alsa:adevice=hw.1,0:amode=1:audiorate=48000:forceaudio:immediatemode=0
When start watch TV very shortly after radio the kernel crashed hardly. Didn't stop all USB URBs, need some time for stop.
Lawrence Rust [Sun, 6 Feb 2011 20:46:12 +0000 (17:46 -0300)]
[media] Add proper audio support for Nova-S Plus with wm8775 ADC
This patch adds audio DMA capture and ALSA mixer elements for the line
input jack of the Hauppauge Nova-S-plus DVB-S PCI card. The Nova-S-plus
has a WM8775 ADC that is currently not detected. This patch enables
this chip and exports volume, balance mute and ALC elements for ALSA
mixer controls.
[mchehab@redhat.com: Changed the patch to only talk with wm8775 if board
info says so. Also, added platform_data support, to avoid changing the
behaviour for other boards, and fixed CodingStyle]
[awalls@md.metrocast.net: Changed patch to make the WM8775_GID defintion
bridge driver private and let the bridge driver set the value of
v4l2_subdev.grp_id.]
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Thomas Weber [Mon, 31 Jan 2011 12:16:09 +0000 (09:16 -0300)]
[media] omap24xxcam: Fix compilation
Add linux/sched.h because of missing declaration of TASK_NORMAL.
This patch fixes the following error:
drivers/media/video/omap24xxcam.c: In function
'omap24xxcam_vbq_complete':
drivers/media/video/omap24xxcam.c:415: error: 'TASK_NORMAL' undeclared
(first use in this function)
drivers/media/video/omap24xxcam.c:415: error: (Each undeclared
identifier is reported only once
drivers/media/video/omap24xxcam.c:415: error: for each function it
appears in.)
Signed-off-by: Thomas Weber <weber@corscience.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Peter Huewe [Sun, 30 Jan 2011 19:33:01 +0000 (16:33 -0300)]
[media] video/saa7164: Fix sparse warning: Using plain integer as NULL pointer
This patch fixes the warning "Using plain integer as NULL pointer",
generated by sparse, by replacing
if (var == 0)
with
if (!var)
after an allocation
and all other offending 0s with NULL.
[media] cx23885, altera-ci: enable all PID's less than 0x20 in hardware PID filter
It takes too long time to scan due to low symbol rate PID's
like PAT, PMT, CAT, NIT.
For that matter we enabled permanently all PID's
less 0x20 in hardware PID filter for NetUP Dual DVB-T/C CI RF card
to combine rates.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx23885: implement num_fds_portb, num_fds_portc parameters for cx23885_board structure
This is needed for multifrontend support.
NetUP Dual DVB-T/C CI RF card has frontends connected to port B & C
Each frontend has two switchable cores - DVB-T & DVB-C
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] cx23885: implement tuner_bus parameter for cx23885_board structure
There is two external I2C buses in cx23885 chip.
Currently, analog tuners supported for second I2C bus only
In NetUP Dual DVB-T/C CI RF card tuners connected to first bus
So, in order to support analog tuners sitting on first bus
we need modifications.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Initial commit to support NetUP Dual DVB-T/C CI RF card
The card based on cx23885 PCI-e brige. Altera FPGA for CI,
multistandard demods stv0367 from STM for QAM & OFDM, Xcieve xc5000 tuners
and additional cx25840 for second analog input.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Support for stv0367 multi-standard demodulator
The STV0367 is a multi-standard demodulator which is
capable of processing DVB-T as well as DVB-C signals.
It is fully compliant with DVB-T and DVB-C
recommendations for broadcast services.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It uses STAPL files and programs Altera FPGA through JTAG.
Interface to JTAG must be provided from main device module,
for example through cx23885 GPIO.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andrew Chew [Thu, 17 Feb 2011 22:14:33 +0000 (19:14 -0300)]
[media] V4L: Initial submit of OV9740 driver
This soc_camera driver is for Omnivision's OV9740 sensor. This initial
submission provides support for YUV422 output at 1280x720 (720p), which is
the sensor's native resolution. 640x480 (VGA) is also supported, with
cropping and scaling performed by the sensor's ISP.
This driver is heavily based off of the existing OV9640 driver.
Now that soc-camera supports videobuf API v1 and v2, camera-host drivers
can be converted to videobuf2 individually. This patch converts the
mx3_camera driver.
Alberto Panizzo [Mon, 17 Jan 2011 09:52:10 +0000 (06:52 -0300)]
[media] V4L: mx3_camera: fix capture issues for non 8-bit per pixel formats
If the camera was set to output formats like RGB565 YUYV or SBGGR10,
the resulting image was scrambled due to erroneous interpretations of
horizontal parameter's units.
This patch in fourcc_to_ipu_pix, eliminate also the pixel formats mappings
that, first are not used within mainline code and second, standing at
the datasheets, they will not work properly:
The IPU internal bus support only the following data formatting
(44.1.1.3 Data Flows and Formats):
1 YUV 4:4:4 or RGB-8 bits per color component
2 YUV 4:4:4 or RGB-10 bits per color component
3 Generic data (from sensor to the system memory only)
And format conversions are done:
- from memory: unpacking from other formats to IPU supported ones
- to memory: packing in the inverse order.
So, assigning a packing/unpacking strategy to the IPU for those formats
will produce a packing to memory and not the inverse.
[media] V4L: mx3_camera: correct 'sizeimage' value reporting
The 'pix->width' field may be updated in mx3_camera_set_fmt() to
fulfill the IPU stride line alignment requirements. If this update
takes place, the 'fmt.pix.sizeimage' field in the struct v4l2_format
stucture returned by VIDIOC_S_FMT is wrong. We need to update the
'pix->sizeimage' field in the mx3_camera_set_fmt() function to fix
this issue.
Mathias Krause [Sun, 30 Jan 2011 10:05:58 +0000 (07:05 -0300)]
[media] V4L: omap1_camera: fix use after free
Even though clk_put() is a no-op on most architectures it is not for
some ARM implementations. To not fail on those, release the clock timer
before freeing the surrounding structure.
This bug was spotted by the semantic patch tool coccinelle using the
script found at scripts/coccinelle/free/kfree.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
[media] V4L: soc-camera: start stream after queueing the buffers
Some camera systems have strong requirement for capturing
an exact number of frames after starting the stream and do
not tolerate losing captured frames. By starting the stream
after the videobuf has queued the buffers, we ensure that
no frame will be lost.
Reported by, and based on a patch from, Martin Dauskardt.
The AUDIO_AC3_BITRATE control is still missing from this list, but such
optional controls are a bit hard to handle. This will be fixed automatically
when we switch to the control framework.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/ieee1394/ has been removed in Linux 2.6.37. The corresponding
backend code in firedtv is no longer built in now and can be deleted.
Firedtv continues to work with drivers/firewire/.
Also, fix a Kconfig menu comment: Removal of CONFIG_IEEE1394 made the
"Supported FireWire (IEEE 1394) Adapters" comment disappear; bring it back
with corrected dependency.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 13:10:38 +0000 (10:10 -0300)]
[media] v4l: removal of old, obsolete ioctls
Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
type of R/W arguments. They were fixed, but the old ioctl names are
still there, maintained to avoid breaking binary compatibility:
There's no sense on preserving those forever, as it is very doubtful
that someone would try to use a such old binary with a modern kernel.
Removing them will allow us to remove some magic done at the V4L ioctl
handler.
Note that any application compiled with a videodev2.h from 2.6.7 or later
will be using the correct ioctls.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 12:29:31 +0000 (09:29 -0300)]
[media] dabusb: remove obsolete driver
The dabusb driver was conceived as an experimental driver for a test
device. The driver never supported any shipped product, and, while
there were some updates for it in 2003, for an ancient product,
those changes were never submitted upstream.
Also, there's no DocBook for its API, nor any upstream discussion.
So it was decided to remove it in 2.6.39. Future support for a DAB API
should be discussed on the linux-media list first.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sat, 5 Feb 2011 12:25:02 +0000 (09:25 -0300)]
[media] se401: remove last V4L1 driver
This driver is for obsolete hardware that the old maintainer
didn't care (or not have the hardware anymore), and that no other developer
could find any hardware to buy.
The V4L1 API is no longer supported, and since nobody stepped in to convert
them to V4L2 the decision was made to remove them.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 22 Feb 2011 16:39:36 +0000 (13:39 -0300)]
[media] staging-usbvideo: remove
With the new gspca v4l2 vicam driver, there is no more reason to keep the
old v4l1 usbvideo vicam driver around, and since that is the last
usbvideo framework using driver, the old usbvideo framework itself can
go too.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Wed, 16 Feb 2011 11:17:36 +0000 (08:17 -0300)]
[media] gspca_sn9c20x: Add hflip and vflip controls for the ov7660 sensor
Tested with a camera with usb-id: 0c45:62bb
Also enable dmi based flopped laptop detection for the 0c45:627b ov7660 model.
Some of the MSI laptops with upside down camera have this one instead of the
0c45:624f.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>