Skip to contentSkip to conversation

select for drivers/media

PATCH In review Adrian Bunk 4 participants 7 messages Sep 28, 2003 – Oct 1, 2003 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 select for drivers/media

The patch below switches drivers/mtd to use select where appropriate.

Could someone with a knowledge of the code please check the following:

DVB_AV7110 and DVB_BUDGET select VIDEO_SAA7146 (without my patch VIDEO_SAA7146 depends on them) although they don't fulfill the VIDEO_SAA7146 dependencies VIDEO_DEV && PCI && I2C.

Is the intention to enable VIDEO_SAA7146 only when these options are enabled or should DVB_AV7110 and DVB_BUDGET depend on these options?

diffstat output:

 drivers/media/Kconfig           |    8 --------
 drivers/media/common/Kconfig    |    7 ++-----
 drivers/media/dvb/ttpci/Kconfig |    3 +++
 drivers/media/video/Kconfig     |   12 ++++++++++++
 4 files changed, 17 insertions(+), 13 deletions(-)

cu
Adrian

drivers/media/Kconfig renamed from drivers/media/Kconfig.old +0 -8
@@ -34,20 +34,12 @@
 
 config VIDEO_TUNER
 	tristate
-	default y if VIDEO_BT848=y || VIDEO_SAA7134=y || VIDEO_MXB=y
-	default m if VIDEO_BT848=m || VIDEO_SAA7134=m || VIDEO_MXB=m
-	depends on VIDEO_DEV
 
 config VIDEO_BUF
 	tristate
-	default y if VIDEO_BT848=y || VIDEO_SAA7134=y || VIDEO_SAA7146=y
-	default m if VIDEO_BT848=m || VIDEO_SAA7134=m || VIDEO_SAA7146=m
-	depends on VIDEO_DEV
 
 config VIDEO_BTCX
 	tristate
-	default VIDEO_BT848
-	depends on VIDEO_DEV
 
 endmenu
 
drivers/media/video/Kconfig renamed from drivers/media/video/Kconfig.old +12 -0
@@ -10,6 +10,10 @@
 config VIDEO_BT848
 	tristate "BT848 Video For Linux"
 	depends on VIDEO_DEV && PCI && I2C_ALGOBIT && SOUND
+	select VIDEO_TUNER
+	select VIDEO_BUF
+	select VIDEO_BTCX
+	select VIDEO_VIDEOBUF
 	---help---
 	  Support for BT848 based frame grabber/overlay boards. This includes
 	  the Miro, Hauppauge and STB boards. Please read the material in
@@ -219,6 +223,9 @@
 config VIDEO_SAA7134
 	tristate "Philips SAA7134 support"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_TUNER
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
 	---help---
 	  This is a video4linux driver for Philips SAA7130/7134 based
 	  TV cards.
@@ -229,6 +236,8 @@
 config VIDEO_MXB
 	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_TUNER
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the 'Multimedia eXtension Board'
 	  TV card by Siemens-Nixdorf.
@@ -239,6 +248,7 @@
 config VIDEO_DPC
 	tristate "Philips-Semiconductors 'dpc7146 demonstration board'"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the 'dpc7146 demonstration
 	  board' by Philips-Semiconductors. It's the reference design
@@ -252,6 +262,7 @@
 config VIDEO_HEXIUM_ORION
 	tristate "Hexium HV-PCI6 and Orion frame grabber"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the Hexium HV-PCI6 and
 	  Orion frame grabber cards by Hexium.
@@ -262,6 +273,7 @@
 config VIDEO_HEXIUM_GEMINI
 	tristate "Hexium Gemini frame grabber"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the Hexium Gemini frame
 	  grabber card by Hexium. Please note that the Gemini Dual
drivers/media/dvb/ttpci/Kconfig renamed from drivers/media/dvb/ttpci/Kconfig.old +2 -0
@@ -1,6 +1,7 @@
 config DVB_AV7110
 	tristate "AV7110 cards"
 	depends on VIDEO_DEV && DVB_CORE
+	select VIDEO_SAA7146
 	help
 	  Support for SAA7146 and AV7110 based DVB cards as produced 
 	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.
@@ -26,6 +27,7 @@
 config DVB_BUDGET
 	tristate "Budget cards"
 	depends on DVB_CORE
+	select VIDEO_SAA7146
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
drivers/media/common/Kconfig renamed from drivers/media/common/Kconfig.old +2 -5
@@ -1,11 +1,8 @@
 config VIDEO_SAA7146
         tristate
-        default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y || VIDEO_DPC=y || VIDEO_HEXIUM_ORION=y || VIDEO_HEXIUM_GEMINI=y
-        default m if DVB_AV7110=m || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m || VIDEO_DPC=m || VIDEO_HEXIUM_ORION=m || VIDEO_HEXIUM_GEMINI=m
         depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
 
 config VIDEO_VIDEOBUF
         tristate
-        default y if VIDEO_SAA7134=y || VIDEO_BT848=y || VIDEO_SAA7146=y
-        default m if VIDEO_SAA7134=m || VIDEO_BT848=m || VIDEO_SAA7146=m
-        depends on VIDEO_DEV
#1 lore raw

