/[openvortex]/alsa/pci/au88x0/au88x0_mpu401.c
ViewVC logotype

Diff of /alsa/pci/au88x0/au88x0_mpu401.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by vizard, Tue Apr 15 22:01:03 2003 UTC revision 1.2 by vizard, Tue Apr 22 02:52:03 2003 UTC
# Line 20  Line 20 
20   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   */   */
23    
24  #include <sound/driver.h>  #include <sound/driver.h>
25  #include <linux/time.h>  #include <linux/time.h>
26  #include <linux/init.h>  #include <linux/init.h>
# Line 47  int __devinit snd_vortex_midi(vortex_t * Line 47  int __devinit snd_vortex_midi(vortex_t *
47          int temp, mode;          int temp, mode;
48      mpu401_t *mpu;      mpu401_t *mpu;
49      int port;      int port;
50            
51  #ifdef VORTEX_MPU401_LEGACY  #ifdef VORTEX_MPU401_LEGACY
52      /* EnableHardCodedMPU401Port() */      /* EnableHardCodedMPU401Port() */
53      port  = (0x03 << 5); /* FIXME: static address. 0x330,0x331 */      port  = (0x03 << 5); /* FIXME: static address. 0x330,0x331 */
# Line 56  int __devinit snd_vortex_midi(vortex_t * Line 56  int __devinit snd_vortex_midi(vortex_t *
56  #else  #else
57      /* Enable MIDI Interface. */      /* Enable MIDI Interface. */
58          temp = (hwread(vortex->mmio, VORTEX_CTRL) & ~CTRL_MIDI_PORT) | CTRL_MIDI_EN;          temp = (hwread(vortex->mmio, VORTEX_CTRL) & ~CTRL_MIDI_PORT) | CTRL_MIDI_EN;
59          hwwrite(vortex->mmio, VORTEX_CTRL, temp);              hwwrite(vortex->mmio, VORTEX_CTRL, temp);
60  #endif  #endif
61        
62          /* Mpu401UartInit() */          /* Mpu401UartInit() */
63      mode = 1;      mode = 1;
64          temp = hwread(vortex->mmio, VORTEX_CTRL2) & 0xffff00cf;          temp = hwread(vortex->mmio, VORTEX_CTRL2) & 0xffff00cf;
# Line 68  int __devinit snd_vortex_midi(vortex_t * Line 68  int __devinit snd_vortex_midi(vortex_t *
68          /* Set some kind of mode */          /* Set some kind of mode */
69          if (mode)          if (mode)
70                  hwwrite(vortex->mmio, VORTEX_MIDI_CMD, MPU401_ENTER_UART);                  hwwrite(vortex->mmio, VORTEX_MIDI_CMD, MPU401_ENTER_UART);
71            
72          /* Check if anything is OK. */          /* Check if anything is OK. */
73          temp = hwread(vortex->mmio, VORTEX_MIDI_DATA);          temp = hwread(vortex->mmio, VORTEX_MIDI_DATA);
74          if (temp != MPU401_ACK /*0xfe*/) {          if (temp != MPU401_ACK /*0xfe*/) {
# Line 77  int __devinit snd_vortex_midi(vortex_t * Line 77  int __devinit snd_vortex_midi(vortex_t *
77          }          }
78          /* Enable MPU401 interrupts. */          /* Enable MPU401 interrupts. */
79          hwwrite(vortex->mmio, VORTEX_IRQ_CTRL, hwread(vortex->mmio, VORTEX_IRQ_CTRL) | IRQ_MIDI);          hwwrite(vortex->mmio, VORTEX_IRQ_CTRL, hwread(vortex->mmio, VORTEX_IRQ_CTRL) | IRQ_MIDI);
80            
81      /* Create MPU401 instance. */      /* Create MPU401 instance. */
82  #ifdef VORTEX_MPU401_LEGACY  #ifdef VORTEX_MPU401_LEGACY
83      if ((temp = snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_MPU401, 0x330, 0, 0, 0, &rmidi)) != 0) {      if ((temp = snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_MPU401, 0x330, 0, 0, 0, &rmidi)) != 0) {
# Line 95  int __devinit snd_vortex_midi(vortex_t * Line 95  int __devinit snd_vortex_midi(vortex_t *
95  #endif  #endif
96          return 0;          return 0;
97  }  }
   
 /* End of file */  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26