Changeset 37185 in vbox for trunk/src/VBox
- Timestamp:
- May 23, 2011 3:06:44 PM (14 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevCodec.cpp
r36692 r37185 35 35 { 36 36 uint8_t id; /* 7 - bit format */ 37 const char *name;38 37 /* RPM 5.3.6 */ 39 38 uint32_t au32F00_param[CODECNODE_F0_PARAM_LENGTH]; … … 274 273 /* Root Node*/ 275 274 case 0: 276 pNode->root.node.name = "Root";277 275 pNode->node.au32F00_param[2] = CODEC_MAKE_F00_02(0x1, 0x0, 0x34, 0x1); /* rev id */ 278 276 break; 279 277 case 1: 280 pNode->afg.node.name = "AFG";281 278 pNode->node.au32F00_param[8] = CODEC_MAKE_F00_08(1, 0xd, 0xd); 282 279 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) … … 296 293 break; 297 294 case 2: 298 pNode->dac.node.name = "DAC0";299 goto dac_init;300 295 case 3: 301 pNode->dac.node.name = "DAC1";302 goto dac_init;303 296 case 4: 304 pNode->dac.node.name = "DAC2";305 goto dac_init;306 297 case 5: 307 pNode->dac.node.name = "DAC3";308 dac_init:309 298 memset(pNode->dac.B_params, 0, AMPLIFIER_SIZE); 310 299 pNode->dac.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//RT_BIT(14)|(0x1 << 4)|0x1; /* 441000Hz/16bit/2ch */ … … 322 311 break; 323 312 case 6: 324 pNode->adc.node.name = "ADC0";325 313 pNode->node.au32F02_param[0] = 0x17; 326 314 goto adc_init; 327 315 case 7: 328 pNode->adc.node.name = "ADC1";329 316 pNode->node.au32F02_param[0] = 0x18; 330 317 adc_init: … … 341 328 break; 342 329 case 8: 343 pNode->spdifout.node.name = "SPDIFOut";344 330 pNode->spdifout.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//(1<<14)|(0x1<<4) | 0x1; 345 331 pNode->spdifout.node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_OUTPUT, 0x4, 0) … … 353 339 break; 354 340 case 9: 355 pNode->node.name = "Reserved_0";356 341 pNode->spdifin.u32A_param = CODEC_MAKE_A(0, 1, CODEC_A_MULT_1X, CODEC_A_DIV_1X, CODEC_A_16_BIT, 1);//(0x1<<4) | 0x1; 357 342 pNode->spdifin.node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_INPUT, 0x4, 0) … … 368 353 break; 369 354 case 0xA: 370 pNode->node.name = "PortA";371 355 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 372 356 | CODEC_F00_0C_CAP_INPUT … … 390 374 goto port_init; 391 375 case 0xB: 392 pNode->node.name = "PortB";393 376 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 394 377 | CODEC_F00_0C_CAP_INPUT … … 409 392 goto port_init; 410 393 case 0xC: 411 pNode->node.name = "PortC";412 394 pNode->node.au32F02_param[0] = 0x3; 413 395 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) … … 427 409 goto port_init; 428 410 case 0xD: 429 pNode->node.name = "PortD";430 411 pNode->node.au32F00_param[0xC] = CODEC_MAKE_F00_0C(0x17) 431 412 | CODEC_F00_0C_CAP_INPUT … … 453 434 break; 454 435 case 0xE: 455 pNode->node.name = "PortE";456 436 pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0) 457 437 | CODEC_F00_09_CAP_UNSOL … … 472 452 break; 473 453 case 0xF: 474 pNode->node.name = "PortF";475 454 pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0x0) 476 455 | CODEC_F00_09_CAP_CONNECTION_LIST … … 498 477 break; 499 478 case 0x10: 500 pNode->node.name = "DigOut_0";501 479 pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0x0, 0x0) 502 480 | CODEC_F00_09_CAP_DIGITAL … … 515 493 break; 516 494 case 0x11: 517 pNode->node.name = "DigIn_0";518 495 pNode->node.au32F00_param[9] = (4 << 20)|(3<<16)|RT_BIT(10)|RT_BIT(9)|RT_BIT(7)|RT_BIT(0); 519 496 pNode->node.au32F00_param[0xC] = CODEC_F00_0C_CAP_EAPD … … 534 511 break; 535 512 case 0x12: 536 pNode->node.name = "ADCMux_0";537 513 pNode->adcmux.u32F01_param = 0; 538 514 goto adcmux_init; 539 515 case 0x13: 540 pNode->node.name = "ADCMux_1";541 516 pNode->adcmux.u32F01_param = 1; 542 517 adcmux_init: … … 554 529 break; 555 530 case 0x14: 556 pNode->node.name = "PCBEEP";557 531 pNode->node.au32F00_param[9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_BEEP_GEN, 0, 0) 558 532 | CODEC_F00_09_CAP_AMP_FMT_OVERRIDE … … 563 537 break; 564 538 case 0x15: 565 pNode->node.name = "CD";566 539 pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0, 0) 567 540 | CODEC_F00_09_CAP_LSB;//(4 << 20)|RT_BIT(0); … … 576 549 break; 577 550 case 0x16: 578 pNode->node.name = "VolumeKnob";579 551 pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_VOLUME_KNOB, 0x0, 0x0);//(0x6 << 20); 580 552 pNode->node.au32F00_param[0x13] = RT_BIT(7)| 0x7F; … … 585 557 break; 586 558 case 0x17: 587 pNode->node.name = "ADC0Vol";588 559 pNode->node.au32F02_param[0] = 0x12; 589 560 goto adcvol_init; 590 561 case 0x18: 591 pNode->node.name = "ADC1Vol";592 562 pNode->node.au32F02_param[0] = 0x13; 593 563 adcvol_init: … … 605 575 break; 606 576 case 0x19: 607 pNode->node.name = "Reserved_1";608 577 pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_VENDOR_DEFINED, 0x3, 0) 609 578 | CODEC_F00_09_CAP_DIGITAL … … 611 580 break; 612 581 case 0x1A: 613 pNode->node.name = "Reserved_2";614 582 pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_AUDIO_OUTPUT, 0x3, 0) 615 583 | CODEC_F00_09_CAP_DIGITAL … … 617 585 break; 618 586 case 0x1B: 619 pNode->node.name = "Reserved_3";620 587 pNode->node.au32F00_param[0x9] = CODEC_MAKE_F00_09(CODEC_F00_09_TYPE_PIN_COMPLEX, 0, 0) 621 588 | CODEC_F00_09_CAP_DIGITAL … … 1870 1837 int codecLoadState(CODECState *pCodecState, PSSMHANDLE pSSMHandle) 1871 1838 { 1872 SSMR3GetMem (pSSMHandle, pCodecState->pNodes, sizeof(CODECNODE) * pCodecState->cTotalNodes);1839 int rc = SSMR3GetMem (pSSMHandle, pCodecState->pNodes, sizeof(CODECNODE) * pCodecState->cTotalNodes); 1873 1840 if (codecIsDacNode(pCodecState, pCodecState->u8DacLineOut)) 1874 1841 codecToAudVolume(&pCodecState->pNodes[pCodecState->u8DacLineOut].dac.B_params, AUD_MIXER_VOLUME); … … 1876 1843 codecToAudVolume(&pCodecState->pNodes[pCodecState->u8DacLineOut].spdifout.B_params, AUD_MIXER_VOLUME); 1877 1844 codecToAudVolume(&pCodecState->pNodes[pCodecState->u8AdcVolsLineIn].adcvol.B_params, AUD_MIXER_LINE_IN); 1878 return VINF_SUCCESS;1879 } 1845 return rc; 1846 } -
trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp
r36691 r37185 53 53 #endif 54 54 55 #define HDA_SSM_VERSION 155 #define HDA_SSM_VERSION 2 56 56 PDMBOTHCBDECL(int) hdaMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb); 57 57 PDMBOTHCBDECL(int) hdaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb); … … 1996 1996 PCIINTELHDLinkState *pThis = PDMINS_2_DATA(pDevIns, PCIINTELHDLinkState *); 1997 1997 /* Load Codec nodes states */ 1998 AssertMsgReturn (uVersion == HDA_SSM_VERSION, ("%d\n", uVersion), VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION); 1998 if (uVersion < HDA_SSM_VERSION) 1999 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 1999 2000 Assert (uPass == SSM_PASS_FINAL); NOREF(uPass); 2000 2001
Note:
See TracChangeset
for help on using the changeset viewer.