1
0
Fork 0
Commit Graph

49 Commits (907d109bc212bc1193fb01b5c320e8c9a850bbf4)

Author SHA1 Message Date
Frank Schaefer 907d109bc2 [media] em28xx: extend GPIO register definitions for the em25xx, em276x/7x/8x, em2874/174/84
The em25xx/em276x/7x/8x provides 4 GPIO register sets,
each of them consisting of separate read and a write registers.
The same registers are also used by the em2874/174/84.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-19 11:40:33 -03:00
Hans Verkuil 3300101001 [media] tveeprom: remove v4l2-chip-ident.h include
Replace the V4L2_IDENT_* usage with tveeprom-specific defines. This header
is deprecated, so those defines shouldn't be used anymore.
The em28xx driver is the only one that uses the tveeprom audio_processor
field, so that has been updated to use the new tveeprom AUDPROC define.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 08:48:03 -03:00
Jakob Haufe 7c1dfdb059 [media] em28xx: Add support for 1b80:e1cc Delock 61959
Hardware is the same as MaxMedia UB425-TC but ships with a different
remote.

Signed-off-by: Jakob Haufe <sur5r@sur5r.net>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21 08:18:42 -03:00
Frank Schaefer b3404a8ef5 [media] em28xx: save isoc endpoint number for DVB only if endpoint has alt settings with xMaxPacketSize != 0
X-Patchwork-Delegate: mchehab@redhat.com
In addition to commit 72cc9ba3 "em28xx: ignore isoc DVB USB endpoints with
wMaxPacketSize = 0 bytes for all alt settings" we should not save the endpoint
number of the isoc DVB endpoint before it has been validated.
While the current code works fine, dev->dvb_ep_isoc != 0 could be interpreted
as indicator that the device provides DVB support.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25 09:51:23 -03:00
Frank Schaefer 1552fb344d [media] em28xx: add a missing le16_to_cpu conversion
commit 61ff5d69 "em28xx: improve em2710/em2820 distinction" missed the
le16_to_cpu conversion of the USB vendor ID.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22 10:11:05 -03:00
Antti Palosaari 831378dbb6 [media] em28xx: map remote for 1b80:e425
Map RC_MAP_REDDO to that device.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 22:48:49 -03:00
Frank Schaefer 61ff5d69dc [media] em28xx: improve em2710/em2820 distinction
Chip id 18 is used by the em2710 and em2820.
The current code assumes that if the device is a camera, the chip is an em2710
and an em2820 otherwise.
But it turned out that the em2820 is also used in camera devices.
"Silvercrest 1.3 MPix" webcams for example are available with both chips.
Fortunately both variants are using different generic USD IDs which give us a
hint about the used chip.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 20:04:36 -03:00
Frank Schaefer 2b64cbd1da [media] em28xx: fix snapshot button support
The snapshot button support is currently broken, because module em28xx-rc is
loaded only if the device has remote control support.
Fix it by also loading this module if the device has a snapshot button.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 20:04:22 -03:00
Frank Schaefer 855ff38e88 [media] em28xx: move sensor code to a separate source code file em28xx-camera.c
em28xx-cards.c is very large and the sensor/camera related code is growing,
so move this code to a separate source code file em28xx-camera.c.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 06:36:20 -03:00
Frank Schaefer b3944c8f67 [media] em28xx: rename em28xx_hint_sensor() to em28xx_detect_sensor()
Now that the board hints and the sensor initialization/configuration have been
separated, em28xx_detect_sensor() is the better name for this function.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 06:34:25 -03:00
Frank Schaefer 484fbbeb3e [media] em28xx: separate sensor detection and initialization/configuration
Sensor detection and initialization/configuration are currently mixed together.
This works as long as all devices with a particular sensor are working with the
same board configuration. In the long run, this will be not sufficient, so
separate these both steps to make the code more flexible and future proof.
This also makes the code more consistent, because the initialization of the
MT9V011 sensor subdevice is already separated.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 06:34:01 -03:00
Frank Schaefer 2d466e1136 [media] em28xx: fix and separate the board hints for sensor devices
The current board hint code is mixed together with the sensor detection and
initialization code. It actually selects a board depending on the detected
sensor type only, with the result that 3 of the 6 webcam boards are currently
dead.
Separate it and move it to em28xx_hint_board() which already contains the board
hints for analog capturing+TV and DVB devices.
This way, we have all board hints at a common place which makes it easier
to extend the code and reduces the risk of regressions.
It also makes it possible again to use the boards EM2750_BOARD_DLCW_130,
EM2820_BOARD_VIDEOLOGY_20K14XUSB and EM2860_BOARD_NETGMBH_CAM (using the module
parameter "card").
NOTE: the current board hint logic for webcams is preserved. Not more not less.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 06:31:38 -03:00
Frank Schaefer 72cc9ba39a [media] em28xx: ignore isoc DVB USB endpoints with wMaxPacketSize = 0 bytes for all alt settings
Some devices without DVB support (such as the "Terratec Grabby" and
"Easycap DC-60") provide isochronous DVB USB endpoints with wMaxPacketSize set
to 0 bytes for all alt settings.
Ignore these endpoints and avoid registering a DVB device node and loading the
DVB driver extension.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Tested-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-28 18:39:44 -03:00
Frank Schaefer 736a320bd2 [media] em28xx: add chip id of the em2765
This chip can be found in the SpeedLink VAD Laplace webcam (1ae7:9003 and 1ae7:9004).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-28 17:43:45 -03:00
Frank Schaefer a3ea4bf98b [media] em28xx: add support for em25xx i2c bus B read/write/check device operations
The webcam "SpeedLink VAD Laplace" (em2765 + ov2640) uses a special algorithm
for i2c communication with the sensor, which is connected to a second i2c bus.
We don't know yet how to find out which devices support/use it.
It's very likely used by all em25xx and em276x+ bridges.
Tests with other em28xx chips (em2820, em2882/em2883) show, that this
algorithm always succeeds there although no slave device is connected.
The algorithm likely also works for real i2c client devices (OV2640 uses SCCB),
because the Windows driver seems to use it for probing Samsung and Kodak
sensors.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-28 17:37:45 -03:00
Hans Verkuil bc3d292803 [media] em28xx: tuner setup is broken after algo_data change
Commit aab3125c43 broke em28xx. I traced
this eventually to the change in what algo_data points to. This pointer
is also passed to em28xx_tuner_callback() through several hidden tuner
layers (yuck!) and that callback was not updated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22 13:21:10 -03:00
Mauro Carvalho Chehab 4159d01bea [media] em28xx: Add ISDB support for c3tech Digital duo
This is an hybrid board. However, for analog, it requires
a new driver for saa7136. So, for now, let's just add
support for Digital TV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 15:13:50 -03:00
Mauro Carvalho Chehab aab3125c43 [media] em28xx: add support for registering multiple i2c buses
Register both buses 0 and 1 via I2C API. For now, bus 0 is used
only by eeprom on all known devices. Later patches will be needed
if this changes in the future.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:56:27 -03:00
Mauro Carvalho Chehab 3aa2b3b9cc [media] em28xx: Add a separate config dir for secondary bus
Prepare to register a separate bus for the second bus.
For now, just add a new field. A latter patch will add the
bits to make it work.
This patch was generated by this script:
perl -e 'while (<>) { if (s/EM2874_I2C_SECONDARY_BUS_SELECT.*\n//) {
	printf "\t\t.def_i2c_bus  = 1,\n"; $found = 1; print $_ } else { if ($found) { s/^\s+// }; $found = 0; print $_; } }' \
drivers/media/usb/em28xx/em28xx-cards.c >a && mv a drivers/media/usb/em28xx/em28xx-cards.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:14:52 -03:00
Mauro Carvalho Chehab c7a45e5b4f [media] em28xx: Prepare to support 2 different I2C buses
Newer em28xx devices have 2 buses. Change the logic to allow
using both buses.
This patch was generated by this small script:
for i in drivers/media/usb/em28xx/*.c; do
	sed 's,->i2c_adap,->i2c_adap[dev->def_i2c_bus],g;s,->i2c_client,->i2c_client[dev->def_i2c_bus],'
done
Of course, em28xx.h needed manual edit.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 18:14:15 -03:00
Frank Schaefer a61660185b [media] em28xx: enable tveeprom for device Hauppauge HVR-930C
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:38:05 -03:00
Frank Schaefer a217968f91 [media] em28xx: do not store eeprom content permanently
We currently reserve an array of 256 bytes for the eeprom content in the device
struct. For eeproms with 16 bit address width it might even be necessary to
increase the buffer size further.
Having such a big chunk of memory reserved even if the device has no eeprom and
keeping it after it has already been processed seems to be a waste of memory.
Change the code to allocate + free the eeprom memory dynamically.
This also makes it possible to handle different dataset sizes depending on what
is stored/found in the eeprom.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:23:27 -03:00
Frank Schaefer 87b52439cf [media] em28xx: add basic support for eeproms with 16 bit address width
Newer devices (em2874, em2884, em28174, em25xx, em27[6,7,8]x) use eeproms with
16 bit instead of 8 bit address width.
The used eeprom type depends on the chip type, which makes sure eeproms can't
be damaged.
This patch adds basic support for 16 bit eeproms only, which includes
- reading the content
- calculating the eeprom hash
- displaying the content
The eeprom content uses a different format, for which support will be added with
subsequent patches.
Tested with the "Hauppauge HVR-930C" and the "Speedlink VAD Laplace webcam"
(with additional experimental patches).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 16:20:51 -03:00
Frank Schaefer 8f8b113a03 [media] em28xx: add image quality bridge controls
Add the image quality bridge controls contrast, brightness, saturation,
blue balance, red balance and sharpness.
These controls are enabled only if no subdevice provides them.
Tested with the following devices:
"Terratec Cinergy 200 USB"
"Hauppauge HVR-900"
"SilverCrest 1.3MPix webcam"
"Hauppauge WinTV USB2"
"Speedlink VAD Laplace webcam"

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-04 14:51:30 -03:00
Roland Scheidegger 676fa7d4c9 [media] em28xx: add usb id for terratec h5 rev. 3
Seems to work just the same as older revisions.

Signed-off-by: Roland Scheidegger <rscheidegger_lists@hispeed.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-13 17:41:49 -02:00
Frank Schaefer 5e8d02bb34 [media] em28xx: fix audio input for TV mode of device Terratec Cinergy 250
Remy Blank reported that audio over USB can be made working for the television
input if .amux is changed from EM28XX_AMUX_LINE_IN to EM28XX_AMUX_VIDEO.
An examination of his devices shows, that it is indeed supplied with an EM202
AC97 audio IC. We also use this setting for the Cinergy 200.
Remy Blank also provided the original version of this patch (many thanks !).
Fixes bug 14126 (see bug report for further device details).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Remy Blank <remy.blank@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:45:53 -02:00
Frank Schaefer 05fe2175cf [media] em28xx: refactor the code in em28xx_usb_disconnect()
The main purpose of this patch is to move the call of em28xx_release_resources()
after the call of em28xx_close_extension().
This is necessary, because some resources might be needed/used by the extensions
fini() functions when they get closed.
Also mark the device as disconnected earlier in this function and unify the
em28xx_uninit_usb_xfer() calls for analog and digital mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:10:13 -02:00
Frank Schaefer 2665c2995d [media] em28xx: simplify device state tracking
DEV_INITIALIZED of enum em28xx_dev_state state is used nowhere and there is no
need for DEV_MISCONFIGURED, so remove this enum and use a boolean field
'disconnected' in the device struct instead.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:09:39 -02:00
Devin Heitmueller d3829fadc4 [media] em28xx: convert to videobuf2
This patch converts the em28xx driver over to videobuf2.  It is
likely that em28xx_fh can go away entirely, but that will come in
a separate patch.

[mchehab@redhat.com: fix a non-trivial merge conflict with some VBI
 patches; CodingStyle fixes]

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:03:38 -02:00
Hans Verkuil 081b945ed7 [media] em28xx: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:51:05 -02:00
Mauro Carvalho Chehab 728f9778e2 [media] em28xx: autoload em28xx-rc if the device has an I2C IR
If the device has an I2C IR, em28xx-rc should be loaded by default,
except if the user explicitly requested to not load, via modprobe
option.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04 19:13:14 -02:00
Frank Schaefer 7e5d74ee11 [media] em28xx: rename module parameter prefer_bulk to usb_xfer_mode
Since we have now 3 modes (auto/isoc/bulk), usb_xfer_mode is more suitable than prefer_bulk.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27 19:40:38 -02:00
Mauro Carvalho Chehab 8b2aea7878 [media] em28xx: prefer bulk mode on webcams
Using bulk mode allows more than one webcam, as the maximum fps
is low at 640x480 resolution. So, prefer it, if the device is
a webcam.

Tested with Silvercrest 1.3 Mpixel webcam (em2710) on both bulk and isoc
modes.

Tested analog with HVR-950 model 65201/A1C0 (em2883), where only ISOC
endpoints are available for both DVB and Analog.

Tested on Hauppauge WinTV USB 2 (em2840) on both bulk and isoc modes.

It should be noticed that enabling bulk mode by default with TV boards
is a bad idea; what happens is that, while with ISOC the USB logic will
prevent the concurrent usage of two devices that spends more than 100%
of the USB2 traffic, it doesn't care with bulk transfers.

On my tests, I started two streams, one with a WinTV at 640x480x30fps
and the other one with a Silvercrest webcam at 640x480, on a lower fps)
both on bulk mode. One of the streams always silently failed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-23 17:24:30 -02:00
Mauro Carvalho Chehab a3efa1cc0e [media] em28xx: make the logs reflect the specific chip name
In order to make easier to analize the logs when multiple devices
are plugged, change the device name accordingly with the chip
version.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-23 16:54:34 -02:00
Mauro Carvalho Chehab aa51496b21 [media] em28xx: display the isoc/bulk mode
As both bulk and isoc modes can be available, display what it
was found for both DVB and analog.

While here, also displays if audio is provided via USB Audio
Class or via vendor's extension.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-23 14:35:25 -02:00
Mauro Carvalho Chehab b5cff595bd [media] em28xx: prefer_bulk parameter is read-only
As the bulk mode is set at device's probe, it is not possible
to change it later. So, change the parameter to be read only
after modprobing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-23 13:14:20 -02:00
Frank Schaefer 454fe92f01 [media] em28xx: add module parameter for selection of the preferred USB transfer type
By default, isoc transfers are used if possible.
With the new module parameter, bulk can be selected as the
preferred USB transfer type.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-22 18:20:03 -02:00
Frank Schaefer c647a91a25 [media] em28xx: improve USB endpoint logic, also use bulk transfers
The current enpoint logic ignores all bulk endpoints and uses
a fixed mapping between endpint addresses and the supported
data stream types (analog/audio/DVB):
  Ep 0x82, isoc	=> analog
  Ep 0x83, isoc	=> audio
  Ep 0x84, isoc	=> DVB
Now that the code can also do bulk transfers, the endpoint
logic has to be extended to also consider bulk endpoints.
The new logic preserves backwards compatibility and reflects
the endpoint configurations we have seen so far:
  Ep 0x82, isoc		=> analog
  Ep 0x82, bulk		=> analog
  Ep 0x83, isoc*	=> audio
  Ep 0x84, isoc		=> digital
  Ep 0x84, bulk		=> analog or digital**
 (*: audio should always be isoc)
 (**: analog, if ep 0x82 is isoc, otherwise digital)

[mchehab@redhat.com: Fix a CodingStyle issue: don't break strings
 into separate lines]

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-22 18:17:52 -02:00
Frank Schaefer 0cf544a6cc [media] em28xx: rename some USB parameter fields in struct em28xx to clarify their role
Also improve the comments.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-22 18:11:26 -02:00
Frank Schaefer 6ddd89d0c9 [media] em28xx: create a common function for isoc and bulk URB allocation and setup
Rename the existing function for isoc transfers em28xx_init_isoc
to em28xx_init_usb_xfer and extend it.
URB allocation and setup is now done depending on the USB
transfer type, which is selected with a new function parameter.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-22 17:58:00 -02:00
Frank Schaefer afb177e065 [media] em28xx: rename function em28xx_uninit_isoc to em28xx_uninit_usb_xfer
This function will be used to uninitialize USB bulk transfers, too.
Also rename the local variable isoc_bufs to usb_bufs.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-22 17:57:41 -02:00
Frank Schaefer 515688a898 [media] em28xx: rename isoc packet number constants and parameters
Rename EM28XX_NUM_PACKETS to EM28XX_NUM_ISOC_PACKETS and
EM28XX_DVB_MAX_PACKETS to EM28XX_DVB_NUM_ISOC_PACKETS to
clarify that these values are used only for isoc usb transfers.
Also use the term num_packets instead of max_packets, as this
is how these values are used and called in struct urb.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-22 17:56:10 -02:00
Mauro Carvalho Chehab d3e4ea017a [media] em28xx-cards: fix a warning
drivers/media/usb/em28xx/em28xx-cards.c:3309:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28 07:38:56 -02:00
Martin Blumenstingl 890401364d [media] em28xx: Better support for the Terratec Cinergy HTC USB XS
This intializes the card just like the windows driver does

- the "HTC USB XS HD" uses the same firmware as the "HTC Stick HD";
- both have different GPIO and reg init sequences;

Tested only with DVB-C.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-25 11:25:16 -02:00
Mauro Carvalho Chehab bf3b202b41 Merge branch 'staging/for_v3.7' into v4l_for_linus
Applied on the top of changeset 782cd9e, as some of those patches
depend on some fixes that went via -arm tree.

* staging/for_v3.7: (109 commits)
  [media] m5mols: Add missing #include <linux/sizes.h>
  [media] stk1160: Add support for S-Video input
  Revert "[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check"
  [media]  dvb: LNA implementation changes
  [media] v4l2-ioctl: fix W=1 warnings
  [media] v4l2-ioctl: add blocks check for VIDIOC_SUBDEV_G/S_EDID
  [media] omap3isp: Fix compilation error in ispreg.h
  [media] rc-msi-digivox-ii: Add full scan keycodes
  [media] cx25821: testing the wrong variable
  [media] tda18271-common: hold the I2C adapter during write transfers
  [media] ds3000: add module parameter to force firmware upload
  [media] drivers/media: Remove unnecessary semicolon
  [media] winbond: remove space from driver name
  [media] iguanair: cannot send data from the stack
  [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
  [media] dvb-usb: print small buffers via %*ph
  [media] uvc: Add return code check at vb2_queue_init()
  [media] em28xx: Replace memcpy with struct assignment
  [media] bt8xx: Add video4linux control V4L2_CID_COLOR_KILLER
  [media] mem2mem_testdev: Use devm_kzalloc() in probe
  ...
2012-10-11 15:07:19 -03:00
Linus Torvalds 0b8e74c6f4 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "The first part of the media updates for Kernel 3.7.

  This series contain:

   - A major tree renaming patch series: now, drivers are organized
     internally by their used bus, instead of by V4L2 and/or DVB API,
     providing a cleaner driver location for hybrid drivers that
     implement both APIs, and allowing to cleanup the Kconfig items and
     make them more intuitive for the end user;

   - Media Kernel developers are typically very lazy with their duties
     of keeping the MAINTAINERS entries for their drivers updated.  As
     now the tree is more organized, we're doing an effort to add/update
     those entries for the drivers that aren't currently orphan;

   - Several DVB USB drivers got moved to a new DVB USB v2 core; the new
     core fixes several bugs (as the existing one that got bitroted).
     Now, suspend/resume finally started to work fine (at least with
     some devices - we should expect more work with regards to it);

   - added multistream support for DVB-T2, and unified the API for
     DVB-S2 and ISDB-S.  Backward binary support is preserved;

   - as usual, a few new drivers, some V4L2 core improvements and lots
     of drivers improvements and fixes.

  There are some points to notice on this series:

   1) you should expect a trivial merge conflict on your tree, with the
      removal of Documentation/feature-removal-schedule.txt: this series
      would be adding two additional entries there.  I opted to not
      rebase it due to this recent change;

   2) With regards to the PCTV 520e udev-related breakage, I opted to
      fix it in a way that the patches can be backported to 3.5 even
      without your firmware fix patch.  This way, Greg doesn't need to
      rush backporting your patch (as there are still the firmware cache
      and firmware path customization issues to be addressed there).

      I'll send later a patch (likely after the end of the merge window)
      reverting the rest of the DRX-K async firmware request, fully
      restoring its original behaviour to allow media drivers to
      initialize everything serialized as before for 3.7 and upper.

   3) I'm planning to work on this weekend to test the DMABUF patches
      for V4L2.  The patches are on my queue for several Kernel cycles,
      but, up to now, there is/was no way to test the series locally.

      I have some concerns about this particular changeset with regards
      to security issues, and with regards to the replacement of the old
      VIDIOC_OVERLAY ioctl's that is broken on modern systems, due to
      GPU drivers change.  The Overlay API allows direct PCI2PCI
      transfers from a media capture card into the GPU framebuffer, but
      its API is crappy.  Also, the only existing X11 driver that
      implements it requires a XV extension that is not available
      anymore on modern drivers.  The DMABUF can do the same thing, but
      with it is promising to be a properly-designed API.  If I can
      successfully test this series and be happy with it, I should be
      asking you to pull them next week."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (717 commits)
  em28xx: regression fix: use DRX-K sync firmware requests on em28xx
  drxk: allow loading firmware synchrousnously
  em28xx: Make all em28xx extensions to be initialized asynchronously
  [media] tda18271: properly report read errors in tda18271_get_id
  [media] tda18271: delay IR & RF calibration until init() if delay_cal is set
  [media] MAINTAINERS: add Michael Krufky as tda827x maintainer
  [media] MAINTAINERS: add Michael Krufky as tda8290 maintainer
  [media] MAINTAINERS: add Michael Krufky as cxusb maintainer
  [media] MAINTAINERS: add Michael Krufky as lg2160 maintainer
  [media] MAINTAINERS: add Michael Krufky as lgdt3305 maintainer
  [media] MAINTAINERS: add Michael Krufky as mxl111sf maintainer
  [media] MAINTAINERS: add Michael Krufky as mxl5007t maintainer
  [media] MAINTAINERS: add Michael Krufky as tda18271 maintainer
  [media] s5p-tv: Report only multi-plane capabilities in vidioc_querycap
  [media] s5p-mfc: Fix misplaced return statement in s5p_mfc_suspend()
  [media] exynos-gsc: Add missing static storage class specifiers
  [media] exynos-gsc: Remove <linux/version.h> header file inclusion
  [media] s5p-fimc: Fix incorrect condition in fimc_lite_reqbufs()
  [media] s5p-tv: Fix potential NULL pointer dereference error
  [media] s5k6aa: Fix possible NULL pointer dereference
  ...
2012-10-07 17:49:05 +09:00
Ezequiel Garcia e0f6e4d6ff [media] em28xx: Replace memcpy with struct assignment
This kind of memcpy() is error-prone and its
replacement with a struct assignment is prefered.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-06 12:23:15 -03:00
Mauro Carvalho Chehab 6ae5e06084 em28xx: Make all em28xx extensions to be initialized asynchronously
em28xx-dvb, em28xx-alsa and em28xx-ir are typically initialized
asyncrhronously. The exception for it is when those modules
are loaded before em28xx (or before an em28xx card insertion) or
when they're built in.

Make the extentions to always load asynchronously. That allows
having all DVB firmwares loaded synchronously with udev-182.

Antti tested it with the following hardware:
	Hauppauge WinTV HVR 930C
	MaxMedia UB425-TC
	PCTV QuatroStick nano (520e)

Tested-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-02 17:11:33 -03:00
Mauro Carvalho Chehab 0c0d06cac6 [media] rename most media/video usb drivers to media/usb
Rename all USB drivers with their own directory under
drivers/media/video into drivers/media/usb and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 16:25:07 -03:00