diff options
Diffstat (limited to 'sound/drivers/opl3')
| -rw-r--r-- | sound/drivers/opl3/opl3_lib.c | 5 | ||||
| -rw-r--r-- | sound/drivers/opl3/opl3_midi.c | 9 | ||||
| -rw-r--r-- | sound/drivers/opl3/opl3_oss.c | 1 | ||||
| -rw-r--r-- | sound/drivers/opl3/opl3_seq.c | 3 | ||||
| -rw-r--r-- | sound/drivers/opl3/opl3_synth.c | 3 |
5 files changed, 14 insertions, 7 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index 6e31e46ca39..f66af5884c4 100644 --- a/sound/drivers/opl3/opl3_lib.c +++ b/sound/drivers/opl3/opl3_lib.c @@ -26,6 +26,7 @@ #include <sound/opl3.h> #include <asm/io.h> #include <linux/delay.h> +#include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/ioport.h> @@ -500,10 +501,8 @@ int snd_opl3_hwdep_new(struct snd_opl3 * opl3, hw->private_data = opl3; hw->exclusive = 1; #ifdef CONFIG_SND_OSSEMUL - if (device == 0) { + if (device == 0) hw->oss_type = SNDRV_OSS_DEVICE_TYPE_DMFM; - sprintf(hw->oss_dev, "dmfm%i", card->number); - } #endif strcpy(hw->name, hw->id); switch (opl3->hardware & OPL3_HW_MASK) { diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index 7d722a025d0..6c6d09a51f4 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c @@ -27,7 +27,7 @@ extern char snd_opl3_regmap[MAX_OPL2_VOICES][4]; -extern int use_internal_drums; +extern bool use_internal_drums; static void snd_opl3_note_off_unsafe(void *p, int note, int vel, struct snd_midi_channel *chan); @@ -163,7 +163,7 @@ static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op, struct best *bp; for (i = 0; i < END; i++) { - best[i].time = (unsigned int)(-1); /* XXX MAX_?INT really */; + best[i].time = (unsigned int)(-1); /* XXX MAX_?INT really */ best[i].voice = -1; } @@ -390,6 +390,11 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) voice = snd_opl3_oss_map[chan->number]; } + if (voice < 0) { + spin_unlock_irqrestore(&opl3->voice_lock, flags); + return; + } + if (voice < MAX_OPL2_VOICES) { /* Left register block for voices 0 .. 8 */ reg_side = OPL3_LEFT; diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c index ade3ca52422..c1cb249acfa 100644 --- a/sound/drivers/opl3/opl3_oss.c +++ b/sound/drivers/opl3/opl3_oss.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/export.h> #include "opl3_voice.h" static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure); diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c index 2d33f53d36b..68399538e43 100644 --- a/sound/drivers/opl3/opl3_seq.c +++ b/sound/drivers/opl3/opl3_seq.c @@ -25,13 +25,14 @@ #include "opl3_voice.h" #include <linux/init.h> #include <linux/moduleparam.h> +#include <linux/module.h> #include <sound/initval.h> MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ALSA driver for OPL3 FM synth"); -int use_internal_drums = 0; +bool use_internal_drums = 0; module_param(use_internal_drums, bool, 0444); MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums."); diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c index 301acb6b9cf..ddcc1a325a6 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -20,10 +20,11 @@ */ #include <linux/slab.h> +#include <linux/export.h> #include <sound/opl3.h> #include <sound/asound_fm.h> -#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) +#if IS_ENABLED(CONFIG_SND_SEQUENCER) #define OPL3_SUPPORT_SYNTH #endif |
