mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]>
This commit is contained in:
parent
eb3b705aae
commit
3d774d5ef0
11 changed files with 22 additions and 28 deletions
|
|
@ -252,7 +252,7 @@ static int snd_opl3_seq_probe(struct device *_dev)
|
|||
spin_lock_init(&opl3->sys_timer_lock);
|
||||
opl3->sys_timer_status = 0;
|
||||
|
||||
#ifdef CONFIG_SND_SEQUENCER_OSS
|
||||
#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
|
||||
snd_opl3_init_seq_oss(opl3, name);
|
||||
#endif
|
||||
return 0;
|
||||
|
|
@ -267,7 +267,7 @@ static int snd_opl3_seq_remove(struct device *_dev)
|
|||
if (opl3 == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef CONFIG_SND_SEQUENCER_OSS
|
||||
#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
|
||||
snd_opl3_free_seq_oss(opl3);
|
||||
#endif
|
||||
if (opl3->seq_client >= 0) {
|
||||
|
|
|
|||
|
|
@ -44,9 +44,12 @@ void snd_opl3_load_drums(struct snd_opl3 *opl3);
|
|||
void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);
|
||||
|
||||
/* Prototypes for opl3_oss.c */
|
||||
#ifdef CONFIG_SND_SEQUENCER_OSS
|
||||
#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
|
||||
void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name);
|
||||
void snd_opl3_free_seq_oss(struct snd_opl3 *opl3);
|
||||
#else
|
||||
#define snd_opl3_init_seq_oss(opl3, name) /* NOP */
|
||||
#define snd_opl3_free_seq_oss(opl3) /* NOP */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue