All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCHv2 0/3] Improve Kconfig selection for media devices
@ 2012-05-28 12:17 Mauro Carvalho Chehab
  2012-05-28 12:17 ` [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items Mauro Carvalho Chehab
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-05-28 12:17 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, stefanr

The Kconfig building system is improperly selecting some drivers,
like analog TV tuners even when this is not required.

Rearrange the Kconfig in a way to prevent that.

v2: Some fixups at the first patch (typos, renames). Other patches
    got rebased due to that.

Mauro Carvalho Chehab (3):
  [media] media: reorganize the main Kconfig items
  [media] media: Remove VIDEO_MEDIA Kconfig option
  [media] media: only show V4L devices based on device type selection

 drivers/media/Kconfig               |  113 +++++++++++++++++++++++------------
 drivers/media/common/tuners/Kconfig |   64 ++++++++++----------
 drivers/media/dvb/frontends/Kconfig |    1 +
 drivers/media/radio/Kconfig         |    1 +
 drivers/media/rc/Kconfig            |   29 ++++-----
 drivers/media/video/Kconfig         |   76 +++++++++++++++++------
 drivers/media/video/m5mols/Kconfig  |    1 +
 drivers/media/video/pvrusb2/Kconfig |    1 -
 drivers/media/video/smiapp/Kconfig  |    1 +
 9 files changed, 180 insertions(+), 107 deletions(-)

-- 
1.7.8


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items
  2012-05-28 12:17 [RFC PATCHv2 0/3] Improve Kconfig selection for media devices Mauro Carvalho Chehab
@ 2012-05-28 12:17 ` Mauro Carvalho Chehab
  2012-05-28 12:51   ` Hans Verkuil
  2012-05-28 12:17 ` [RFC PATCHv2 2/3] [media] media: Remove VIDEO_MEDIA Kconfig option Mauro Carvalho Chehab
  2012-05-28 12:17 ` [RFC PATCHv2 3/3] [media] media: only show V4L devices based on device type selection Mauro Carvalho Chehab
  2 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-05-28 12:17 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, stefanr

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>
---
 drivers/media/Kconfig               |  109 +++++++++++++++++++++++-----------
 drivers/media/common/tuners/Kconfig |    1 +
 drivers/media/dvb/frontends/Kconfig |    1 +
 drivers/media/rc/Kconfig            |   29 ++++-----
 4 files changed, 89 insertions(+), 51 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 9575db4..323b2f0 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -6,20 +6,82 @@ menuconfig MEDIA_SUPPORT
 	tristate "Multimedia support"
 	depends on HAS_IOMEM
 	help
-	  If you want to use Video for Linux, DVB for Linux, or DAB adapters,
+	  If you want to use Webcams, Video grabber devices and/or TV devices
 	  enable this option and other options below.
+	  Additional info and docs are available on the web at
+	  <http://linuxtv.org>
 
 if MEDIA_SUPPORT
 
 comment "Multimedia core support"
 
 #
+# Multimedia support - automatically enable V4L2 and DVB core
+#
+config MEDIA_CAMERA_SUPPORT
+	bool "Cameras/video grabbers support"
+	---help---
+	  Enable support for webcams and video grabbers.
+
+	  Say Y when you have a webcam or a video capture grabber board.
+
+config MEDIA_ANALOG_TV_SUPPORT
+	bool "Analog TV support"
+	---help---
+	  Enable analog TV support.
+
+	  Say Y when you have a TV board with analog support or with a
+	  hybrid analog/digital TV chipset.
+
+	  Note: There are several DVB cards that are based on chips that
+		support both analog and digital TV. Disabling this option
+		will disable support for them.
+
+config MEDIA_DIGITAL_TV_SUPPORT
+	bool "Digital TV support"
+	---help---
+	  Enable digital TV support.
+
+	  Say Y when you have a board with digital support or a board with
+	  hybrid digital TV and analog TV.
+
+config MEDIA_RADIO_SUPPORT
+	bool "AM/FM radio receivers/transmitters support"
+	---help---
+	  Enable AM/FM radio support.
+
+	  Additional info and docs are available on the web at
+	  <http://linuxtv.org>
+
+	  Say Y when you have a board with radio support.
+
+	  Note: There are several TV cards that are based on chips that
+		support radio reception. Disabling this option will
+		disable support for them.
+
+menuconfig MEDIA_RC_SUPPORT
+	bool "Remote Controller support"
+	depends on INPUT
+	---help---
+	  Enable support for Remote Controllers on Linux. This is
+	  needed in order to support several video capture adapters,
+	  standalone IR receivers/transmitters, and RF receivers.
+
+	  Enable this option if you have a video capture board even
+	  if you don't need IR, as otherwise, you may not be able to
+	  compile the driver for your adapter.
+
+	  Say Y when you have a TV or an IR device.
+
+#
 # Media controller
+#	Selectable only for webcam/grabbers, as other drivers don't use it
 #
 
 config MEDIA_CONTROLLER
 	bool "Media Controller API (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  Enable the media controller API used to query media devices internal
 	  topology and configure it dynamically.
@@ -27,26 +89,15 @@ config MEDIA_CONTROLLER
 	  This API is mostly used by camera interfaces in embedded platforms.
 
 #
-# V4L core and enabled API's
+# Video4Linux support
+#	Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
 #
 
 config VIDEO_DEV
-	tristate "Video For Linux"
-	---help---
-	  V4L core support for video capture and overlay devices, webcams and
-	  AM/FM radio cards.
-
-	  This kernel includes support for the new Video for Linux Two API,
-	  (V4L2).
-
-	  Additional info and docs are available on the web at
-	  <http://linuxtv.org>
-
-	  Documentation for V4L2 is also available on the web at
-	  <http://bytesex.org/v4l/>.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called videodev.
+	tristate
+	depends on MEDIA_SUPPORT
+	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT
+	default y
 
 config VIDEO_V4L2_COMMON
 	tristate
@@ -64,25 +115,15 @@ config VIDEO_V4L2_SUBDEV_API
 
 #
 # DVB Core
+#	Only enables if one of DTV is selected
 #
 
 config DVB_CORE
-	tristate "DVB for Linux"
+	tristate
+	depends on MEDIA_SUPPORT
+	depends on MEDIA_DIGITAL_TV_SUPPORT
+	default y
 	select CRC32
-	help
-	  DVB core utility functions for device handling, software fallbacks etc.
-
-	  Enable this if you own a DVB/ATSC adapter and want to use it or if
-	  you compile Linux for a digital SetTopBox.
-
-	  Say Y when you have a DVB or an ATSC card and want to use it.
-
-	  API specs and user tools are available from <http://www.linuxtv.org/>.
-
-	  Please report problems regarding this support to the LinuxDVB
-	  mailing list.
-
-	  If unsure say N.
 
 config DVB_NET
 	bool "DVB Network Support"
@@ -101,8 +142,6 @@ config VIDEO_MEDIA
 	tristate
 	default (DVB_CORE && (VIDEO_DEV = n)) || (VIDEO_DEV && (DVB_CORE = n)) || (DVB_CORE && VIDEO_DEV)
 
-comment "Multimedia drivers"
-
 source "drivers/media/common/Kconfig"
 source "drivers/media/rc/Kconfig"
 
diff --git a/drivers/media/common/tuners/Kconfig b/drivers/media/common/tuners/Kconfig
index bbf4945..16ee1a4 100644
--- a/drivers/media/common/tuners/Kconfig
+++ b/drivers/media/common/tuners/Kconfig
@@ -2,6 +2,7 @@ config MEDIA_ATTACH
 	bool "Load and attach frontend and tuner driver modules as needed"
 	depends on VIDEO_MEDIA
 	depends on MODULES
+	default y if !EXPERT
 	help
 	  Remove the static dependency of DVB card drivers on all
 	  frontend modules for all possible card variants. Instead,
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
index b98ebb2..6d3c2f7 100644
--- a/drivers/media/dvb/frontends/Kconfig
+++ b/drivers/media/dvb/frontends/Kconfig
@@ -1,6 +1,7 @@
 config DVB_FE_CUSTOMISE
 	bool "Customise the frontend modules to build"
 	depends on DVB_CORE
+	depends on EXPERT
 	default y if EXPERT
 	help
 	  This allows the user to select/deselect frontend drivers for their
diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
index f97eeb8..d2655f1 100644
--- a/drivers/media/rc/Kconfig
+++ b/drivers/media/rc/Kconfig
@@ -1,21 +1,12 @@
-menuconfig RC_CORE
-	tristate "Remote Controller adapters"
+config RC_CORE
+	tristate
+	depends on MEDIA_RC_SUPPORT
 	depends on INPUT
-	default INPUT
-	---help---
-	  Enable support for Remote Controllers on Linux. This is
-	  needed in order to support several video capture adapters,
-	  standalone IR receivers/transmitters, and RF receivers.
-
-	  Enable this option if you have a video capture board even
-	  if you don't need IR, as otherwise, you may not be able to
-	  compile the driver for your adapter.
-
-if RC_CORE
+	default y
 
 config LIRC
-	tristate
-	default y
+	tristate "LIRC interface driver"
+	depends on RC_CORE
 
 	---help---
 	   Enable this option to build the Linux Infrared Remote
@@ -109,6 +100,12 @@ config IR_MCE_KBD_DECODER
 	   Windows Media Center Edition, which you would like to use with
 	   a raw IR receiver in your system.
 
+menuconfig RC_DEVICES
+	bool "Remote Controller devices"
+	depends on RC_CORE
+
+if RC_DEVICES
+
 config IR_LIRC_CODEC
 	tristate "Enable IR to LIRC bridge"
 	depends on RC_CORE
@@ -276,4 +273,4 @@ config IR_GPIO_CIR
 	   To compile this driver as a module, choose M here: the module will
 	   be called gpio-ir-recv.
 
-endif #RC_CORE
+endif #RC_DEVICES
-- 
1.7.8


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCHv2 2/3] [media] media: Remove VIDEO_MEDIA Kconfig option
  2012-05-28 12:17 [RFC PATCHv2 0/3] Improve Kconfig selection for media devices Mauro Carvalho Chehab
  2012-05-28 12:17 ` [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items Mauro Carvalho Chehab
@ 2012-05-28 12:17 ` Mauro Carvalho Chehab
  2012-05-28 12:17 ` [RFC PATCHv2 3/3] [media] media: only show V4L devices based on device type selection Mauro Carvalho Chehab
  2 siblings, 0 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-05-28 12:17 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, stefanr

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>
---
 drivers/media/Kconfig               |    4 --
 drivers/media/common/tuners/Kconfig |   63 ++++++++++++++++++-----------------
 drivers/media/video/pvrusb2/Kconfig |    1 -
 3 files changed, 32 insertions(+), 36 deletions(-)

diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 323b2f0..6d10ccb 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -138,10 +138,6 @@ config DVB_NET
 	  You may want to disable the network support on embedded devices. If
 	  unsure say Y.
 
-config VIDEO_MEDIA
-	tristate
-	default (DVB_CORE && (VIDEO_DEV = n)) || (VIDEO_DEV && (DVB_CORE = n)) || (DVB_CORE && VIDEO_DEV)
-
 source "drivers/media/common/Kconfig"
 source "drivers/media/rc/Kconfig"
 
diff --git a/drivers/media/common/tuners/Kconfig b/drivers/media/common/tuners/Kconfig
index 16ee1a4..94c6ff7 100644
--- a/drivers/media/common/tuners/Kconfig
+++ b/drivers/media/common/tuners/Kconfig
@@ -1,6 +1,6 @@
 config MEDIA_ATTACH
 	bool "Load and attach frontend and tuner driver modules as needed"
-	depends on VIDEO_MEDIA
+	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
 	depends on MODULES
 	default y if !EXPERT
 	help
@@ -20,15 +20,15 @@ config MEDIA_ATTACH
 
 config MEDIA_TUNER
 	tristate
-	default VIDEO_MEDIA && I2C
-	depends on VIDEO_MEDIA && I2C
+	depends on (MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT) && I2C
+	default y
 	select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE
 	select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMISE
 	select MEDIA_TUNER_XC4000 if !MEDIA_TUNER_CUSTOMISE
 	select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMISE
 	select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMISE
-	select MEDIA_TUNER_TEA5761 if !MEDIA_TUNER_CUSTOMISE && EXPERIMENTAL
-	select MEDIA_TUNER_TEA5767 if !MEDIA_TUNER_CUSTOMISE
+	select MEDIA_TUNER_TEA5761 if !MEDIA_TUNER_CUSTOMISE && MEDIA_RADIO_SUPPORT && EXPERIMENTAL
+	select MEDIA_TUNER_TEA5767 if !MEDIA_TUNER_CUSTOMISE && MEDIA_RADIO_SUPPORT
 	select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE
 	select MEDIA_TUNER_TDA9887 if !MEDIA_TUNER_CUSTOMISE
 	select MEDIA_TUNER_MC44S803 if !MEDIA_TUNER_CUSTOMISE
@@ -48,10 +48,11 @@ config MEDIA_TUNER_CUSTOMISE
 
 menu "Customize TV tuners"
 	visible if MEDIA_TUNER_CUSTOMISE
+	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
 
 config MEDIA_TUNER_SIMPLE
 	tristate "Simple tuner support"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	select MEDIA_TUNER_TDA9887
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
@@ -59,7 +60,7 @@ config MEDIA_TUNER_SIMPLE
 
 config MEDIA_TUNER_TDA8290
 	tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	select MEDIA_TUNER_TDA827X
 	select MEDIA_TUNER_TDA18271
 	default m if MEDIA_TUNER_CUSTOMISE
@@ -68,21 +69,21 @@ config MEDIA_TUNER_TDA8290
 
 config MEDIA_TUNER_TDA827X
 	tristate "Philips TDA827X silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A DVB-T silicon tuner module. Say Y when you want to support this tuner.
 
 config MEDIA_TUNER_TDA18271
 	tristate "NXP TDA18271 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A silicon tuner module. Say Y when you want to support this tuner.
 
 config MEDIA_TUNER_TDA9887
 	tristate "TDA 9885/6/7 analog IF demodulator"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Say Y here to include support for Philips TDA9885/6/7
@@ -90,7 +91,7 @@ config MEDIA_TUNER_TDA9887
 
 config MEDIA_TUNER_TEA5761
 	tristate "TEA 5761 radio tuner (EXPERIMENTAL)"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	depends on EXPERIMENTAL
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
@@ -98,63 +99,63 @@ config MEDIA_TUNER_TEA5761
 
 config MEDIA_TUNER_TEA5767
 	tristate "TEA 5767 radio tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Say Y here to include support for the Philips TEA5767 radio tuner.
 
 config MEDIA_TUNER_MT20XX
 	tristate "Microtune 2032 / 2050 tuners"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Say Y here to include support for the MT2032 / MT2050 tuner.
 
 config MEDIA_TUNER_MT2060
 	tristate "Microtune MT2060 silicon IF tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon IF tuner MT2060 from Microtune.
 
 config MEDIA_TUNER_MT2063
 	tristate "Microtune MT2063 silicon IF tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon IF tuner MT2063 from Microtune.
 
 config MEDIA_TUNER_MT2266
 	tristate "Microtune MT2266 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon baseband tuner MT2266 from Microtune.
 
 config MEDIA_TUNER_MT2131
 	tristate "Microtune MT2131 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon baseband tuner MT2131 from Microtune.
 
 config MEDIA_TUNER_QT1010
 	tristate "Quantek QT1010 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon tuner QT1010 from Quantek.
 
 config MEDIA_TUNER_XC2028
 	tristate "XCeive xc2028/xc3028 tuners"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Say Y here to include support for the xc2028/xc3028 tuners.
 
 config MEDIA_TUNER_XC5000
 	tristate "Xceive XC5000 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon tuner XC5000 from Xceive.
@@ -163,7 +164,7 @@ config MEDIA_TUNER_XC5000
 
 config MEDIA_TUNER_XC4000
 	tristate "Xceive XC4000 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon tuner XC4000 from Xceive.
@@ -172,70 +173,70 @@ config MEDIA_TUNER_XC4000
 
 config MEDIA_TUNER_MXL5005S
 	tristate "MaxLinear MSL5005S silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon tuner MXL5005S from MaxLinear.
 
 config MEDIA_TUNER_MXL5007T
 	tristate "MaxLinear MxL5007T silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon tuner MxL5007T from MaxLinear.
 
 config MEDIA_TUNER_MC44S803
 	tristate "Freescale MC44S803 Low Power CMOS Broadband tuners"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Say Y here to support the Freescale MC44S803 based tuners
 
 config MEDIA_TUNER_MAX2165
 	tristate "Maxim MAX2165 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  A driver for the silicon tuner MAX2165 from Maxim.
 
 config MEDIA_TUNER_TDA18218
 	tristate "NXP TDA18218 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  NXP TDA18218 silicon tuner driver.
 
 config MEDIA_TUNER_FC0011
 	tristate "Fitipower FC0011 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Fitipower FC0011 silicon tuner driver.
 
 config MEDIA_TUNER_FC0012
 	tristate "Fitipower FC0012 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Fitipower FC0012 silicon tuner driver.
 
 config MEDIA_TUNER_FC0013
 	tristate "Fitipower FC0013 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Fitipower FC0013 silicon tuner driver.
 
 config MEDIA_TUNER_TDA18212
 	tristate "NXP TDA18212 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  NXP TDA18212 silicon tuner driver.
 
 config MEDIA_TUNER_TUA9001
 	tristate "Infineon TUA 9001 silicon tuner"
-	depends on VIDEO_MEDIA && I2C
+	depends on MEDIA_SUPPORT && I2C
 	default m if MEDIA_TUNER_CUSTOMISE
 	help
 	  Infineon TUA 9001 silicon tuner driver.
diff --git a/drivers/media/video/pvrusb2/Kconfig b/drivers/media/video/pvrusb2/Kconfig
index f9b6001..25e412e 100644
--- a/drivers/media/video/pvrusb2/Kconfig
+++ b/drivers/media/video/pvrusb2/Kconfig
@@ -1,7 +1,6 @@
 config VIDEO_PVRUSB2
 	tristate "Hauppauge WinTV-PVR USB2 support"
 	depends on VIDEO_V4L2 && I2C
-	depends on VIDEO_MEDIA	# Avoids pvrusb = Y / DVB = M
 	select VIDEO_TUNER
 	select VIDEO_TVEEPROM
 	select VIDEO_CX2341X
-- 
1.7.8


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCHv2 3/3] [media] media: only show V4L devices based on device type selection
  2012-05-28 12:17 [RFC PATCHv2 0/3] Improve Kconfig selection for media devices Mauro Carvalho Chehab
  2012-05-28 12:17 ` [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items Mauro Carvalho Chehab
  2012-05-28 12:17 ` [RFC PATCHv2 2/3] [media] media: Remove VIDEO_MEDIA Kconfig option Mauro Carvalho Chehab
