Skip to contentSkip to conversation

use select in sound/isa/Kconfig

PATCH New Bodo Eggert 2 participants 7 messages Jul 17, 2005 – Jul 24, 2005 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use select in sound/isa/Kconfig

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed, resulting in funny behaviour. (Soundcarts get selectable if other soundcards are selected).

This patch changes the "depend on ISAPNP"s to select.

 sound/isa/Kconfig |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
sound/isa/Kconfig +10 -5
@@ -15,7 +15,8 @@ config SND_CS4231_LIB
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on SND && ISAPNP
+	depends on SND
+	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
 	select SND_PCM
@@ -80,7 +81,8 @@ config SND_CS4236
 
 config SND_ES968
 	tristate "Generic ESS ES968 driver"
-	depends on SND && ISAPNP
+	depends on SND
+	select ISAPNP
 	select SND_MPU401_UART
 	select SND_PCM
 	help
@@ -291,7 +293,8 @@ config SND_WAVEFRONT
 
 config SND_ALS100
 	tristate "Avance Logic ALS100/ALS120"
-	depends on SND && ISAPNP
+	depends on SND
+	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
 	select SND_PCM
@@ -304,7 +307,8 @@ config SND_ALS100
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on SND && ISAPNP
+	depends on SND
+	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
 	select SND_CS4231_LIB
@@ -328,7 +332,8 @@ config SND_CMI8330
 
 config SND_DT019X
 	tristate "Diamond Technologies DT-019X, Avance Logic ALS-007"
-	depends on SND && ISAPNP
+	depends on SND
+	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
 	select SND_PCM
Signature · 2 lines
Funny quotes:
3. On the other hand, you have different fingers.
#1 lore raw

PATCH 1/1 sound drivers select'ing ISAPNP must depend on PNP && ISA

Quoted 6 lines · Bodo Eggert

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed, resulting in funny behaviour. (Soundcarts get selectable if other soundcards are selected).

This patch changes the "depend on ISAPNP"s to select.
...

I like the idea of this patch, but it brings to more drivers to a violation of the "if you select something, you have to ensure that the dependencies of what you select are fulfilled" rule causing link errors with invalid .config's.

This patch (on top of your patch) fixes this problem.

---

 sound/isa/Kconfig |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
sound/isa/Kconfig renamed from sound/isa/Kconfig.old +7 -7
@@ -15,7 +15,7 @@
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -81,7 +81,7 @@
 
 config SND_ES968
 	tristate "Generic ESS ES968 driver"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_MPU401_UART
 	select SND_PCM
@@ -162,7 +162,7 @@
 
 config SND_INTERWAVE
 	tristate "AMD InterWave, Gravis UltraSound PnP"
-	depends on SND
+	depends on SND && PNP && ISA
 	select SND_RAWMIDI
 	select SND_CS4231_LIB
 	select SND_GUS_SYNTH
@@ -177,7 +177,7 @@
 
 config SND_INTERWAVE_STB
 	tristate "AMD InterWave + TEA6330T (UltraSound 32-Pro)"
-	depends on SND
+	depends on SND && PNP && ISA
 	select SND_RAWMIDI
 	select SND_CS4231_LIB
 	select SND_GUS_SYNTH
@@ -293,7 +293,7 @@
 
 config SND_ALS100
 	tristate "Avance Logic ALS100/ALS120"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -307,7 +307,7 @@
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -332,7 +332,7 @@
 
 config SND_DT019X
 	tristate "Diamond Technologies DT-019X, Avance Logic ALS-007"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

#2 lore raw

PATCH 1/1 sound drivers select'ing ISAPNP must depend on PNP && ISA

In reply to Bodo Eggert
Quoted 6 lines · Bodo Eggert

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed, resulting in funny behaviour. (Soundcarts get selectable if other soundcards are selected).

This patch changes the "depend on ISAPNP"s to select.
...

I like the idea of this patch, but it brings to more drivers to a violation of the "if you select something, you have to ensure that the dependencies of what you select are fulfilled" rule causing link errors with invalid .config's.

This patch (on top of your patch) fixes this problem.

---

 sound/isa/Kconfig |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
sound/isa/Kconfig renamed from sound/isa/Kconfig.old +7 -7
@@ -15,7 +15,7 @@
 
 config SND_AD1816A
 	tristate "Analog Devices SoundPort AD1816A"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -81,7 +81,7 @@
 
 config SND_ES968
 	tristate "Generic ESS ES968 driver"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_MPU401_UART
 	select SND_PCM
@@ -162,7 +162,7 @@
 
 config SND_INTERWAVE
 	tristate "AMD InterWave, Gravis UltraSound PnP"
-	depends on SND
+	depends on SND && PNP && ISA
 	select SND_RAWMIDI
 	select SND_CS4231_LIB
 	select SND_GUS_SYNTH
@@ -177,7 +177,7 @@
 
 config SND_INTERWAVE_STB
 	tristate "AMD InterWave + TEA6330T (UltraSound 32-Pro)"
-	depends on SND
+	depends on SND && PNP && ISA
 	select SND_RAWMIDI
 	select SND_CS4231_LIB
 	select SND_GUS_SYNTH
