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. Signed-off-by: Tejun Heo <tj@kernel.org> --- Aieee.. forgot to add [PATCH]. Resending. Thanks. arch/um/Kconfig.char | 4 ++ sound/Kconfig | 5 +++ sound/core/Kconfig | 1 sound/sound_core.c | 82 +++++++++++++++++++++++++++++++++++++-------------- 4 files changed, 71 insertions(+), 21 deletions(-) Index: work/sound/Kconfig =================================================================== --- work.orig/sound/Kconfig +++ 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. Index: work/sound/core/Kconfig =================================================================== --- work.orig/sound/core/Kconfig +++ 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 ...
At Wed, 27 Aug 2008 10:19:35 +0200, This seems missing from the scope. This alias should be in #ifdef CONFIG_SOUND_OSS_CORE. The module doesn't provide that major without CONFIG_SOUND_OSS_CORE. Takashi --
Hello, SOUND_OSS_CORE should be turned on if ALSA OSS emul is turned on or arch-um hostsound is turned on, both of which can be enabled regardless Ah.. right. Moving. Thanks. -- tejun --
At Wed, 27 Aug 2008 11:37:44 +0200, Yes, sorry, I didn't cite clearly. I meant only the last line. sound/oss/dmasound/Kconfig is included and evaluated outside the block "if SOUND_PRIME". Thus, CONFIG_SOUND_OSS_CORE won't be enabled for drivers in sound/oss/dmasound. My suggestion is to move that line source sound/oss/dmasound/Kconfig into the "if SOUND_PRIME" block first, then apply your patch. Anyway, there are some other minor issues in sound/Kconfig, for example, why "if !M68K" is there. We can clean up a bit more. thanks, Takashi --
Ah.. okay, dmasound also requires SOUND_OSS_CORE but not in That would pull in sound_firmware. Most likely no big deal but still... How about just adding select SOUND_OSS_CORE to DMASOUND for now? Thanks. Subject: [PATCH] sound: make OSS sound core optional sound/sound_core.c implements soundcore.ko and 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. Also, there's also the user confusion factor. Signed-off-by: Tejun Heo <tj@kernel.org> --- arch/um/Kconfig.char | 4 ++ sound/Kconfig | 5 ++ sound/core/Kconfig | 1 sound/oss/dmasound/Kconfig | 1 sound/sound_core.c | 79 ++++++++++++++++++++++++++++++++++----------- 5 files changed, 71 insertions(+), 19 deletions(-) Index: work/sound/Kconfig =================================================================== --- work.orig/sound/Kconfig +++ 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. Index: ...
At Wed, 27 Aug 2008 11:57:06 +0200, Ouch, another pain. sound_firmware.c should be removed and the relevant code should use Looks good to me. Acked-by: Takashi Iwai <tiwai@suse.de> If no objection comes up, I'll merge it to sound tree later. thanks, --