@ 2012-05-28 12:17 ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-05-28 12:17 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List, stefanr

After this patch, the MEDIA*_SUPPORT will be used as a filter,
exposing only devices that are pertinent to one of the 3
V4L types: webcam/grabber, radio, analog TV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/radio/Kconfig        |    1 +
 drivers/media/video/Kconfig        |   76 ++++++++++++++++++++++++++---------
 drivers/media/video/m5mols/Kconfig |    1 +
 drivers/media/video/smiapp/Kconfig |    1 +
 4 files changed, 59 insertions(+), 20 deletions(-)

diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index c257da1..24ce5a4 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -5,6 +5,7 @@
 menuconfig RADIO_ADAPTERS
 	bool "Radio Adapters"
 	depends on VIDEO_V4L2
+	depends on MEDIA_RADIO_SUPPORT
 	default y
 	---help---
 	  Say Y here to enable selecting AM/FM radio adapters.
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 99937c9..da363c4 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -5,7 +5,7 @@
 config VIDEO_V4L2
 	tristate
 	depends on VIDEO_DEV && VIDEO_V4L2_COMMON
-	default VIDEO_DEV && VIDEO_V4L2_COMMON
+	default y
 
 config VIDEOBUF_GEN
 	tristate
@@ -73,6 +73,7 @@ config VIDEOBUF2_DMA_SG
 menuconfig VIDEO_CAPTURE_DRIVERS
 	bool "Video capture adapters"
 	depends on VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT
 	default y
 	---help---
 	  Say Y here to enable selecting the video adapters for
