History log of /drivers/media/Kconfig
Revision Date Author Comments
7d24c514e8e06c0a2d90f0735fdf8810016a6fea 22-Aug-2014 Antti Palosaari <crope@iki.fi> [media] Kconfig: do not select SPI bus on sub-driver auto-select

We should not select SPI bus when sub-driver auto-select is
selected. That option is meant for auto-selecting all possible
ancillary drivers used for selected board driver. Ancillary
drivers should define needed dependencies itself.

I2C and I2C_MUX are still selected here for a reason described on
commit 347f7a3763601d7b466898d1f10080b7083ac4a3

Reverts commit e4462ffc1602d9df21c00a0381dca9080474e27a

Reported-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
e4462ffc1602d9df21c00a0381dca9080474e27a 13-Jul-2014 Antti Palosaari <crope@iki.fi> [media] Kconfig: sub-driver auto-select SPI bus

Mirics MSi001 and MSi2500 drivers uses SPI bus. Due to that we need
auto-select it too.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
435ef148cabb65644032cb08d1ac3e7611cb24ae 13-Jul-2014 Antti Palosaari <crope@iki.fi> [media] Kconfig: add SDR support

Add software defined radio device support for media Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
347f7a3763601d7b466898d1f10080b7083ac4a3 21-Dec-2013 Mauro Carvalho Chehab <m.chehab@samsung.com> [media] subdev autoselect only works if I2C and I2C_MUX is selected

As reported by the kbuild test robot <fengguang.wu@intel.com>:

> warning: (VIDEO_EM28XX_DVB) selects DVB_M88DS3103 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX)
> drivers/built-in.o: In function `m88ds3103_release':
> >> m88ds3103.c:(.text+0x1ab1af): undefined reference to `i2c_del_mux_adapter'
> drivers/built-in.o: In function `m88ds3103_attach':
> >> (.text+0x1ab342): undefined reference to `i2c_add_mux_adapter'

There are 3 possible ways to fix it:

1) make em28xx dependent on I2C_MUX.

That sounds wrong, as the em28xx bridge doesn't have i2c muxes on it,
and just one frontend has.

Well, subdevs could eventually be converted to, instead of using dvb
i2c gate control, to use i2c mux support.

That makes sense, but it takes time and lots of effort. Not sure if
this will happen anytime soon.

2) MEDIA_SUBDRV_AUTOSELECT can be dependent of I2C and I2C_MUX.

That means that users will need to manually enable I2C_MUX on some
distributions. Not sure about others, but, on Fedora, this option is
disabled.

So, it can end by generating a number of complains from users
that their devices suddenly stopped working after a Kernel upgrade,
at least until all distros that ship Kernels with I2C_MUX enabled.

3) if MEDIA_SUBDRV_AUTOSELECT is selected, it will select I2C and I2C_MUX.

Of course, MEDIA_SUBDRV_AUTOSELECT will need to inherit all dependencies
that I2C and I2C_MUX have (only HAS_IOMEM).

The disadvantage is that, if new dependencies are added on I2C, they'll
also need to be added here.

As the hole idea of autoselect is to let the user not bother about whatever
frontend/tuner is used by a driver, IMHO, (3) is the better solution.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
bb69ee27b96110c509d5b92c9ee541d81a821706 20-Jun-2013 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Fix build when drivers are builtin and frontend modules

There are a large number of reports that the media build is
not compiling when some drivers are compiled as builtin, while
the needed frontends are compiled as module.

