home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / cs0929a.zip / ioctl.lst < prev    next >
File List  |  1999-09-29  |  24KB  |  633 lines

  1.  
  2. Module: D:\dev\csrc\os2dd\scd\ioctl.c
  3. Group: 'DGROUP' CONST,CONST2,_DATA,_BSS
  4.  
  5. Segment: _TEXT  PARA   000002bd bytes  
  6.  
  7. //
  8. // ioctl.c
  9. // 2-Feb-99
  10. //
  11. // VOID ioctlStrat(REQPACK __far *rpPtr, USHORT lDev);
  12.  
  13. #include "cs40.h"
  14.  
  15. #define VSD_RCID  99    // as in VSD RCID
  16.  
  17.  
  18. // mixer/line stuff not yet done
  19.  
  20.  
  21. // -------------------------
  22. // in: rpPtr -> request pack
  23. //     lDev = logical device
  24. //out: n/a
  25. //nts: this checks that the SFN is not already a registered stream, and
  26. //     then
  27.  
  28. static VOID ioctlAudioInit(REQPACK __far *rpPtr, USHORT lDev) {
  29.  
  30.  WAVESTREAM *wsPtr;
  31.  STREAM *streamPtr;
  32.  USHORT devType;
  33.  USHORT rc;
  34.  
  35.  0000  51                ioctlAudioInit_ push    cx
  36.  0001  56                                push    si
  37.  0002  57                                push    di
  38.  0003  55                                push    bp
  39.  0004  89 e5                             mov     bp,sp
  40.  0006  83 ec 0a                          sub     sp,000aH
  41.  0009  89 46 f8                          mov     [bp-8H],ax
  42.  000c  89 56 fc                          mov     [bp-4H],dx
  43.  000f  89 da                             mov     dx,bx
  44.  
  45.  MCI_AUDIO_INIT __far *mciInitPtr = rpPtr->ioctl.dataPtr;
  46.  0011  8e 46 fc                          mov     es,[bp-4H]
  47.  0014  89 c3                             mov     bx,ax
  48.  0016  89 c6                             mov     si,ax
  49.  0018  26 8b 47 15                       mov     ax,es:[bx+15H]
  50.  001c  26 8b 74 13                       mov     si,es:[si+13H]
  51.  0020  89 46 fe                          mov     [bp-2H],ax
  52.  
  53.  USHORT SFN = rpPtr->ioctl.SFN;
  54.  
  55. // !!!
  56. //ddprintf("@ioctlAudioInit...\n");
  57.  
  58.  // if idle or deinit request, get the stream object based on SFN and set state to idle...
  59.  
  60.  0023  26 8b 47 17                       mov     ax,es:[bx+17H]
  61.  
  62.  if (mciInitPtr->sMode == IDLE) {
  63.  0027  8e 46 fe                          mov     es,[bp-2H]
  64.  002a  26 8b 5c 0c                       mov     bx,es:[si+0cH]
  65.  002e  89 46 fa                          mov     [bp-6H],ax
  66.  0031  81 fb e7 03                       cmp     bx,03e7H
  67.  0035  75 12                             jne     L1
  68.  
  69.     streamPtr = streamFindStreamSFN(SFN);
  70.  0037  e8 00 00                          call    streamFindStreamSFN_
  71.  003a  89 c3                             mov     bx,ax
  72.  
  73.     if (streamPtr) streamPtr->streamState = streamPtr->streamState | STREAM_IDLE;
  74.     //mciInitPtr->pvReserved = (VOID __far *)((ULONG)SFN);  // have to... done at good exit
  75.     rc = 0;
  76.  003c  85 c0                             test    ax,ax
  77.  003e  0f 84 f5 00                       je      L13
  78.  0042  80 4f 1e 04                       or      byte ptr [bx+1eH],04H
  79.  
  80.     goto ExitNow;
  81.  }
  82.  else {
  83.  
  84.     // check for stream with same SFN already -- if so and is idle, reset idle bit
  85.     // this has to be done because mmpm passes the idle state down if the stream is
  86.     // losing the hardware to another app (usually to another app) -- if not now idle,
  87.     // then the stream is either not registered or is being re-initialized (o) in another
  88.     // mode or with different file attributes (quote) ... this reinit is "a total hack on
  89.     // the part of mmpm since it should instead deregister the stream, then init a new
  90.     // stream, but mmpm doesn't do it that way" (at least, the VSD doesn't, supposedly)
  91.     // anyway, if this is the case, delete the current stream and make a new one based on
  92.     // this req pack
  93.  
  94.  0046  e9 ee 00                          jmp     L13
  95.  
  96.     streamPtr = streamFindStreamSFN(SFN);
  97.  0049  e8 00 00          L1              call    streamFindStreamSFN_
  98.  004c  89 c3                             mov     bx,ax
  99.  
  100.     if (streamPtr) {
  101.  004e  85 c0                             test    ax,ax
  102.  0050  74 18                             je      L3
  103.  
  104.        if (streamPtr->streamState & STREAM_IDLE) {
  105.  0052  8a 47 1e                          mov     al,[bx+1eH]
  106.  0055  24 04                             and     al,04H
  107.  0057  30 e4                             xor     ah,ah
  108.  0059  85 c0                             test    ax,ax
  109.  005b  74 07                             je      L2
  110.  
  111.           streamPtr->streamState = streamPtr->streamState & STREAM_NOT_IDLE;
  112.           //mciInitPtr->pvReserved = (VOID __far *)((ULONG)SFN);  // have to... done at good exit
  113.           rc = 0;
  114.  005d  80 67 1e fb                       and     byte ptr [bx+1eH],0fbH
  115.  
  116.           goto ExitNow;
  117.        }
  118.        else {
  119.           //streamDeinit(streamPtr);      // was "delete pstream" (use wavestreamDeinit() instead)
  120.  0061  e9 d3 00                          jmp     L13
  121.  
  122.           wavestreamDeinit(streamPtr->wsParentPtr);
  123.        }
  124.     }
  125.  }
  126.  
  127.  0064  8b 47 24          L2              mov     ax,[bx+24H]
  128.  0067  e8 00 00                          call    wavestreamDeinit_
  129.  
  130.  devType = hwGetType(mciInitPtr->sMode, (USHORT)mciInitPtr->ulOperation, lDev);  // AUDIOHW_WAVE_PLAY/CAPTURE
  131.  006a  8e 46 fe          L3              mov     es,[bp-2H]
  132.  006d  89 d3                             mov     bx,dx
  133.  006f  26 8b 8c 1c 01                    mov     cx,es:[si+11cH]
  134.  0074  26 8b 44 0c                       mov     ax,es:[si+0cH]
  135.  0078  89 ca                             mov     dx,cx
  136.  007a  e8 00 00                          call    hwGetType_
  137.  007d  89 46 f6                          mov     [bp-0aH],ax
  138.  
  139.  if (devType == AUDIOHW_INVALID_DEVICE) {
  140.  0080  3d ff ff                          cmp     ax,0ffffH
  141.  0083  75 06                             jne     L4
  142.  
  143.     rc = INVALID_REQUEST;
  144.  0085  b8 04 00                          mov     ax,0004H
  145.  
  146.     goto ExitNow;
  147.  }
  148.  
  149.  0088  e9 ae 00                          jmp     L14
  150.  
  151.  mciInitPtr->ulFlags = 0;
  152.  
  153.  008b  8e 46 fe          L4              mov     es,[bp-2H]
  154.  008e  26 c7 84 18 01 00 
  155.        00                                mov     word ptr es:[si+118H],0000H
  156.  0095  26 c7 84 1a 01 00 
  157.        00                                mov     word ptr es:[si+11aH],0000H
  158.  
  159.  if (devType == AUDIOHW_WAVE_PLAY || devType == AUDIOHW_WAVE_CAPTURE) {
  160.  
  161.  009c  3d 11 00                          cmp     ax,0011H
  162.  009f  74 05                             je      L5
  163.  00a1  3d 10 00                          cmp     ax,0010H
  164.  00a4  75 6e                             jne     L11
  165.  
  166.     wsPtr = malloc(sizeof(WAVESTREAM));   // wsPtr will be stored/tracked in streamPtr->wsParentPtr
  167.  00a6  b8 20 00          L5              mov     ax,0020H
  168.  00a9  e8 00 00                          call    malloc_
  169.  00ac  89 c2                             mov     dx,ax
  170.  
  171.     if (wsPtr) {
  172.  00ae  85 c0                             test    ax,ax
  173.  00b0  74 62                             je      L11
  174.  
  175.        MEMSET(wsPtr,0,sizeof(WAVESTREAM));
  176.  00b2  b9 20 00                          mov     cx,0020H
  177.  00b5  89 d7                             mov     di,dx
  178.  00b7  1e                                push    ds
  179.  00b8  07                                pop     es
  180.  00b9  31 c0                             xor     ax,ax
  181.  00bb  fc                                cld     
  182.  00bc  85 c9                             test    cx,cx
  183.  00be  74 43                             je      L10
  184.  00c0  83 f9 20                          cmp     cx,0020H
  185.  00c3  72 37                             jb      L9
  186.  00c5  f7 c1 01 00                       test    cx,0001H
  187.  00c9  74 02                             je      L6
  188.  00cb  88 c4                             mov     ah,al
  189.  00cd  89 c3             L6              mov     bx,ax
  190.  00cf  66 c1 e0 10                       shl     eax,10H
  191.  00d3  89 d8                             mov     ax,bx
  192.  00d5  f7 c7 03 00                       test    di,0003H
  193.  00d9  74 12                             je      L8
  194.  00db  f7 c7 01 00                       test    di,0001H
  195.  00df  74 08                             je      L7
  196.  00e1  aa                                stosb   
  197.  00e2  49                                dec     cx
  198.  00e3  f7 c7 02 00                       test    di,0002H
  199.  00e7  74 04                             je      L8
  200.  00e9  ab                L7              stosw   
  201.  00ea  83 e9 02                          sub     cx,0002H
  202.  00ed  88 cb             L8              mov     bl,cl
  203.  00ef  c1 e9 02                          shr     cx,02H
  204.  00f2  f3 66 ab                          repe    stosd    
  205.  00f5  80 e3 03                          and     bl,03H
  206.  00f8  74 09                             je      L10
  207.  00fa  88 d9                             mov     cl,bl
  208.  00fc  d1 e9             L9              shr     cx,1
  209.  00fe  f3 ab                             repe    stosw    
  210.  0100  73 01                             jae     L10
  211.  0102  aa                                stosb   
  212.  0103  8b 4e fe          L10             mov     cx,[bp-2H]
  213.  0106  8b 46 f6                          mov     ax,[bp-0aH]
  214.  
  215.        streamPtr = wavestreamInit(devType, mciInitPtr, wsPtr);  // wavestreamInit() allocates streamPtr
  216.  0109  89 f3                             mov     bx,si
  217.  010b  e8 00 00                          call    wavestreamInit_
  218.  010e  89 c3                             mov     bx,ax
  219.  
  220.        if (streamPtr == 0) {
  221.  0110  85 c0                             test    ax,ax
  222.  0112  75 05                             jne     L12
  223.  
  224.           rc = INVALID_REQUEST;
  225.  0114  b8 04 00          L11             mov     ax,0004H
  226.  
  227.           goto ExitNow;
  228.        }
  229.     }
  230.     else {
  231.        rc = INVALID_REQUEST;    // rc = 8; probably not a valid rc, but could use it in rp.status...
  232.        goto ExitNow;            // see audio.h for valid return codes...
  233.     }
  234.  }
  235.  else {
  236.     rc = INVALID_REQUEST;
  237.     goto ExitNow;
  238.  }
  239.  
  240.  0117  eb 20                             jmp     L14
  241.  
  242.  mciInitPtr->ulFlags = mciInitPtr->ulFlags | VOLUME | INPUT | OUTPUT | MONITOR; // have to modify
  243.  0119  8e 46 fe          L12             mov     es,[bp-2H]
  244.  011c  26 8b 8c 1a 01                    mov     cx,es:[si+11aH]
  245.  
  246.  mciInitPtr->sDeviceID = VSD_RCID; // reported in VSD DLL (I'll have to come up with my own, say 40)
  247.  
  248.  0121  26 c7 84 24 01 63 
  249.        00                                mov     word ptr es:[si+124H],0063H
  250.  0128  81 c9 e0 01                       or      cx,01e0H
  251.  
  252.  streamPtr->SFN = SFN;
  253.  012c  8b 46 fa                          mov     ax,[bp-6H]
  254.  012f  26 89 8c 1a 01                    mov     es:[si+11aH],cx
  255.  0134  89 47 0c                          mov     [bx+0cH],ax
  256.  
  257.  rc = 0;
  258.  
  259.  
  260. ExitNow:
  261.  
  262. // !!!
  263. //ddprintf("...mciInit.flags=%lx\n",mciInitPtr->ulFlags);
  264.  
  265.  0137  31 c0             L13             xor     ax,ax
  266.  
  267.  if (rc == 0) {
  268.  0139  85 c0             L14             test    ax,ax
  269.  013b  75 10                             jne     L15
  270.  013d  8e 46 fe                          mov     es,[bp-2H]
  271.  
  272.     mciInitPtr->pvReserved = (VOID __far *)((ULONG)SFN);  // since common in all rc==0
  273.     // think this is for sending in, as in driver version needed?
  274.     // mciInitPtr->ulVersionLevel = DRIVER_VERSION;
  275.  }
  276.  
  277.  0140  8b 56 fa                          mov     dx,[bp-6H]
  278.  0143  26 89 94 26 01                    mov     es:[si+126H],dx
  279.  0148  26 89 84 28 01                    mov     es:[si+128H],ax
  280.  
  281.  mciInitPtr->sReturnCode = rc;
  282.  014d  8e 46 fe          L15             mov     es,[bp-2H]
  283.  0150  26 89 84 20 01                    mov     es:[si+120H],ax
  284.  
  285.  if (rc) rpPtr->status = rpPtr->status | RPERR;
  286.  
  287.  return;
  288.  0155  74 0b                             je      L16
  289.  0157  8e 46 fc                          mov     es,[bp-4H]
  290.  015a  8b 5e f8                          mov     bx,[bp-8H]
  291.  015d  26 80 4f 04 80                    or      byte ptr es:[bx+4H],80H
  292.  
  293. }
  294.  
  295.  
  296. // -------------------------
  297. // in: rpPtr -> request pack
  298. //     lDev = logical device
  299. //out: n/a
  300. //nts:
  301.  
  302.  0162  89 ec             L16             mov     sp,bp
  303.  0164  5d                                pop     bp
  304.  0165  5f                                pop     di
  305.  0166  5e                                pop     si
  306.  0167  59                                pop     cx
  307.  0168  c3                                ret     
  308.  0169  89 c0                             mov     ax,ax
  309.  016b  fc                                cld     
  310.  
  311. static VOID ioctlAudioCaps(REQPACK __far *rpPtr, USHORT lDev) {
  312.  
  313.  USHORT devType;
  314.  USHORT rc = 0;
  315.  
  316.  016c  51                ioctlAudioCaps_ push    cx
  317.  016d  56                                push    si
  318.  016e  57                                push    di
  319.  016f  55                                push    bp
  320.  0170  89 e5                             mov     bp,sp
  321.  0172  83 ec 02                          sub     sp,0002H
  322.  0175  89 c7                             mov     di,ax
  323.  0177  89 56 fe                          mov     [bp-2H],dx
  324.  
  325.  MCI_AUDIO_CAPS __far *devCapsPtr = rpPtr->ioctl.dataPtr;
  326.  
  327.  017a  8e c2                             mov     es,dx
  328.  017c  26 8b 4d 15                       mov     cx,es:[di+15H]
  329.  0180  26 8b 75 13                       mov     si,es:[di+13H]
  330.  
  331.  devType = hwGetType((USHORT)devCapsPtr->ulDataType, (USHORT)devCapsPtr->ulOperation, lDev);
  332.  0184  8e c1                             mov     es,cx
  333.  0186  26 8b 54 14                       mov     dx,es:[si+14H]
  334.  018a  26 8b 44 10                       mov     ax,es:[si+10H]
  335.  018e  e8 00 00                          call    hwGetType_
  336.  
  337.  if (devType == AUDIOHW_INVALID_DEVICE) {
  338.  0191  3d ff ff                          cmp     ax,0ffffH
  339.  0194  75 05                             jne     L17
  340.  
  341.     rc = UNSUPPORTED_DATATYPE;
  342.  0196  b8 08 00                          mov     ax,0008H
  343.  
  344.     goto ExitNow;
  345.  }
  346.  
  347.  0199  eb 0d                             jmp     L18
  348.  
  349.  waDevCaps(devCapsPtr);
  350.  019b  89 f0             L17             mov     ax,si
  351.  019d  89 ca                             mov     dx,cx
  352.  019f  e8 00 00                          call    waDevCaps_
  353.  
  354.  rc = devCapsPtr->ulSupport;
  355.  
  356. ExitNow:
  357.  01a2  8e c1                             mov     es,cx
  358.  01a4  26 8b 44 18                       mov     ax,es:[si+18H]
  359.  
  360.  devCapsPtr->ulSupport = rc;
  361.  01a8  8e c1             L18             mov     es,cx
  362.  01aa  26 c7 44 1a 00 00                 mov     word ptr es:[si+1aH],0000H
  363.  01b0  26 89 44 18                       mov     es:[si+18H],ax
  364.  
  365.  if (rc) rpPtr->status = rpPtr->status | RPERR;
  366.  
  367.  return;
  368.  01b4  85 c0                             test    ax,ax
  369.  01b6  74 08                             je      L19
  370.  01b8  8e 46 fe                          mov     es,[bp-2H]
  371.  01bb  26 80 4d 04 80                    or      byte ptr es:[di+4H],80H
  372.  
  373. }
  374.  
  375.  
  376. // -------------------------
  377. // in: rpPtr -> request pack
  378. //out: n/a
  379. //nts:
  380. // * if it's AUDIO_CHANGE, just report success, otherwise report failure
  381. // * this is because we don't support volume, balance, multiple in/out devices,
  382. // * etc.  Also, START, STOP, RESUME, and PAUSE are redundant, so we don't
  383. // * support those either.
  384.  
  385.  01c0  89 ec             L19             mov     sp,bp
  386.  01c2  5d                                pop     bp
  387.  01c3  5f                                pop     di
  388.  01c4  5e                                pop     si
  389.  01c5  59                                pop     cx
  390.  01c6  c3                                ret     
  391.  01c7  fc                                cld     
  392.  
  393. static VOID ioctlAudioControl(REQPACK __far *rpPtr) {
  394.  
  395.  01c8                    ioctlAudioControl_:
  396.  01c8  53                                push    bx
  397.  01c9  56                                push    si
  398.  01ca  89 c3                             mov     bx,ax
  399.  01cc  8e c2                             mov     es,dx
  400.  
  401.  MCI_AUDIO_CONTROL __far *controlPtr = rpPtr->ioctl.dataPtr;
  402.  
  403.  01ce  26 c4 77 13                       les     si,dword ptr es:[bx+13H]
  404.  
  405.  if (controlPtr->usIOCtlRequest == AUDIO_CHANGE) {
  406.  01d2  26 8b 14                          mov     dx,es:[si]
  407.  01d5  85 d2                             test    dx,dx
  408.  01d7  75 07                             jne     L20
  409.  
  410.     controlPtr->sReturnCode = 0;
  411.  }
  412.  01d9  26 89 54 0a                       mov     es:[si+0aH],dx
  413.  
  414.  else {
  415.  01dd  5e                                pop     si
  416.  01de  5b                                pop     bx
  417.  01df  c3                                ret     
  418.  
  419.     controlPtr->sReturnCode = INVALID_REQUEST;
  420.  }
  421.  
  422.  return;
  423.  01e0  26 c7 44 0a 04 00 L20             mov     word ptr es:[si+0aH],0004H
  424.  
  425. }
  426.  
  427.  
  428. // -------------------------
  429. // in: rpPtr -> request pack (.status RPDONE bit already set)
  430. //     lDev = logical device (first header device is 0, second (if any) is 1, and so on)
  431. //out: n/a
  432. //nts: generic ioctl strategy entry
  433. //     cat80 is all that's supported...
  434.  
  435.  01e6  5e                                pop     si
  436.  01e7  5b                                pop     bx
  437.  01e8  c3                                ret     
  438.  01e9  89 c0                             mov     ax,ax
  439.  01eb  fc                                cld     
  440.  
  441. VOID ioctlStrat(REQPACK __far *rpPtr, USHORT lDev) {
  442.  
  443. // !!!
  444.  
  445. #ifdef TRACE_STRAT_GENIOCTL
  446.  01ec  51                ioctlStrat_     push    cx
  447.  01ed  56                                push    si
  448.  01ee  57                                push    di
  449.  01ef  55                                push    bp
  450.  01f0  89 e5                             mov     bp,sp
  451.  01f2  83 ec 02                          sub     sp,0002H
  452.  01f5  89 c6                             mov     si,ax
  453.  01f7  89 56 fe                          mov     [bp-2H],dx
  454.  01fa  89 df                             mov     di,bx
  455.  
  456.  tracePerf(rpPtr->ioctl.category | TRACE_IN, rpPtr->ioctl.function);
  457. #endif
  458.  
  459.  01fc  8e c2                             mov     es,dx
  460.  01fe  31 c9                             xor     cx,cx
  461.  0200  26 8a 5c 0e                       mov     bl,es:[si+0eH]
  462.  0204  26 8a 44 0d                       mov     al,es:[si+0dH]
  463.  0208  30 ff                             xor     bh,bh
  464.  020a  30 e4                             xor     ah,ah
  465.  020c  e8 00 00                          call    tracePerf_
  466.  
  467.  if (rpPtr->ioctl.category == AUDIO_IOCTL_CAT) {
  468.  
  469.  020f  8e 46 fe                          mov     es,[bp-2H]
  470.  0212  26 8a 44 0d                       mov     al,es:[si+0dH]
  471.  0216  30 e4                             xor     ah,ah
  472.  0218  3d 80 00                          cmp     ax,0080H
  473.  021b  0f 85 79 00                       jne     L27
  474.  
  475.     switch(rpPtr->ioctl.function) {
  476.     case AUDIO_INIT:
  477.  021f  26 8a 44 0e                       mov     al,es:[si+0eH]
  478.  0223  3c 42                             cmp     al,42H
  479.  0225  72 12                             jb      L21
  480.  0227  76 1f                             jbe     L22
  481.  0229  3c 48                             cmp     al,48H
  482.  022b  72 5b                             jb      L26
  483.  022d  76 38                             jbe     L24
  484.  022f  3c 60                             cmp     al,60H
  485.  0231  72 55                             jb      L26
  486.  0233  3c 64                             cmp     al,64H
  487.  0235  76 3b                             jbe     L25
  488.  0237  eb 4f                             jmp     L26
  489.  0239  3c 40             L21             cmp     al,40H
  490.  023b  75 4b                             jne     L26
  491.  
  492.        ioctlAudioInit(rpPtr,lDev);
  493.  023d  89 fb                             mov     bx,di
  494.  023f  89 f0                             mov     ax,si
  495.  0241  8c c2                             mov     dx,es
  496.  0243  e8 00 00                          call    ioctlAudioInit_
  497.  
  498.        break;
  499.  0246  eb 6e                             jmp     L28
  500.  
  501.     case AUDIO_CONTROL:
  502.  0248  26 8b 44 15       L22             mov     ax,es:[si+15H]
  503.  
  504.        ioctlAudioControl(rpPtr);
  505.        break;
  506.     case AUDIO_CAPABILITY:
  507.  024c  26 8b 5c 13                       mov     bx,es:[si+13H]
  508.  0250  8e c0                             mov     es,ax
  509.  0252  26 8b 0f                          mov     cx,es:[bx]
  510.  0255  85 c9                             test    cx,cx
  511.  0257  75 06                             jne     L23
  512.  0259  26 89 4f 0a                       mov     es:[bx+0aH],cx
  513.  025d  eb 57                             jmp     L28
  514.  025f  26 c7 47 0a 04 00 L23             mov     word ptr es:[bx+0aH],0004H
  515.  0265  eb 4f                             jmp     L28
  516.  
  517.        ioctlAudioCaps(rpPtr,lDev);
  518.  0267  89 fb             L24             mov     bx,di
  519.  0269  89 f0                             mov     ax,si
  520.  026b  8c c2                             mov     dx,es
  521.  026d  e8 00 00                          call    ioctlAudioCaps_
  522.  
  523.        break;
  524.     case MIX_GETCONNECTIONS:
  525.     case MIX_SETCONNECTIONS:
  526.     case MIX_GETLINEINFO:
  527.     case MIX_GETCONTROL:
  528.     case MIX_SETCONTROL:
  529.  
  530. // !!!
  531.  0270  eb 44                             jmp     L28
  532.  
  533. if (gCLflags & FLAGS_CL_DDPRINT) ddprintf("ioctl mixer calls, %u\n",rpPtr->ioctl.function);
  534.  
  535.        break;
  536.     default:
  537.  0272  f6 06 01 00 40    L25             test    byte ptr _gCLflags+1H,40H
  538.  0277  74 3d                             je      L28
  539.  0279  30 e4                             xor     ah,ah
  540.  027b  50                                push    ax
  541.  027c  1e                                push    ds
  542.  027d  68 00 00                          push    offset L29
  543.  0280  e8 00 00                          call    _ddprintf
  544.  0283  83 c4 06                          add     sp,0006H
  545.  0286  eb 2e                             jmp     L28
  546.  
  547.        rpPtr->status = rpPtr->status | RPERR | RPBADCMD;
  548.        break;
  549.     }
  550.  }
  551.  else {
  552.  0288  8e 46 fe          L26             mov     es,[bp-2H]
  553.  028b  26 81 4c 03 03 80                 or      word ptr es:[si+3H],8003H
  554.  0291  89 ec                             mov     sp,bp
  555.  0293  5d                                pop     bp
  556.  0294  5f                                pop     di
  557.  0295  5e                                pop     si
  558.  0296  59                                pop     cx
  559.  0297  c3                                ret     
  560.  
  561.     rpPtr->status = rpPtr->status | RPERR | RPBADCMD;
  562.  
  563. // !!!
  564.  
  565. #ifdef TRACE_STRAT_GENIOCTL
  566.  0298  26 8b 54 03       L27             mov     dx,es:[si+3H]
  567.  
  568.  tracePerf(rpPtr->ioctl.category | TRACE_OUT, rpPtr->ioctl.function);
  569. #endif
  570.  
  571.  }
  572.  
  573.  return;
  574.  029c  26 8a 5c 0e                       mov     bl,es:[si+0eH]
  575.  02a0  26 8a 44 0d                       mov     al,es:[si+0dH]
  576.  02a4  31 c9                             xor     cx,cx
  577.  02a6  81 ca 03 80                       or      dx,8003H
  578.  02aa  80 cc 80                          or      ah,80H
  579.  02ad  30 ff                             xor     bh,bh
  580.  02af  26 89 54 03                       mov     es:[si+3H],dx
  581.  02b3  e8 00 00                          call    tracePerf_
  582.  
  583. }
  584.  
  585.  02b6  89 ec             L28             mov     sp,bp
  586.  02b8  5d                                pop     bp
  587.  02b9  5f                                pop     di
  588.  02ba  5e                                pop     si
  589.  02bb  59                                pop     cx
  590.  02bc  c3                                ret     
  591.  
  592. No disassembly errors
  593.  
  594. List of external symbols
  595.  
  596. Symbol
  597. ----------------
  598. streamFindStreamSFN_ 
  599.                  0000004a 00000038
  600. wavestreamDeinit_ 
  601.                  00000068
  602. hwGetType_       0000018f 0000007b
  603. malloc_          000000aa
  604. wavestreamInit_  0000010c
  605. waDevCaps_       000001a0
  606. tracePerf_       000002b4 0000020d
  607. ioctlAudioInit_  00000244
  608. ioctlAudioCaps_  0000026e
  609. _gCLflags        00000274
  610. _ddprintf        00000281
  611. ------------------------------------------------------------
  612.  
  613. Segment: CONST  WORD   00000017 bytes  
  614.  0000  69 6f 63 74 6c 20 6d 69 L29             - ioctl mi
  615.  0008  78 65 72 20 63 61 6c 6c                 - xer call
  616.  0010  73 2c 20 25 75 0a 00                    - s, %u..
  617.  
  618. No disassembly errors
  619.  
  620. ------------------------------------------------------------
  621. List of public symbols
  622.  
  623. SYMBOL          GROUP           SEGMENT          ADDRESS
  624. ---------------------------------------------------------
  625. ioctlAudioCaps_                 _TEXT            0000016c
  626. ioctlAudioControl_ 
  627.                                 _TEXT            000001c8
  628. ioctlAudioInit_                 _TEXT            00000000
  629. ioctlStrat_                     _TEXT            000001ec
  630.  
  631. ------------------------------------------------------------
  632.  
  633.