@@ -478,6 +479,7 @@ config VIDEO_SMIAPP_PLL
 config VIDEO_OV7670
 	tristate "OmniVision OV7670 sensor support"
 	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the OmniVision
 	  OV7670 VGA camera.  It currently only works with the M88ALP01
@@ -486,6 +488,7 @@ config VIDEO_OV7670
 config VIDEO_VS6624
 	tristate "ST VS6624 sensor support"
 	depends on VIDEO_V4L2 && I2C
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the ST VS6624
 	  camera.
@@ -496,6 +499,7 @@ config VIDEO_VS6624
 config VIDEO_MT9M032
 	tristate "MT9M032 camera sensor support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	select VIDEO_APTINA_PLL
 	---help---
 	  This driver supports MT9M032 camera sensors from Aptina, monochrome
@@ -504,6 +508,7 @@ config VIDEO_MT9M032
 config VIDEO_MT9P031
 	tristate "Aptina MT9P031 support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	select VIDEO_APTINA_PLL
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the Aptina
@@ -512,6 +517,7 @@ config VIDEO_MT9P031
 config VIDEO_MT9T001
 	tristate "Aptina MT9T001 support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the Aptina
 	  (Micron) mt0t001 3 Mpixel camera.
@@ -519,6 +525,7 @@ config VIDEO_MT9T001
 config VIDEO_MT9V011
 	tristate "Micron mt9v011 sensor support"
 	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the Micron
 	  mt0v011 1.3 Mpixel camera.  It currently only works with the