Hello Adrian,

Quoted 1 line

The patch below switches drivers/mtd to use select where appropriate.

Ok.

Quoted 3 lines

Could someone with a knowledge of the code please check the following:

DVB_AV7110 and DVB_BUDGET select VIDEO_SAA7146 (without my patch VIDEO_SAA7146 depends on them) although they don't fulfill the VIDEO_SAA7146 dependencies VIDEO_DEV && PCI && I2C.

I admit that this is somewhat broken and might fail under certain cirumstances. It's possible that someone sets DVB_AV7110, but does not have I2C enabled. Then VIDEO_SAA7146 is not build, although it should. Doh!

Does your patch fix this issue as well?

Quoted 1 line

Is the intention to enable VIDEO_SAA7146 only when these options are enabled or should DVB_AV7110 and DVB_BUDGET depend on these options?

Both DVB_AV7110 and DVB_BUDGET need VIDEO_SAA7146 to work properly. Same goes for the analog video drivers VIDEO_MXB, VIDEO_DPC and the other saa7146 drivers.

It's somewhat annoying that you have to enable I2C before all these drivers can be build. The user needs to know that I2C is used somewhere in the driver, although he won't see anything -- all i2c drivers are compiled automatically, a "modprobe mxb" loads all i2c drivers it needs.

It would be better, if I2C would be enabled automatically if SAA7146 is set. I admit that this sort of reversed-selection can introduce new problems.

What do you think?

Quoted 2 lines

cu
Adrian

CU
Michael.

#2 lore raw
Quoted 1 line · Michael Hunold

Hello Adrian,

Hi Michael,

Quoted 10 lines
Quoted 1 line

The patch below switches drivers/mtd to use select where appropriate.

Ok.

Quoted 5 lines

Could someone with a knowledge of the code please check the following:

DVB_AV7110 and DVB_BUDGET select VIDEO_SAA7146 (without my patch VIDEO_SAA7146 depends on them) although they don't fulfill the VIDEO_SAA7146 dependencies VIDEO_DEV && PCI && I2C.

Quoted 5 lines

I admit that this is somewhat broken and might fail under certain cirumstances. It's possible that someone sets DVB_AV7110, but does not have I2C enabled. Then VIDEO_SAA7146 is not build, although it should. Doh!

Does your patch fix this issue as well?

No, it doesn't.

Quoted 6 lines
Quoted 2 lines

Is the intention to enable VIDEO_SAA7146 only when these options are enabled or should DVB_AV7110 and DVB_BUDGET depend on these options?

Both DVB_AV7110 and DVB_BUDGET need VIDEO_SAA7146 to work properly. Same goes for the analog video drivers VIDEO_MXB, VIDEO_DPC and the other saa7146 drivers.

The problem described doesn't exist with the other drivers (they have the appropriate dependencies).

Quoted 10 lines

It's somewhat annoying that you have to enable I2C before all these drivers can be build. The user needs to know that I2C is used somewhere in the driver, although he won't see anything -- all i2c drivers are compiled automatically, a "modprobe mxb" loads all i2c drivers it needs.

It would be better, if I2C would be enabled automatically if SAA7146 is set. I admit that this sort of reversed-selection can introduce new problems.

What do you think?

Below is an updated patch that does additionally:
- let DVB_BUDGET depend on VIDEO_DEV
- let DVB_AV7110 and DVB_BUDGET select PCI and I2C

Other possibilitties would be:
- let DVB_AV7110 and DVB_BUDGET depend on PCI and I2C or
- let VIDEO_SAA7146 select PCI and I2C

I don't have any strong opinion which solution is the best one.

@Greg:
What's your opinion on this issue?

Quoted 2 lines

CU
Michael.

cu
Adrian

drivers/media/Kconfig renamed from drivers/media/Kconfig.old +0 -8
@@ -34,20 +34,12 @@
 
 config VIDEO_TUNER
 	tristate
-	default y if VIDEO_BT848=y || VIDEO_SAA7134=y || VIDEO_MXB=y
-	default m if VIDEO_BT848=m || VIDEO_SAA7134=m || VIDEO_MXB=m
-	depends on VIDEO_DEV
 
 config VIDEO_BUF
 	tristate
-	default y if VIDEO_BT848=y || VIDEO_SAA7134=y || VIDEO_SAA7146=y
-	default m if VIDEO_BT848=m || VIDEO_SAA7134=m || VIDEO_SAA7146=m
-	depends on VIDEO_DEV
 
 config VIDEO_BTCX
 	tristate
-	default VIDEO_BT848
-	depends on VIDEO_DEV
 
 endmenu
 
drivers/media/video/Kconfig renamed from drivers/media/video/Kconfig.old +12 -0
@@ -10,6 +10,10 @@
 config VIDEO_BT848
 	tristate "BT848 Video For Linux"
 	depends on VIDEO_DEV && PCI && I2C_ALGOBIT && SOUND