On the last one of such reports:
From: kbuild test robot <fengguang.wu@intel.com>
Subject: saa7134-dvb.c:undefined reference to `zl10039_attach'

The .config file has:

CONFIG_VIDEO_SAA7134=y
CONFIG_VIDEO_SAA7134_DVB=y
# CONFIG_MEDIA_ATTACH is not set
CONFIG_DVB_ZL10039=m

And it produces all those errors:

drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x2f263e): undefined reference to `tea5767_attach'
tuner-core.c:(.text+0x2f273e): undefined reference to `tda9887_attach'
drivers/built-in.o: In function `tuner_probe':
tuner-core.c:(.text+0x2f2d20): undefined reference to `tea5767_autodetection'
drivers/built-in.o: In function `av7110_attach':
av7110.c:(.text+0x330bda): undefined reference to `ves1x93_attach'
av7110.c:(.text+0x330bf7): undefined reference to `stv0299_attach'
av7110.c:(.text+0x330c63): undefined reference to `tda8083_attach'
av7110.c:(.text+0x330d09): undefined reference to `ves1x93_attach'
av7110.c:(.text+0x330d33): undefined reference to `tda8083_attach'
av7110.c:(.text+0x330d5d): undefined reference to `stv0297_attach'
av7110.c:(.text+0x330dbe): undefined reference to `stv0299_attach'
drivers/built-in.o: In function `tuner_attach_dtt7520x':
ngene-cards.c:(.text+0x3381cb): undefined reference to `dvb_pll_attach'
drivers/built-in.o: In function `demod_attach_lg330x':
ngene-cards.c:(.text+0x33828a): undefined reference to `lgdt330x_attach'
drivers/built-in.o: In function `demod_attach_stv0900':
ngene-cards.c:(.text+0x3383d5): undefined reference to `stv090x_attach'
drivers/built-in.o: In function `cineS2_probe':
ngene-cards.c:(.text+0x338b7f): undefined reference to `drxk_attach'
drivers/built-in.o: In function `configure_tda827x_fe':
saa7134-dvb.c:(.text+0x346ae7): undefined reference to `tda10046_attach'
drivers/built-in.o: In function `dvb_init':
saa7134-dvb.c:(.text+0x347283): undefined reference to `mt352_attach'
saa7134-dvb.c:(.text+0x3472cd): undefined reference to `mt352_attach'
saa7134-dvb.c:(.text+0x34731c): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x34733c): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x34735c): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x347378): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x3473db): undefined reference to `tda10046_attach'
drivers/built-in.o:saa7134-dvb.c:(.text+0x347502): more undefined references to `tda10046_attach' follow
drivers/built-in.o: In function `dvb_init':
saa7134-dvb.c:(.text+0x347812): undefined reference to `mt352_attach'
saa7134-dvb.c:(.text+0x347951): undefined reference to `mt312_attach'
saa7134-dvb.c:(.text+0x3479a9): undefined reference to `mt312_attach'
>> saa7134-dvb.c:(.text+0x3479c1): undefined reference to `zl10039_attach'

This is happening because a builtin module can't use directly a symbol
found on a module. By enabling CONFIG_MEDIA_ATTACH, the configuration
becomes valid, as dvb_attach() macro loads the module if needed, making
the symbol available to the builtin module.

While this bug started to appear after the patches that use IS_DEFINED
macro (like changeset 7b34be71db533f3e0cf93d53cf62d036cdb5418a), this
bug is a way ancient than that.

The thing is that, before the IS_DEFINED() patches, the logic used to be:

&& defined(MODULE))
struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
u8 i2c_addr,
struct i2c_adapter *i2c);
static inline struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
u8 i2c_addr,
struct i2c_adapter *i2c)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}

The above code, with the .config file used, was evoluting to FALSE
(instead of TRUE as it should be, as CONFIG_DVB_ZL10039 is 'm'),
and were adding the static inline code at saa7134-dvb, instead
of the external call. So, while it weren't producing any compilation
error, the code weren't working either.

So, as the overhead for using CONFIG_MEDIA_ATTACH is minimal, just
enable it, if MODULES is defined.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
51e8cb7454c8dd294596e8cfa49afb92447a4987 02-Oct-2012 Kees Cook <keescook@chromium.org> drivers/media: remove depends on CONFIG_EXPERIMENTAL

The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5344fe6e041c1ff867cde87d8088abf845645655 22-Dec-2012 Hans Verkuil <hans.verkuil@cisco.com> [media] Improve media Kconfig menu

I've always found it very confusing that the "Media ancillary drivers (tuners,
sensors, i2c, frontends)" comment came after the "Autoselect" option. This patch
moves it up and changes the "Autoselect" text to correspond more closely to
the "Media ancillary drivers" comment.
It also fixes two typos.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5d92bbe634cc9d768db2b88ca7c303e6799ed5c0 27-Dec-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] ttpci: Fix a missing Kconfig dependency

Fix a Kconfig warning that appears with allmodconfig on arm:

warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2c76a12ae9f5e6e2afc400bfbdd8b326e7d36b2a 17-Oct-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Kconfig: Fix dependencies for driver autoselect options

This option is a merge of both analog TV and DVB CUSTOMISE.

At the merge, the dependencies were not done right: the menu
currently appears only for analog TV. It should also be opened
for digital TV. As there are other I2C devices there (flash
devices, etc) that aren't related to either one, it is better
to make it generic enough to open for all media devices with
video.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
fccea74ff8b5159935acc7b4b4857ee81ee44661 20-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Kconfig: merge all customise options into just one

Instead of having 3 options to allow customizing the media
sub-drivers (tuners, I2C drivers, frontends), merge all of
them into just one.

That simplifies the life for users, as they can just keep
this untouched.

Life for developers is also simpler, as there's now just
one Kconfig item to remember, for the ancillary sub-drivers
providing supports for chips that could change from one
board design to another.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b6334460f2929c02d0d1f0fbad9f909229d00d50 20-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Cleanup media Kconfig files

- get rid of ridden V4L2_COMMON symbol

This symbol is not needed anymore; it can be folded with V4L2
one, simplifying the Kconfig a little bit;

- Comment why some Kconfig items are needed;

- Remove if test for MEDIA_CAMERA_SUPPORT, replacing it by
depends on.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
3c8c09b5edcc5b70c4e197b7419d07bf3bc84d89 20-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Kconfig reorganization

Reorganize the Kconfig order, for it to be a little more intuitive.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2c3fb08b3f74b8792004095a1f6881a3296ff643 14-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rename drivers/media/video as .../platform

The remaining drivers are mostly platform drivers. Name the
dir to reflect it.

It makes sense to latter break it into a few other dirs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cb7a01ac324bf2ee2c666f37ac867e4135f9785a 14-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] move i2c files into drivers/media/i2c

Move ancillary I2C drivers into drivers/media/i2c, in order to
better organize them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
f0af8fa4dad0839f844fd0633e1936493f6d685a 14-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] reorganize the API core items

Reorganize the API core changes for them to appear closer to
the items that enable them, and not at the drivers part of
the menu.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d1677dc31ac1918f6a91e77ab74d456df01f2bb2 14-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] move parallel port/isa video drivers to drivers/media/parport/

We should keep just the I2C drivers under drivers/media/video, and
then rename it to drivers/media/i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0013ca8c52ba7bb1030ed75d6df7e58af0314018 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] siano: break it into common, mmc and usb

siano is, in fact, 2 drivers: one for MMC and one for USB, plus
a common bus-independent code. Break it accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ccae7af2bf07dfef69cc2eb6ebc9e1ff15addfbd 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] common: move media/common/tuners to media/tuners

Move the tuners one level up, as the "common" directory will be used
by drivers that are shared between more than one driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
3785bc170f79ef04129731582b468c28e1326d6d 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] b2c2: break it into common/pci/usb directories

b2c2 is, in fact, 2 drivers: one for PCI and one for USB, plus
a common bus-independent code. Break it accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
25aee3debe0464f6c680173041fa3de30ec9ff54 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Rename media/dvb as media/pci

The remaining dvb drivers are pci, so rename them to match the
bus.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
786baecfe78f8e25547c628b48a60fc8e5636056 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] dvb-usb: move it to drivers/media/usb/dvb-usb

As media/dvb will be removed, move it to a proper place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
616300bd51bee80d2d122c205866aa4c20adbaa8 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] firewire: move it one level up

Move firewire to one level up, as the dvb subdirectory will be
removed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9a0bf528b4d66b605f02634236da085595c22101 14-Aug-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] move the dvb/frontends to drivers/media/dvb-frontends

Raise the DVB frontends one level up, as the intention is to remove
the drivers/media/dvb directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
3d6c2bc08ac4f75bf3597740357c98f2207ca412 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] dvb: move the dvb core one level up

just like the V4L2 core, move the DVB core to drivers/media, as the
intention is to get rid of both "video" and "dvb" directories.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5bc3cb743bbab408792c1b4ef31adf6268aa4b7e 14-Jun-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] v4l: move v4l2 core into a separate directory

Currently, the v4l2 core is mixed together with other non-core drivers.
Move them into a separate directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
c455f5c85ab79d065d09915e73c643f4cfa0eb16 06-Jul-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Kconfig: Split the core support options from the driver ones

Better arrange the remote controller driver items to happen after the
core support, on their proper menus, and making clerarer what is media
core options and what is media driver options.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
8cfd9dccf2693774d28c2d4ea7b2a7301c99d190 28-May-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] media: Remove VIDEO_MEDIA Kconfig option

In the past, it was possible to have either DVB or V4L2 core
as module and the other as builtin. Such config never make much
sense, and created several issues in order to make the Kconfig
dependency to work, as all drivers that depend on both (most
TV drivers) would need to be compiled as 'm'. Due to that,
the VIDEO_MEDIA config option were added.

Instead of such weird approach, let's just use the MEDIA_SUPPORT
=y or =m to select if the media subsystem core will be either
builtin or module, simplifying the building system logic.

Also, fix the tuners configuration, by enabling them only if
a tuner is required. So, if just webcam/grabbers support is
selected, no tuner option will be selected. Also, if only digital
TV is selected, no analog tuner support is selected.

That removes the need of using EXPERT customise options, when
analog TV is not selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b4c184e506a4cdb9b77bff4a1d39237581540b33 28-May-2012 Mauro Carvalho Chehab <mchehab@redhat.com> [media] media: reorganize the main Kconfig items

Change the main items to:

<m> Multimedia support --->
[ ] Cameras/video grabbers support
[ ] Analog TV support
[ ] Digital TV support
[ ] AM/FM radio receivers/transmitters support
[ ] Remote Controller support

This provides an interface that is clearer to end users that
are compiling the Kernel, and will allow the building system
to automatically unselect drivers for unused functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9a78efc8fbd6776cd0f704be9cac7b013f3d3d16 16-Jun-2011 Jiri Slaby <jslaby@suse.cz> [media] DVB: dvb-net, make the kconfig text helpful

Telling the user they can disable an option if they want is not the
much useful. Describe what it is good for instead.

The text was derived from Mauro's email.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Hans Petter Selasky <hselasky@c2i.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
8c528d5e51af26fd71ca6b5e39dfd1b4bd34c505 10-Jun-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> [media] media: DVB_NET must depend on DVB_CORE

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
a34ff6cdbb464b3e37f0cbb6b0cff9dab4ee057b 23-May-2011 Hans Petter Selasky <hselasky@c2i.net> [media] Make DVB NET configurable in the kernel

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7cd5a16b22af7dc92190a60f336b6854a6fcb99d 21-May-2010 Stanimir Varbanov <svarbanov@mm-sol.com> [media] v4l: Create v4l2 subdev file handle structure

Used for storing subdev information per file handle and hold V4L2 file
handle.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Antti Koskipaa <akoskipa@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cf4b9211b5680cd9ca004232e517fb7ec5bf5316 09-Dec-2009 Laurent Pinchart <laurent.pinchart@ideasonboard.com> [media] media: Media device node support

The media_devnode structure provides support for registering and
unregistering character devices using a dynamic major number. Reference
counting is handled internally, making device drivers easier to write
without having to solve the open/disconnect race condition issue over
and over again.

The code is based on video/v4l2-dev.c.

[mchehab@redhat.com: Remove linux/smp_lock.h include to not break compilation on bisect]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2d5ca76f2b39a31313d7e54224c78b7b311e7dce 27-Dec-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] dabusb: Move it to staging to be deprecated

dabusb driver were conceived as an experimental driver for a test
device. The driver never supported any shipped product, and, while
there were some updates on 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, better to remove it, on .39. If later needed, we may rescue it
from git logs. For now, let's move it to staging.

Acked-by: Deti Fliegl <deti@fliegl.de>
Cc: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
58c66df3e38ffb1d59cc5162bb9e07c859288034 27-Dec-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] Remove VIDEO_V4L1 Kconfig option

There's no sense on keeping VIDEO_V4L1 Kconfig option just because of
two deprecated drivers moved to staging scheduled to die on 2.6.39.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
08af245de0cf6ab5f4ed008ee2bb99273774fce0 24-Dec-2010 Hans Verkuil <hverkuil@xs4all.nl> [media] V4L: remove V4L1 compatibility mode

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
32cf86f6d16367db5a10039c1dd938a2427d697c 10-Nov-2010 Mauro Carvalho Chehab <mchehab@redhat.com> [media] rename drivers/media/IR to drives/media/rc

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
0edf2e5e2bd0ae7689ce8a57ae3c87cc1f0c6548 27-Oct-2010 Arnd Bergmann <arnd@arndb.de> [media] v4l: kill the BKL

All of the hard problems for BKL removal appear to be solved in the
v4l-dvb/master tree. This removes the BKL from the various open
functions that do not need it, or only use it to protect an
open count.

The zoran driver is nontrivial in this regard, so I introduce
a new mutex that locks both the open/release and the ioctl
functions. Someone with access to the hardware can probably
improve that by using the existing lock in all cases.

Finally, all drivers that still use the locked version of the
ioctl function now get called under a new mutex instead of
the BKL.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
6de5bd128d381ad88ac6d419a5e597048eb468cf 11-Sep-2010 Arnd Bergmann <arnd@arndb.de> BKL: introduce CONFIG_BKL.

With all the patches we have queued in the BKL removal tree, only a
few dozen modules are left that actually rely on the BKL, and even
there are lots of low-hanging fruit. We need to decide what to do
about them, this patch illustrates one of the options:

Every user of the BKL is marked as 'depends on BKL' in Kconfig,
and the CONFIG_BKL becomes a user-visible option. If it gets
disabled, no BKL using module can be built any more and the BKL
code itself is compiled out.

The one exception is file locking, which is practically always
enabled and does a 'select BKL' instead. This effectively forces
CONFIG_BKL to be enabled until we have solved the fs/lockd
mess and can apply the patch that removes the BKL from fs/locks.c.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
e27d38112eb727df189a9ebf560aa104cb102253 11-Dec-2009 Mauro Carvalho Chehab <mchehab@redhat.com> V4L/DVB (13612): IR: Move common IR code to drivers/media/IR

This is the first step of creating a common code for IR that can be
used by other input devices.

For now, keep IR dir at drivers/media, to easy the movement of the IR files,
but later patches may move it to drivers/IR or drivers/input/IR.

No functional changes is done on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ab482a6c18523b7aa75eb146dad4db77a86572fa 19-May-2009 Randy Dunlap <randy.dunlap@oracle.com> V4L/DVB (11881): one kconfig controls them all

Add a kconfig symbol that allows someone to disable all
multimedia config options at one time.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
b7763f9bee2a1a59c0481b408ca42097944e1651 01-Feb-2009 Márton Németh <nm127@freemail.hu> V4L/DVB (10633): DAB: fix typo

Fix typo in "DAB adapters" section in Kconfig.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d4216488c0ccf7b659411023903bac7207f0dfb7 18-Jul-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
3617691fb98b81850640a9b61fb932b798ad4504 22-May-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (8274): sms1xxx: build cleanup after driver relocation

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2e5c1ec8865abd81e24a394918c7ba315e0b7b70 19-May-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (8258): add support for SMS1010 and SMS1150 based digital television devices

initial driver drop, provided by Siano Mobile Silicon, Inc.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
039d40019f3c5e26ea50ec5af4270189f63365e1 14-May-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic

If one of DVB_CORE or VIDEO_DEV is a module, the modules that can be used by
both DVB and V4L cores should also be a module, otherwise, it will break its
dependencies. This Kconfig logic implements the following:

CONFIG_VIDEO_DEV CONFIG_DVB_CORE CONFIG_VIDEO_MEDIA
N N N
N M M
N Y Y
M N M
M M M
M Y M
Y N Y
Y M M
Y Y Y

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
f1784354f774e1fa4863fc6382296ef6ede26dc5 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> Fix V4L/DVB core help messages

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
7c91f0624a9a2b8b9b122cf94fef34bc7f7347a6 30-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB(7767): Move tuners to common/tuners

There were several issues in the past, caused by the hybrid tuner design, since
now, the same tuner can be used by drivers/media/dvb and drivers/media/video.

Kconfig items were rearranged, to split V4L/DVB core from their drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17de9a4e53567912735105e189535f5d83e74a81 15-Apr-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7584): Fix build that occurs when CONFIG_VIDEO_PMS=y and VIDEO_V4L2_COMMON=m

This patch removes zoran checks for VIDEO_V4L2, since this API is always
present, when V4L is selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
8eb8ff3870ede23b2328ef376023a3542efcb9a5 30-Mar-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7483): tuner-simple: fix broken build dependency

tuner-simple is the only module that uses tuner-types - these will be
merged to a single module in the future. For now, build both of them
if TUNER_SIMPLE is selected.

This fixes the following build warning, if tuner-simple is selected
without tuner-types:

WARNING: "tuner_count" [tuner-simple.ko] undefined!
WARNING: "tuners" [tuner-simple.ko] undefined!

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
0705135e59f8503e4dade4b3580fed77b1743b7c 22-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API

videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
6d43cec87f9d9679a5c4adca7935dc8cf207f6ce 22-Apr-2008 Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> V4L/DVB (7196): Lift videobuf-dma-sg's PCI dependency, until it is fixed

videobuf-dma-sg.c should be converted to the generic DMA API to make it
also useful for non-PCI configurations. Even now it can be used thanks
to compatibility macros in include/asm-generic/pci-dma-compat.h. This
has been verified to work on PXA270 CPU with the pxa_camera.c soc-camera
driver. For this the following temporary work-around is needed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
82b3083d2673e5fe8ac508071038b2b4c10bbf9c 22-Apr-2008 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (7125): tuner: build tuner-types independently of tuner-core

tuner-types is needed for tuner-simple, and does not need to be bound
to tuner-core. Any caller of tuner-simple, including tuner-core, needs
to pass a structure from tuner-types into tuner-simple at attach-time.

Export the two needed symbols from tuner-types for now, so that card-level
drivers can attach tuner-simple for hybrid dvb_frontend devices. We will
remove this dependency altogether as tuner refactoring phase 3 progresses.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ea35e3a754b2ba5f712c3f4df55e426ae2e4d60a 14-Feb-2008 Paul Mundt <lethal@linux-sh.org> V4L/DVB (7205): tuner-xc2028 depends on FW_LOADER

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
057596eea8402aa8f7a670bf3195665aa8267204 02-Feb-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7133): Fix Kconfig dependencies

As pointed by Adrian Bunk, with I2C=m and VIDEO_DEV=y, videodev brokes.

This patch moves the functions that videodev needs from v4l2-common. It also
fixes some Kconfig changes.

After this patch, I2C=m / VIDEO_DEV=y will make v4l2 core statically linked
into kernel. v4l2-common will be m, and all V4L drivers will also be m.

This approach is very conservative, since it is possible to have V4L drivers
that don't need I2C or v4l2-common. The better is to map what drivers really
need v4l2-common, making them to select v4l2-common, and allowing the others to
be 'y', 'm' and 'n'.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
a9254475bbfbed5f0596d952c6a3c9806e19dd0b 29-Jan-2008 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (7115): Fix bug #9833: regression when compiling V4L without I2C

Adrian Bunk reported:

> > Commit 8ffbc6559493c64d6194c92d856196fdaeb8a5fb causes the following
> > compile error with CONFIG_VIDEO_DEV=y/m, CONFIG_I2C=n:
> >
> > <-- snip -->
> >
> > ...
> > MODPOST 26 modules
> > ERROR: "i2c_attach_client" [drivers/media/video/v4l2-common.ko] undefined!
> > make[2]: *** [__modpost] Error 1
> >
> > <-- snip -->

...

And what should happen if CONFIG_VIDEO_DEV=y, CONFIG_I2C=m?

CC: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
31c9584c0b071dfa7a75db6e21cc727f728f97b0 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6443): make tda9887 build selectable via Kconfig

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
5bea1cd3871351d70cc7624af138f8aa68b7be77 22-Oct-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6435): tda8290: add support for NXP TDA18271 tuner and TDA8295 analog demod

Add basic support for NXP TDA8295 analog demod and TDA18271 tuner silicon.

TDA8295 + TDA8275a not yet tested.
TDA8290 + TDA18271 not yet supported.

Digital mode of TDA18271 not yet tested & needs more work.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
746d9732dbd5b95c3ba36230e2814fa2c391a311 26-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6433): Move all tda8275/8275a tuning code from tda8290 module into tda827x module

Add analog tuning support to tda827x dvb_frontend tuner module.

Convert tda8290 module back to native tuner interface.

The tda8290 analog demodulator will be handled the same way as tda9887.
The tuner.ko module (tuner-core) will pass commands to tda8290 via the
tuner_operations interface. tda8290 will communicate with tda827x via
the dvb_frontend interface, while passing a pointer to a private data
structure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
215b95baf969c6f895969f0a4ae0479954fba7cd 23-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6430): Convert tuner-xc2028 driver to the newer hybrid approach

This changeset converts tuner-xc2028 to the newer hybrid approach. It also
prevents creating twice the xc3028 private struct by both DVB and V4L parts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
5efeb972942f3bfe2fce2b73db9579484625e270 29-Oct-2007 Randy Dunlap <randy.dunlap@oracle.com> V4L/DVB (6478): ir-functions use input functions, should depend on INPUT

Media ir-functions uses input_(*) functions so it should depend
on the INPUT config symbol.

drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
102abd826a20307c5a0d23f49b8a3b5d98bddf94 08-Oct-2007 Trent Piepho <xyzzy@speakeasy.org> V4L/DVB (6299): dvb: Add dependencies for VIDEOBUF_DVB

It needs to select VIDEOBUF_GEN and VIDEOBUF_DMA_SG, since it uses those
modules.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
28318c72adc14952d05d8037d73cec852247791c 02-Oct-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6260): Fix Kconfig dependency

Thanks to Michael Krufky for pointing this to me.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
87b9ad070cf76c0f1e8cf836f7eb86e9ac94e34a 03-Aug-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6254): Add videobuf-vmalloc

Adds a newer videobuf-vmalloc module. This module uses the same
videobuf controls, but implements memory allocation based on vmalloc
methods.

With this method, an USB driver can use video-buf, without needing to
request memory from the DMA-safe area.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
c1accaa21bdef38ec0f36eaaf7ce3384fff9d0c5 23-Aug-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (6252): Adapt drivers to use the newer videobuf modules

PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo.

Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct.
So, to access it, a subroutine call is needed.

This patch renames all occurences of those function calls to be
consistent with the video-buf split.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
ca805d57cf5ea7482ed3da28653f30621249ee45 28-Aug-2007 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (6134): tuner: alter build to produce separate modules

Break tuner.ko into separate modules. This was a quick change -
Tuner sub-drivers are still static-linked to tuner.ko, this will
change after using dvb_attach and removing the probing functions.

After this change, one can deselect undesired tuner sub-drivers via Kconfig.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mike Isely <isely@pobox.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Acked-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Jarod Wilson <jwilson@redhat.com>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ea6337417da26a74a3b91c554ae9823995f8a84d 25-Jun-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (5791): Fix Kbuild for kbd-ir-i2c

Potentially, all board types with I2C and IR support can use an i2c
based IR. Currently, the driver is selected only if bt848 or saa7134
boards are selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
e25df1205f37c7bff3ab14fdfc8a5249f3c69c82 10-May-2007 Martin Schwidefsky <schwidefsky@de.ibm.com> [S390] Kconfig: menus with depends on HAS_IOMEM.

Add "depends on HAS_IOMEM" to a number of menus to make them
disappear for s390 which does not have I/O memory.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
9a95735dde206d2b3575c6368172206535c9bb4e 03-May-2007 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (5601): Create a menu for DAB

DABUSB driver were a little lost at Multimedia core menu.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
7a9ca4a3f99129c2316ee14273ded519630c573d 07-Feb-2007 Andrew Morton <akpm@osdl.org> V4L/DVB (5196): VIDEO_BUF depends on PCI

m68k allmodconfig:
drivers/media/video/video-buf.c: In function 'videobuf_queue_pci':
drivers/media/video/video-buf.c:396: error: 'pci_map_sg' undeclared (first use in this function)
drivers/media/video/video-buf.c:396: error: (Each undeclared identifier is reported only once
drivers/media/video/video-buf.c:396: error: for each function it appears in.)
drivers/media/video/video-buf.c:399: error: 'pci_dma_sync_sg_for_cpu' undeclared (first use in this function)
drivers/media/video/video-buf.c:401: error: 'pci_unmap_sg' undeclared (first use in this function)
drivers/media/video/video-buf.c: In function 'videobuf_pci_dma_map':
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
444dadc4391b978b43a778a5a56dfaed1c4ddc61 21-Nov-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4871): Fix i2c dependencies of VIDEO_TVEEPROM and VIDEO_TUNER

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
a868b45dad04854e07bb1c7c81a73930098bc370 03-Oct-2006 Maciej W. Rozycki <macro@linux-mips.org> V4L/DVB (4706): Do not enable VIDEO_V4L2 unconditionally

The VIDEO_V4L2 config setting is enabled unconditionally, even for
configurations with no support for this subsystem whatsoever. The
following patch adds the necessary dependency.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
8a905162e038367503bac732bf1e3e01c19158b9 10-Sep-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install

V4L1 support should be disabled when no CONFIG_VIDEO_V4L1_COMPAT is defined,
to allow checking for broken V4L2 ports. This is very important during the
migration phase for V4L2 API.
However, userspace apps should be capable of using both APIs, since they need
to test at runtime, via VIDIOCGCAP ioctl, if V4L1 is supported. So, when
__KERNEL__ is not defined, those ioctls and corresponding structs should be
visible.
This patch also removes the obsolete defines HAVE_V4L1 and HAVE_V4L2, that
where causing some confusion, and were replaced by CONFIG_VIDEO_V4L1_COMPAT
and CONFIG_VIDEO_V4L2.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
3446807d6e9ccf4b21476b0b143d35fcc964be4b 25-Jun-2006 Michael Krufky <mkrufky@linuxtv.org> V4L/DVB (4214): Make VIDEO_CX2341X a selectable build option

The cx2341x mpeg encoder module is used by cx88-blackbird, pvrusb2 and
the external ivtv driver. This patch allows for cx2341x to be selected without
having to also select cx88-blackbird. This will be needed to build the external
ivtv driver or the standalone pvrusb2 driver against kernel 2.6.18

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
5d1a9ae6d9d7fc14b2259cd550eb87364a21190a 18-Jun-2006 Hans Verkuil <hverkuil@xs4all.nl> V4L/DVB (4191): Add CX2341X MPEG encoder module.

Adds the cx2341x.c module that handles the programming of the Conexant
cx23415/6 MPEG encoder chip used by cx88-blackbird, pvrusb2 and ivtv.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
741b5bb6498e09178f14a3a5b2cc46e9970f46ed 28-May-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (4052): Wrong syntax: instead of bool, it was written boolean

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
cd41e28e2d0f198ad56840bf8ba13cb41b129bab 09-Apr-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3774): Create V4L1 config options

V4L1 API is depreciated and should be removed soon from kernel. This patch
adds two new options, one to disable V4L1 drivers, and another to disable
V4L1 compat module. This way, it would be easy to check what still depends
on V4L1 stuff, allowing also to test if app works fine with V4L2 only support.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
8dbc5ece9a6a424eb03f1eeee2774c42d8db1ce4 26-Mar-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3619): Whitespace cleanup

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
9f6933be665ce3b049c274c99810ac754edabf19 25-Mar-2006 Mauro Carvalho Chehab <mchehab@infradead.org> V4L/DVB (3599a): Move drivers/usb/media to drivers/media/video

Because of historic reasons, there are two separate directories with
V4L stuff. Most drivers are located at driver/media/video. However, some
code for USB Webcams were inserted under drivers/usb/media.

This makes difficult for module authors to know were things should be.
Also, makes Kconfig menu confusing for normal users.

This patch moves all V4L content under drivers/usb/media to
drivers/media/video, and fixes Kconfig/Makefile entries.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!