Skip to contentSkip to conversation

ALSA: update the Kconfig files to be easier to use

PATCH In review Andrew Paprocki 2 participants 5 messages Feb 23, 2008 – Feb 24, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: update the Kconfig files to be easier to use

This update to the Kconfig files allows the ability to select/deselect entire submenus, starting with the root "Sound device support" on the main kernel configuration page. Inside sound support, ALSA/OSS can be easily enabled/disabled. Inside ALSA, entire classes of devices can be easily enabled/disabled at the ALSA menu (e.g. ISA, PCI, USB devices) without having to manually disable individual cards within the submenus. Modified menus: main, isa, pci, pcmcia, soc, spi, usb

Kconfig +18 -22
diff -r 39df17389b57 -r a60a39d8e6fe Kconfig
@@ -1,11 +1,9 @@
 # sound/Config.in
 #
 
-menu "Sound"
+menuconfig SOUND
+	tristate "Sound device support"
 	depends on HAS_IOMEM
-
-config SOUND
-	tristate "Sound card support"
 	help
 	  If you have a sound card in your computer, i.e. if it can say more
 	  than an occasional beep, say Y.  Be sure to have all the information
@@ -33,21 +31,22 @@ config SOUND
 	  Kernel patches and supporting utilities to do that are in the pcsp
 	  package, available at <ftp://ftp.infradead.org/pub/pcsp/>.
 
+if SOUND
+
 source "sound/oss/dmasound/Kconfig"
 
 if !M68K
 
-menu "Advanced Linux Sound Architecture"
-	depends on SOUND!=n
-
-config SND
-	tristate "Advanced Linux Sound Architecture"
-	depends on SOUND
-	help
+menuconfig SND
+        tristate "Advanced Linux Sound Architecture"
+        depends on SOUND!=n
+        help
 	  Say 'Y' or 'M' to enable ALSA (Advanced Linux Sound Architecture),
 	  the new base sound system.
 
 	  For more information, see <http://www.alsa-project.org/>
+
+if SND
 
 source "sound/core/Kconfig"
 
@@ -63,9 +62,7 @@ source "sound/aoa/Kconfig"
 
 source "sound/arm/Kconfig"
 
-if SPI
 source "sound/spi/Kconfig"
-endif
 
 source "sound/mips/Kconfig"
 
@@ -85,22 +82,21 @@ source "sound/parisc/Kconfig"
 
 source "sound/soc/Kconfig"
 
-endmenu
+endif # SND
 
-menu "Open Sound System"
+menuconfig SOUND_PRIME
+        tristate "Open Sound System (DEPRECATED)"
 	depends on SOUND!=n
-
-config SOUND_PRIME
-	tristate "Open Sound System (DEPRECATED)"
-	depends on SOUND
 	help
 	  Say 'Y' or 'M' to enable Open Sound System drivers.
 
+if SOUND_PRIME
+
 source "sound/oss/Kconfig"
 
-endmenu
+endif # SOUND_PRIME
 
-endif
+endif # !M68K
 
 config AC97_BUS
 	tristate
@@ -110,4 +106,4 @@ config AC97_BUS
 	  sound although they're sharing the AC97 bus. Concerned drivers
 	  should "select" this.
 
-endmenu
+endif # SOUND
isa/Kconfig +113 -129

477 lines not on this page · raw message

pci/Kconfig +191 -244

975 lines not on this page · raw message

pcmcia/Kconfig +8 -4
diff -r 39df17389b57 -r a60a39d8e6fe pcmcia/Kconfig
@@ -1,11 +1,16 @@
 # ALSA PCMCIA drivers
 
-menu "PCMCIA devices"
+menuconfig SND_PCMCIA
+        bool "PCMCIA devices"
 	depends on SND!=n && PCMCIA
+        default y
+        help
+          Support for sound devices connected via a PCMCIA interface.
+
+if SND_PCMCIA
 
 config SND_VXPOCKET
 	tristate "Digigram VXpocket"
-	depends on SND && PCMCIA
 	select SND_VX_LIB
 	help
 	  Say Y here to include support for Digigram VXpocket and
@@ -16,7 +21,6 @@ config SND_VXPOCKET
 
 config SND_PDAUDIOCF
 	tristate "Sound Core PDAudioCF"
-	depends on SND && PCMCIA
 	select SND_PCM
 	help
 	  Say Y here to include support for Sound Core PDAudioCF
@@ -25,4 +29,4 @@ config SND_PDAUDIOCF
 	  To compile this driver as a module, choose M here: the module
 	  will be called snd-pdaudiocf.
 
-endmenu
+endif # SND_PCMCIA
soc/Kconfig +18 -21
diff -r 39df17389b57 -r a60a39d8e6fe soc/Kconfig
@@ -1,27 +1,24 @@
-#
-# SoC audio configuration
-#
+# ALSA SoC audio configuration
 
