Changeset 655
- Timestamp:
- Jan 24, 2021, 9:19:48 AM (5 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/drv32/devhlp.asm
r435 r655 25 25 .386p 26 26 27 include bseerr.inc28 include devhlp.inc29 27 include segments.inc 30 28 29 IFNDEF KEE 30 include devhlp.inc 31 31 DosTable2 struc 32 32 d2_ErrMap24 dd ? … … 52 52 53 53 DATA32 segment 54 public DevHelp3255 54 public intSwitchStack 56 57 DevHelp32 dd 0 55 public _TKSSBase 58 56 intSwitchStack dd 0 59 60 public _TKSSBase61 57 _TKSSBase dd 0 62 58 63 59 DATA32 ends 64 60 ENDIF 65 61 66 62 CODE32 segment 67 63 ASSUME CS:FLAT, DS:FLAT, ES:FLAT 68 64 69 public iodelay32_ 70 65 IFNDEF KEE 71 66 extrn DevHlp : near 72 extrn DOSIODELAYCNT : ABS73 74 67 ALIGN 4 75 76 68 public GetTKSSBase 77 78 69 GetTKSSBase proc near 79 70 push ebp … … 131 122 ret 132 123 GetTKSSBase endp 124 ENDIF 125 126 public iodelay32_ 127 extrn DOSIODELAYCNT : ABS 133 128 134 129 ALIGN 4 -
GPL/branches/uniaud32-next/drv32/init.c
r649 r655 203 203 char FAR48 *args; 204 204 205 #if def KEE205 #ifndef KEE 206 206 GetTKSSBase(); 207 207 #endif 208 //_asm int 3;209 208 210 209 DebugLevel = 1; -
GPL/branches/uniaud32-next/drv32/startup.asm
r577 r655 1039 1039 extrn ALSA_TIMER_ : near 1040 1040 extrn ALSA_Interrupt : near 1041 extrn GetTKSSBase : near1042 1041 extrn _rdOffset: dword 1043 1042 … … 1046 1045 extrn KernThunkStackTo32 : near 1047 1046 ELSE 1047 extrn GetTKSSBase : near 1048 1048 extrn StackAlloc : near 1049 1049 extrn StackFree : near … … 1067 1067 DevHelpDebug endp 1068 1068 1069 ALIGN 41070 1069 1071 1070 ALIGN 4 1072 1071 DevHlp proc near 1073 IFDEF FLATSTACK1074 1072 DevThunkStackTo16_Int 1075 ENDIF1076 1077 1073 jmp far ptr CODE16:thunk3216_devhelp 1078 1074 ALIGN 4 1079 1075 thunk1632_devhelp: 1080 IFDEF FLATSTACK1081 1076 DevThunkStackTo32_Int 1082 ENDIF1083 1077 ret 1084 1078 DevHlp endp … … 1086 1080 ALIGN 4 1087 1081 DevHlp_ModifiedDS proc near 1088 IFDEF FLATSTACK1089 1082 DevThunkStackTo16_Int 1090 ENDIF1091 1083 jmp far ptr CODE16:thunk3216_devhelp_modified_ds 1092 1084 ALIGN 4 1093 1085 thunk1632_devhelp_modified_ds: 1094 IFDEF FLATSTACK1095 1086 DevThunkStackTo32_Int 1096 ENDIF1097 1087 ret 1098 1088 DevHlp_ModifiedDS endp … … 1222 1212 push fs 1223 1213 push gs 1224 1225 1214 mov eax, DOS32FLATDS 1226 1215 mov ds, eax 1227 1216 mov es, eax 1228 1229 IFDEF FLATSTACK1230 1231 1217 IFNDEF KEE 1232 1218 ;done in init.cpp for the KEE version 1233 1219 cmp dword ptr [intSwitchStack], 0 1234 1220 jne stratcontinue 1235 1236 1221 ;get TKSSBase & intSwitchStack pointers 1237 1222 call GetTKSSBase 1238 1223 stratcontinue: 1239 1224 ENDIF 1240 1241 1225 DevThunkStackTo32 1242 1226 cmp eax, 0 1243 1227 jne @@stackswitchfail_strat 1244 1245 1228 call ALSA_STRATEGY 1246 1247 1229 DevThunkStackTo16 1248 1249 1230 @@stackswitchfail_strat: 1250 ELSE1251 int 31252 call ALSA_STRATEGY1253 ENDIF1254 1255 1231 pop gs 1256 1232 pop fs … … 1273 1249 push fs 1274 1250 push gs 1275 1276 1251 mov eax, DOS32FLATDS 1277 1252 mov ds, eax 1278 1253 mov es, eax 1279 1280 IFDEF FLATSTACK1281 1254 DevThunkStackTo32 1282 1255 cmp eax, 0 1283 1256 jne @@stackswitchfail_idc 1284 1285 1257 call ALSA_IDC 1286 1287 1258 DevThunkStackTo16 1288 1289 1259 @@stackswitchfail_idc: 1290 1291 ELSE1292 int 31293 call ALSA_IDC1294 ENDIF1295 1296 1260 pop gs 1297 1261 pop fs … … 1310 1274 push fs 1311 1275 push gs 1312 1313 1276 mov eax, DOS32FLATDS 1314 1277 mov ds, eax 1315 1278 mov es, eax 1316 1317 1279 IFDEF DEBUG 1318 1280 add DbgU32TimerCnt, 1 1319 1281 ENDIF 1320 1321 IFDEF FLATSTACK1322 1282 DevThunkStackTo32 1323 1283 cmp eax, 0 1324 1284 jne @@stackswitchfail_timer 1325 1326 1285 call ALSA_TIMER_ 1327 1328 1286 DevThunkStackTo16 1329 1330 1287 @@stackswitchfail_timer: 1331 1332 ELSE1333 int 31334 call ALSA_TIMER_1335 ENDIF1336 1288 IFDEF DEBUG 1337 1289 add DbgU32TimerCnt, -1 1338 1290 ENDIF 1339 1340 1291 pop gs 1341 1292 pop fs … … 1355 1306 enter 0, 0 1356 1307 and sp, 0fffch ; align stack 1357 1358 1308 pushad 1359 1309 push ds … … 1361 1311 push fs 1362 1312 push gs 1363 1364 1313 mov eax, DOS32FLATDS 1365 1314 mov ds, eax 1366 1315 mov es, eax 1367 1368 1316 pushfd 1369 1370 1317 IFDEF DEBUG 1371 1318 add DbgU32IntCnt, 1 1372 1319 ENDIF 1373 1374 1320 ; At this point a cli is redundant 1375 1321 ; we enter the interrupt handler with interrupts disabled. 1376 1322 ;cli 1377 1378 IFDEF FLATSTACK1379 1323 DevThunkStackTo32 1380 1324 cmp eax, 0 1381 1325 jne @@stackswitchfail_irq 1382 1383 1326 ;returns irq status in eax (1=handled; 0=unhandled) 1384 1327 call ALSA_Interrupt 1385 1386 1328 DevThunkStackTo16 1387 1388 1329 @@stackswitchfail_irq: 1389 ELSE1390 int 31391 call ALSA_Interrupt1392 ENDIF1393 1394 1330 IFDEF DEBUG 1395 1331 add DbgU32IntCnt, -1 1396 1332 ENDIF 1397 1398 1333 ;restore flags 1399 1334 popfd 1400 1401 1335 cmp eax, 1 1402 1336 je irqhandled 1403 1337 stc ;tell OS/2 kernel we didn't handle this interrupt 1404 1338 jmp short endofirq 1405 1406 1339 irqhandled: 1407 1340 clc ;tell OS/2 kernel this interrupt was ours 1408 1409 1341 endofirq: 1410 1411 1342 pop gs 1412 1343 pop fs … … 1414 1345 pop ds 1415 1346 popad 1416 1417 1347 leave 1418 1348 retf … … 1600 1530 public _ISR07 1601 1531 1602 IFDEF FLATSTACK1603 extrn intSwitchStack : dword1604 ENDIF1605 1606 1532 IFDEF KEE 1607 1533 public stackbase … … 1611 1537 stacksel dd 0 1612 1538 ELSE 1539 extrn intSwitchStack : dword 1613 1540 1614 1541 public gdtsave -
GPL/branches/uniaud32-next/drv32/startup.inc
r32 r655 249 249 ENDIF ;KEE 250 250 251 IFDEF FLATSTACK252 251 ;******************************************************************************* 253 252 ;enter a function that needs to switch to a 16 bits stack … … 288 287 ;;****************************************************************************** 289 288 290 ENDIF291 289 292 290 ;Constants and structure definitions -
GPL/branches/uniaud32-next/include/DEVHELP.H
r32 r655 848 848 modify [eax edx]; 849 849 850 #ifdef FLATSTACK851 #define kstrcpy strcpy852 #define kmemcpy memcpy853 #define kmemset memset854 #else855 #define kstrcpy _fstrcpy856 #define kmemcpy _fmemcpy857 #define kmemset _fmemset858 #define strcpy _fstrcpy859 #define memcpy _fmemcpy860 #define memset _fmemset861 #endif862 863 850 #endif // DevHelp_h -
GPL/branches/uniaud32-next/include/linux/types.h
r647 r655 114 114 #define __inline__ __inline 115 115 116 #ifdef FLATSTACK117 #define kstrcpy strcpy118 #define kstrcat strcat119 #define kmemcpy memcpy120 #define kmemcmp memcmp121 #define kmemset memset122 #else123 #define kstrcpy _fstrcpy124 #define kstrcat _fstrcat125 #define kmemcpy _fmemcpy126 #define kmemcmp _fmemcmp127 #define kmemset _fmemset128 #define strcpy _fstrcpy129 #define strcat _fstrcat130 #define memcpy _fmemcpy131 #define memcmp _fmemcmp132 #define memset _fmemset133 #endif134 135 116 typedef unsigned __nocast gfp_t; 136 117 -
GPL/branches/uniaud32-next/include/stacktoflat.h
r32 r655 26 26 #define __STACKTOFLAT_H__ 27 27 28 #ifdef KEE 29 extern ULONG stacksel; //16 bits stack selector 30 #pragma aux stacksel "stacksel" 31 32 extern ULONG stackbase; //32 bits stackbase 33 #pragma aux stackbase "stackbase" 34 35 #else 36 28 37 extern ULONG TKSSBase; 29 38 #pragma aux TKSSBase "_TKSSBase" … … 33 42 value [eax]; 34 43 35 #ifdef KEE36 extern ULONG stacksel; //16 bits stack selector37 #pragma aux stacksel "stacksel"38 39 extern ULONG stackbase; //32 bits stackbase40 #pragma aux stackbase "stackbase"41 44 #endif 42 43 #ifdef FLATSTACK44 45 45 46 #ifdef KEE … … 49 50 //Convert 16:16 stack based address to 0:32 flat addresss 50 51 #define __Stack16ToFlat(addr) (LINEAR)((((ULONG)addr)&0xffff) + *(ULONG *)TKSSBase) 51 #endif52 53 //stack is already flat54 #define __Stack32ToFlat(addr) (LINEAR)addr55 56 #else57 //Convert 16:16 stack based address to 0:32 flat addresss58 #define __Stack16ToFlat(addr) (LINEAR)((((ULONG)addr)&0xffff) + *(ULONG *)TKSSBase)59 60 //Convert 16:16 stack based address to 0:32 flat addresss61 #define __Stack32ToFlat(addr) (LINEAR)((((ULONG)addr)&0xffff) + *(ULONG *)TKSSBase)62 52 #endif 63 53 -
GPL/branches/uniaud32-next/include/watcom32.mak
r615 r655 30 30 !if $(KEE) == 1 31 31 CFLAGS16 = $(CFLAGS) -mc -zu -zc 32 CFLAGS += -mf -DKEE -DFLATSTACK33 ASFLAGS += -D:KEE -D:FLATSTACK32 CFLAGS += -mf -DKEE 33 ASFLAGS += -D:KEE 34 34 !else 35 35 CFLAGS16 = $(CFLAGS) -mc -zu -zc 36 CFLAGS += -mf -DFLATSTACK 37 ASFLAGS += -D:FLATSTACK 36 CFLAGS += -mf 38 37 !endif 39 38 -
GPL/branches/uniaud32-next/lib32/fminstrload.c
r598 r655 215 215 ev.data.ext.ptr = put; 216 216 217 err = pHandle->file.f_op->write(&pHandle->file, (char *) __Stack32ToFlat(&ev), sizeof(ev), &pHandle->file.f_pos);217 err = pHandle->file.f_op->write(&pHandle->file, (char *)&ev, sizeof(ev), &pHandle->file.f_pos); 218 218 if(err < 0) { 219 219 dprintf(("Unable to write an instrument %.3i put event: %x",prg, err)); -
GPL/branches/uniaud32-next/lib32/memory.c
r632 r655 191 191 PAGELIST pagelist; 192 192 193 if(DevLinToPageList(addr, PAGE_SIZE, (PAGELIST NEAR *) __Stack32ToFlat((ULONG)&pagelist))) {193 if(DevLinToPageList(addr, PAGE_SIZE, (PAGELIST NEAR *)&pagelist)) { 194 194 DebugInt3(); 195 195 return 0; … … 209 209 rc = KernVMAlloc(PAGE_SIZE, VMDHA_PHYS, (PVOID*)&addr, (PVOID*)&address, &sel); 210 210 #else 211 rc = DevVMAlloc(VMDHA_PHYS, PAGE_SIZE, (LINEAR)&address, __Stack32ToFlat((ULONG)&addr));211 rc = DevVMAlloc(VMDHA_PHYS, PAGE_SIZE, (LINEAR)&address, (ULONG)&addr); 212 212 #endif 213 213 if (rc != 0) { … … 236 236 rc = KernVMAlloc(size, flags, (PVOID*)&addr, (PVOID*)-1, &sel); 237 237 #else 238 rc = DevVMAlloc(flags, size, (LINEAR)-1, __Stack32ToFlat((ULONG)&addr));238 rc = DevVMAlloc(flags, size, (LINEAR)-1, (ULONG)&addr); 239 239 #endif 240 240 if (rc == 0) { … … 410 410 411 411 //check if it really is the base of the allocation (see above) 412 addr = GetBaseAddressAndFree(addr, (ULONG NEAR *) __Stack32ToFlat(&size));412 addr = GetBaseAddressAndFree(addr, (ULONG NEAR *)&size); 413 413 414 414 if(VMFree((LINEAR)addr)) { … … 454 454 ULONG size = 0; 455 455 456 GetBaseAddressAndFree((ULONG)ptr, (ULONG NEAR *) __Stack32ToFlat(&size));456 GetBaseAddressAndFree((ULONG)ptr, (ULONG NEAR *)&size); 457 457 458 458 if(VMFree((LINEAR)ptr)) { … … 505 505 rc = KernVMAlloc(Length, VMDHA_PHYS, (PVOID*)&addr, (PVOID*)&PhysicalAddress, &sel); 506 506 #else 507 //rc = DevVMAlloc(VMDHA_PHYS, size, (LINEAR)&physaddr, __Stack32ToFlat((ULONG)&addr));508 rc = DevVMAlloc(VMDHA_PHYS, Length, (LINEAR)&PhysicalAddress, __Stack32ToFlat((ULONG)&addr));507 //rc = DevVMAlloc(VMDHA_PHYS, size, (LINEAR)&physaddr, (ULONG)&addr); 508 rc = DevVMAlloc(VMDHA_PHYS, Length, (LINEAR)&PhysicalAddress, (ULONG)&addr); 509 509 #endif 510 510 if (rc != 0) { … … 544 544 if(n == 0) return; 545 545 546 kmemcpy(to, from, n);546 memcpy(to, from, n); 547 547 } 548 548 //****************************************************************************** … … 556 556 if(n == 0) return 0; 557 557 558 kmemcpy(to, from, n);558 memcpy(to, from, n); 559 559 return 0; 560 560 } … … 581 581 if(n == 0) return 0; 582 582 583 kmemcpy(to, from, n);583 memcpy(to, from, n); 584 584 return 0; 585 585 } … … 594 594 return 0; 595 595 } 596 kmemcpy(dest, src, size);596 memcpy(dest, src, size); 597 597 return 0; 598 598 } … … 701 701 size = _msize((void _near *)block); 702 702 703 else if (!GetBaseAddressNoFree((ULONG)block, (ULONG NEAR *) __Stack32ToFlat(&size)))703 else if (!GetBaseAddressNoFree((ULONG)block, (ULONG NEAR *)&size)) 704 704 size = 0; // Something wrong 705 705 -
GPL/branches/uniaud32-next/lib32/sound.c
r644 r655 818 818 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_CHANNELS, 819 819 pHwParams->ulNumChannels, 0); 820 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));820 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 821 821 if (ret == 0) break; 822 822 pHwParams->ulNumChannels--; … … 831 831 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_FORMAT, 832 832 OSSToALSADataType[pHwParams->ulDataType], 0); 833 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));833 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 834 834 if(ret != 0) { 835 835 rprintf(("invalid format %lx\n", OSSToALSADataType[pHwParams->ulDataType])); … … 838 838 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_SAMPLE_BITS, 839 839 pHwParams->ulBitsPerSample, 0); 840 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));840 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 841 841 if(ret != 0) { 842 842 rprintf(("invalid number of sample bits %d\n", pHwParams->ulBitsPerSample)); … … 845 845 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_FRAME_BITS, 846 846 pHwParams->ulBitsPerSample*pHwParams->ulNumChannels, 0); 847 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));847 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 848 848 if(ret != 0) { 849 849 rprintf(("invalid number of frame bits %d\n", pHwParams->ulBitsPerSample*pHwParams->ulNumChannels)); … … 862 862 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_RATE, 863 863 pHwParams->ulSampleRate, 0); 864 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));864 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 865 865 if(ret != 0) { 866 866 rprintf(("32_WSetHwPms (first pass) error %d bps:%d fmt: %d ch: %d sr: %d\n", … … 881 881 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_RATE, 882 882 pHwParams->ulSampleRate, 0); 883 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));883 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 884 884 if(ret == 0) 885 885 { … … 895 895 _snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_RATE, 896 896 pHwParams->ulSampleRate, 0); 897 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG) __Stack32ToFlat(¶ms));897 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)¶ms); 898 898 goto __next; 899 899 } … … 1003 1003 pHwParams->ulSampleRate, pHwParams->ulBitsPerSample, pHwParams->ulNumChannels, periodsize, nrperiods)); 1004 1004 1005 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_PARAMS, (ULONG) __Stack32ToFlat(¶ms));1005 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_HW_PARAMS, (ULONG)¶ms); 1006 1006 if (ret == -77 && fTryAgain == FALSE) 1007 1007 { … … 1048 1048 swparams.xfer_align = periodsize; 1049 1049 1050 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_SW_PARAMS, (ULONG) __Stack32ToFlat(&swparams));1050 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_SW_PARAMS, (ULONG)&swparams); 1051 1051 } 1052 1052 1053 1053 total = 0; 1054 1054 per_bytes = periodbytes; 1055 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1055 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1056 1056 if ( ((status.state != SNDRV_PCM_STATE_PREPARED) && 1057 1057 (status.state != SNDRV_PCM_STATE_SETUP) && … … 1097 1097 1098 1098 /* get the status of the circular dma buffer */ 1099 iRet = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1099 iRet = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1100 1100 1101 1101 if(iRet) { … … 1134 1134 return UNIXToOSSError(iRet); 1135 1135 } 1136 iRet = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1136 iRet = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1137 1137 rprintf(("Xrun restarted: state=%x avail=%x ReqSize=%x", status.state, status.avail, ulReqSize)); 1138 1138 if (iRet < 0) return UNIXToOSSError(iRet); … … 1168 1168 while (ulSize && ulJ && iRet) { 1169 1169 for (ulI=0; ulI < 1000; ulI++) { 1170 iRet1 = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1170 iRet1 = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1171 1171 // If here any state and have free buffer to any byte 1172 1172 if ((status.state != SNDRV_PCM_STATE_XRUN ) && samples_to_bytes(status.avail) ) break; … … 1260 1260 1261 1261 //Get the status of the stream 1262 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1262 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1263 1263 1264 1264 if(ret) { … … 1292 1292 1293 1293 //Get the nr of bytes left in the audio buffer 1294 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1294 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1295 1295 1296 1296 if(ret) { … … 1324 1324 1325 1325 //Get the status of the stream 1326 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1326 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1327 1327 1328 1328 if(ret) { … … 1355 1355 1356 1356 //Get the status of the stream 1357 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG) __Stack32ToFlat(&status));1357 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)&status); 1358 1358 if(ret) return UNIXToOSSError(ret); 1359 1359 *pStatus = status.state; … … 1387 1387 1388 1388 dprintf(("OSS32_WaveSetVolume %x to (%d,%d)", streamid, leftvol, rightvol)); 1389 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_SETVOLUME, (ULONG) __Stack32ToFlat(&pcm_volume));1389 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_PCM_IOCTL_SETVOLUME, (ULONG)&pcm_volume); 1390 1390 return UNIXToOSSError(ret); 1391 1391 } -
GPL/branches/uniaud32-next/lib32/soundmidi.c
r644 r655 130 130 for(i=64;i<64+((deviceid+1)<<3);i++) 131 131 { 132 memset( (PVOID)__Stack32ToFlat(&clientinfo), 0, sizeof(clientinfo));132 memset(&clientinfo, 0, sizeof(clientinfo)); 133 133 clientinfo.client = i; 134 134 clientinfo.type = KERNEL_CLIENT; 135 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_GET_CLIENT_INFO, (ULONG) __Stack32ToFlat(&clientinfo));135 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_GET_CLIENT_INFO, (ULONG)&clientinfo); 136 136 if(ret) { 137 137 continue; … … 157 157 portinfo.addr.client = pHandle->clientid; 158 158 portinfo.flags = SNDRV_SEQ_PORT_TYPE_APPLICATION; 159 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_CREATE_PORT, (ULONG) __Stack32ToFlat(&portinfo));159 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_CREATE_PORT, (ULONG)&portinfo); 160 160 if(ret) { 161 161 rprintf(("subscribe error %d", ret)); … … 172 172 subs.sender.client = pHandle->clientid; 173 173 subs.sender.port = pHandle->clientport; 174 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, (ULONG) __Stack32ToFlat(&subs));174 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, (ULONG)&subs); 175 175 if(ret) { 176 176 rprintf(("subscribe error %d", ret)); … … 212 212 subs.sender.client = pHandle->clientid; 213 213 subs.sender.port = pHandle->clientport; 214 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, (ULONG) __Stack32ToFlat(&subs));214 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, (ULONG)&subs); 215 215 if(ret) { 216 216 rprintf(("unsubscribe error %d", ret)); … … 227 227 portinfo.addr.client = pHandle->clientid; 228 228 portinfo.addr.port = pHandle->clientport; 229 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_DELETE_PORT, (ULONG) __Stack32ToFlat(&portinfo));229 ret = pHandle->file.f_op->unlocked_ioctl(&pHandle->file, SNDRV_SEQ_IOCTL_DELETE_PORT, (ULONG)&portinfo); 230 230 if(ret) { 231 231 dprintf(("delete port error %d", ret)); … … 300 300 pHandle->file.f_flags = O_NONBLOCK; 301 301 302 memset( (PVOID)__Stack32ToFlat(&fmevent), 0, sizeof(fmevent));302 memset(&fmevent, 0, sizeof(fmevent)); 303 303 switch(Cmd) { 304 304 case IDC32_MIDI_NOTEON: … … 331 331 fmevent.dest.port = pHandle->destport; 332 332 333 transferred = pHandle->file.f_op->write(&pHandle->file, (char *) __Stack32ToFlat(&fmevent), sizeof(fmevent), &pHandle->file.f_pos);333 transferred = pHandle->file.f_op->write(&pHandle->file, (char *)&fmevent, sizeof(fmevent), &pHandle->file.f_pos); 334 334 335 335 if(transferred < 0) { -
GPL/branches/uniaud32-next/tools/header.mif
r598 r655 44 44 .SUFFIXES: .lst .obj .lib .cpp .cpp16 .c .c16 .asm .def 45 45 46 CPPFLAGS = -xd 47 ASFLAGS = -Mb -Li -Sv:M510 48 CFLAGS = -bt=os2v2 -5r -omlinear -s -wx -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -ei 49 CFLAGS16 = $(CFLAGS) -mc -zu -zc 50 CFLAGS += -mf 51 46 52 !if "$(DEBUG)" == "1" 47 CFLAGS = -dDEBUG -bt=os2v2 -hc -5r -omlinear -s -wx -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -ei 48 CPPFLAGS= -xd 49 ASFLAGS = -D:DEBUG -Mb -Li -Sv:M510 50 !else 51 CFLAGS = -bt=os2v2 -5r -omlinear -s -wx -ze -zdp -zl -zq -nt=CODE32 -zff -zgf -ei 52 CPPFLAGS= -xd 53 ASFLAGS = -Mb -Li -Sv:M510 53 CFLAGS += -dDEBUG -hc 54 ASFLAGS += -D:DEBUG 54 55 !endif 55 56 … … 61 62 62 63 !if $(KEE) == 1 63 CFLAGS16 = $(CFLAGS) -mc -zu -zc 64 CFLAGS += -mf -DKEE -DFLATSTACK 65 ASFLAGS += -D:KEE -D:FLATSTACK 66 !else 67 CFLAGS16 = $(CFLAGS) -mc -zu -zc 68 CFLAGS += -mf -DFLATSTACK 69 ASFLAGS += -D:FLATSTACK 64 CFLAGS += -DKEE 65 ASFLAGS += -D:KEE 70 66 !endif 71 67 -
GPL/branches/uniaud32-next/tools/mkversion.cmd
r637 r655 141 141 call lineout versHdr, '#define RM_DRIVER_NAME "UNIAUD32.SYS"'; 142 142 call lineout versHdr, '#define RM_DRIVER_DESCRIPTION "'||projProduct||'"'; 143 call lineout versHdr, '#define RM_ADAPTER_NAME "'||projAdapter||'"';144 143 call lineout versHdr, '#define RM_DRIVER_VENDORNAME "'||projVendorNam||'"'; 145 144 call lineout versHdr, '#define RM_DRIVER_BUILDYEAR (PRODUCT_TIMESTAMP / 10000)';
Note:
See TracChangeset
for help on using the changeset viewer.