@@ -527,6 +534,7 @@ config VIDEO_MT9V011
 config VIDEO_MT9V032
 	tristate "Micron MT9V032 sensor support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a Video4Linux2 sensor-level driver for the Micron
 	  MT9V032 752x480 CMOS sensor.
@@ -534,6 +542,7 @@ config VIDEO_MT9V032
 config VIDEO_TCM825X
 	tristate "TCM825x camera sensor support"
 	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a driver for the Toshiba TCM825x VGA camera sensor.
 	  It is used for example in Nokia N800.
@@ -541,12 +550,14 @@ config VIDEO_TCM825X
 config VIDEO_SR030PC30
 	tristate "Siliconfile SR030PC30 sensor support"
 	depends on I2C && VIDEO_V4L2
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This driver supports SR030PC30 VGA camera from Siliconfile
 
 config VIDEO_NOON010PC30
 	tristate "Siliconfile NOON010PC30 sensor support"
 	depends on I2C && VIDEO_V4L2 && EXPERIMENTAL && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This driver supports NOON010PC30 CIF camera from Siliconfile
 
@@ -554,6 +565,7 @@ source "drivers/media/video/m5mols/Kconfig"
 
 config VIDEO_S5K6AA
 	tristate "Samsung S5K6AAFX sensor support"
+	depends on MEDIA_CAMERA_SUPPORT
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
 	---help---
 	  This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M
@@ -566,6 +578,7 @@ comment "Flash devices"
 config VIDEO_ADP1653
 	tristate "ADP1653 flash support"
 	depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a driver for the ADP1653 flash controller. It is used for
 	  example in Nokia N900.
@@ -573,6 +586,7 @@ config VIDEO_ADP1653
 config VIDEO_AS3645A
 	tristate "AS3645A flash driver support"
 	depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This is a driver for the AS3645A and LM3555 flash controllers. It has
 	  build in control for flash, torch and indicator LEDs.
@@ -647,30 +661,14 @@ menuconfig V4L_USB_DRIVERS
 	depends on USB
 	default y
 
-if V4L_USB_DRIVERS
+if V4L_USB_DRIVERS && MEDIA_CAMERA_SUPPORT
 
-source "drivers/media/video/au0828/Kconfig"
+	comment "Webcam devices"
 
 source "drivers/media/video/uvc/Kconfig"
 
 source "drivers/media/video/gspca/Kconfig"
 
-source "drivers/media/video/pvrusb2/Kconfig"
-
-source "drivers/media/video/hdpvr/Kconfig"
-
-source "drivers/media/video/em28xx/Kconfig"
-
-source "drivers/media/video/tlg2300/Kconfig"
-
-source "drivers/media/video/cx231xx/Kconfig"
-
-source "drivers/media/video/tm6000/Kconfig"
-
-source "drivers/media/video/usbvision/Kconfig"
-
-source "drivers/media/video/sn9c102/Kconfig"
-
 source "drivers/media/video/pwc/Kconfig"
 
 source "drivers/media/video/cpia2/Kconfig"
@@ -711,15 +709,46 @@ config USB_S2255
 	  Say Y here if you want support for the Sensoray 2255 USB device.
 	  This driver can be compiled as a module, called s2255drv.
 