+	select VIDEO_TUNER
+	select VIDEO_BUF
+	select VIDEO_BTCX
+	select VIDEO_VIDEOBUF
 	---help---
 	  Support for BT848 based frame grabber/overlay boards. This includes
 	  the Miro, Hauppauge and STB boards. Please read the material in
@@ -219,6 +223,9 @@
 config VIDEO_SAA7134
 	tristate "Philips SAA7134 support"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_TUNER
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
 	---help---
 	  This is a video4linux driver for Philips SAA7130/7134 based
 	  TV cards.
@@ -229,6 +236,8 @@
 config VIDEO_MXB
 	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_TUNER
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the 'Multimedia eXtension Board'
 	  TV card by Siemens-Nixdorf.
@@ -239,6 +248,7 @@
 config VIDEO_DPC
 	tristate "Philips-Semiconductors 'dpc7146 demonstration board'"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the 'dpc7146 demonstration
 	  board' by Philips-Semiconductors. It's the reference design
@@ -252,6 +262,7 @@
 config VIDEO_HEXIUM_ORION
 	tristate "Hexium HV-PCI6 and Orion frame grabber"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the Hexium HV-PCI6 and
 	  Orion frame grabber cards by Hexium.
@@ -262,6 +273,7 @@
 config VIDEO_HEXIUM_GEMINI
 	tristate "Hexium Gemini frame grabber"
 	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146
 	---help---
 	  This is a video4linux driver for the Hexium Gemini frame
 	  grabber card by Hexium. Please note that the Gemini Dual
drivers/media/common/Kconfig renamed from drivers/media/common/Kconfig.old +2 -6
@@ -1,11 +1,7 @@
 config VIDEO_SAA7146
         tristate
-        default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y || VIDEO_DPC=y || VIDEO_HEXIUM_ORION=y || VIDEO_HEXIUM_GEMINI=y
-        default m if DVB_AV7110=m || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m || VIDEO_DPC=m || VIDEO_HEXIUM_ORION=m || VIDEO_HEXIUM_GEMINI=m
-        depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
 
 config VIDEO_VIDEOBUF
         tristate
-        default y if VIDEO_SAA7134=y || VIDEO_BT848=y || VIDEO_SAA7146=y
-        default m if VIDEO_SAA7134=m || VIDEO_BT848=m || VIDEO_SAA7146=m
-        depends on VIDEO_DEV
drivers/media/dvb/ttpci/Kconfig renamed from drivers/media/dvb/ttpci/Kconfig.old +8 -1
@@ -1,6 +1,9 @@
 config DVB_AV7110
 	tristate "AV7110 cards"
 	depends on VIDEO_DEV && DVB_CORE
+	select VIDEO_SAA7146
+	select PCI
+	select I2C
 	help
 	  Support for SAA7146 and AV7110 based DVB cards as produced 
 	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.
@@ -25,7 +28,10 @@
 
 config DVB_BUDGET
 	tristate "Budget cards"
-	depends on DVB_CORE
+	depends on VIDEO_DEV && DVB_CORE
+	select VIDEO_SAA7146
+	select PCI
+	select I2C
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -52,6 +58,7 @@
 config DVB_BUDGET_AV
 	tristate "Budget cards with analog video inputs"
 	depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+	select VIDEO_SAA7146
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
#3 lore raw
Quoted 2 lines · Adrian Bunk

@Greg:
What's your opinion on this issue?

Your patch looks fine to me.

thanks,

greg k-h

#4 lore raw

Hello Greg, Adrian,

Quoted 1 line

Your patch looks fine to me.

Ok, here comes my suggestion: 8-)

"VIDEO_SAA7146" consists of two parts: saa7146.o and saa7146_vv.o The former contains the low level functions only, whereas the second one has all the *v*ideo and *v*bi functions, too.

So I split the stuff into VIDEO_SAA7146 and VIDEO_SAA7146_VV.

The reason is, that the so-called DVB budget cards without MPEG-Deocder only need the core functions, while the full-featured cards with MPEG-Decoder need both modules plus Video4Linux support. The budget cards work just fine without Video4Linux.

So here it comes: The idea is to allow the user to basically select everything. If a subsystem or utitlity stuff is needed (NET, INET, PCI, USB, I2C) it's selected automatically.

Before, users had to set all these things correctly, before they could even see the drivers. A co-worked argued, that now stuff is automatically selected and experienced user now have to find out which driver toggled which setting. He said that this is almost as bad as before.

What do you think?

Ok, here are some comments to the patch:

drivers/media/common/Kconfig +8 -6
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/common/Kconfig linux-2.6.0-test6/drivers/media/common/Kconfig
@@ -1,11 +1,13 @@
 config VIDEO_SAA7146
+	select I2C
+	select PCI
         tristate
-        default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y || VIDEO_DPC=y || VIDEO_HEXIUM_ORION=y || VIDEO_HEXIUM_GEMINI=y
-        default m if DVB_AV7110=m || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m || VIDEO_DPC=m || VIDEO_HEXIUM_ORION=m || VIDEO_HEXIUM_GEMINI=m
-        depends on VIDEO_DEV && PCI && I2C
+
+config VIDEO_SAA7146_VV
+        tristate
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
+	select VIDEO_SAA7146
 
 config VIDEO_VIDEOBUF
         tristate
