Ignore:
Timestamp:
Apr 3, 2017, 4:51:56 PM (9 years ago)
Author:
David Azarewicz
Message:

Merged/reintegrated v2 branch into trunk. Trunk is now v2

Location:
GPL/trunk
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/drivers/opl3/opl3_midi.c

    r426 r598  
    3030extern int use_internal_drums;
    3131
     32static void snd_opl3_note_off_unsafe(void *p, int note, int vel,
     33                                     struct snd_midi_channel *chan);
    3234/*
    3335 * The next table looks magical, but it certainly is not. Its values have
     
    243245        int i;
    244246
    245         spin_lock_irqsave(&opl3->sys_timer_lock, flags);
     247        spin_lock_irqsave(&opl3->voice_lock, flags);
    246248        for (i = 0; i < opl3->max_voices; i++) {
    247249                struct snd_opl3_voice *vp = &opl3->voices[i];
    248250                if (vp->state > 0 && vp->note_off_check) {
    249251                        if (vp->note_off == jiffies)
    250                                 snd_opl3_note_off(opl3, vp->note, 0, vp->chan);
     252                                snd_opl3_note_off_unsafe(opl3, vp->note, 0,
     253                                                         vp->chan);
    251254                        else
    252255                                again++;
    253256                }
    254257        }
     258        spin_unlock_irqrestore(&opl3->voice_lock, flags);
     259
     260        spin_lock_irqsave(&opl3->sys_timer_lock, flags);
    255261        if (again) {
    256262                opl3->tlist.expires = jiffies + 1;      /* invoke again */
     
    659665 * Release a note in response to a midi note off.
    660666 */
    661 void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
     667static void snd_opl3_note_off_unsafe(void *p, int note, int vel,
     668                                     struct snd_midi_channel *chan)
    662669{
    663670        struct snd_opl3 *opl3;
     
    666673        struct snd_opl3_voice *vp;
    667674
    668         unsigned long flags;
    669 
    670675        opl3 = p;
    671676
     
    674679                   chan->number, chan->midi_program, note);
    675680#endif
    676 
    677         spin_lock_irqsave(&opl3->voice_lock, flags);
    678681
    679682        if (opl3->synth_mode == SNDRV_OPL3_MODE_SEQ) {
    680683                if (chan->drum_channel && use_internal_drums) {
    681684                        snd_opl3_drum_switch(opl3, note, vel, 0, chan);
    682                         spin_unlock_irqrestore(&opl3->voice_lock, flags);
    683685                        return;
    684686                }
     
    698700                }
    699701        }
     702}
     703
     704void snd_opl3_note_off(void *p, int note, int vel,
     705                       struct snd_midi_channel *chan)
     706{
     707        struct snd_opl3 *opl3 = p;
     708        unsigned long flags;
     709
     710        spin_lock_irqsave(&opl3->voice_lock, flags);
     711        snd_opl3_note_off_unsafe(p, note, vel, chan);
    700712        spin_unlock_irqrestore(&opl3->voice_lock, flags);
    701713}
  • GPL/trunk/alsa-kernel/drivers/opl3/opl3_synth.c

    r426 r598  
    2020 */
    2121
     22#include <linux/slab.h>
    2223#include <sound/opl3.h>
    2324#include <sound/asound_fm.h>
Note: See TracChangeset for help on using the changeset viewer.