+source "drivers/media/video/sn9c102/Kconfig"
+
+endif # V4L_USB_DRIVERS && MEDIA_CAMERA_SUPPORT
+
+if V4L_USB_DRIVERS
+
+	comment "Webcam and/or TV USB devices"
+
+source "drivers/media/video/em28xx/Kconfig"
+
+endif
+
+if V4L_USB_DRIVERS && MEDIA_ANALOG_TV_SUPPORT
+
+	comment "TV USB devices"
+
+source "drivers/media/video/au0828/Kconfig"
+
+source "drivers/media/video/pvrusb2/Kconfig"
+
+source "drivers/media/video/hdpvr/Kconfig"
+
+source "drivers/media/video/tlg2300/Kconfig"
+
+source "drivers/media/video/cx231xx/Kconfig"
+
+source "drivers/media/video/tm6000/Kconfig"
+
+source "drivers/media/video/usbvision/Kconfig"
+
 endif # V4L_USB_DRIVERS
 
 #
-# PCI drivers configuration
+# PCI drivers configuration - No devices here are for webcams
 #
 
 menuconfig V4L_PCI_DRIVERS
 	bool "V4L PCI(e) devices"
 	depends on PCI
+	depends on MEDIA_ANALOG_TV_SUPPORT
 	default y
 	---help---
 	  Say Y here to enable support for these PCI(e) drivers.
@@ -814,11 +843,13 @@ endif # V4L_PCI_DRIVERS
 
 #
 # ISA & parallel port drivers configuration
+#	All devices here are webcam or grabber devices
 #
 
 menuconfig V4L_ISA_PARPORT_DRIVERS
 	bool "V4L ISA and parallel port devices"
 	depends on ISA || PARPORT
+	depends on MEDIA_CAMERA_SUPPORT
 	default n
 	---help---
 	  Say Y here to enable support for these ISA and parallel port drivers.
@@ -871,8 +902,13 @@ config VIDEO_W9966
 
 endif # V4L_ISA_PARPORT_DRIVERS
 
+#
+# Platform drivers
+#	All drivers here are currently for webcam support
+
 menuconfig V4L_PLATFORM_DRIVERS
 	bool "V4L platform devices"
+	depends on MEDIA_CAMERA_SUPPORT
 	default n
 	---help---
 	  Say Y here to enable support for platform-specific V4L drivers.
diff --git a/drivers/media/video/m5mols/Kconfig b/drivers/media/video/m5mols/Kconfig
index 302dc3d..dc8c250 100644
--- a/drivers/media/video/m5mols/Kconfig
+++ b/drivers/media/video/m5mols/Kconfig
@@ -1,5 +1,6 @@
 config VIDEO_M5MOLS
 	tristate "Fujitsu M-5MOLS 8MP sensor support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	---help---
 	  This driver supports Fujitsu M-5MOLS camera sensor with ISP
diff --git a/drivers/media/video/smiapp/Kconfig b/drivers/media/video/smiapp/Kconfig
index f7b35ff..5dac63f 100644
--- a/drivers/media/video/smiapp/Kconfig
+++ b/drivers/media/video/smiapp/Kconfig
@@ -1,6 +1,7 @@
 config VIDEO_SMIAPP
 	tristate "SMIA++/SMIA sensor support"
 	depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
+	depends on MEDIA_CAMERA_SUPPORT
 	select VIDEO_SMIAPP_PLL
 	---help---
 	  This is a generic driver for SMIA++/SMIA camera modules.
-- 
1.7.8


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items
  2012-05-28 12:17 ` [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items Mauro Carvalho Chehab
@ 2012-05-28 12:51   ` Hans Verkuil
  2012-05-28 13:30     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Verkuil @ 2012-05-28 12:51 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Linux Media Mailing List; +Cc: stefanr

On Mon May 28 2012 14:17:47 Mauro Carvalho Chehab wrote:
> 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>
> ---
>  drivers/media/Kconfig               |  109 +++++++++++++++++++++++-----------
>  drivers/media/common/tuners/Kconfig |    1 +
>  drivers/media/dvb/frontends/Kconfig |    1 +
>  drivers/media/rc/Kconfig            |   29 ++++-----
>  4 files changed, 89 insertions(+), 51 deletions(-)
> 
> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
> index 9575db4..323b2f0 100644
> --- a/drivers/media/Kconfig
> +++ b/drivers/media/Kconfig
> @@ -6,20 +6,82 @@ menuconfig MEDIA_SUPPORT
>  	tristate "Multimedia support"
>  	depends on HAS_IOMEM
>  	help
> -	  If you want to use Video for Linux, DVB for Linux, or DAB adapters,
> +	  If you want to use Webcams, Video grabber devices and/or TV devices
>  	  enable this option and other options below.
> +	  Additional info and docs are available on the web at
> +	  <http://linuxtv.org>
>  
>  if MEDIA_SUPPORT
>  
>  comment "Multimedia core support"
>  
>  #
> +# Multimedia support - automatically enable V4L2 and DVB core
> +#
> +config MEDIA_CAMERA_SUPPORT
> +	bool "Cameras/video grabbers support"
> +	---help---
> +	  Enable support for webcams and video grabbers.

And memory-to-memory devices, and video output devices.

Perhaps this should be called MEDIA_VIDEO_SUPPORT? It really refers
to any video device that does not have a tuner, right? I find it
really strange to have a e.g. HDMI video grabber depend on MEDIA_CAMERA_SUPPORT.

> +
> +	  Say Y when you have a webcam or a video capture grabber board.
> +
> +config MEDIA_ANALOG_TV_SUPPORT
> +	bool "Analog TV support"
> +	---help---
> +	  Enable analog TV support.

I still prefer to see the term 'tuner' be used explicitly:

MEDIA_ANALOG_TUNER_SUPPORT and 'Analog TV tuner support'

> +
> +	  Say Y when you have a TV board with analog support or with a
> +	  hybrid analog/digital TV chipset.
> +
> +	  Note: There are several DVB cards that are based on chips that
> +		support both analog and digital TV. Disabling this option
> +		will disable support for them.
> +
> +config MEDIA_DIGITAL_TV_SUPPORT
> +	bool "Digital TV support"
> +	---help---
> +	  Enable digital TV support.

Ditto.

> +
> +	  Say Y when you have a board with digital support or a board with
> +	  hybrid digital TV and analog TV.
> +
> +config MEDIA_RADIO_SUPPORT
> +	bool "AM/FM radio receivers/transmitters support"
> +	---help---
> +	  Enable AM/FM radio support.

Just drop the 'AM/FM' part. We may get other devices that support other
bands as well (I know they exist, and one is actually on its way to me).

> +
> +	  Additional info and docs are available on the web at
> +	  <http://linuxtv.org>
> +
> +	  Say Y when you have a board with radio support.
> +
> +	  Note: There are several TV cards that are based on chips that
> +		support radio reception. Disabling this option will
> +		disable support for them.

