Changeset 604 for GPL/trunk/drv32
- Timestamp:
- Jan 8, 2018, 2:07:36 AM (8 years ago)
- Location:
- GPL/trunk/drv32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/drv32/Makefile
r596 r604 48 48 !endif 49 49 50 51 50 #=================================================================== 52 51 # … … 67 66 FILES += end.obj 68 67 69 LIBS = $(ALSA_LIB)\linuxlib.lib $(ALSA_LIB)\core.lib $(ALSA_LIB)\ac97.lib $(ALSA_LIB)\pci.lib $(ALSA_LIB)\ca0106.lib $(ALSA_LIB)\hda.lib $(ALSA_LIB)\sequencer.lib $(ALSA_LIB)\opl3.lib $(ALSA_LIB)\mpu401.lib $(ALSA_LIB)\synth.lib $(ALSA_LIB)\cs46xx.lib $(ALSA_LIB)\cs5535audio.lib $(ALSA_LIB)\emu10k1.lib $(ALSA_LIB)\ymfpci.lib $(ALSA_LIB)\ali5451.lib $(ALSA_LIB)\trident.lib $(ALSA_LIB)\nm256.lib $(ALSA_LIB)\sb.lib $(ALSA_LIB)\core_oss.lib 68 LIBS = $(ALSA_LIB)\linuxlib.lib $(ALSA_LIB)\core.lib $(ALSA_LIB)\ac97.lib $(ALSA_LIB)\pci.lib & 69 $(ALSA_LIB)\ca0106.lib $(ALSA_LIB)\hda.lib $(ALSA_LIB)\sequencer.lib $(ALSA_LIB)\opl3.lib & 70 $(ALSA_LIB)\mpu401.lib $(ALSA_LIB)\synth.lib $(ALSA_LIB)\cs46xx.lib $(ALSA_LIB)\cs5535audio.lib & 71 $(ALSA_LIB)\emu10k1.lib $(ALSA_LIB)\ymfpci.lib $(ALSA_LIB)\ali5451.lib $(ALSA_LIB)\trident.lib & 72 $(ALSA_LIB)\nm256.lib $(ALSA_LIB)\sb.lib $(ALSA_LIB)\core_oss.lib 70 73 WMAPNAME = $(OBJDIR)\$(TARGET).wmap 71 74 … … 100 103 @%write $^@ $(WATCOM)\lib386\os2\clib3r.lib 101 104 @%write $^@ $(WATCOM)\lib386\os2\os2386.lib 105 !ifdef %DRV32KIT 106 @%write $^@ $(%DRV32KIT)\drv32.lib 107 !endif 102 108 @%write $^@ $(DEFFILE) 103 109 !endif -
GPL/trunk/drv32/irq.c
r587 r604 51 51 BOOL ALSA_SetIrq(ULONG ulIrq, ULONG ulSlotNo, BOOL fShared) 52 52 { 53 USHORT rc = 1;53 USHORT rc = 1; 54 54 55 if( ulSlotNo >= MAX_IRQ_SLOTS ) { 56 DebugInt3(); 57 return FALSE; 58 } 55 if( ulSlotNo >= MAX_IRQ_SLOTS ) 56 { 57 DebugInt3(); 58 return FALSE; 59 } 59 60 60 if(fShared) 61 { 62 rc = DevIRQSet((WORD16) *pISR[ulSlotNo], 63 (WORD16)ulIrq, 64 1 ); // first try shared shared 65 } 61 if(fShared) 62 { 63 rc = DevIRQSet((WORD16) *pISR[ulSlotNo], (WORD16)ulIrq, 1 ); // first try shared shared 64 } 66 65 67 if (rc != 0) { // If error ... 68 rprintf(("ERROR: RMSetIrq %d %d %x - failed to set shared - trying exclusive!!", ulIrq, fShared, ulSlotNo)); 69 rc = DevIRQSet((WORD16) *pISR[ulSlotNo], 70 (WORD16)ulIrq, 71 0); // failed, so try exclusive instead 72 } 66 if (rc != 0) 67 { // If error ... 68 rprintf(("ERROR: RMSetIrq %d %d %x - failed to set shared - trying exclusive!!", ulIrq, fShared, ulSlotNo)); 69 rc = DevIRQSet((WORD16) *pISR[ulSlotNo], (WORD16)ulIrq, 0); // failed, so try exclusive instead 70 } 73 71 74 if (rc != 0) { // If error ... 75 rprintf(("ERROR: RMSetIrq %d %d %x FAILED shared and exclusive mode!!", ulIrq, fShared, ulSlotNo)); 76 DebugInt3(); 77 return FALSE; 78 } 72 if (rc != 0) 73 { // If error ... 74 rprintf(("ERROR: RMSetIrq %d %d %x FAILED shared and exclusive mode!!", ulIrq, fShared, ulSlotNo)); 75 DebugInt3(); 76 return FALSE; 77 } 79 78 80 return TRUE;79 return TRUE; 81 80 } 82 81 … … 84 83 BOOL ALSA_FreeIrq(ULONG ulIrq) 85 84 { 86 return (DevIRQClear((WORD16)ulIrq) == 0);85 return (DevIRQClear((WORD16)ulIrq) == 0); 87 86 } 88 87 … … 91 90 ULONG ALSA_Interrupt(ULONG ulSlotNo) 92 91 { 93 ULONGulIrqNo;92 ULONG ulIrqNo; 94 93 95 // enable interrupts that have higher priority we should 96 // allow higher priority interrupts 97 sti(); 98 if( process_interrupt(ulSlotNo, &ulIrqNo) ) { 99 DbgInt.ulIntServiced[DbgInt.ulState]++; 100 // We've cleared all service requests. 101 // Clear (disable) Interrupts, Send EOI 102 // and clear the carry flag (tells OS/2 kernel that Int was handled). 103 // Note carry flag is handled in setup.asm 104 cli(); 105 DevEOI( (WORD16)ulIrqNo ); 106 return TRUE; 107 } 108 DbgInt.ulIntUnserviced[DbgInt.ulState]++; 109 // Indicate Interrupt not serviced by setting carry flag before 110 // returning to OS/2 kernel. OS/2 will then shut down the interrupt! 111 // NOTE: Make sure interrupts are not turned on again when this irq isn't ours! 112 return FALSE; 94 // enable interrupts that have higher priority we should 95 // allow higher priority interrupts 96 sti(); 97 if( process_interrupt(ulSlotNo, &ulIrqNo) ) 98 { 99 DbgInt.ulIntServiced[DbgInt.ulState]++; 100 // We've cleared all service requests. 101 // Clear (disable) Interrupts, Send EOI 102 // and clear the carry flag (tells OS/2 kernel that Int was handled). 103 // Note carry flag is handled in setup.asm 104 cli(); 105 DevEOI( (WORD16)ulIrqNo ); 106 return TRUE; 107 } 108 DbgInt.ulIntUnserviced[DbgInt.ulState]++; 109 // Indicate Interrupt not serviced by setting carry flag before 110 // returning to OS/2 kernel. OS/2 will then shut down the interrupt! 111 // NOTE: Make sure interrupts are not turned on again when this irq isn't ours! 112 return FALSE; 113 113 } 114 114
Note:
See TracChangeset
for help on using the changeset viewer.