-menu "System on Chip audio support"
-	depends on SND!=n
+menuconfig SND_SOC
+        tristate "SoC (System on Chip) devices"
+        depends on SND!=n
+        select SND_PCM
+        help
+	  If you want ASoC support, you should say Y here and also to the
+	  specific driver for your SoC platform below.
+	  
+	  ASoC provides power efficient ALSA support for embedded battery 
+          powered SoC based systems like PDAs, phones and personal media 
+          players.
+
+	  This ASoC audio support can also be built as a module.  If so, the 
+          module will be called snd-soc-core.
+
+if SND_SOC
 
 config SND_SOC_AC97_BUS
 	bool
-
-config SND_SOC
-	tristate "ALSA for SoC audio support"
-	depends on SND
-	select SND_PCM
-	---help---
-
-	  If you want ASoC support, you should say Y here and also to the
-	  specific driver for your SoC platform below.
-	  
-	  ASoC provides power efficient ALSA support for embedded battery powered
-	  SoC based systems like PDA's, Phones and Personal Media Players.
-
-	  This ASoC audio support can also be built as a module.  If so, the module
-	  will be called snd-soc-core.
 
 # All the supported Soc's
 source "sound/soc/at91/Kconfig"
@@ -34,4 +31,4 @@ source "sound/soc/davinci/Kconfig"
 # Supported codecs
 source "sound/soc/codecs/Kconfig"
 
-endmenu
+endif # SND_SOC
spi/Kconfig +12 -6
diff -r 39df17389b57 -r a60a39d8e6fe spi/Kconfig
@@ -1,13 +1,19 @@
-#SPI drivers
+# ALSA SPI drivers
 
-menu "SPI devices"
-	depends on SND != n
+menuconfig SND_SPI
+        bool "SPI devices"
+        depends on SND!=n && SPI
+        default y
+        help
+          Support for sound devices connected via the SPI bus.
+
+if SND_SPI
 
 config SND_AT73C213
 	tristate "Atmel AT73C213 DAC driver"
 	depends on ATMEL_SSC
 	select SND_PCM
-	help
+	---help---
 	  Say Y here if you want to use the Atmel AT73C213 external DAC. This
 	  DAC can be found on Atmel development boards.
 
@@ -22,10 +28,10 @@ config SND_AT73C213_TARGET_BITRATE
 	depends on SND_AT73C213
 	default "48000"
 	range 8000 50000
-	help
+	---help---
 	  Sets the target bitrate for the bitrate calculator in the driver.
 	  Limited by hardware to be between 8000 Hz and 50000 Hz.
 
 	  Set to 48000 Hz by default.
 
-endmenu
+endif # SND_SPI
usb/Kconfig +15 -12
diff -r 39df17389b57 -r a60a39d8e6fe usb/Kconfig
@@ -1,15 +1,20 @@
 # ALSA USB drivers
 
-menu "USB devices"
-	depends on SND!=n && USB!=n
+menuconfig SND_USB
+        bool "USB devices"
+        depends on SND!=n && USB!=n
+        default y
+        help
+          Support for sound devices connected via the USB bus.
+
+if SND_USB
 
 config SND_USB_AUDIO
 	tristate "USB Audio/MIDI driver"
-	depends on SND && USB
 	select SND_HWDEP
 	select SND_RAWMIDI
 	select SND_PCM
-	help
+	---help---
 	  Say Y here to include support for USB audio and USB MIDI
 	  devices.
 
@@ -18,11 +23,11 @@ config SND_USB_AUDIO
 
 config SND_USB_USX2Y
 	tristate "Tascam US-122, US-224 and US-428 USB driver"
-	depends on SND && USB && (X86 || PPC || ALPHA)
+	depends on (X86 || PPC || ALPHA)
 	select SND_HWDEP
 	select SND_RAWMIDI
 	select SND_PCM
-	help
+	---help---
 	  Say Y here to include support for Tascam USB Audio/MIDI
 	  interfaces or controllers US-122, US-224 and US-428.
 
@@ -31,11 +36,10 @@ config SND_USB_USX2Y
 
 config SND_USB_CAIAQ
 	tristate "Native Instruments USB audio devices"
-	depends on SND && USB
 	select SND_HWDEP
 	select SND_RAWMIDI
 	select SND_PCM
-	help
+	---help---
 	   Say Y here to include support for caiaq USB audio interfaces,
 	   namely:
 
@@ -50,10 +54,10 @@ config SND_USB_CAIAQ
 	   will be called snd-usb-caiaq.
 
 config SND_USB_CAIAQ_INPUT
-	bool "enable input device for controllers"
+	bool "Enable input device for controllers"
 	depends on SND_USB_CAIAQ
 	depends on INPUT=y || INPUT=SND_USB_CAIAQ
-	help
+	---help---
 	  Say Y here to support input controllers like buttons, knobs,
 	  alpha dials and analog pedals on the following products:
 