The remainder of this patch looks good to me.

Regards,

	Hans

> +
> +menuconfig MEDIA_RC_SUPPORT
> +	bool "Remote Controller support"
> +	depends on INPUT
> +	---help---
> +	  Enable support for Remote Controllers on Linux. This is
> +	  needed in order to support several video capture adapters,
> +	  standalone IR receivers/transmitters, and RF receivers.
> +
> +	  Enable this option if you have a video capture board even
> +	  if you don't need IR, as otherwise, you may not be able to
> +	  compile the driver for your adapter.
> +
> +	  Say Y when you have a TV or an IR device.
> +
> +#
>  # Media controller
> +#	Selectable only for webcam/grabbers, as other drivers don't use it
>  #
>  
>  config MEDIA_CONTROLLER
>  	bool "Media Controller API (EXPERIMENTAL)"
>  	depends on EXPERIMENTAL
> +	depends on MEDIA_CAMERA_SUPPORT
>  	---help---
>  	  Enable the media controller API used to query media devices internal
>  	  topology and configure it dynamically.
> @@ -27,26 +89,15 @@ config MEDIA_CONTROLLER
>  	  This API is mostly used by camera interfaces in embedded platforms.
>  
>  #
> -# V4L core and enabled API's
> +# Video4Linux support
> +#	Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
>  #
>  
>  config VIDEO_DEV
> -	tristate "Video For Linux"
> -	---help---
> -	  V4L core support for video capture and overlay devices, webcams and
> -	  AM/FM radio cards.
> -
> -	  This kernel includes support for the new Video for Linux Two API,
> -	  (V4L2).
> -
> -	  Additional info and docs are available on the web at
> -	  <http://linuxtv.org>
> -
> -	  Documentation for V4L2 is also available on the web at
> -	  <http://bytesex.org/v4l/>.
> -
> -	  To compile this driver as a module, choose M here: the
> -	  module will be called videodev.
> +	tristate
> +	depends on MEDIA_SUPPORT
> +	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT
> +	default y
>  
>  config VIDEO_V4L2_COMMON
>  	tristate
> @@ -64,25 +115,15 @@ config VIDEO_V4L2_SUBDEV_API
>  
>  #
>  # DVB Core
> +#	Only enables if one of DTV is selected
>  #
>  
>  config DVB_CORE
> -	tristate "DVB for Linux"
> +	tristate
> +	depends on MEDIA_SUPPORT
> +	depends on MEDIA_DIGITAL_TV_SUPPORT
> +	default y
>  	select CRC32
> -	help
> -	  DVB core utility functions for device handling, software fallbacks etc.
> -
> -	  Enable this if you own a DVB/ATSC adapter and want to use it or if
> -	  you compile Linux for a digital SetTopBox.
> -
> -	  Say Y when you have a DVB or an ATSC card and want to use it.
> -
> -	  API specs and user tools are available from <http://www.linuxtv.org/>.
> -
> -	  Please report problems regarding this support to the LinuxDVB
> -	  mailing list.
> -
> -	  If unsure say N.
>  
>  config DVB_NET
>  	bool "DVB Network Support"
> @@ -101,8 +142,6 @@ config VIDEO_MEDIA
>  	tristate
>  	default (DVB_CORE && (VIDEO_DEV = n)) || (VIDEO_DEV && (DVB_CORE = n)) || (DVB_CORE && VIDEO_DEV)
>  
> -comment "Multimedia drivers"
> -
>  source "drivers/media/common/Kconfig"
>  source "drivers/media/rc/Kconfig"
>  
> diff --git a/drivers/media/common/tuners/Kconfig b/drivers/media/common/tuners/Kconfig
> index bbf4945..16ee1a4 100644
> --- a/drivers/media/common/tuners/Kconfig
> +++ b/drivers/media/common/tuners/Kconfig
> @@ -2,6 +2,7 @@ config MEDIA_ATTACH
>  	bool "Load and attach frontend and tuner driver modules as needed"
>  	depends on VIDEO_MEDIA
>  	depends on MODULES
> +	default y if !EXPERT
>  	help
>  	  Remove the static dependency of DVB card drivers on all
>  	  frontend modules for all possible card variants. Instead,
> diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
> index b98ebb2..6d3c2f7 100644
> --- a/drivers/media/dvb/frontends/Kconfig
> +++ b/drivers/media/dvb/frontends/Kconfig
> @@ -1,6 +1,7 @@
>  config DVB_FE_CUSTOMISE
>  	bool "Customise the frontend modules to build"
>  	depends on DVB_CORE
> +	depends on EXPERT
>  	default y if EXPERT
>  	help
>  	  This allows the user to select/deselect frontend drivers for their
> diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
> index f97eeb8..d2655f1 100644
> --- a/drivers/media/rc/Kconfig
> +++ b/drivers/media/rc/Kconfig
> @@ -1,21 +1,12 @@
> -menuconfig RC_CORE
> -	tristate "Remote Controller adapters"
> +config RC_CORE
> +	tristate
> +	depends on MEDIA_RC_SUPPORT
>  	depends on INPUT
> -	default INPUT
> -	---help---
> -	  Enable support for Remote Controllers on Linux. This is
> -	  needed in order to support several video capture adapters,
> -	  standalone IR receivers/transmitters, and RF receivers.
> -
> -	  Enable this option if you have a video capture board even
> -	  if you don't need IR, as otherwise, you may not be able to
> -	  compile the driver for your adapter.
> -
> -if RC_CORE
> +	default y
>  
>  config LIRC
> -	tristate
> -	default y
> +	tristate "LIRC interface driver"
> +	depends on RC_CORE
>  
>  	---help---
>  	   Enable this option to build the Linux Infrared Remote
> @@ -109,6 +100,12 @@ config IR_MCE_KBD_DECODER
>  	   Windows Media Center Edition, which you would like to use with
>  	   a raw IR receiver in your system.
>  
> +menuconfig RC_DEVICES
> +	bool "Remote Controller devices"
> +	depends on RC_CORE
> +
> +if RC_DEVICES
> +
>  config IR_LIRC_CODEC
>  	tristate "Enable IR to LIRC bridge"
>  	depends on RC_CORE
> @@ -276,4 +273,4 @@ config IR_GPIO_CIR
>  	   To compile this driver as a module, choose M here: the module will
>  	   be called gpio-ir-recv.
>  
> -endif #RC_CORE
> +endif #RC_DEVICES
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items
  2012-05-28 12:51   ` Hans Verkuil
@ 2012-05-28 13:30     ` Mauro Carvalho Chehab
  2012-05-28 13:38       ` Hans Verkuil
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2012-05-28 13:30 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List, stefanr

Em 28-05-2012 09:51, Hans Verkuil escreveu:
> On Mon May 28 2012 14:17:47 Mauro Carvalho Chehab wrote:
>> 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>
>> ---
>>  drivers/media/Kconfig               |  109 +++++++++++++++++++++++-----------
>>  drivers/media/common/tuners/Kconfig |    1 +
>>  drivers/media/dvb/frontends/Kconfig |    1 +
>>  drivers/media/rc/Kconfig            |   29 ++++-----
>>  4 files changed, 89 insertions(+), 51 deletions(-)
>>
>> diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
>> index 9575db4..323b2f0 100644
>> --- a/drivers/media/Kconfig
>> +++ b/drivers/media/Kconfig
>> @@ -6,20 +6,82 @@ menuconfig MEDIA_SUPPORT
>>  	tristate "Multimedia support"
>>  	depends on HAS_IOMEM
>>  	help
>> -	  If you want to use Video for Linux, DVB for Linux, or DAB adapters,
>> +	  If you want to use Webcams, Video grabber devices and/or TV devices
>>  	  enable this option and other options below.
>> +	  Additional info and docs are available on the web at
>> +	  <http://linuxtv.org>
>>  
>>  if MEDIA_SUPPORT
>>  
>>  comment "Multimedia core support"
>>  
>>  #
>> +# Multimedia support - automatically enable V4L2 and DVB core
>> +#
>> +config MEDIA_CAMERA_SUPPORT
>> +	bool "Cameras/video grabbers support"
>> +	---help---
>> +	  Enable support for webcams and video grabbers.
> 
> And memory-to-memory devices, and video output devices.
> 
> Perhaps this should be called MEDIA_VIDEO_SUPPORT? It really refers
> to any video device that does not have a tuner, right? I find it
> really strange to have a e.g. HDMI video grabber depend on MEDIA_CAMERA_SUPPORT.

Yes. Renaming it to MEDIA_VIDEO_SUPPORT makes sense. In this case, we can
make analog TV to depend on it.

> 
>> +
>> +	  Say Y when you have a webcam or a video capture grabber board.
>> +
>> +config MEDIA_ANALOG_TV_SUPPORT
>> +	bool "Analog TV support"
>> +	---help---
>> +	  Enable analog TV support.
> 
> I still prefer to see the term 'tuner' be used explicitly:
> 
> MEDIA_ANALOG_TUNER_SUPPORT and 'Analog TV tuner support'

That makes sense if we make it dependent on MEDIA_VIDEO_SUPPORT.

> 
>> +
>> +	  Say Y when you have a TV board with analog support or with a
>> +	  hybrid analog/digital TV chipset.
>> +
>> +	  Note: There are several DVB cards that are based on chips that
>> +		support both analog and digital TV. Disabling this option
>> +		will disable support for them.
>> +
>> +config MEDIA_DIGITAL_TV_SUPPORT
>> +	bool "Digital TV support"
>> +	---help---
>> +	  Enable digital TV support.
> 
> Ditto.

In this case, it is not just the tuner that it is enabled.

>> +
>> +	  Say Y when you have a board with digital support or a board with
>> +	  hybrid digital TV and analog TV.
>> +
>> +config MEDIA_RADIO_SUPPORT
>> +	bool "AM/FM radio receivers/transmitters support"
>> +	---help---
>> +	  Enable AM/FM radio support.
> 
> Just drop the 'AM/FM' part. We may get other devices that support other
> bands as well (I know they exist, and one is actually on its way to me).

The thing is that "radio" is an ambiguous term inside the Kernel, as it
can mean wireless, bluetooth, etc.

> 
>> +
>> +	  Additional info and docs are available on the web at
>> +	  <http://linuxtv.org>
>> +
>> +	  Say Y when you have a board with radio support.
>> +
>> +	  Note: There are several TV cards that are based on chips that
>> +		support radio reception. Disabling this option will
>> +		disable support for them.
> 
> The remainder of this patch looks good to me.
> 
> Regards,
> 
> 	Hans
> 
>> +
>> +menuconfig MEDIA_RC_SUPPORT
>> +	bool "Remote Controller support"
>> +	depends on INPUT
>> +	---help---
>> +	  Enable support for Remote Controllers on Linux. This is
>> +	  needed in order to support several video capture adapters,
>> +	  standalone IR receivers/transmitters, and RF receivers.
>> +
>> +	  Enable this option if you have a video capture board even
>> +	  if you don't need IR, as otherwise, you may not be able to
>> +	  compile the driver for your adapter.
>> +
>> +	  Say Y when you have a TV or an IR device.
>> +
>> +#
>>  # Media controller
>> +#	Selectable only for webcam/grabbers, as other drivers don't use it
>>  #
>>  
>>  config MEDIA_CONTROLLER
>>  	bool "Media Controller API (EXPERIMENTAL)"
>>  	depends on EXPERIMENTAL
>> +	depends on MEDIA_CAMERA_SUPPORT
>>  	---help---
>>  	  Enable the media controller API used to query media devices internal
>>  	  topology and configure it dynamically.
>> @@ -27,26 +89,15 @@ config MEDIA_CONTROLLER
>>  	  This API is mostly used by camera interfaces in embedded platforms.
>>  
>>  #
>> -# V4L core and enabled API's
>> +# Video4Linux support
>> +#	Only enables if one of the V4L2 types (ATV, webcam, radio) is selected
>>  #
>>  
>>  config VIDEO_DEV
>> -	tristate "Video For Linux"
>> -	---help---
>> -	  V4L core support for video capture and overlay devices, webcams and
>> -	  AM/FM radio cards.
>> -
>> -	  This kernel includes support for the new Video for Linux Two API,
>> -	  (V4L2).
>> -
>> -	  Additional info and docs are available on the web at
>> -	  <http://linuxtv.org>
>> -
>> -	  Documentation for V4L2 is also available on the web at
>> -	  <http://bytesex.org/v4l/>.
>> -
>> -	  To compile this driver as a module, choose M here: the
>> -	  module will be called videodev.
>> +	tristate
>> +	depends on MEDIA_SUPPORT
>> +	depends on MEDIA_CAMERA_SUPPORT || MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT
>> +	default y
>>  
>>  config VIDEO_V4L2_COMMON
>>  	tristate
>> @@ -64,25 +115,15 @@ config VIDEO_V4L2_SUBDEV_API
>>  
>>  #
>>  # DVB Core
>> +#	Only enables if one of DTV is selected
>>  #
>>  
>>  config DVB_CORE
>> -	tristate "DVB for Linux"
>> +	tristate
>> +	depends on MEDIA_SUPPORT
>> +	depends on MEDIA_DIGITAL_TV_SUPPORT
>> +	default y
>>  	select CRC32
>> -	help
>> -	  DVB core utility functions for device handling, software fallbacks etc.
>> -
>> -	  Enable this if you own a DVB/ATSC adapter and want to use it or if
>> -	  you compile Linux for a digital SetTopBox.
>> -
>> -	  Say Y when you have a DVB or an ATSC card and want to use it.
>> -
>> -	  API specs and user tools are available from <http://www.linuxtv.org/>.
>> -
>> -	  Please report problems regarding this support to the LinuxDVB
>> -	  mailing list.
>> -
>> -	  If unsure say N.
>>  
>>  config DVB_NET
>>  	bool "DVB Network Support"
>> @@ -101,8 +142,6 @@ config VIDEO_MEDIA
>>  	tristate
>>  	default (DVB_CORE && (VIDEO_DEV = n)) || (VIDEO_DEV && (DVB_CORE = n)) || (DVB_CORE && VIDEO_DEV)
>>  
>> -comment "Multimedia drivers"
>> -
>>  source "drivers/media/common/Kconfig"
>>  source "drivers/media/rc/Kconfig"
>>  
>> diff --git a/drivers/media/common/tuners/Kconfig b/drivers/media/common/tuners/Kconfig
>> index bbf4945..16ee1a4 100644
>> --- a/drivers/media/common/tuners/Kconfig
>> +++ b/drivers/media/common/tuners/Kconfig
>> @@ -2,6 +2,7 @@ config MEDIA_ATTACH
>>  	bool "Load and attach frontend and tuner driver modules as needed"
>>  	depends on VIDEO_MEDIA
>>  	depends on MODULES
>> +	default y if !EXPERT
>>  	help
>>  	  Remove the static dependency of DVB card drivers on all
>>  	  frontend modules for all possible card variants. Instead,
>> diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
>> index b98ebb2..6d3c2f7 100644
>> --- a/drivers/media/dvb/frontends/Kconfig
>> +++ b/drivers/media/dvb/frontends/Kconfig
>> @@ -1,6 +1,7 @@
>>  config DVB_FE_CUSTOMISE
>>  	bool "Customise the frontend modules to build"
>>  	depends on DVB_CORE
>> +	depends on EXPERT
>>  	default y if EXPERT
>>  	help
>>  	  This allows the user to select/deselect frontend drivers for their
>> diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
>> index f97eeb8..d2655f1 100644
>> --- a/drivers/media/rc/Kconfig
>> +++ b/drivers/media/rc/Kconfig
>> @@ -1,21 +1,12 @@
>> -menuconfig RC_CORE
>> -	tristate "Remote Controller adapters"
>> +config RC_CORE
>> +	tristate
>> +	depends on MEDIA_RC_SUPPORT
>>  	depends on INPUT
>> -	default INPUT
>> -	---help---
>> -	  Enable support for Remote Controllers on Linux. This is
>> -	  needed in order to support several video capture adapters,
>> -	  standalone IR receivers/transmitters, and RF receivers.
>> -
>> -	  Enable this option if you have a video capture board even
>> -	  if you don't need IR, as otherwise, you may not be able to
>> -	  compile the driver for your adapter.
>> -
>> -if RC_CORE
>> +	default y
>>  
>>  config LIRC
>> -	tristate
>> -	default y
>> +	tristate "LIRC interface driver"
>> +	depends on RC_CORE
>>  
>>  	---help---
>>  	   Enable this option to build the Linux Infrared Remote
>> @@ -109,6 +100,12 @@ config IR_MCE_KBD_DECODER
>>  	   Windows Media Center Edition, which you would like to use with
>>  	   a raw IR receiver in your system.
>>  
>> +menuconfig RC_DEVICES
>> +	bool "Remote Controller devices"
>> +	depends on RC_CORE
>> +
>> +if RC_DEVICES
>> +
>>  config IR_LIRC_CODEC
>>  	tristate "Enable IR to LIRC bridge"
>>  	depends on RC_CORE
>> @@ -276,4 +273,4 @@ config IR_GPIO_CIR
>>  	   To compile this driver as a module, choose M here: the module will
>>  	   be called gpio-ir-recv.
>>  
>> -endif #RC_CORE
>> +endif #RC_DEVICES
>>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items
  2012-05-28 13:30     ` Mauro Carvalho Chehab