-        default y if VIDEO_SAA7134=y || VIDEO_BT848=y || VIDEO_SAA7146=y
-        default m if VIDEO_SAA7134=m || VIDEO_BT848=m || VIDEO_SAA7146=m
-        depends on VIDEO_DEV

VIDEO_SAA7146 needs I2C and PCI to function. VIDEO_SAA7146_VV needs VIDEO_BUF, VIDEO_VIDEOBUF and VIDEO_SAA7146.

drivers/media/dvb/Kconfig +4 -2
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/Kconfig linux-2.6.0-test6/drivers/media/dvb/Kconfig
@@ -3,16 +3,18 @@
 #
 
 menu "Digital Video Broadcasting Devices"
-	depends on NET && INET
 
 config DVB
 	bool "DVB For Linux"
+	select NET
+	select INET
+	select DVB_CORE
 	---help---
 	  Support Digital Video Broadcasting hardware.  Enable this if you
 	  own a DVB adapter and want to use it or if you compile Linux for
 	  a digital SetTopBox.
 
-	  API specs and user tools and are available for example from
+	  API specs and user tools are available from
 	  <http://www.linuxtv.org/>.
 

I simplified the handling here. Instead of relying that the user has NET and INET set, DVB depends on this. Set DVB_CORE automatically -- if somebody wants DVB support, he wants the DVB_CORE stuff, too...

@@ -33,18 +35,18 @@
source "drivers/media/dvb/frontends/Kconfig"

comment "Supported SAA7146 based PCI Adapters"
- depends on DVB && PCI
+ depends on DVB_CORE

source "drivers/media/dvb/ttpci/Kconfig"

comment "Supported USB Adapters"
- depends on DVB && USB
+ depends on DVB_CORE

source "drivers/media/dvb/ttusb-budget/Kconfig"
source "drivers/media/dvb/ttusb-dec/Kconfig"

comment "Supported FlexCopII (B2C2) Adapters"
- depends on DVB && PCI
+ depends on DVB_CORE
source "drivers/media/dvb/b2c2/Kconfig"

Make every bigger "subsystem" depend on DVB_CORE. The drivers are all selectable by default, they set the corresponding dependencies (PCI or USB) later on.

endmenu

drivers/media/dvb/b2c2/Kconfig +1 -0
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/b2c2/Kconfig linux-2.6.0-test6/drivers/media/dvb/b2c2/Kconfig
@@ -1,6 +1,7 @@
 config DVB_B2C2_SKYSTAR
 	tristate "Technisat Skystar2 PCI"
 	depends on DVB_CORE
+	select PCI
 	help
 	  Support for the Skystar2 PCI DVB card by Technisat, which
 	  is equipped with the FlexCopII chipset by B2C2.

B2C2 needs PCI.

drivers/media/dvb/ttpci/Kconfig +3 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/ttpci/Kconfig linux-2.6.0-test6/drivers/media/dvb/ttpci/Kconfig
@@ -1,6 +1,8 @@
 config DVB_AV7110
 	tristate "AV7110 cards"
-	depends on VIDEO_DEV && DVB_CORE
+	depends on DVB_CORE
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for SAA7146 and AV7110 based DVB cards as produced
 	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.

This is the full-featured card which needs everything: VIDEO_DEV for Video4Linux, VIDEO_SAA7146_VV for video&vbi saa7146 support.

@@ -26,6 +28,7 @@
config DVB_BUDGET
tristate "Budget cards"
depends on DVB_CORE
+ select VIDEO_SAA7146
help
Support for simple SAA7146 based DVB cards (so called Budget- or Nova-PCI cards) without onboard
@@ -38,7 +41,8 @@

config DVB_BUDGET_CI
tristate "Budget cards with onboard CI connector"
- depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+ depends on DVB_CORE
+ select VIDEO_SAA7146
help
Support for simple SAA7146 based DVB cards (so called Budget- or Nova-PCI cards) without onboard
@@ -51,7 +55,9 @@

config DVB_BUDGET_AV
tristate "Budget cards with analog video inputs"
- depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+ depends on DVB_CORE
+ select VIDEO_DEV
+ select VIDEO_SAA7146_VV
help
Support for simple SAA7146 based DVB cards (so called Budget- or Nova-PCI cards) without onboard
@@ -64,7 +70,9 @@

The "budget" cards only need the core functionality of saa7146.

config DVB_BUDGET_PATCH
tristate "AV7110 cards with Budget Patch"
- depends on DVB_CORE && DVB_BUDGET
+ depends on DVB_BUDGET
+ select VIDEO_DEV
+ select VIDEO_SAA7146_VV
help
Support for Budget Patch (full TS) modification on SAA7146+AV7110 based cards (DVB-S cards). This

This is basically the "full" av7110 card, but with hardware modifications to behave like a "budget" card...

drivers/media/dvb/ttusb-budget/Kconfig +2 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/ttusb-budget/Kconfig linux-2.6.0-test6/drivers/media/dvb/ttusb-budget/Kconfig
@@ -1,6 +1,7 @@
 config DVB_TTUSB_BUDGET
 	tristate "Technotrend/Hauppauge Nova-USB devices"