@@ -63,5 +67,4 @@ config SND_USB_CAIAQ_INPUT
 	   * Native Instruments Kore Controller 2
 	   * Native Instruments Audio Kontrol 1
 
-endmenu
-
+endif # SND_USB
#1 lore raw

At Sat, 23 Feb 2008 01:06:46 -0400,

Quoted 8 lines · Andrew Paprocki

This update to the Kconfig files allows the ability to select/deselect entire submenus, starting with the root "Sound device support" on the main kernel configuration page. Inside sound support, ALSA/OSS can be easily enabled/disabled. Inside ALSA, entire classes of devices can be easily enabled/disabled at the ALSA menu (e.g. ISA, PCI, USB devices) without having to manually disable individual cards within the submenus. Modified menus: main, isa, pci, pcmcia, soc, spi, usb

A problem I found at the last time from a similar patch is that the replacement with menuconfig throws away the old configuration unless you have "default y". And people are picky about "default y"...

I need to check this again, anyway.

thanks,

Takashi

#2 lore raw

Yes, I realized that and I made the new toplevel options default y so that it would mimic the existing config. The main reason for doing this is so that I can quickly 'n' to shut off things like "ISA devices" with one key. I believe I got them all, but please verify.

Thanks,
-Andrew

Quoted 24 lines · Takashi Iwai

At Sat, 23 Feb 2008 01:06:46 -0400,

Quoted 8 lines · Andrew Paprocki

This update to the Kconfig files allows the ability to select/deselect entire submenus, starting with the root "Sound device support" on the main kernel configuration page. Inside sound support, ALSA/OSS can be easily enabled/disabled. Inside ALSA, entire classes of devices can be easily enabled/disabled at the ALSA menu (e.g. ISA, PCI, USB devices) without having to manually disable individual cards within the submenus. Modified menus: main, isa, pci, pcmcia, soc, spi, usb

A problem I found at the last time from a similar patch is that the replacement with menuconfig throws away the old configuration unless you have "default y". And people are picky about "default y"...

I need to check this again, anyway.

thanks,

Takashi

#3 lore raw

To respond better, I'd actually prefer not putting 'default y', but I figured it was more important to stay compatible with existing configs. If you feel that isn't a big deal, then it can be removed. The default in these cases should do no harm because it doesn't actually enable any code.

Quoted 36 lines · Andrew Paprocki

Yes, I realized that and I made the new toplevel options default y so
that it would mimic the existing config. The main reason for doing this is so that I can quickly 'n' to shut off things like "ISA devices" with one key. I believe I got them all, but please verify.

Thanks,
-Andrew

Quoted 24 lines · Takashi Iwai

At Sat, 23 Feb 2008 01:06:46 -0400,

Quoted 8 lines · Andrew Paprocki

This update to the Kconfig files allows the ability to select/deselect entire submenus, starting with the root "Sound device support" on the main kernel configuration page. Inside sound support, ALSA/OSS can be easily enabled/disabled. Inside ALSA, entire classes of devices can be easily enabled/disabled at the ALSA menu (e.g. ISA, PCI, USB devices) without having to manually disable individual cards within the submenus. Modified menus: main, isa, pci, pcmcia, soc, spi, usb

A problem I found at the last time from a similar patch is that the replacement with menuconfig throws away the old configuration unless you have "default y". And people are picky about "default y"...

I need to check this again, anyway.

thanks,

Takashi

#4 lore raw

At Sat, 23 Feb 2008 12:04:01 -0500,

Quoted 6 lines · Andrew Paprocki

To respond better, I'd actually prefer not putting 'default y', but I figured it was more important to stay compatible with existing configs. If you feel that isn't a big deal, then it can be removed. The default in these cases should do no harm because it doesn't actually enable any code.

I think it's more important not to break the old config than avoiding default y.

I'll apply the patch after a bit more testing (I'm off from the main workstation right now)...

thanks,

Takashi

Quoted 38 lines · Andrew Paprocki
Quoted 36 lines

Yes, I realized that and I made the new toplevel options default y so
that it would mimic the existing config. The main reason for doing this is so that I can quickly 'n' to shut off things like "ISA devices" with one key. I believe I got them all, but please verify.

Thanks,
-Andrew

Quoted 24 lines · Takashi Iwai

At Sat, 23 Feb 2008 01:06:46 -0400,

Quoted 8 lines · Andrew Paprocki

This update to the Kconfig files allows the ability to select/deselect entire submenus, starting with the root "Sound device support" on the main kernel configuration page. Inside sound support, ALSA/OSS can be easily enabled/disabled. Inside ALSA, entire classes of devices can be easily enabled/disabled at the ALSA menu (e.g. ISA, PCI, USB devices) without having to manually disable individual cards within the submenus. Modified menus: main, isa, pci, pcmcia, soc, spi, usb

A problem I found at the last time from a similar patch is that the replacement with menuconfig throws away the old configuration unless you have "default y". And people are picky about "default y"...

I need to check this again, anyway.

thanks,

Takashi