Ejemplo n.º 1
0
static void
sb16midi_input_loop (void)
{
  while (input_avail ())
    {
      unsigned char   c = sb16midi_read ();

      if (sb16midi_opened & OPEN_READ)
	midi_input_intr (my_dev, c);
    }
}
Ejemplo n.º 2
0
static void
sb16midi_input_loop(void)
{
	while (input_avail()) {
		u_char   c = sb16midi_read();

		if (c == MPU_ACK)
			input_byte = c;
		else if (sb16midi_opened & OPEN_READ && midi_input_intr)
			midi_input_intr(my_dev, c);
	}
}
Ejemplo n.º 3
0
void
sb_midi_interrupt (int dummy)
{
  unsigned long   flags;
  unsigned char   data;

  DISABLE_INTR (flags);

  data = INB (DSP_READ);
  if (input_opened)
    midi_input_intr (my_dev, data);

  RESTORE_INTR (flags);
}
Ejemplo n.º 4
0
void
sb_midi_interrupt(int dummy)
{
    u_long   flags;
    u_char   data;

    flags = splhigh();

    data = inb(DSP_READ);
    if (input_opened)
	midi_input_intr(my_dev, data);

    splx(flags);
}
Ejemplo n.º 5
0
void
gus_midi_interrupt (int dummy)
{
  unsigned char   stat, data;
  unsigned long   flags;

  DISABLE_INTR (flags);

  stat = GUS_MIDI_STATUS ();

  if (stat & MIDI_RCV_FULL)
    {
      data = INB (u_MidiData);
      if (input_opened)
	midi_input_intr (my_dev, data);
    }

  if (stat & MIDI_XMIT_EMPTY)
    {
      while (qlen && dump_to_midi (tmp_queue[qhead]))
	{
	  qlen--;
	  qhead++;
	}

      if (!qlen)
	{
	  /*
	   * Disable Midi output interrupts, since no data in the buffer
	   */
	  gus_midi_control &= ~MIDI_ENABLE_XMIT;
	  OUTB (gus_midi_control, u_MidiControl);
	}
    }

#if 0
  if (stat & MIDI_FRAME_ERR)
    printk ("GUS: Midi framing error\n");
  if (stat & MIDI_OVERRUN && input_opened)
    printk ("GUS: Midi input overrun\n");
#endif

  RESTORE_INTR (flags);
}
Ejemplo n.º 6
0
static void uart6850_input_loop(void)
{
	int count = 10;

	while (count)
	{
		/*
		 * Not timed out
		 */
		if (input_avail())
		{
			unsigned char c = uart6850_read();
			count = 100;
			if (uart6850_opened & OPEN_READ)
				midi_input_intr(my_dev, c);
		}
		else
		{
			while (!input_avail() && count)
				count--;
		}
	}
}
Ejemplo n.º 7
0
void gus_midi_interrupt(int dummy)
{
	volatile unsigned char stat, data;
	unsigned long flags;
	int timeout = 10;

	save_flags(flags);
	cli();

	while (timeout-- > 0 && (stat = GUS_MIDI_STATUS()) & (MIDI_RCV_FULL | MIDI_XMIT_EMPTY))
	{
		if (stat & MIDI_RCV_FULL)
		{
			data = inb(u_MidiData);
			if (input_opened)
				midi_input_intr(my_dev, data);
		}
		if (stat & MIDI_XMIT_EMPTY)
		{
			while (qlen && dump_to_midi(tmp_queue[qhead]))
			{
				qlen--;
				qhead++;
			}
			if (!qlen)
			{
			      /*
			       * Disable Midi output interrupts, since no data in the buffer
			       */
			      gus_midi_control &= ~MIDI_ENABLE_XMIT;
			      outb((gus_midi_control), u_MidiControl);
			      outb((gus_midi_control), u_MidiControl);
			}
		}
	}
	restore_flags(flags);
}