@@ -293,7 +293,7 @@
 
 config SND_ALS100
 	tristate "Avance Logic ALS100/ALS120"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -307,7 +307,7 @@
 
 config SND_AZT2320
 	tristate "Aztech Systems AZT2320"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
@@ -332,7 +332,7 @@
 
 config SND_DT019X
 	tristate "Diamond Technologies DT-019X, Avance Logic ALS-007"
-	depends on SND
+	depends on SND && PNP && ISA
 	select ISAPNP
 	select SND_OPL3_LIB
 	select SND_MPU401_UART
#3 lore raw

Re: [2.6 patch] sound drivers select'ing ISAPNP must depend on PNP && ISA

Quoted 6 lines · Adrian Bunk
Quoted 4 lines · Bodo Eggert

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed, resulting in funny behaviour. (Soundcarts get selectable if other soundcards are selected).

Quoted 7 lines
Quoted 2 lines

This patch changes the "depend on ISAPNP"s to select.
...

I like the idea of this patch, but it brings to more drivers to a violation of the "if you select something, you have to ensure that the dependencies of what you select are fulfilled" rule causing link errors with invalid .config's.

That should be mentioned in kconfig-language.txt. OTOH, the build system should automatically propagate the dependencies. I asume that should be easy, except for having the time to implement that.

BTW: How can you select something to be at least a module?
BTW2: In bool options, depending on FOO seems to be equal to depending on

      FOO!=n. Is this assumption correct?
Signature · 2 lines
Top 100 things you don't want the sysadmin to say:
49. What's this switch for anyways...?
#4 lore raw

Re: [2.6 patch] sound drivers select'ing ISAPNP must depend on PNP && ISA

Quoted 15 lines · Bodo Eggert
Quoted 6 lines · Adrian Bunk
Quoted 4 lines · Bodo Eggert

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed, resulting in funny behaviour. (Soundcarts get selectable if other soundcards are selected).

Quoted 7 lines
Quoted 2 lines

This patch changes the "depend on ISAPNP"s to select.
...

I like the idea of this patch, but it brings to more drivers to a violation of the "if you select something, you have to ensure that the dependencies of what you select are fulfilled" rule causing link errors with invalid .config's.

Quoted 4 lines

That should be mentioned in kconfig-language.txt. OTOH, the build system should automatically propagate the dependencies. I asume that should be easy, except for having the time to implement that.
...

There are nontrivial problems:
E.g. what should happen if you select option A that depends on (B || C)?

There's one opinion that options should be either select'able _or_ user visible.

The current policy in the kernel is not 100% dogmatic regarding this issue, but it shouldn't be violated without a good reason.

cu
Adrian

Signature · 12 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
#5 lore raw

Re: [2.6 patch] sound drivers select'ing ISAPNP must depend on PNP && ISA

Quoted 9 lines · Adrian Bunk
Quoted 4 lines · Bodo Eggert

OTOH, the build system
should automatically propagate the dependencies. I asume that should be easy, except for having the time to implement that.
...

There are nontrivial problems:
E.g. what should happen if you select option A that depends on (B || C)?

You should in effect depend on ($original_depends) && (B || C). You'll just need to append all (recursive) dependencies in the selecting option.

last_length:=-1; /* impossible value */ while |options_with_unresolved_selects| > 0 do begin

	if |options_with_unresolved_selects| == last_length
	then goto circular_recursion_detected;
	last_length:=|options_with_unresolved_selects|;

	for i in options_with_unresolved_selects do begin
		for s in i->unresolved_selects do
			if 0 == |s->unresolved_selects|
			then begin
				add(i->depends, s->depends)
				delete_from(i->unresolved_selects, s)
			end
		if 0 == |i->unresolved_selects|
		then delete_from(options_with_unresolved_selects, i);
	end

end

Quoted 2 lines

There's one opinion that options should be either select'able _or_ user visible.

That would only result in ugly workarounds. Think about the kernel libraries. You'll want to manually select them, and you'll want to automatically select them, and you want both to be visible.

Signature · 10 lines
Funny quotes:
22. When everything's going your way, you're in the wrong lane and and going
    the wrong way.


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
#6 lore raw

Re: [2.6 patch] sound drivers select'ing ISAPNP must depend on PNP && ISA

In reply to Adrian Bunk
Quoted 6 lines · Adrian Bunk
Quoted 4 lines · Bodo Eggert

In sound/isa/Kconfig, select ISAPNP and depend on ISAPNP are intermixed, resulting in funny behaviour. (Soundcarts get selectable if other soundcards are selected).

Quoted 7 lines
Quoted 2 lines

This patch changes the "depend on ISAPNP"s to select.
...

I like the idea of this patch, but it brings to more drivers to a violation of the "if you select something, you have to ensure that the dependencies of what you select are fulfilled" rule causing link errors with invalid .config's.

That should be mentioned in kconfig-language.txt. OTOH, the build system should automatically propagate the dependencies. I asume that should be easy, except for having the time to implement that.

BTW: How can you select something to be at least a module?
BTW2: In bool options, depending on FOO seems to be equal to depending on

      FOO!=n. Is this assumption correct?
Signature · 9 lines
Top 100 things you don't want the sysadmin to say:
49. What's this switch for anyways...?


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click