-	depends on DVB_CORE && USB
+	depends on DVB_CORE
+	select USB
 	help
 	  Support for external USB adapters designed by Technotrend and
 	  produced by Hauppauge, shipped under the brand name 'Nova-USB'.
drivers/media/dvb/ttusb-dec/Kconfig +3 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/ttusb-dec/Kconfig linux-2.6.0-test6/drivers/media/dvb/ttusb-dec/Kconfig
@@ -1,6 +1,8 @@
 config DVB_TTUSB_DEC
 	tristate "Technotrend/Hauppauge USB DEC2000-T devices"
-	depends on DVB_CORE && USB && !STANDALONE
+	depends on DVB_CORE
+	depends on !STANDALONE
+	select USB
 	help
 	  Support for external USB adapters designed by Technotrend and
 	  produced by Hauppauge, shipped under the brand name 'DEC2000-T'.

The USB drivers need USB to work. What does STANDALONE mean?

drivers/media/video/Kconfig +2 -2
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/video/Kconfig linux-2.6.0-test6/drivers/media/video/Kconfig
@@ -228,7 +228,7 @@
 
 config VIDEO_MXB
 	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
-	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the 'Multimedia eXtension Board'
 	  TV card by Siemens-Nixdorf.
@@ -238,7 +238,7 @@
 
 config VIDEO_DPC
 	tristate "Philips-Semiconductors 'dpc7146 demonstration board'"
-	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the 'dpc7146 demonstration
 	  board' by Philips-Semiconductors. It's the reference design
@@ -251,7 +251,7 @@
 

[...]

These are the "analog" drivers using the saa7146. They all need VIDEO_SAA7146_VV.

Ok, that's it. I'm planning to submit a DVB patchset for Linus within the next days. I can incorporated these changes within my patchset easily.

CU
Michael.

drivers/media/common/Kconfig +8 -6
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/common/Kconfig linux-2.6.0-test6/drivers/media/common/Kconfig
@@ -1,11 +1,13 @@
 config VIDEO_SAA7146
+	select I2C
+	select PCI
         tristate
-        default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y || VIDEO_DPC=y || VIDEO_HEXIUM_ORION=y || VIDEO_HEXIUM_GEMINI=y
-        default m if DVB_AV7110=m || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m || VIDEO_DPC=m || VIDEO_HEXIUM_ORION=m || VIDEO_HEXIUM_GEMINI=m
-        depends on VIDEO_DEV && PCI && I2C
+
+config VIDEO_SAA7146_VV
+        tristate
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
+	select VIDEO_SAA7146
 
 config VIDEO_VIDEOBUF
         tristate
-        default y if VIDEO_SAA7134=y || VIDEO_BT848=y || VIDEO_SAA7146=y
-        default m if VIDEO_SAA7134=m || VIDEO_BT848=m || VIDEO_SAA7146=m
-        depends on VIDEO_DEV
drivers/media/common/Makefile +2 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/common/Makefile linux-2.6.0-test6/drivers/media/common/Makefile
@@ -1,5 +1,6 @@
 saa7146-objs    := saa7146_i2c.o saa7146_core.o 
 saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o  
 
-obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o saa7146_vv.o
+obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
+obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
 
drivers/media/dvb/Kconfig +7 -5
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/Kconfig linux-2.6.0-test6/drivers/media/dvb/Kconfig
@@ -3,16 +3,18 @@
 #
 
 menu "Digital Video Broadcasting Devices"
-	depends on NET && INET 
 
 config DVB
 	bool "DVB For Linux"
+	select NET
+	select INET
+	select DVB_CORE
 	---help---
 	  Support Digital Video Broadcasting hardware.  Enable this if you 
 	  own a DVB adapter and want to use it or if you compile Linux for 
 	  a digital SetTopBox.
 
-	  API specs and user tools and are available for example from 
+	  API specs and user tools are available from
 	  <http://www.linuxtv.org/>. 
 
 	  Please report problems regarding this driver to the LinuxDVB 
@@ -33,18 +35,18 @@
 source "drivers/media/dvb/frontends/Kconfig"
 
 comment "Supported SAA7146 based PCI Adapters"
-	depends on DVB && PCI
+	depends on DVB_CORE
 
 source "drivers/media/dvb/ttpci/Kconfig"
 
 comment "Supported USB Adapters"
-	depends on DVB && USB
+	depends on DVB_CORE
 
 source "drivers/media/dvb/ttusb-budget/Kconfig"
 source "drivers/media/dvb/ttusb-dec/Kconfig"
 
 comment "Supported FlexCopII (B2C2) Adapters"
-	depends on DVB && PCI
+	depends on DVB_CORE
 source "drivers/media/dvb/b2c2/Kconfig"
 
 endmenu
drivers/media/dvb/b2c2/Kconfig +1 -0
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/b2c2/Kconfig linux-2.6.0-test6/drivers/media/dvb/b2c2/Kconfig
@@ -1,6 +1,7 @@
 config DVB_B2C2_SKYSTAR
 	tristate "Technisat Skystar2 PCI"
 	depends on DVB_CORE
