Changeset 493
- Timestamp:
- Jul 3, 2010, 7:26:36 PM (15 years ago)
- Location:
- GPL/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/drv32/idc.c
r479 r493 145 145 } 146 146 147 case IDC32_WAVE_GETSTATUS: 148 { 149 ULONG status = 0; 150 rc = OSS32_WaveGetStatus(pPacket->streamid, &status); 151 pPacket->status.state = status; 152 return rc; 153 } 154 147 155 case IDC32_WAVE_SETVOLUME: 148 156 return OSS32_WaveSetVolume(pPacket->streamid, pPacket->setwavevol.volume); … … 225 233 return OSS32_MidiCommand(pPacket->streamid, cmd, pPacket->midicmd.channel, pPacket->midicmd.param1, pPacket->midicmd.param2); 226 234 } 227 return 0; 235 236 return OSSERR_INVALID_PARAMETER; 228 237 } -
GPL/trunk/drv32/startup.asm
r375 r493 1 ; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ 1 ; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ 2 2 ;* 3 3 ;* 16bit entrypoints to the PDD with thunks to the 32bit functions … … 52 52 public _RM_Help3 53 53 public _RMFlags 54 IFDEF DEBUG 55 public DbgU32TimerCnt 56 public DbgU32IntCnt 57 ENDIF 54 58 55 59 ;********************************************************************************************* … … 123 127 InitPktSeg dw 0 124 128 InitPktOff dw 0 129 IFDEF DEBUG 130 DbgU32TimerCnt dd 0 131 DbgU32IntCnt dd 0 132 ENDIF 125 133 ;needed for rmcalls.lib 126 134 _RM_Help0 dd 0 … … 165 173 cmp eax, 04h ; DosRead 166 174 je uniaud_stub_strategy 167 175 168 176 enter 0, 0 169 177 and sp, 0fffch ; align stack 170 178 171 pushad 179 pushad 172 180 push ds 173 181 push es … … 235 243 and sp, 0fffch ; align stack 236 244 237 pushad 245 pushad 238 246 push ds 239 247 push es … … 328 336 ; device_init 329 337 ; 330 ; Use DosOpen to tell the 1st driver to handle init for us. We must do it this 338 ; Use DosOpen to tell the 1st driver to handle init for us. We must do it this 331 339 ; way since right now our CPL is 3 and the flat code selector has DPL 0, so 332 340 ; we can't load it. In the open strategy request, CPL is 0 … … 600 608 call near ptr _CallRM 601 609 mov sp,bp 602 ret16 610 ret16 603 611 DeAllocL1: test byte ptr _RMFlags,02H 604 612 je short DeAllocL2 605 613 sub ax,ax 606 ret16 614 ret16 607 615 DeAllocL2: mov ax,0001H 608 ret16 616 ret16 609 617 _RMDeallocResourceOrg endp 610 618 … … 622 630 623 631 ALIGN 2 624 PUBLIC MY_DEVHELP_ATTACHDD 632 PUBLIC MY_DEVHELP_ATTACHDD 625 633 MY_DEVHELP_ATTACHDD proc near 626 634 push bp … … 638 646 pop es 639 647 pop di 640 leave 648 leave 641 649 ret 0004H 642 650 L2: pop es … … 659 667 call near ptr _CallRM 660 668 add sp,0006H 661 ret16 669 ret16 662 670 CreateDrL4: test byte ptr _RMFlags,02H 663 671 je short CreateDrL6 … … 670 678 pop bx 671 679 pop es 672 ret16 680 ret16 673 681 CreateDrL6: mov ax, word ptr DevHelpInit + 2H 674 682 or ax, word ptr DevHelpInit 675 683 jne short CreateDrL7 676 684 mov ax,0008H 677 ret16 685 ret16 678 686 CreateDrL7: push offset ResMgr 679 687 push offset _RMIDCTable … … 708 716 709 717 ALIGN 2 710 PUBLIC _CallRM 718 PUBLIC _CallRM 711 719 _CallRM proc near 712 720 enter 0002H,00H … … 719 727 call dword ptr _RM_Help3 720 728 add sp,0006H 721 leave 729 leave 722 730 ret 723 731 L1: push word ptr +6H[bp] 724 732 call dword ptr _RM_Help0 725 leave 733 leave 726 734 ret 727 735 _CallRM endp … … 733 741 pop word ptr -2H[bp] 734 742 mov ax,word ptr -2H[bp] 735 leave 736 ret 743 leave 744 ret 737 745 _GetCS endp 738 746 … … 754 762 je short DestroyDrvL2 755 763 sub ax,ax 756 ret16 764 ret16 757 765 DestroyDrvL2: mov ax,0001H 758 766 ret16 … … 788 796 GetNodeInfo_L1: mov ax,0014H 789 797 ret16 790 nop 798 nop 791 799 GetNodeInfo_L2: test byte ptr _RMFlags,02H 792 800 je short GetNodeInfo_L3 … … 799 807 ALIGN 2 800 808 PUBLIC _RMGetNodeInfo16 801 _RMGetNodeInfo16 proc far 809 _RMGetNodeInfo16 proc far 802 810 enter32 803 811 xor eax, eax … … 825 833 mov sp,bp 826 834 ret16 827 RMDevIDToHandleList_L1: 835 RMDevIDToHandleList_L1: 828 836 mov ax,0014H 829 837 ret16 830 nop 831 RMDevIDToHandleList_L2: 838 nop 839 RMDevIDToHandleList_L2: 832 840 test byte ptr _RMFlags,02H 833 841 je short RMDevIDToHandleList_L3 834 842 sub ax,ax 835 843 ret16 836 nop 837 RMDevIDToHandleList_L3: 844 nop 845 RMDevIDToHandleList_L3: 838 846 mov ax,0001H 839 847 ret16 840 nop 848 nop 841 849 _RMDevIDToHandleListOrg endp 842 850 843 851 ALIGN 2 844 852 PUBLIC _RMDevIDToHandleList16 845 _RMDevIDToHandleList16 proc far 853 _RMDevIDToHandleList16 proc far 846 854 enter32 847 855 xor eax, eax … … 874 882 call near ptr _CallRM 875 883 ret16 876 nop 884 nop 877 885 RMHandleToResourceHandleList_L1: 878 886 mov ax,0014H 879 887 ret16 880 nop 888 nop 881 889 RMHandleToResourceHandleList_L2: 882 890 test byte ptr _RMFlags,02H … … 884 892 sub ax,ax 885 893 ret16 886 nop 894 nop 887 895 RMHandleToResourceHandleList_L3: 888 896 mov ax,0001H 889 897 ret16 890 nop 898 nop 891 899 _RMHandleToResourceHandleListOrg endp 892 900 893 901 ALIGN 2 894 902 PUBLIC _RMHandleToResourceHandleList16 895 _RMHandleToResourceHandleList16 proc far 903 _RMHandleToResourceHandleList16 proc far 896 904 enter32 897 905 xor eax, eax … … 1082 1090 shr edx, 13 1083 1091 and edx, 3 1084 1092 1085 1093 ;has the OS/2 kernel finally changed the DPL to 0? 1086 1094 cmp edx, 0 … … 1089 1097 mov SelRef, 0 1090 1098 jmp short @@endchange 1091 1099 1092 1100 @@changedpl: 1093 1101 mov oldDPL, eax … … 1101 1109 inc SelRef 1102 1110 @@fixdpl_end: 1103 ret 1104 FixSelDPL endp 1111 ret 1112 FixSelDPL endp 1105 1113 ;;****************************************************************************** 1106 1114 ; RestoreSelDPL: … … 1114 1122 cmp fWrongDPL, 1 1115 1123 jne short @@restdpl_end 1116 1124 1117 1125 cmp SelRef, 1 1118 1126 jne short @@restdpl_endrest … … 1138 1146 ;******************************************************************************* 1139 1147 ;Copy parameters to 16 bits stack and call 16:32 IDC handler 1140 ; 1148 ; 1141 1149 ; Paramters: IDC16_HANDLER pHandler 1142 1150 ; ULONG cmd … … 1159 1167 call fword ptr [ebx] 1160 1168 add sp, 12 1161 1169 1162 1170 DevThunkStackTo32_Int 1163 1171 … … 1198 1206 cmp eax, 0 1199 1207 jne @@stackswitchfail_strat 1200 1208 1201 1209 call ALSA_STRATEGY 1202 1210 … … 1224 1232 ;******************************************************************************* 1225 1233 ALIGN 4 1226 IDC_ proc far 1234 IDC_ proc far 1227 1235 push ds 1228 1236 push es … … 1261 1269 ;******************************************************************************* 1262 1270 ALIGN 4 1263 TIMER_ proc far 1271 TIMER_ proc far 1264 1272 push ds 1265 1273 push es … … 1271 1279 mov es, eax 1272 1280 1281 IFDEF DEBUG 1282 add DbgU32TimerCnt, 1 1283 ENDIF 1284 1273 1285 IFDEF FLATSTACK 1274 1286 DevThunkStackTo32 … … 1285 1297 int 3 1286 1298 call ALSA_TIMER_ 1299 ENDIF 1300 IFDEF DEBUG 1301 add DbgU32TimerCnt, -1 1287 1302 ENDIF 1288 1303 … … 1316 1331 1317 1332 pushfd 1333 1334 IFDEF DEBUG 1335 add DbgU32IntCnt, 1 1336 ENDIF 1337 1318 1338 ; At this point a cli is redundant 1319 1339 ; we enter the interrupt handler with interrupts disabled. … … 1329 1349 1330 1350 DevThunkStackTo16 1331 1351 1332 1352 @@stackswitchfail_irq: 1333 1353 ELSE … … 1336 1356 ENDIF 1337 1357 1358 IFDEF DEBUG 1359 add DbgU32IntCnt, -1 1360 ENDIF 1361 1338 1362 ;restore flags 1339 1363 popfd … … 1348 1372 1349 1373 endofirq: 1350 1374 1351 1375 pop gs 1352 1376 pop fs … … 1534 1558 1535 1559 stackbase dd 0 1536 stacksel dd 0 1560 stacksel dd 0 1537 1561 ELSE 1538 1562 … … 1560 1584 _MSG_TABLE32 dw OFFSET DATA16:_MSG_TABLE16 1561 1585 dw SEG DATA16:_MSG_TABLE16 1562 1563 ;16:16 address of driver name 1586 1587 ;16:16 address of driver name 1564 1588 PDDName dw OFFSET DATA16:pddname16 1565 1589 dw SEG DATA16:pddname16 -
GPL/trunk/include/ossidc.h
r485 r493 41 41 typedef struct 42 42 { 43 OSSSTREAMID streamid; //IN: stream id 44 ULONG fileid; 45 union { 46 struct { 47 ULONG handler16; //IN: 16:16 address of pdd idc handler 48 } init; 49 struct { 50 ULONG devicenr; //IN: nr of detected device 51 ULONG streamtype; //IN: stream type 52 } open; 53 struct { 54 ULONG devicenr; //IN: nr of detected device 55 ULONG pDevCaps; //IN: 16:16 stack based pointer to OSS32_DEVCAPS structure 56 } devcaps; 57 struct { 58 ULONG position; //OUT: stream position 59 } getpos; 60 struct { 61 ULONG hwparams; //IN: 16:16 pointer to OSS32_HWPARAMS structure 62 } sethwparams; 63 struct { 64 ULONG bytesavail; //OUT: bytes available in dma buffer 65 } getspace; 66 struct { 67 ULONG volume; //IN: wave stream volume 68 } setwavevol; 69 struct { 70 ULONG buffer; //IN: physical address of mmpm/2 buffer 71 ULONG size; //IN: size of mmpm/2 buffer 72 ULONG transferred; //OUT: nr of bytes transferred 73 } buffer; 74 struct { 75 ULONG midiByte; 76 } midiwrite; 77 struct { 78 ULONG buffer; //IN: data buffer 79 ULONG bufsize; //IN: size of data buffer 80 ULONG transferred; //OUT: nr of bytes transferred 81 } midiread; 82 struct { 83 ULONG pCaps; //IN: 16:16 stack based pointer to OSSMIDICAPS structure 84 } midicaps; 85 struct { 86 BYTE channel; //IN: channel nr 87 BYTE param1; //IN: midi command parameter 1 88 BYTE param2; //IN: midi command parameter 2 89 } midicmd; 90 struct { 91 ULONG line; //IN: mixer line 92 ULONG volume; //IN/OUT: volume (set/get) 93 } mixvol; 94 struct { 95 ULONG property; //IN: mixer property 96 ULONG value; //IN/OUT: property value (set/get) 97 } mixprop; 98 struct { 99 ULONG pCaps; //IN: 16:16 stack based pointer to OSSMIXCAPS structure 100 } mixcaps; 101 struct { 102 ULONG param1; 103 ULONG param2; 104 ULONG param3; 43 OSSSTREAMID streamid; //IN: stream id 44 ULONG fileid; 45 union { 46 struct { 47 ULONG handler16; //IN: 16:16 address of pdd idc handler 48 } init; 49 struct { 50 ULONG devicenr; //IN: nr of detected device 51 ULONG streamtype; //IN: stream type 52 } open; 53 struct { 54 ULONG devicenr; //IN: nr of detected device 55 ULONG pDevCaps; //IN: 16:16 stack based pointer to OSS32_DEVCAPS structure 56 } devcaps; 57 struct { 58 ULONG position; //OUT: stream position 59 } getpos; 60 struct { 61 ULONG state; //OUT: stream state 62 } status; 63 struct { 64 ULONG hwparams; //IN: 16:16 pointer to OSS32_HWPARAMS structure 65 } sethwparams; 66 struct { 67 ULONG bytesavail; //OUT: bytes available in dma buffer 68 } getspace; 69 struct { 70 ULONG volume; //IN: wave stream volume 71 } setwavevol; 72 struct { 73 ULONG buffer; //IN: physical address of mmpm/2 buffer 74 ULONG size; //IN: size of mmpm/2 buffer 75 ULONG transferred; //OUT: nr of bytes transferred 76 } buffer; 77 struct { 78 ULONG midiByte; 79 } midiwrite; 80 struct { 81 ULONG buffer; //IN: data buffer 82 ULONG bufsize; //IN: size of data buffer 83 ULONG transferred; //OUT: nr of bytes transferred 84 } midiread; 85 struct { 86 ULONG pCaps; //IN: 16:16 stack based pointer to OSSMIDICAPS structure 87 } midicaps; 88 struct { 89 BYTE channel; //IN: channel nr 90 BYTE param1; //IN: midi command parameter 1 91 BYTE param2; //IN: midi command parameter 2 92 } midicmd; 93 struct { 94 ULONG line; //IN: mixer line 95 ULONG volume; //IN/OUT: volume (set/get) 96 } mixvol; 97 struct { 98 ULONG property; //IN: mixer property 99 ULONG value; //IN/OUT: property value (set/get) 100 } mixprop; 101 struct { 102 ULONG pCaps; //IN: 16:16 stack based pointer to OSSMIXCAPS structure 103 } mixcaps; 104 struct { 105 ULONG param1; 106 ULONG param2; 107 ULONG param3; 108 }; 105 109 }; 106 };107 110 } IDC32_PACKET, NEAR *PIDC32_PACKET; 108 111 … … 165 168 #define IDC32_WAVE_SETVOLUME 0x1C 166 169 #define IDC32_WAVE_GETHWPTR 0x1D 170 #define IDC32_WAVE_GETSTATUS 0x1E 167 171 168 172 #define IDC32_MIXER_OPEN 0x20 -
GPL/trunk/include/ossidc32.h
r386 r493 59 59 OSSRET OSS32_WaveGetSpace(OSSSTREAMID streamid, ULONG *pBytesAvail); 60 60 OSSRET OSS32_WaveGetHwPtr(OSSSTREAMID streamid, ULONG *pBytesAvail); 61 OSSRET OSS32_WaveGetStatus(OSSSTREAMID streamid, ULONG *pStatus); 61 62 OSSRET OSS32_WaveSetVolume(OSSSTREAMID streamid, ULONG volume); 62 63 -
GPL/trunk/include/watcom32.mak
r433 r493 14 14 !if "$(DEBUG)" == "1" 15 15 CFLAGS = -dDEBUG -bt=os2v2 -e60 -hc -d2 -5r -omlinear -s -w4 -ze -zdp -zl -zq -nt=CODE32 -zff -zgf 16 CPPFLAGS= -xd 17 ASFLAGS = - Mb -Li -Sv:M51016 CPPFLAGS= -xd 17 ASFLAGS = -D:DEBUG -Mb -Li -Sv:M510 18 18 !else 19 19 CFLAGS = -bt=os2v2 -e60 -5r -omlinear -s -w4 -ze -zdp -zl -zq -nt=CODE32 -zff -zgf 20 CPPFLAGS= -xd 20 CPPFLAGS= -xd 21 21 ASFLAGS = -Mb -Li -Sv:M510 22 22 !endif … … 111 111 @set WATCOM=$(WATCOM) 112 112 @if not exist .\$(OBJDIR) $(CREATEPATH) .\$(OBJDIR) 113 @if not exist $(ALSA_LIB_) mkdir $(ALSA_LIB_) 113 @if not exist $(ALSA_LIB_) mkdir $(ALSA_LIB_) 114 114 @if not exist $(ALSA_LIB) mkdir $(ALSA_LIB) 115 @if not exist $(ALSA_BIN_) mkdir $(ALSA_BIN_) 115 @if not exist $(ALSA_BIN_) mkdir $(ALSA_BIN_) 116 116 @if not exist $(ALSA_BIN) mkdir $(ALSA_BIN) 117 117 -
GPL/trunk/lib32/sound.c
r484 r493 1208 1208 struct snd_pcm_status status; 1209 1209 int ret; 1210 ULONG delta;1211 1210 1212 1211 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { … … 1273 1272 struct snd_pcm_status status; 1274 1273 int ret; 1275 ULONG delta;1276 1274 1277 1275 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { … … 1298 1296 return OSSERR_SUCCESS; 1299 1297 } 1300 1298 //****************************************************************************** 1299 //****************************************************************************** 1300 OSSRET OSS32_WaveGetStatus(ULONG streamid, ULONG *pStatus) 1301 { 1302 soundhandle *pHandle = (soundhandle *)streamid; 1303 struct snd_pcm_status status; 1304 int ret; 1305 1306 if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) { 1307 DebugInt3(); 1308 return OSSERR_INVALID_STREAMID; 1309 } 1310 if(pStatus == NULL) { 1311 DebugInt3(); 1312 return OSSERR_INVALID_PARAMETER; 1313 } 1314 1315 //set operation to non-blocking 1316 pHandle->file.f_flags = O_NONBLOCK; 1317 1318 //Get the status of the stream 1319 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)__Stack32ToFlat(&status)); 1320 1321 if(ret) { 1322 DebugInt3(); 1323 return UNIXToOSSError(ret); 1324 } 1325 1326 *pStatus = status.state; 1327 return OSSERR_SUCCESS; 1328 } 1301 1329 //****************************************************************************** 1302 1330 //****************************************************************************** -
GPL/trunk/uniaud.inc
r485 r493 7 7 # BUILDVERSION must be 3 parts, and only numbers like 5.44.108 8 8 # It is best that 2'nd number is always 2 digits, eg at least 10 9 BUILDVERSION = 1.9.2 29 BUILDVERSION = 1.9.23 10 10 11 11 # Fixpack version … … 13 13 # ex RC3 GA FIXPACK2 beta_47 14 14 # Comment out to avoid a fixpack line in bldlevel 15 FIXPACK = SVN r4 8515 FIXPACK = SVN r492 16 16 17 17 # ALSA BUILD VERSION
Note:
See TracChangeset
for help on using the changeset viewer.