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/drv16/ioctl.cpp

    r483 r486  
    687687extern "C" void StrategyIoctl(PREQPACKET prp, USHORT LDev)
    688688{
    689     if (prp->s.ioctl.bCategory == DAUDIO_IOCTL_CAT)
    690     {
    691         IoctlDirectAudio(prp);
    692         return;
    693     }
    694 
    695689#ifdef DEBUG
    696690    dprintf(("StrategyIoctl:cat:0x%x, code:0x%x cd %d gd %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device, LDev));
    697691#endif
    698     if (prp->s.ioctl.bCategory == 0x90)
    699     {
     692        switch (prp->s.ioctl.bCategory) {
     693        case DAUDIO_IOCTL_CAT: /* 0x91 */
     694        IoctlDirectAudio(prp);
     695        break;
     696
     697        case MIXER_IOCTL_CAT: /* 0x90 */
    700698        IoctlMixer(prp, LDev);
    701         return;
    702     }
    703     if (prp->s.ioctl.bCategory != AUDIO_IOCTL_CAT)
    704     {
    705         prp->usStatus |= RPERR | RPBADCMD;
    706         return;
    707     }
    708 
    709     switch (prp->s.ioctl.bCode)
    710     {
    711            case AUDIO_INIT:
    712                 IoctlAudioInit(prp, LDev);
    713                 break;
    714            case AUDIO_CONTROL:
    715                 IoctlAudioControl(prp);
    716                 break;
    717            case AUDIO_CAPABILITY:
    718                 IoctlAudioCapability(prp, LDev);
    719                 break;
    720            default:
    721                 prp->usStatus |= RPERR | RPBADCMD;
    722                break;
    723     }
     699        break;
     700
     701        case AUDIO_IOCTL_CAT: /* 0x80 */
     702                switch (prp->s.ioctl.bCode) {
     703                case AUDIO_INIT: /* 0x40 */
     704                        IoctlAudioInit(prp, LDev);
     705                        break;
     706                case AUDIO_CONTROL: /* 0x42 */
     707                        IoctlAudioControl(prp);
     708                        break;
     709                case AUDIO_CAPABILITY: /* 0x48 */
     710                        IoctlAudioCapability(prp, LDev);
     711                        break;
     712                default:
     713                        prp->usStatus |= RPERR | RPBADCMD;
     714                        break;
     715                }
     716                break;
     717
     718        default:
     719                prp->usStatus |= RPERR | RPBADCMD;
     720                break;
     721        }
    724722
    725723#ifdef DEBUG
    726 //    dprintf(("StrategyIoctl:ret:0x%x", (USHORT)prp->usStatus));
     724        dprintf(("StrategyIoctl:ret:0x%x", (USHORT)prp->usStatus));
    727725#endif
    728     return;
     726        return;
    729727}
     728
Note: See TracChangeset for help on using the changeset viewer.