Changeset 473 for OCO/trunk/drv16/ioctl.cpp
- Timestamp:
- Nov 9, 2009, 2:36:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OCO/trunk/drv16/ioctl.cpp
r468 r473 203 203 204 204 #ifdef DEBUG 205 // dprintf(("IACapability: src type: %d, op %d",(USHORT)p->ulDataType, (USHORT)p->ulOperation));205 dprintf(("IACapability: src type: 0x%lx, op %d",p->ulDataType, (USHORT)p->ulOperation)); 206 206 #endif 207 207 … … 210 210 211 211 #ifdef DEBUG 212 // dprintf(("IACapability: dev type: %d, ldev %d",ulDevicetype, LDev));212 dprintf(("IACapability: dev type: %ld, ldev %d",ulDevicetype, LDev)); 213 213 #endif 214 214 … … 223 223 { 224 224 pHWobj->DevCaps(p); 225 if (p->ulSupport != SUPPORT_SUCCESS) { 225 if (p->ulSupport != SUPPORT_SUCCESS) 226 { 227 //PS+++ filling to our parameters as say mmpm2.inf for returning error in this call 228 // (for HDA only!!!!!) 229 p->ulDataType = WAVE_FORMAT_4S16; 230 p->ulChannels = 2; 231 p->ulSamplingRate = HZ_44100; 232 // 226 233 dprintf(("IACapability: Error support")); 227 234 prp->usStatus |= RPERR; … … 232 239 dprintf(("IACapability: Error get HW obj")); 233 240 #endif 241 //PS+++ filling to our parameters as say mmpm2.inf for returning error in this call 242 // (for HDA only!!!!!) 243 p->ulDataType = WAVE_FORMAT_4S16; 244 p->ulChannels = 2; 245 p->ulSamplingRate = HZ_44100; 246 // 234 247 p->ulSupport = UNSUPPORTED_DATATYPE; 235 248 prp->usStatus |= RPERR; … … 367 380 void IoctlDirectAudio(PREQPACKET prp) 368 381 { 369 dprintf(("IoctlDirectAudio "));382 dprintf(("IoctlDirectAudio Code:0x%x",prp->s.ioctl.bCode)); 370 383 if(prp->s.ioctl.bCode == DAUDIO_OPEN) 371 384 { … … 396 409 { 397 410 pHWobj->DevCaps(&audioCaps); 398 if (audioCaps.ulSupport != SUPPORT_SUCCESS) { 411 if (audioCaps.ulSupport != SUPPORT_SUCCESS) 412 { 399 413 dprintf(("IDirectAudio: DevCaps failed")); 400 414 pInit->sReturnCode = INVALID_REQUEST; … … 403 417 } 404 418 } 405 else { 419 else 420 { 421 dprintf(("IDirectAudio: HW DevCaps failed")); 406 422 pInit->sReturnCode = INVALID_REQUEST; 407 423 prp->usStatus |= RPERR; … … 418 434 } 419 435 420 if(!pStream->IsEverythingOk()) { 436 if(!pStream->IsEverythingOk()) 437 { 421 438 delete pStream; 422 439 dprintf(("IlDirectAudio: IsEverythingOk")); … … 465 482 { 466 483 pHWobj->DevCaps(&audioCaps); 467 if (audioCaps.ulSupport != SUPPORT_SUCCESS) { 484 if (audioCaps.ulSupport != SUPPORT_SUCCESS) 485 { 468 486 dprintf(("IlDirectAudio: DevCaps failed")); 469 487 prp->usStatus |= RPERR; … … 471 489 return; 472 490 } 491 dprintf(("IoctlDirectAudio ret")); 473 492 pInit->sReturnCode = 0; 474 493 return; 475 494 } 476 495 else { 496 dprintf(("IoctlDirectAudio err req")); 477 497 pInit->sReturnCode = INVALID_REQUEST; 478 498 prp->usStatus |= RPERR; … … 499 519 { 500 520 pHWobj->DevCaps(lpCaps); 501 return; 502 } 503 else { 521 dprintf(("IoctlDirectAudio ret1")); 522 return; 523 } 524 else 525 { 504 526 prp->usStatus |= RPERR; 527 dprintf(("IoctlDirectAudio ret err1")); 505 528 return; 506 529 } … … 509 532 510 533 pStream = FindStream_fromFile((ULONG) prp->s.ioctl.usSysFileNum); 511 if(pStream == NULL) { 534 if(pStream == NULL) 535 { 512 536 dprintf(("IDirectAudio stream %lx not found!", (ULONG) prp->s.ioctl.usSysFileNum)); 513 537 DebugInt3(); … … 547 571 case DAUDIO_START: 548 572 { 549 if(numFreeStreams > 0) { 573 if(numFreeStreams > 0) 574 { 550 575 rc = pStream->StartStream(); 551 576 if(!rc) numFreeStreams--; … … 621 646 } 622 647 623 if(rc) { 648 if(rc) 649 { 650 dprintf(("IoctlDirectAudio ret err rc=%ld",rc)); 624 651 prp->usStatus |= RPERR | RPBADCMD; 625 652 return; 626 653 } 654 dprintf(("IoctlDirectAudio ret Ok")); 627 655 return; 628 656 } … … 644 672 { 645 673 #ifdef DEBUG 646 dprintf(("StrategyIoctl:cat:0x%x, code:0x%x dev %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device));674 dprintf(("StrategyIoctl:cat:0x%x, code:0x%x cd %d gd %d", prp->s.ioctl.bCategory, prp->s.ioctl.bCode, current_device, LDev)); 647 675 #endif 648 676 if (prp->s.ioctl.bCategory == DAUDIO_IOCTL_CAT)
Note:
See TracChangeset
for help on using the changeset viewer.