Skip to contentSkip to conversation

media: config option for building tuners

PATCH In review Simon Que 3 participants 3 messages Jan 24, 2013 – Feb 4, 2013 Media (V4L/DVB)

lore
Share & tools
lore

Simon Que

author
#0 lore raw

PATCH 1/1 media: config option for building tuners

This patch provides a Kconfig option, MEDIA_TUNER_SUPPORT, that determines whether media/tuners is included in the build. This way, the tuners don't have to be unconditionally included in the build.

---
 drivers/media/Kconfig  | 9 +++++++++
 drivers/media/Makefile | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/media/Kconfig +9 -0
index 4ef0d80..a266da2 100644
@@ -73,6 +73,15 @@ config MEDIA_RC_SUPPORT
 
 	  Say Y when you have a TV or an IR device.
 
+config MEDIA_TUNER_SUPPORT
+	tristate
+	help
+	  This enables the tuner modules in the tuners directory.  Use this
+	  option to turn on tuners.  The individual tuner modules can then be
+	  turned on/off one-by-one.
+
+	  Say Y when you have a V4L/DVB tuner in your system.
+
 #
 # Media controller
 #	Selectable only for webcam/grabbers, as other drivers don't use it
drivers/media/Makefile +2 -1
index 620f275..679db94 100644
@@ -8,7 +8,8 @@ media-objs	:= media-device.o media-devnode.o media-entity.o
 # I2C drivers should come before other drivers, otherwise they'll fail
 # when compiled as builtin drivers
 #
-obj-y += i2c/ tuners/
+obj-y += i2c/
+obj-$(CONFIG_MEDIA_TUNER_SUPPORT)  += tuners/
 obj-$(CONFIG_DVB_CORE)  += dvb-frontends/
 
 #
Signature · 1 line
1.8.1
#1 lore raw
Quoted 35 lines · Simon Que

This patch provides a Kconfig option, MEDIA_TUNER_SUPPORT, that determines whether media/tuners is included in the build. This way, the tuners don't have to be unconditionally included in the build.

---
 drivers/media/Kconfig  | 9 +++++++++
 drivers/media/Makefile | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/media/Kconfig +9 -0
index 4ef0d80..a266da2 100644
@@ -73,6 +73,15 @@ config MEDIA_RC_SUPPORT
 
          Say Y when you have a TV or an IR device.
 
+config MEDIA_TUNER_SUPPORT
+       tristate
+       help
+         This enables the tuner modules in the tuners directory.  Use this
+         option to turn on tuners.  The individual tuner modules can then be
+         turned on/off one-by-one.
+
+         Say Y when you have a V4L/DVB tuner in your system.
+
 #
 # Media controller
 #      Selectable only for webcam/grabbers, as other drivers don't use it
drivers/media/Makefile +0 -0
index 620f275..679db94 100644

drivers/media/Makefile media-objs := media-device.o media-devnode.o media-entity.o · line 15

Quoted 9 lines
drivers/media/Makefile +2 -1
@@ -8,7 +8,8 @@ media-objs      := media-device.o media-devnode.o media-entity.o
 # I2C drivers should come before other drivers, otherwise they'll fail
 # when compiled as builtin drivers
 #
-obj-y += i2c/ tuners/
+obj-y += i2c/
+obj-$(CONFIG_MEDIA_TUNER_SUPPORT)  += tuners/
 obj-$(CONFIG_DVB_CORE)  += dvb-frontends/
 
 #

I don't quite see the benefit of this patch. Could you explain to us what the desired effect is that you're looking to achieve? I believe that if you have no drivers selected that need tuners, that no tuner drivers will be built, or at least that's how it used to work.

Even if you did select a driver that uses a tuner, you can enable the customization options and deselect all of the tuners drivers. I don't think this patch is needed at all, if I understand your goal correctly.

If I'm missing something, please elaborate.

-Mike

#2 lore raw

Em Sun, 3 Feb 2013 20:15:53 -0500
Michael Krufky <[email protected]> escreveu:

Quoted 52 lines · Simon Que
Quoted 35 lines

This patch provides a Kconfig option, MEDIA_TUNER_SUPPORT, that determines whether media/tuners is included in the build. This way, the tuners don't have to be unconditionally included in the build.

---
 drivers/media/Kconfig  | 9 +++++++++
 drivers/media/Makefile | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/media/Kconfig +9 -0
index 4ef0d80..a266da2 100644
@@ -73,6 +73,15 @@ config MEDIA_RC_SUPPORT
 
          Say Y when you have a TV or an IR device.
 
+config MEDIA_TUNER_SUPPORT
+       tristate
+       help
+         This enables the tuner modules in the tuners directory.  Use this
+         option to turn on tuners.  The individual tuner modules can then be
+         turned on/off one-by-one.
+
+         Say Y when you have a V4L/DVB tuner in your system.
+
 #
 # Media controller
 #      Selectable only for webcam/grabbers, as other drivers don't use it
drivers/media/Makefile +0 -0
index 620f275..679db94 100644

drivers/media/Makefile media-objs := media-device.o media-devnode.o media-entity.o · line 15

Quoted 9 lines
drivers/media/Makefile +2 -1
@@ -8,7 +8,8 @@ media-objs      := media-device.o media-devnode.o media-entity.o
 # I2C drivers should come before other drivers, otherwise they'll fail
 # when compiled as builtin drivers
 #
-obj-y += i2c/ tuners/
+obj-y += i2c/
+obj-$(CONFIG_MEDIA_TUNER_SUPPORT)  += tuners/
 obj-$(CONFIG_DVB_CORE)  += dvb-frontends/
 
 #

I don't quite see the benefit of this patch. Could you explain to us what the desired effect is that you're looking to achieve? I believe that if you have no drivers selected that need tuners, that no tuner drivers will be built, or at least that's how it used to work.

Quoted 6 lines

Even if you did select a driver that uses a tuner, you can enable the customization options and deselect all of the tuners drivers. I don't think this patch is needed at all, if I understand your goal correctly.

If I'm missing something, please elaborate.

I'd say that this patch is likely broken, as it doesn't take MEDIA_SUBDRV_AUTOSELECT Kconfig option into account.

Regards,
Mauro