* /home/v4l/v4l/patchwork: (42 commits)
[media] s5h1420: Unused variable clock_setting
[media] stv090x: variable 'no_signal' set but not used
[media] stv0367: variable 'tps_rcvd' set but not used
[media] saa7164: Variable set but not used
[media] pvrusb2: Variables set but not used
[media] cx231xx: Paranoic stack memory save
[media] [trivial] v4l drivers: typo, change ctruct to struct in comment
[media] stradis: remove unused V4L1 headers
[media] em28xx: Improve support for the Terratec Cinergy HTC Stick HD
[media] em28xx: Add the DRX-K at I2C address 0x29 to the list of known I2C devices
[media] Add support for downloading the firmware of the Terratec Cinergy HTC Stick HD's firmware
[media] radio-sf16fmi: Use LM7000 driver
[media] radio-aimslab: Use LM7000 driver
[media] radio: Add Sanyo LM7000 tuner driver
[media] em28xx: Make a few drxk_config structs static
[media] em28xx: Remove unused AC97 register definitions
[media] em28xx: Rename AC97 registers to use sound/ac97_codec.h definitions
[media] em28xx: Fix wrong AC97 mic register usage
[media] zr364xx: add suspend/resume support
[media] zr364xx: allow multiple opens
...
Paul Bolle [Wed, 13 Jun 2012 07:47:19 +0000 (04:47 -0300)]
[media] stradis: remove unused V4L1 headers
Commit 39c3d488452ae206cfc8afda0db041ee55d01c3c ("[media] cpia, stradis:
remove deprecated V4L1 drivers") removed the last file including these
five headers. Apparently it was just an oversight to keep them in the
tree. They can safely be removed now.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] em28xx: Improve support for the Terratec Cinergy HTC Stick HD
The windows driver used different values for the GPIOs and analog
decoder configuration. The values from the windows driver are now
used.
It also seems that the windows driver has LNA always disabled.
Thus we are doing the same (using the same flags as on windows).
I (only) tested with DVB-T and it worked quite well.
[mchehab@redhat.com: Fix merge conflicts and tested with DVB-C] Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-/* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */
-/* It is only useful to give freq in interval of 800 (=0.05Mhz),
- * other bits will be truncated, e.g 92.7400016 -> 92.7, but
- * 92.7400017 -> 92.75
- */
-#define RSF16_ENCODE(x) ((x) / 800 + 214)
#define RSF16_MINFREQ (87 * 16000)
#define RSF16_MAXFREQ (108 * 16000)
Randy Dunlap [Thu, 21 Jun 2012 00:30:30 +0000 (21:30 -0300)]
[media] media: pms.c needs linux/slab.h
drivers/media/video/pms.c uses kzalloc() and kfree() so it should
include <linux/slab.h> to fix build errors and a warning.
drivers/media/video/pms.c:1047:2: error: implicit declaration of function 'kzalloc'
drivers/media/video/pms.c:1047:6: warning: assignment makes pointer from integer without a cast
drivers/media/video/pms.c:1116:2: error: implicit declaration of function 'kfree'
Found in mmotm but applies to mainline.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 28 May 2012 10:42:54 +0000 (07:42 -0300)]
[media] V4L2 spec: clarify a few modulator issues
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 27 May 2012 10:25:06 +0000 (07:25 -0300)]
[media] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN
Set the new capability flags in G_TUNER and return ENODATA if no channels
were found.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 28 May 2012 10:30:28 +0000 (07:30 -0300)]
[media] v4l2 spec: document the new v4l2_tuner capabilities
Update the spec with the new capabilities and specify new error codes for
S_HW_FREQ_SEEK.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Sun, 27 May 2012 09:54:29 +0000 (06:54 -0300)]
[media] videodev2.h: add new hwseek capability bits
Tell the application whether the hardware seek is bounded and/or wraps around.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Daniel Glöckner [Sun, 10 Jun 2012 00:43:58 +0000 (21:43 -0300)]
[media] tvaudio: don't report mono when stereo is received
The V4L2 spec says reporting mono and stereo at the same time means
the hardware can not distinguish between the two. So when we can,
we should report only one of them.
Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Daniel Glöckner [Sun, 10 Jun 2012 00:43:56 +0000 (21:43 -0300)]
[media] tvaudio: obey V4L2 tuner audio matrix
V4L2 specifies the audio mode to use for combinations of possible
(rxsubchans) and requested (audmode) audio modes. Up to now tvaudio
has made these decisions automatically based on the possible audio
modes from setting of the frequency until VIDIOC_S_TUNER was called.
It then forced the hardware to use the mode requested by the user.
With this patch it continues to adjust the audio mode while taking
the requested mode into account.
Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Fengguang Wu [Sat, 9 Jun 2012 23:00:19 +0000 (20:00 -0300)]
[media] pms: fix build error in pms_probe()
Fix a compiler breakage introduced by commit 8173090acb33:
drivers/media/video/pms.c: In function ‘pms_probe’:
drivers/media/video/pms.c:1047:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
drivers/media/video/pms.c:1116:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
* /home/v4l/v4l/for_upstream: (45 commits)
[media] smia: Fix compile failures
[media] Fix VIDIOC_DQEVENT docbook entry
[media] s5p-fimc: Fix control creation function
[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
[media] s5p-mfc: Fix setting controls
[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
[media] v4l/s5p-mfc: corrected encoder v4l control definitions
[media] v4l: mem2mem_testdev: Fix race conditions in driver
[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
[media] cxd2820r: Fix an incorrect modulation type bitmask
[media] em28xx: Show a warning if the board does not support remote controls
[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
[media] USB: Staging: media: lirc: initialize spinlocks before usage
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
[media] bw-qcam: driver and pixfmt documentation fixes
[media] cx88: fix firmware load on big-endian systems
[media] cx18: support big-endian systems
[media] ivtv: fix support for big-endian systems
[media] tuner-core: return the frequency range of the correct tuner
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
...
Kamil Debski [Fri, 15 Jun 2012 16:40:32 +0000 (13:40 -0300)]
[media] s5p-fimc: Fix control creation function
Fixed the size of the V4L2_CID_COLORFX control cluster.
Prior to this fix V4L2_CID_ROTATE was also icluded in
the cluster preventing application from enabling rotation.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Kamil Debski [Thu, 14 Jun 2012 08:58:07 +0000 (05:58 -0300)]
[media] s5p-mfc: Fix setting controls
Fixed s_ctrl function when setting the following controls:
- V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER
- V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY
Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tomasz Moń [Fri, 8 Jun 2012 07:47:34 +0000 (04:47 -0300)]
[media] v4l: mem2mem_testdev: Fix race conditions in driver
The mem2mem_testdev allows multiple instances to be opened in parallel.
Source and destination queue data are being shared between all
instances, which can lead to kernel oops due to race conditions (most
likely to happen inside device_run()).
Attached patch fixes mentioned problem by storing queue data per device
context.
Signed-off-by: Tomasz Moń <desowin@gmail.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jarod Wilson [Mon, 4 Jun 2012 16:05:24 +0000 (13:05 -0300)]
[media] lirc_sir: make device registration work
For one, the driver device pointer needs to be filled in, or the lirc core
will refuse to load the driver. And we really need to wire up all the
platform_device bits. This has been tested via the lirc sourceforge tree
and verified to work, been sitting there for months, finally getting
around to sending it. :\
stb0899_read_ber() takes 500ms (half a second!) to deliver the current
BER value. Apparently it takes 5 subsequent readings, with a 100ms pause
between them (and even before the first one). This is a real performance
brake if an application freqeuently reads the BER of several devices.
The attached patch reduces this to a single reading, with no more pausing.
I didn't observe any negative side effects of this change.
Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] em28xx: Show a warning if the board does not support remote controls
This simply shows a little warning if the board does not have remote
control support. This should make it easier for users to see if they
have misconfigured their system or if the driver simply does not have
rc-support for their card (yet).
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sachin Kamat [Sat, 26 May 2012 14:11:54 +0000 (11:11 -0300)]
[media] s5p-fimc: Add missing static storage class specifiers
Fixes the following sparse warnings:
drivers/media/video/s5p-fimc/fimc-lite-reg.c:218:6: warning: symbol
'flite_hw_set_out_order' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-mdevice.c:183:5: warning: symbol '__fimc_pipeline_shutdown' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-mdevice.c:1013:12: warning: symbol 'fimc_md_init' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-mdevice.c:1024:13: warning: symbol 'fimc_md_exit' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-core.c:466:5: warning: symbol 'fimc_set_color_effect' was not declared. Should it be static?
drivers/media/video/s5p-fimc/fimc-capture.c:1163:5: warning: symbol 'enclosed_rectangle' was not declared. Should it be static?
Dan Carpenter [Thu, 24 May 2012 14:56:41 +0000 (11:56 -0300)]
[media] videobuf-dma-contig: use gfp_t for GFP flags
Sparse complains if about using unsigned long.
videobuf-dma-contig.c:47:67: warning: restricted gfp_t degrades to integer
videobuf-dma-contig.c:47:65: warning: incorrect type in argument 2 (different base types)
videobuf-dma-contig.c:47:65: expected restricted gfp_t [usertype] gfp_mask
videobuf-dma-contig.c:47:65: got unsigned long
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
This reverts commit d509835e32bd761a2b7b446034a273da568e5573. That commit
breaks support for the generic pass-through mode in the driver for formats,
not natively supported by it. Besides due to a merge conflict it also breaks
driver compilation:
drivers/media/video/mx2_camera.c: In function 'mx2_camera_set_bus_param':
drivers/media/video/mx2_camera.c:937: error: 'pixfmt' undeclared (first use in this function)
drivers/media/video/mx2_camera.c:937: error: (Each undeclared identifier is reported only once
drivers/media/video/mx2_camera.c:937: error: for each function it appears in.)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Thu, 31 May 2012 22:51:05 +0000 (19:51 -0300)]
[media] v4l: Correct create_bufs documentation
Patch id 6016af82eafcb6e086a8f2a2197b46029a843d68 ("[media] v4l2: use __u32
rather than enums in ioctl() structs") unintentionally changes the type of
the format field in struct v4l2_create_buffers from struct v4l2_format to
__u32. Revert that change.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 6 Jun 2012 04:46:50 +0000 (01:46 -0300)]
[media] bw-qcam: driver and pixfmt documentation fixes
Fix the documentation of the Y4 and Y6 formats.
Fix a poll() issue, add support for enum_frmsizes, set the proper
parent device and fix a few compliance issues.
Tested with an actual Connectix B&W parallel port webcam, both on a
little-endian and a big-endian platform. This driver has never been
so good, doing 320x240 at 1 frame per second :-)
I know, nobody cares, but still it is cool that linux can still support
this old webcam.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 25 May 2012 15:01:40 +0000 (12:01 -0300)]
[media] tuner-core: return the frequency range of the correct tuner
The frequency range of the current tuner (radio or TV) was returned
instead of the frequency range of the requested tuner (which depends
on the device node).
This bug caused the frequency range of the radio tuner to be returned
when G_TUNER was called on a video node.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 25 May 2012 14:58:06 +0000 (11:58 -0300)]
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
The field current_norm does not have to be set for g_parm to be a valid
ioctl. Remove that check, but add a check whether this is a video node
instead as g_parm only makes sense for those nodes.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 23 May 2012 09:32:52 +0000 (06:32 -0300)]
[media] vino: fix compiler warnings
v4l-dvb-git/drivers/media/video/vino.c: In function 'vino_acquire_input':
v4l-dvb-git/drivers/media/video/vino.c:2602:18: warning: 'data_norm' may be used uninitialized in this function [-Wuninitialized]
v4l-dvb-git/drivers/media/video/vino.c: In function 'vino_set_input':
v4l-dvb-git/drivers/media/video/vino.c:2690:19: warning: 'data_norm' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 23 May 2012 05:48:37 +0000 (02:48 -0300)]
[media] cx24110: fix compiler warning
v4l-dvb-git/drivers/media/dvb/frontends/cx24110.c: In function ‘cx24110_read_ucblocks’:
v4l-dvb-git/drivers/media/dvb/frontends/cx24110.c:520:40: warning: value computed is not used [-Wunused-value]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antonio Ospite [Wed, 16 May 2012 21:42:45 +0000 (18:42 -0300)]
[media] gspca_ov534: make AGC and AWB controls independent
Even if the best results are indeed achieved with both AGC and AWB
enabled, the webcam is capable of setting these independently, and the
user can see the difference of any of the 4 combinations of these two
boolean controls.
Removing the dependency from one another simplifies the code and gives
more control to the user.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Mon, 21 May 2012 10:46:22 +0000 (07:46 -0300)]
[media] bttv: The Hauppauge 61334 needs the msp3410 to do radio demodulation
The (radio) audio out from the tuner (which can also demod FM radio) does not
seem to be hooked up to the msp3410 on this board in any way, so the only way
to get sound from the radio part is to make the msp3410 do the FM radio demod.
The msp3410 can handle this fine, but it is a bit weird compared to how it
is handled on other boards.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sun, 20 May 2012 11:11:04 +0000 (08:11 -0300)]
[media] bttv: Use btv->has_radio rather then the card info when registering the tuner
bttv_init_card2() sets btv->has_audio to a *default* value from the tvcards
array and then may update it by reading a card specific eeprom or gpio
detection.
After bttv_init_card2(), bttv_init_tuner() gets called, and it should clearly
use the updated, dynamic has_radio value from btv->has_radio, rather then
the const value in the tvcards array.
This fixes the radio not working on my Hauppauge WinTV.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sat, 19 May 2012 14:19:06 +0000 (11:19 -0300)]
[media] snd_tea575x: set_freq: update cached freq to the actual achieved frequency
Signed-off-by: Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sat, 19 May 2012 10:57:03 +0000 (07:57 -0300)]
[media] snd_tea575x: Make the module using snd_tea575x the fops owner
Before this patch the owner field of the /dev/radio# device fops was set to
the snd-tea575x-tuner module itself. Meaning that the module which was using
it could be rmmod-ed while the device is open, and then BAD things happen.
I know, as I found out the hard way :)
Note that there is no need to also somehow increase the refcount of the
snd-tea575x-tuner module itself, since any drivers using it will have
symbolic references to it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Fri, 18 May 2012 18:01:36 +0000 (15:01 -0300)]
[media] snd_tea575x: Report correct frequency range for EU/US versus JA models
My EU/US 5757 cannot tune below approx 86 Mhz, that is below that it
does not even generate the standard not tuned to anything radio noise anymore,
so clearly the 5757 cannot tune to the Japanese frequencies. This patch
assumes that likewise the 5759 cannot tune to the EU/US frequencies.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 6 Jun 2012 20:48:46 +0000 (17:48 -0300)]
[media] V4L2 spec fix
Two small docbook fixes:
- prepare-buf was not positioned in alphabetical order, moved to the right place.
- the format field in create_bufs had the wrong type in the documentation
Hans Verkuil [Thu, 7 Jun 2012 14:20:31 +0000 (11:20 -0300)]
[media] Fix regression in ioctl numbering
Yuck. The VIDIOC_(TRY_)DECODER_CMD ioctls already had ioctl numbers 96 and 97,
and after merging the timings API I forgot to continue numbering from 98. So
now we have two ioctls with number 96 and two with 97.
With the new table-driver ioctl handling in v4l2-ioctl.c it is essential that
each ioctl has its own unique number, so let's fix this quickly for 3.5.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>