Changeset 33721 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Nov 3, 2010 11:59:33 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevCodec.cpp
r33719 r33721 123 123 #define CODEC_F00_09_CAP_IN_AMP_PRESENT RT_BIT(1) 124 124 #define CODEC_F00_09_CAP_LSB RT_BIT(0) 125 126 /* Pin Capabilities (7.3.4.9)*/ 127 #define CODEC_MAKE_F00_0C(vref_ctrl) (((vref_ctrl) & 0xFF) << 8) 128 #define CODEC_F00_0C_CAP_HBR RT_BIT(27) 129 #define CODEC_F00_0C_CAP_DP RT_BIT(24) 130 #define CODEC_F00_0C_CAP_EAPD RT_BIT(16) 131 #define CODEC_F00_0C_CAP_HDMI RT_BIT(7) 132 #define CODEC_F00_0C_CAP_BALANCED_IO RT_BIT(6) 133 #define CODEC_F00_0C_CAP_INPUT RT_BIT(5) 134 #define CODEC_F00_0C_CAP_OUTPUT RT_BIT(4) 135 #define CODEC_F00_0C_CAP_HP RT_BIT(3) 136 #define CODEC_F00_0C_CAP_PRESENSE_DETECT RT_BIT(2) 137 #define CODEC_F00_0C_CAP_TRIGGER_REQUIRED RT_BIT(1) 138 #define CODEC_F00_0C_CAP_IMPENDANCE_SENSE RT_BIT(0) 125 139 126 140 /* HDA spec 7.3.3.31 defines layout of configuration registers/verbs (0xF1C) */ … … 298 312 pNode->afg.node.name = "AFG"; 299 313 pNode->node.au32F00_param[8] = CODEC_MAKE_F00_08(CODEC_F00_08_BEEP_GEN, 0xd, 0xd); 300 pNode->node.au32F00_param[0xC] = (17 << 8)|RT_BIT(6)|RT_BIT(5)|RT_BIT(2)|RT_BIT(1)|RT_BIT(0); 314 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 315 | CODEC_F00_0C_CAP_BALANCED_IO 316 | CODEC_F00_0C_CAP_INPUT 317 | CODEC_F00_0C_CAP_PRESENSE_DETECT 318 | CODEC_F00_0C_CAP_TRIGGER_REQUIRED 319 | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//(17 << 8)|RT_BIT(6)|RT_BIT(5)|RT_BIT(2)|RT_BIT(1)|RT_BIT(0); 301 320 pNode->node.au32F00_param[0xB] = RT_BIT(0); 302 321 pNode->node.au32F00_param[0xD] = RT_BIT(31)|(0x5 << 16)|(0xE)<<8; … … 383 402 case 0xA: 384 403 pNode->node.name = "PortA"; 385 pNode->node.au32F00_param[0xC] = 0x173f; 404 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 405 | CODEC_F00_0C_CAP_BALANCED_IO 406 | CODEC_F00_0C_CAP_INPUT 407 | CODEC_F00_0C_CAP_OUTPUT 408 | CODEC_F00_0C_CAP_HP 409 | CODEC_F00_0C_CAP_PRESENSE_DETECT 410 | CODEC_F00_0C_CAP_TRIGGER_REQUIRED 411 | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x173f; 386 412 pNode->node.au32F02_param[0] = 0x2; 387 413 pNode->port.u32F07_param = 0xc0;//RT_BIT(6); … … 398 424 case 0xB: 399 425 pNode->node.name = "PortB"; 400 pNode->node.au32F00_param[0xC] = 0x1737; 426 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 427 | CODEC_F00_0C_CAP_INPUT 428 | CODEC_F00_0C_CAP_OUTPUT 429 | CODEC_F00_0C_CAP_PRESENSE_DETECT 430 | CODEC_F00_0C_CAP_TRIGGER_REQUIRED 431 | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x1737; 401 432 pNode->node.au32F02_param[0] = 0x4; 402 433 pNode->port.u32F07_param = RT_BIT(5); … … 413 444 pNode->node.name = "PortC"; 414 445 pNode->node.au32F02_param[0] = 0x3; 415 pNode->node.au32F00_param[0xC] = 0x1737; 446 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 447 | CODEC_F00_0C_CAP_INPUT 448 | CODEC_F00_0C_CAP_OUTPUT 449 | CODEC_F00_0C_CAP_PRESENSE_DETECT 450 | CODEC_F00_0C_CAP_TRIGGER_REQUIRED 451 | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x1737; 416 452 pNode->port.u32F07_param = RT_BIT(5); 417 453 if (!pState->fInReset) … … 425 461 case 0xD: 426 462 pNode->node.name = "PortD"; 427 pNode->node.au32F00_param[0xC] = 0x1737; 463 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 464 | CODEC_F00_0C_CAP_INPUT 465 | CODEC_F00_0C_CAP_OUTPUT 466 | CODEC_F00_0C_CAP_PRESENSE_DETECT 467 | CODEC_F00_0C_CAP_TRIGGER_REQUIRED 468 | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x1737; 428 469 pNode->port.u32F07_param = RT_BIT(5); 429 470 pNode->node.au32F02_param[0] = 0x2; … … 450 491 | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(7)|RT_BIT(0); 451 492 pNode->port.u32F08_param = 0; 452 pNode->node.au32F00_param[0xC] = 0x34; 493 pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_INPUT 494 | CODEC_F00_0C_CAP_OUTPUT 495 | CODEC_F00_0C_CAP_PRESENSE_DETECT;//0x34; 453 496 pNode->port.u32F07_param = RT_BIT(5); 454 497 pNode->port.u32F09_param = 0x7fffffff; … … 468 511 | CODEC_F00_09_CAP_OUT_AMP_PRESENT 469 512 | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(8)|RT_BIT(7)|RT_BIT(2)|RT_BIT(0); 470 pNode->node.au32F00_param[0xC] = 0x37; 513 pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_INPUT 514 | CODEC_F00_0C_CAP_OUTPUT 515 | CODEC_F00_0C_CAP_PRESENSE_DETECT 516 | CODEC_F00_0C_CAP_TRIGGER_REQUIRED 517 | CODEC_F00_0C_CAP_IMPENDANCE_SENSE;//0x37; 471 518 pNode->node.au32F00_param[0xE] = 0x1; 472 519 pNode->port.u32F08_param = 0; … … 488 535 | CODEC_F00_09_CAP_CONNECTION_LIST 489 536 | CODEC_F00_09_CAP_LSB;//(4<<20)|RT_BIT(9)|RT_BIT(8)|RT_BIT(0); 490 pNode->node.au32F00_param[0xC] = RT_BIT(4);537 pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_OUTPUT;//RT_BIT(4); 491 538 pNode->node.au32F00_param[0xE] = 0x3; 492 539 pNode->digout.u32F01_param = 0; … … 504 551 pNode->node.name = "DigIn_0"; 505 552 pNode->node.au32F00_param[9] = (4 << 20)|(3<<16)|RT_BIT(10)|RT_BIT(9)|RT_BIT(7)|RT_BIT(0); 506 pNode->node.au32F00_param[0xC] = RT_BIT(16)| RT_BIT(5)|RT_BIT(2); 553 pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_EAPD 554 | CODEC_F00_0C_CAP_INPUT 555 | CODEC_F00_0C_CAP_PRESENSE_DETECT;//RT_BIT(16)| RT_BIT(5)|RT_BIT(2); 507 556 pNode->digin.u32F05_param = 0x3 << 4 | 0x3; /* PS-Act: D3 -> D3 */ 508 557 pNode->digin.u32F07_param = 0; … … 551 600 pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0, 0) 552 601 | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(0); 553 pNode->node.au32F00_param[0xc] = RT_BIT(5);602 pNode->node.au32F00_param[0xc] = CODEC_F00_0C_CAP_INPUT;//RT_BIT(5); 554 603 pNode->cdnode.u32F07_param = 0; 555 604 if (!pState->fInReset) … … 609 658 | CODEC_F00_09_CAP_LSB;//(0x4 << 20)|RT_BIT(9)|RT_BIT(8)|RT_BIT(0); 610 659 pNode->node.au32F00_param[0xE] = 0x1; 611 pNode->node.au32F00_param[0xC] = 0x10;660 pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_OUTPUT;//0x10; 612 661 pNode->node.au32F02_param[0] = 0x1a; 613 662 pNode->reserved.u32F07_param = 0;
Note:
See TracChangeset
for help on using the changeset viewer.