Skip to contentSkip to conversation

sound: make OSS sound core optional

PATCH Tejun Heo 1 participant 1 message Aug 27, 2008

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

sound/sound_core.c implements soundcore.ko contains two parts - sound_class which is shared by both ALSA and OSS and device redirection support for OSS. It's always compiled when any sound support is enabled although it's necessary only when OSS (the actual one or emulation) is enabled. This is slightly wasteful and as device redirection always registers character device region for major 14, it prevents alternative implementation.

This patch introduces a new config SOUND_OSS_CORE which is selected iff OSS support is actually necessary and build the OSS core part conditionally.

If OSS is disabled, soundcore merely contains sound_class but leaving it that way seems to be the simplest approach as otherwise sound_class should be in ALSA core file if OSS is disabled but should be in soundcore if OSS is enabled and there's also the user confusion factor.

---
 arch/um/Kconfig.char |    4 ++
 sound/Kconfig        |    5 +++
 sound/core/Kconfig   |    1 
 sound/sound_core.c   |   82 +++++++++++++++++++++++++++++++++++++--------------
 4 files changed, 71 insertions(+), 21 deletions(-)
sound/Kconfig +5 -0
Index: work/sound/Kconfig
===================================================================
@@ -28,6 +28,10 @@ menuconfig SOUND
 
 if SOUND
 
+config SOUND_OSS_CORE
+	bool
+	default n
+
 source "sound/oss/dmasound/Kconfig"
 
 if !M68K
@@ -80,6 +84,7 @@ endif # SND
 
 menuconfig SOUND_PRIME
 	tristate "Open Sound System (DEPRECATED)"
+	select SOUND_OSS_CORE
 	help
 	  Say 'Y' or 'M' to enable Open Sound System drivers.
 
sound/core/Kconfig +1 -0
Index: work/sound/core/Kconfig
===================================================================
@@ -38,6 +38,7 @@ config SND_SEQ_DUMMY
 	  will be called snd-seq-dummy.
 
 config SND_OSSEMUL
+	select SOUND_OSS_CORE
 	bool
 
 config SND_MIXER_OSS
sound/sound_core.c +61 -21

127 lines not on this page · raw message

arch/um/Kconfig.char +4 -0
Index: work/arch/um/Kconfig.char
===================================================================
@@ -203,6 +203,10 @@ config SOUND
 	tristate
 	default UML_SOUND
 
+config SOUND_OSS_CORE
+	bool
+	default UML_SOUND
+
 config HOSTAUDIO
 	tristate
 	default UML_SOUND