diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-06-09 14:06:46 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-09 22:09:45 +0200 |
commit | 3d774d5ef066971aee1839150bf47d100d8e43d3 (patch) | |
tree | bd345c2cb848ad3b47ea1f5734d86974f10f64f7 /sound/synth | |
parent | eb3b705aaed9cab7efef8c905eda919b5fd902b9 (diff) | |
download | linux-3d774d5ef066971aee1839150bf47d100d8e43d3.tar.bz2 |
ALSA: seq: Allow the tristate build of OSS emulation
Currently OSS sequencer emulation is tied with ALSA sequencer core,
both are built in the same level; i.e. when CONFIG_SND_SEQUENCER=y,
the OSS sequencer emulation is also always built-in, even though the
functionality can be built as an individual module.
This patch changes the rule and allows users to build snd-seq-oss
module while others are built-in. Essentially, it's just a few simple
changes in Kconfig and Makefile. Some driver codes like opl3 need to
convert from the simple ifdef to IS_ENABLED(). But that's all.
You might wonder how about the dependency: right, it can be messy, but
it still works. Since we rewrote the sequencer binding with the
standard bus, the driver can be bound at any time on demand. So, the
synthesizer driver module can be loaded individually from the OSS
emulation core before/after it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/synth')
-rw-r--r-- | sound/synth/emux/emux.c | 6 | ||||
-rw-r--r-- | sound/synth/emux/emux_effect.c | 2 | ||||
-rw-r--r-- | sound/synth/emux/emux_oss.c | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index 9312cd8a6fdd..b9981e8c0027 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -47,7 +47,7 @@ int snd_emux_new(struct snd_emux **remu) mutex_init(&emu->register_mutex); emu->client = -1; -#ifdef CONFIG_SND_SEQUENCER_OSS +#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) emu->oss_synth = NULL; #endif emu->max_voices = 0; @@ -123,7 +123,7 @@ int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, ch snd_emux_init_voices(emu); snd_emux_init_seq(emu, card, index); -#ifdef CONFIG_SND_SEQUENCER_OSS +#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) snd_emux_init_seq_oss(emu); #endif snd_emux_init_virmidi(emu, card); @@ -150,7 +150,7 @@ int snd_emux_free(struct snd_emux *emu) snd_emux_proc_free(emu); snd_emux_delete_virmidi(emu); -#ifdef CONFIG_SND_SEQUENCER_OSS +#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) snd_emux_detach_seq_oss(emu); #endif snd_emux_detach_seq(emu); diff --git a/sound/synth/emux/emux_effect.c b/sound/synth/emux/emux_effect.c index a447218b6160..9ac0bf531b4b 100644 --- a/sound/synth/emux/emux_effect.c +++ b/sound/synth/emux/emux_effect.c @@ -150,7 +150,7 @@ effect_get_offset(struct snd_midi_channel *chan, int lo, int hi, int mode) return addr; } -#ifdef CONFIG_SND_SEQUENCER_OSS +#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS) /* change effects - for OSS sequencer compatibility */ void snd_emux_send_effect_oss(struct snd_emux_port *port, diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c index 850fab4a8f3b..de19e108974a 100644 --- a/sound/synth/emux/emux_oss.c +++ b/sound/synth/emux/emux_oss.c @@ -23,8 +23,6 @@ */ -#ifdef CONFIG_SND_SEQUENCER_OSS - #include <linux/export.h> #include <linux/uaccess.h> #include <sound/core.h> @@ -505,5 +503,3 @@ fake_event(struct snd_emux *emu, struct snd_emux_port *port, int ch, int param, ev.data.control.value = val; snd_emux_event_input(&ev, 0, port, atomic, hop); } - -#endif /* CONFIG_SND_SEQUENCER_OSS */ |