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>
Sakari Ailus [Thu, 31 May 2012 21:51:05 +0000 (18: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>
Ondrej Zary [Thu, 17 May 2012 07:55:01 +0000 (04:55 -0300)]
[media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
Add PnP support to radio-sf16fmr2 driver to support SF16-FMD2 card (SB16 +
TEA5757). The driver can now handle two cards (FMR2 is hardwired to 0x384,
FMD2 can be put at 0x384 or 0x284 by PnP).
Tested with both SF16-FMR2 and SF16-FMD2 (the can work at the same time by
using kernel parameter "pnp_reserve_io=0x384,2" so the FMD2 is put at 0x284).
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Thu, 26 Apr 2012 16:39:44 +0000 (13:39 -0300)]
[media] smiapp: Allow generic quirk registers
Implement more generic quirk registers than just limit and capability
registers. This comes with the expense of a little bit more access time so
these should be only used when really needed.
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jozsef Marton [Tue, 15 May 2012 15:05:36 +0000 (12:05 -0300)]
[media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
gspca_pac7302 module supports the webcam with usb id: 093a:2627.
It is a Genius FaceCam 300.
The module does not need any changes but listing the usb id along with a vertical flip flag.
The included patch adds this to the module source.
Ben Hutchings [Tue, 15 May 2012 00:36:00 +0000 (21:36 -0300)]
[media] rc: Fix invalid free_region and/or free_irq on probe failure
fintek-cir, ite-cir and nuvoton-cir may try to free an I/O region
and/or IRQ handler that was never allocated after a failure in their
respective probe functions. Add and use separate labels on the
failure path so they will do the right cleanup after each possible
point of failure.
Compile-tested only.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Anssi Hannula [Mon, 14 May 2012 12:52:38 +0000 (09:52 -0300)]
[media] ati_remote: add regular up/down buttons to Medion Digitainer keymap
There are many different Medion X10 remotes that need slightly different
keymaps. We may not yet have all the needed keymaps, in which case a
wrong keymap may be used. This happened with Medion X10 OR2x remotes
before the keymap for them was added, causing the ati_remote driver to
select the Medion Digitainer keymap instead. Unfortunately, the Medion
Digitainer keymap doesn't have the standard X10 up/down scancodes
assigned to KEY_UP and KEY_DOWN keycodes, making wrongly assigned
remotes mostly unusable.
Add the regular KEY_UP and KEY_DOWN scancodes to the Medion X10
Digitainer keymap, making any Medion remote mostly usable even when
wrongly used with that keymap (standard buttons, such as
up/down/left/right, 0-9, play/stop/pause, have the same scancode in all
the X10 remotes).
Anssi Hannula [Mon, 14 May 2012 12:52:37 +0000 (09:52 -0300)]
[media] ati_remote: add keymap for Medion X10 OR2x remotes
Add another Medion X10 remote keymap. This is for the Medion OR2x
remotes with the Windows MCE button.
The receiver shipped with this remote has the same USB ID as the other
Medion receivers, but the name is different and is therefore used to
detect this variant.
Laurent Pinchart [Fri, 11 May 2012 12:55:59 +0000 (09:55 -0300)]
[media] uvcvideo: Fix V4L2 button controls that share the same UVC control
The Logitech pan/tilt reset UVC control contains two V4L2 button
controls to reset pan and tilt. As the UVC control is not marked as
auto-update, the button bits are set but never reset. A pan reset that
follows a tilt reset would thus reset both pan and tilt.
Fix this by not caching the control value of write-only controls. All
standard UVC controls are either readable or auto-update, so this will
not cause any regression and will not result in extra USB requests.
Reported-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This issuses applyed only for Adlink MPG24 board with go7007
& wis2804, all whese changes was tested for continuos
load&restart mode
This is minimal changes needed for start up go7007&wis2804 to work correctly
in 3.4 branch
Changes:
- When go7007 reset device, i2c was not worked (need rewrite GPIO5)
- As wis2804 has i2c_addr=0x00/*really*/, so Need set I2C_CLIENT_TEN flag for validity
- some main nonzero initialization, rewrites with kzalloc instead kmalloc
- STATUS_SHUTDOWN was placed in incorrect place, so if firmware wasn`t loaded, we
failed v4l2_device_unregister with kernel panic (OOPS)
- some new v4l2 style features as call_all(...s_stream...) for using subdev calls
- wis-tw2804.ko module code was incompatible with 3.4 branch in initialization v4l2_subdev parts.
now i2c_get_clientdata(...) contains v4l2_subdev struct instead non standart wis_tw2804 struct
Adds:
- Additional chipset tw2804 controls with: gain,auto gain,inputs[0,1],color kill,chroma gain,gain balances,
for all 4 channels (from tw2804.pdf)
- Power control for each 4 ADC (tw2804) up when s_stream(...,1), down otherwise
Signed-off-by: Volokh Konstantin <volokh84@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/lg2160.c: In function ‘lg216x_read_ucblocks’:
drivers/media/dvb/frontends/lg2160.c:1336:1: warning: label ‘fail’ defined but not used [-Wunused-label]
drivers/media/dvb/frontends/lg2160.c:1325:6: warning: unused variable ‘ret’ [-Wunused-variable]
drivers/media/dvb/frontends/lg2160.c:1324:23: warning: unused variable ‘state’ [-Wunused-variable]
drivers/media/dvb/frontends/lg2160.c: In function ‘lg216x_set_ensemble’:
drivers/media/dvb/frontends/lg2160.c:420:23: warning: ‘reg’ may be used uninitialized in this function [-Wuninitialized]
Cc: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Sun, 29 Jan 2012 18:46:46 +0000 (15:46 -0300)]
[media] DVB: add support for the LG2160 ATSC-MH demodulator
This patch adds support for controlling the LG2160 and
LG2161 ATSC-MH demodulators.
[mchehab@redhat.com: fold with the next patch that was fixing the DVB ABI] Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Sun, 29 Apr 2012 15:59:46 +0000 (12:59 -0300)]
[media] DocBook: document new DTV Properties for ATSC-MH delivery system
Document the following properties for controlling an ATSC-MH frontend:
DTV_ATSCMH_FIC_VER - Version number of the FIC signaling data
DTV_ATSCMH_PARADE_ID - Parade identification number
DTV_ATSCMH_NOG - Number of MH groups per MH subframe for a designated parade
DTV_ATSCMH_TNOG - Total number of MH groups in all parades in one subframe
DTV_ATSCMH_SGN - Start group number
DTV_ATSCMH_PRC - Parade repetition cycle
DTV_ATSCMH_RS_FRAME_MODE - RS frame mode
DTV_ATSCMH_RS_FRAME_ENSEMBLE - RS frame ensemble
DTV_ATSCMH_RS_CODE_MODE_PRI - RS code mode (primary)
DTV_ATSCMH_RS_CODE_MODE_SEC - RS code mode (secondary)
DTV_ATSCMH_SCCC_BLOCK_MODE - Series Concatenated Convolutional Code Block Mode
DTV_ATSCMH_SCCC_CODE_MODE_A - Series Concatenated Convolutional Code Rate A
DTV_ATSCMH_SCCC_CODE_MODE_B - Series Concatenated Convolutional Code Rate B
DTV_ATSCMH_SCCC_CODE_MODE_C - Series Concatenated Convolutional Code Rate C
DTV_ATSCMH_SCCC_CODE_MODE_D - Series Concatenated Convolutional Code Rate D
DTV_ATSCMH_FIC_ERR - FIC error count
DTV_ATSCMH_CRC_ERR - CRC error count
DTV_ATSCMH_RS_ERR - RS error count
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] s5p-fimc: Add support for Exynos4x12 FIMC-LITE
This patch adds driver for FIMC-LITE camera host interface. This new IP
differs from the regular FIMC IP in that it doesn't have input DMA,
scaler and color space conversion support. So it just plain camera host
interface for MIPI-CSI2 and ITU-R interfaces. For the serial bus support
it interworks with MIPI-CSIS and the exisiting s5p-csis driver.
The FIMC-LITE and MIPI-CSIS drivers can also be reused in the Exynos5
SoC series.
Tidy up the variant and driver data handling. Remove the 'samsung_'
prefix from some data structures since it doesn't really carry any
useful information and makes the names unnecessarily long.
[media] s5p-fimc: Prefix format enumerations with FIMC_FMT_
Prefix the pixel format enumerations with FIMC_FMT_ to make it more clear,
especially when used in new IP drivers, like fimc-lite, etc. Also add IO_
prefix in the input/output enumeration.
[media] s5p-fimc: Rework the video pipeline control functions
There is getting more entities to manage within single video pipeline
in newer SoCs. To simplify code put subdevs' pointer into an array
rather than adding new member in struct fimc_pipeline for each subdev.
This allows to easier handle subdev operations in proper order.
Additionally walk graph in one direction only in fimc_pipeline_prepare()
function to make sure we properly gather only media entities that below
to single data pipeline. This avoids wrong initialization in case where,
for example there are multiple active links from s5p-mipi-csis subdev
output pad.
struct fimc_pipeline declaration is moved to the driver's public header
to allow other drivers to reuse the fimc-lite driver added in subsequent
patches.
[media] s5p-fimc: Refactor the register interface functions
Simplify the register API and use FIMC_REG_ prefix for all register
definitions for consistency with FIMC-LITE. The unused image effect
defines are removed.
[media] s5p-fimc: Use v4l2_subdev internal ops to register video nodes
In order to be able to select only FIMC-LITE support, which is added
with subsequent patches, the regular FIMC support is now contained
only in fimc-core.c, fimc-m2m.c and fimc-capture.c files. The graph
and pipeline management is now solely handled in fimc-mdevice.[ch].
This means the FIMC driver can now be excluded with Kconfig option,
leaving only FIMC-LITE and allowing this driver to be reused in SoCs
that have only FIMC-LITE and no regular FIMC IP.
[media] s5p-fimc: Move m2m node driver into separate file
Virtually no functional changes, just code reordering. This let us to
clearly separate all logical functions available in the driver: fimc
capture, mem-to-mem, and later fimc-lite capture, ISP features, etc.
[media] s5p-fimc: Avoid crash with null platform_data
In commit "s5p-fimc: Handle sub-device interdependencies using deferred.."
there was a check added for pdata->num_clients without first checking
pdata against NULL. This causes a crash when platform_data is not set,
which is a valid use case. Fix this regression by skipping the MIPI-CSIS
subdev registration also when pdata is null.
Reported-by: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sachin Kamat [Mon, 14 May 2012 09:33:34 +0000 (06:33 -0300)]
[media] s5p-jpeg: Use devm_* functions in jpeg-core.c file
devm_* functions are used to replace kzalloc, request_mem_region, ioremap
and request_irq functions in probe call. With the usage of devm_* functions
explicit freeing and unmapping is not required.
Sachin Kamat [Fri, 11 May 2012 07:38:14 +0000 (04:38 -0300)]
[media] s5p-mfc: Add missing static storage class in s5p_mfc_enc.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1439:5: warning: symbol 'vidioc_s_parm' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1455:5: warning: symbol 'vidioc_g_parm' was not declared. Should it be static?
Sachin Kamat [Thu, 10 May 2012 06:35:48 +0000 (03:35 -0300)]
[media] s5p-g2d: Add missing static storage class in g2d.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-g2d/g2d.c:68:18: warning: symbol 'def_frame' was not declared. Should it be static?
drivers/media/video/s5p-g2d/g2d.c:80:16: warning: symbol 'find_fmt' was not declared. Should it be static?
drivers/media/video/s5p-g2d/g2d.c:205:5: warning: symbol 'g2d_setup_ctrls' was not declared. Should it be static?
Sachin Kamat [Thu, 10 May 2012 06:32:01 +0000 (03:32 -0300)]
[media] s5p-mfc: Add missing static storage class to silence warnings
Fixes the following sparse warnings:
drivers/media/video/s5p-mfc/s5p_mfc.c:73:6
warning: symbol 's5p_mfc_watchdog' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_opr.c:299:6:
warning: symbol 's5p_mfc_set_shared_buffer' was not declared. Should it be static?
Sachin Kamat [Mon, 12 Mar 2012 06:13:34 +0000 (03:13 -0300)]
[media] v4l: s5p-tv: Fix section mismatch warning in mixer_video.c
The function __devinit mxr_probe() references
a function __devexit mxr_release_video().
Since mxr_release_video() is referenced outside the exit section, the following
compilation warning is generated which is fixed here:
WARNING: drivers/media/video/s5p-tv/s5p-mixer.o(.devinit.text+0x340):
Section mismatch in reference from the function mxr_probe() to the function
devexit.text:mxr_release_video()
[media] v4l: s5p-tv: mixer: fix handling of interlaced modes
The next frame was fetched by Mixer at every VSYNC event. This caused tearing
when Mixer's output in interlaced mode. This patch fixes this bug by fetching
new frame every second VSYNC when working in interlaced mode.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The mode setup was applied on HDMI hardware only on resume event. This caused
problem if HDMI was not suspended between mode switches. This patch fixes this
problem by setting a dirty flag on a mode change event. If flag is set, then
new mode is applied on the next stream-on event.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>