+	select PCI
 	help
 	  Support for the Skystar2 PCI DVB card by Technisat, which
 	  is equipped with the FlexCopII chipset by B2C2.
drivers/media/dvb/dvb-core/Kconfig +4 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/dvb-core/Kconfig linux-2.6.0-test6/drivers/media/dvb/dvb-core/Kconfig
@@ -4,5 +4,8 @@
 	select CRC32
 	help
 	  DVB core utility functions for device handling, software fallbacks etc.
+	  Say Y when you have a DVB card and want to use it. Say Y if your want
+	  to build your drivers outside the kernel, but need the DVB core. All 
+	  in-kernel drivers will select this automatically if needed.
+	  If unsure say N.
 
-	  Say Y when you have a DVB card and want to use it. If unsure say N.
drivers/media/dvb/ttpci/Kconfig +12 -4
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/ttpci/Kconfig linux-2.6.0-test6/drivers/media/dvb/ttpci/Kconfig
@@ -1,6 +1,8 @@
 config DVB_AV7110
 	tristate "AV7110 cards"
-	depends on VIDEO_DEV && DVB_CORE
+	depends on DVB_CORE
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for SAA7146 and AV7110 based DVB cards as produced 
 	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.
@@ -26,6 +28,7 @@
 config DVB_BUDGET
 	tristate "Budget cards"
 	depends on DVB_CORE
+	select VIDEO_SAA7146
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -38,7 +41,8 @@
 
 config DVB_BUDGET_CI
 	tristate "Budget cards with onboard CI connector"
-	depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+	depends on DVB_CORE
+	select VIDEO_SAA7146
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -51,7 +55,9 @@
 
 config DVB_BUDGET_AV
 	tristate "Budget cards with analog video inputs"
-	depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+	depends on DVB_CORE
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -64,7 +70,9 @@
 
 config DVB_BUDGET_PATCH
 	tristate "AV7110 cards with Budget Patch"
-	depends on DVB_CORE && DVB_BUDGET
+	depends on DVB_BUDGET
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for Budget Patch (full TS) modification on 
 	  SAA7146+AV7110 based cards (DVB-S cards). This
drivers/media/dvb/ttusb-budget/Kconfig +2 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/ttusb-budget/Kconfig linux-2.6.0-test6/drivers/media/dvb/ttusb-budget/Kconfig
@@ -1,6 +1,7 @@
 config DVB_TTUSB_BUDGET
 	tristate "Technotrend/Hauppauge Nova-USB devices"
-	depends on DVB_CORE && USB
+	depends on DVB_CORE
+	select USB
 	help
 	  Support for external USB adapters designed by Technotrend and
 	  produced by Hauppauge, shipped under the brand name 'Nova-USB'.
drivers/media/dvb/ttusb-dec/Kconfig +3 -1
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/dvb/ttusb-dec/Kconfig linux-2.6.0-test6/drivers/media/dvb/ttusb-dec/Kconfig
@@ -1,6 +1,8 @@
 config DVB_TTUSB_DEC
 	tristate "Technotrend/Hauppauge USB DEC2000-T devices"
-	depends on DVB_CORE && USB && !STANDALONE
+	depends on DVB_CORE
+	depends on !STANDALONE
+	select USB
 	help
 	  Support for external USB adapters designed by Technotrend and
 	  produced by Hauppauge, shipped under the brand name 'DEC2000-T'.
drivers/media/video/Kconfig +4 -4
diff -uNrwB --new-file -uraN xx-linux-2.6.0-test6/drivers/media/video/Kconfig linux-2.6.0-test6/drivers/media/video/Kconfig
@@ -228,7 +228,7 @@
 
 config VIDEO_MXB
 	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
-	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the 'Multimedia eXtension Board'
 	  TV card by Siemens-Nixdorf.
@@ -238,7 +238,7 @@
 
 config VIDEO_DPC
 	tristate "Philips-Semiconductors 'dpc7146 demonstration board'"
-	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the 'dpc7146 demonstration
 	  board' by Philips-Semiconductors. It's the reference design
@@ -251,7 +251,7 @@
 
 config VIDEO_HEXIUM_ORION
 	tristate "Hexium HV-PCI6 and Orion frame grabber"
-	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the Hexium HV-PCI6 and
 	  Orion frame grabber cards by Hexium.
@@ -261,7 +261,7 @@
 
 config VIDEO_HEXIUM_GEMINI
 	tristate "Hexium Gemini frame grabber"
-	depends on VIDEO_DEV && PCI && I2C
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the Hexium Gemini frame
 	  grabber card by Hexium. Please note that the Gemini Dual
#5 lore raw

Hi,

Quoted 3 lines · Michael Hunold

So here it comes: The idea is to allow the user to basically select everything. If a subsystem or utitlity stuff is needed (NET, INET, PCI, USB, I2C) it's selected automatically.

Please don't use select for something like PCI or NET, if e.g. PCI is not selected no pci driver should be visible or you annoy users which don't have a pci bus, but have to wade through thousands of nonrelevant drivers.

