diff options
Diffstat (limited to 'sound/drivers/opl3')
| -rw-r--r-- | sound/drivers/opl3/opl3_lib.c | 4 | ||||
| -rw-r--r-- | sound/drivers/opl3/opl3_midi.c | 5 | ||||
| -rw-r--r-- | sound/drivers/opl3/opl3_synth.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c index 33d9a857a26..f66af5884c4 100644 --- a/sound/drivers/opl3/opl3_lib.c +++ b/sound/drivers/opl3/opl3_lib.c @@ -501,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 0c796bcbc0a..6c6d09a51f4 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c @@ -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_synth.c b/sound/drivers/opl3/opl3_synth.c index 742a4b642fd..ddcc1a325a6 100644 --- a/sound/drivers/opl3/opl3_synth.c +++ b/sound/drivers/opl3/opl3_synth.c @@ -24,7 +24,7 @@ #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 |
