Ignore:
Timestamp:
May 23, 2010, 10:28:06 PM (15 years ago)
Author:
David Azarewicz
Message:

add ability to set volume on headphone, code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OCO/trunk/include/ioctl90.h

    r33 r486  
    88//
    99// Crystal Semiconductor defined category 0x90 OS/2 mixer IOCTLS.
    10 // 
     10//
    1111// STATUS: (Drivers known to implement this API)
    1212//    Crystal Semiconductor ISA Mode 3 driver version 2.08.
     
    1515//-----------------------------------------------------------------------------
    1616//
    17 // This header file contains application usable defines for calls to 
     17// This header file contains application usable defines for calls to
    1818// Crystal Semiconductor device driver to manage hardware mixer.
    1919// It is primarily used to adjust the listening level of
    2020// mixer inputs (CD-ROM, Aux, Line, Phone...).  The API also allows
    21 // adjustment to the record gain as an override to MMPM/2 stream 
     21// adjustment to the record gain as an override to MMPM/2 stream
    2222// specific API.
    2323//
     
    5858// 4E - RecordSrcSet     6E - RecordSrcQuery
    5959// 4F - RecordGainSet    6F - RecordGainQuery
    60 // 80 - ApiLevelQuery   
     60// 80 - ApiLevelQuery
    6161// 81 - GetApiMap
    6262// 82 - CallbackReg
    6363//
    64 // Application passes a structure (ioctl data buffer) 
     64// Application passes a structure (ioctl data buffer)
    6565// which contains:
    6666// ULONG Mute;     // UnMute==0, Mute==1
     
    6868// ULONG ulVolR;   // Right volume in percent 0..100
    6969//
    70 // With the exception of the record gain APIs, these APIs effect 
     70// With the exception of the record gain APIs, these APIs effect
    7171// what you hear (output bus connections).
    7272//
     
    9393//    ULONG ulActionTaken   = 0;
    9494//    HFILE hPdd            = NULL;
    95 // 
     95//
    9696//    OpenFlags = OPEN_ACTION_OPEN_IF_EXISTS;   // Do not create file
    97 // 
     97//
    9898//    OpenMode  = OPEN_ACCESS_READWRITE +       // Read/Write file
    9999//                OPEN_SHARE_DENYNONE +         // Non-exclusive access
    100100//                OPEN_FLAGS_FAIL_ON_ERROR;     // No system popups on errors
    101 // 
     101//
    102102//    ulRC = DosOpen (ddName,          // in
    103103//                    &hPdd,           //    out (handle)
     
    108108//                    OpenMode,        // in
    109109//                    NULL);           // in
    110 // 
     110//
    111111//    printf ("DosOpen RC = %x\n", ulRC);
    112 // 
     112//
    113113//    if (ulRC != 0)
    114114//       hPdd = NULL;
    115 // 
     115//
    116116//    return (hPdd);
    117117// }
     
    121121//    ULONG     ulRC;
    122122//    ULONG     ulSizeOfStruct =  = sizeof (MixStruct);
    123 // 
    124 //    ulRC = DosDevIOCtl 
     123//
     124//    ulRC = DosDevIOCtl
    125125//       (hPdd,               // Device Handle
    126126//        0x90,               // Category (user defined >= 0x80)
     
    132132//        ulSizeOfStruct,     // in      Maximum size of command data
    133133//        &ulSizeOfStruct);   // in out  Size of command data
    134 // 
     134//
    135135//    printf ("DosDevIOCtl ulRC = %d\n", ulRC);
    136 // 
     136//
    137137//    return (ulRC);
    138138// }
     
    150150
    151151// This prototype is used in the device driver only (common header)
    152 //USHORT ioctlmixMain (USHORT Function, 
     152//USHORT ioctlmixMain (USHORT Function,
    153153//                     USHORT SysFileNum,
    154 //                     ULONG  ulpvData, 
     154//                     ULONG  ulpvData,
    155155//                     USHORT usDLength);
    156156
     
    184184#define VIDEOSET        0x45
    185185#define AUXSET          0x46
     186#define HEADPHONESET    0x47
    186187#define BASSTREBLESET   0x4B
    187188#define THREEDSET       0x4C
     
    197198#define VIDEOQUERY      0x65
    198199#define AUXQUERY        0x66
     200#define HEADPHONEQUERY  0x67
    199201#define BASSTREBLEQUERY 0x6B
    200202#define THREEDQUERY     0x6C
     
    213215// This allows override of settings from MMPM/2 applications.
    214216
    215 #define I90SRC_BASE     0x00000010      // 0..F are reserved (MMPM/2 space)       
     217#define I90SRC_BASE     0x00000010      // 0..F are reserved (MMPM/2 space)
    216218#define I90SRC_MIC      0x00000010
    217219#define I90SRC_CD       0x00000020
     
    224226
    225227
    226 // In first release, the APILEVELQUERY function returns a ULONG, 0x01. 
     228// In first release, the APILEVELQUERY function returns a ULONG, 0x01.
    227229// As significant changes are made to the ioctlmix API, the return value
    228230// of this function will be incremented.
    229231
    230232// GETAPIMAP
    231 // To help an application know what APIs are supported by this device driver, 
     233// To help an application know what APIs are supported by this device driver,
    232234// return an array of booleans (BYTES).  TRUE => Supported.
    233 // The array must be declared as 256 bytes.  This is larger than necessary as 
     235// The array must be declared as 256 bytes.  This is larger than necessary as
    234236// the first 64 entries, range 0x00..0x39, are guaranteed to be zero.
    235237// The extra bytes allows the array to be indexed using the IOCTL function
    236238// defines in this file.
    237239//
    238 // Notice that a FALSE value in an array position (for example "video set") 
     240// Notice that a FALSE value in an array position (for example "video set")
    239241// can be used to inform the mixer application that this device driver does
    240242// not support a "video" connection to the audio device.
Note: See TracChangeset for help on using the changeset viewer.