@ 2012-05-28 13:38       ` Hans Verkuil
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Verkuil @ 2012-05-28 13:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List, stefanr

On Mon May 28 2012 15:30:33 Mauro Carvalho Chehab wrote:
> Em 28-05-2012 09:51, Hans Verkuil escreveu:
> > On Mon May 28 2012 14:17:47 Mauro Carvalho Chehab wrote:

...

> >> +
> >> +	  Say Y when you have a board with digital support or a board with
> >> +	  hybrid digital TV and analog TV.
> >> +
> >> +config MEDIA_RADIO_SUPPORT
> >> +	bool "AM/FM radio receivers/transmitters support"
> >> +	---help---
> >> +	  Enable AM/FM radio support.
> > 
> > Just drop the 'AM/FM' part. We may get other devices that support other
> > bands as well (I know they exist, and one is actually on its way to me).
> 
> The thing is that "radio" is an ambiguous term inside the Kernel, as it
> can mean wireless, bluetooth, etc.

On second thought, just keep AM/FM. I keep forgetting that the AM band is
comprised of SW, MW and LW.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-28 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-28 12:17 [RFC PATCHv2 0/3] Improve Kconfig selection for media devices Mauro Carvalho Chehab
2012-05-28 12:17 ` [RFC PATCHv2 1/3] [media] media: reorganize the main Kconfig items Mauro Carvalho Chehab
2012-05-28 12:51   ` Hans Verkuil
2012-05-28 13:30     ` Mauro Carvalho Chehab
2012-05-28 13:38       ` Hans Verkuil
2012-05-28 12:17 ` [RFC PATCHv2 2/3] [media] media: Remove VIDEO_MEDIA Kconfig option Mauro Carvalho Chehab
2012-05-28 12:17 ` [RFC PATCHv2 3/3] [media] media: only show V4L devices based on device type selection Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.