bye, Roman

#6 lore raw

Hi Roman, Greg, Adrian,

Quoted 1 line

Please don't use select for something like PCI or NET, if e.g. PCI is not selected no pci driver should be visible or you annoy users which don't have a pci bus, but have to wade through thousands of nonrelevant drivers.

Ok, I understand. Point taken. 8-)

Attached you can find my latest patch: DVB depends on NET && INET again,
the only subsystem that's getting SELECTed is I2C. All dvb drivers depend on DVB_CORE instead of DVB now, so the user is forced to select the dvb-core, which he'll need anyway.

Quoted 1 line

bye, Roman

If it's ok like that, I can include this patch within my next patchset.

CU
Michael.

- [DVB] split up saa7146 compilation in core part (saa7146.o) and video+vbi part (saa7146_vv). some drivers need both (av7110.c), some drivers only need the core stuff (budget*.c)
- [DVB] add entry for sp887x DVB-T modulator to corresponding Kconfig
- [DVB] use new SELECT facility of Kconfig, first mentioned by Adrian Bunk and Roman Zippel in DVB subsystem
- [DVB] use SELECT in media/video/Kconfig, too.

drivers/media/common/Kconfig +10 -6
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/common/Kconfig linux-2.6.0-test6-cvs/drivers/media/common/Kconfig
@@ -1,8 +1,12 @@
 config VIDEO_SAA7146
-	def_tristate DVB_AV7110 || DVB_BUDGET || DVB_BUDGET_AV || \
-		     VIDEO_MXB || VIDEO_DPC || VIDEO_HEXIUM_ORION || \
-		     VIDEO_HEXIUM_GEMINI
-        depends on VIDEO_DEV && PCI && I2C
+        tristate
+	select I2C
+
+config VIDEO_SAA7146_VV
+        tristate
+	select VIDEO_BUF
+	select VIDEO_VIDEOBUF
+	select VIDEO_SAA7146
+
 config VIDEO_VIDEOBUF
-	def_tristate VIDEO_SAA7134 || VIDEO_BT848 || VIDEO_SAA7146
-        depends on VIDEO_DEV
+        tristate
drivers/media/common/Makefile +2 -1
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/common/Makefile linux-2.6.0-test6-cvs/drivers/media/common/Makefile
@@ -1,5 +1,6 @@
 saa7146-objs    := saa7146_i2c.o saa7146_core.o 
 saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o  
 
-obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o saa7146_vv.o
+obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
+obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
 
drivers/media/dvb/Kconfig +5 -7
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/dvb/Kconfig linux-2.6.0-test6-cvs/drivers/media/dvb/Kconfig
@@ -3,16 +3,16 @@
 #
 
 menu "Digital Video Broadcasting Devices"
-	depends on NET && INET 
 
 config DVB
 	bool "DVB For Linux"
+	depends on NET && INET
 	---help---
 	  Support Digital Video Broadcasting hardware.  Enable this if you 
 	  own a DVB adapter and want to use it or if you compile Linux for 
 	  a digital SetTopBox.
 
-	  API specs and user tools and are available for example from 
+	  API specs and user tools are available from
 	  <http://www.linuxtv.org/>. 
 
 	  Please report problems regarding this driver to the LinuxDVB 
@@ -33,18 +33,16 @@
 source "drivers/media/dvb/frontends/Kconfig"
 
 comment "Supported SAA7146 based PCI Adapters"
-	depends on DVB && PCI
-
+	depends on DVB_CORE && PCI
 source "drivers/media/dvb/ttpci/Kconfig"
 
 comment "Supported USB Adapters"
-	depends on DVB && USB
-
+	depends on DVB_CORE && USB
 source "drivers/media/dvb/ttusb-budget/Kconfig"
 source "drivers/media/dvb/ttusb-dec/Kconfig"
 
 comment "Supported FlexCopII (B2C2) Adapters"
-	depends on DVB && PCI
+	depends on DVB_CORE && PCI
 source "drivers/media/dvb/b2c2/Kconfig"
 
 endmenu
drivers/media/dvb/dvb-core/Kconfig +4 -1
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/dvb/dvb-core/Kconfig linux-2.6.0-test6-cvs/drivers/media/dvb/dvb-core/Kconfig
@@ -4,5 +4,8 @@
 	select CRC32
 	help
 	  DVB core utility functions for device handling, software fallbacks etc.
+	  Say Y when you have a DVB card and want to use it. Say Y if your want
+	  to build your drivers outside the kernel, but need the DVB core. All 
+	  in-kernel drivers will select this automatically if needed.
+	  If unsure say N.
 
-	  Say Y when you have a DVB card and want to use it. If unsure say N.
drivers/media/dvb/dvb-core/Makefile.lib +1 -0
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/dvb/dvb-core/Makefile.lib linux-2.6.0-test6-cvs/drivers/media/dvb/dvb-core/Makefile.lib
@@ -0,0 +1 @@
+obj-$(CONFIG_DVB_CORE)		+= crc32.o
drivers/media/dvb/ttpci/Kconfig +12 -4
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/dvb/ttpci/Kconfig linux-2.6.0-test6-cvs/drivers/media/dvb/ttpci/Kconfig
@@ -1,6 +1,8 @@
 config DVB_AV7110
 	tristate "AV7110 cards"
