summaryrefslogtreecommitdiff
path: root/sound/core/Kconfig
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-17 11:44:25 +0300
committerTakashi Iwai <tiwai@suse.de>2016-02-23 11:03:07 +0300
commitfe0d128c57bf927a713159f60a18d9f315d4d91d (patch)
treee45587f9521ad620056a59e7073307ccb16c39f1 /sound/core/Kconfig
parent94a573500d48e780e5b23d307d6e6b05e6af7d2a (diff)
downloadlinux-fe0d128c57bf927a713159f60a18d9f315d4d91d.tar.xz
ALSA: jack: Allow building the jack layer without input device
Since the recent integration of kctl jack and input jack layers, we can basically build the jack layer even without input devices. That is, the jack layer itself can be built with conditional to enable the input device support or not, while the users may enable always CONFIG_SND_JACK unconditionally. For achieving it, this patch changes the following: - A new Kconfig, CONFIG_SND_JACK_INPUT_DEV, was introduced to indicate whether the jack layer supports the input device, - A few items in snd_jack struct and relevant codes are conditionally built upon CONFIG_SND_JACK_INPUT_DEV, - The users of CONFIG_SND_JACK drop the messy dependency on CONFIG_INPUT. This change also automagically fixes a potential bug in HD-audio driver Arnd reported, where the NULL or uninitialized jack instance is dereferenced. Reported-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/Kconfig')
-rw-r--r--sound/core/Kconfig9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index a2a1e24becc6..6d12ca9bcb80 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -24,12 +24,15 @@ config SND_RAWMIDI
config SND_COMPRESS_OFFLOAD
tristate
-# To be effective this also requires INPUT - users should say:
-# select SND_JACK if INPUT=y || INPUT=SND
-# to avoid having to force INPUT on.
config SND_JACK
bool
+# enable input device support in jack layer
+config SND_JACK_INPUT_DEV
+ bool
+ depends on SND_JACK
+ default y if INPUT=y || INPUT=SND
+
config SND_SEQUENCER
tristate "Sequencer support"
select SND_TIMER