-	depends on VIDEO_DEV && DVB_CORE
+	depends on DVB_CORE
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for SAA7146 and AV7110 based DVB cards as produced 
 	  by Fujitsu-Siemens, Technotrend, Hauppauge and others.
@@ -26,6 +28,7 @@
 config DVB_BUDGET
 	tristate "Budget cards"
 	depends on DVB_CORE
+	select VIDEO_SAA7146
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -38,7 +41,8 @@
 
 config DVB_BUDGET_CI
 	tristate "Budget cards with onboard CI connector"
-	depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+	depends on DVB_CORE
+	select VIDEO_SAA7146
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -51,7 +55,9 @@
 
 config DVB_BUDGET_AV
 	tristate "Budget cards with analog video inputs"
-	depends on VIDEO_DEV && DVB_CORE && DVB_BUDGET
+	depends on DVB_CORE
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for simple SAA7146 based DVB cards
 	  (so called Budget- or Nova-PCI cards) without onboard
@@ -64,7 +70,9 @@
 
 config DVB_BUDGET_PATCH
 	tristate "AV7110 cards with Budget Patch"
-	depends on DVB_CORE && DVB_BUDGET
+	depends on DVB_BUDGET
+	select VIDEO_DEV
+	select VIDEO_SAA7146_VV
 	help
 	  Support for Budget Patch (full TS) modification on 
 	  SAA7146+AV7110 based cards (DVB-S cards). This
drivers/media/dvb/ttusb-budget/Kconfig +1 -1
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/dvb/ttusb-budget/Kconfig linux-2.6.0-test6-cvs/drivers/media/dvb/ttusb-budget/Kconfig
@@ -1,6 +1,6 @@
 config DVB_TTUSB_BUDGET
 	tristate "Technotrend/Hauppauge Nova-USB devices"
-	depends on DVB_CORE && USB
+	depends on DVB_CORE
 	help
 	  Support for external USB adapters designed by Technotrend and
 	  produced by Hauppauge, shipped under the brand name 'Nova-USB'.
drivers/media/dvb/frontends/Kconfig +10 -0
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/dvb/frontends/Kconfig linux-2.6.0-test6-cvs/drivers/media/dvb/frontends/Kconfig
@@ -26,6 +26,16 @@
 	  DVB adapter simply enable all supported frontends, the 
 	  right one will get autodetected.
 
+config DVB_SP887X
+ 	tristate "Frontends with sp887x demodulators, e.g. Microtune DTF7072"
+ 	depends on DVB_CORE
+ 	help
+ 	  A DVB-T demodulator driver. Say Y when you want to support the sp887x.
+ 
+ 	  If you don't know what tuner module is soldered on your
+ 	  DVB adapter simply enable all supported frontends, the
+ 	  right one will get autodetected.
+
 config DVB_ALPS_TDLB7
 	tristate "Alps TDLB7 (OFDM)"
 	depends on DVB_CORE
drivers/media/video/Kconfig +9 -5
diff -uNrwB --new-file -uraN linux-2.6.0-test6/drivers/media/video/Kconfig linux-2.6.0-test6-cvs/drivers/media/video/Kconfig
@@ -3,7 +3,7 @@
 #
 
 menu "Video For Linux"
-	depends on VIDEO_DEV!=n
+	depends on VIDEO_DEV
 
 comment "Video Adapters"
 
@@ -228,7 +228,8 @@
 
 config VIDEO_MXB
 	tristate "Siemens-Nixdorf 'Multimedia eXtension Board'"
-	depends on VIDEO_DEV && PCI && I2C
+	depends on VIDEO_DEV && PCI
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the 'Multimedia eXtension Board'
 	  TV card by Siemens-Nixdorf.
@@ -238,7 +239,8 @@
 
 config VIDEO_DPC
 	tristate "Philips-Semiconductors 'dpc7146 demonstration board'"
-	depends on VIDEO_DEV && PCI && I2C
+	depends on VIDEO_DEV && PCI
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the 'dpc7146 demonstration
 	  board' by Philips-Semiconductors. It's the reference design
@@ -251,7 +253,8 @@
 
 config VIDEO_HEXIUM_ORION
 	tristate "Hexium HV-PCI6 and Orion frame grabber"
-	depends on VIDEO_DEV && PCI && I2C
+	depends on VIDEO_DEV && PCI
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the Hexium HV-PCI6 and
 	  Orion frame grabber cards by Hexium.
@@ -261,7 +264,8 @@
 
 config VIDEO_HEXIUM_GEMINI
 	tristate "Hexium Gemini frame grabber"
-	depends on VIDEO_DEV && PCI && I2C
+	depends on VIDEO_DEV && PCI
+	select VIDEO_SAA7146_VV
 	---help---
 	  This is a video4linux driver for the Hexium Gemini frame
 	  grabber card by Hexium. Please note that the Gemini Dual