Changeset 31050 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Jul 23, 2010 11:46:58 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevCodec.cpp
r31048 r31050 64 64 #define STAC9220_NODE_COUNT 0x1C 65 65 66 #define STAC9220_IS_AFG_CMD(cmd) ( \ 67 CODEC_NID(cmd) == 0x1 \ 68 ) 66 69 #define STAC9220_IS_PORT_CMD(cmd) ( \ 67 70 CODEC_NID(cmd) == 0xA \ … … 171 174 return VINF_SUCCESS; 172 175 } 176 177 static int codecGetSubId(struct CODECState *pState, uint32_t cmd, uint64_t *pResp) 178 { 179 Assert((CODEC_CAD(cmd) == 0)); 180 if (STAC9220_IS_AFG_CMD(cmd)) 181 { 182 *pResp = pState->pNodes[CODEC_NID(cmd)].afg.u32F20_param; 183 } 184 return VINF_SUCCESS; 185 } 186 187 #if 0 188 static int codecGetPowerState(struct CODECState *pState, uint32_t cmd, uint64_t *pResp) 189 { 190 Assert((CODEC_CAD(cmd) == 0)); 191 if (STAC9220_IS_AFG_CMD(cmd)) 192 { 193 *pResp = pState->pNodes[CODEC_NID(cmd)].afg.u32F05_param; 194 } 195 return VINF_SUCCESS; 196 } 197 #endif 173 198 static int stac9220Set706(struct CODECState *pState, uint32_t cmd, uint64_t *pResp) 174 199 { … … 237 262 pNode->node.au32F00_param[0xd] = RT_BIT(31)|(0x5 << 16)|(0xE)<<8; 238 263 pNode->node.au32F00_param[0x12] = RT_BIT(31)|(0x2 << 16)|(0x7f << 8)|0x7f; 239 pNode->afg.u32F05_param = RT_MAKE_U32_FROM_U8(0x02, 0x02, 0x00, 0x0); /* Power State */ 264 pNode->afg.u32F05_param = (0x2) << 4 | 0x2; /* PS-Act: 0x2, D2 */ 265 pNode->afg.u32F20_param = 0x106b0800; /* Old Intel Mac */ 240 266 pNode->afg.u32F08_param = 0; 241 267 break; … … 425 451 /* verb | verb mask | callback */ 426 452 /* ----------- -------------------- ----------------------- */ 427 {0x000F0000, CODEC_VERB_8BIT_CMD ,codecGetF00},453 {0x000F0000, CODEC_VERB_8BIT_CMD , codecGetF00}, 428 454 {0x00020000, CODEC_VERB_16BIT_CMD, codecSetConverterFormat}, 429 455 {0x000B0000, CODEC_VERB_16BIT_CMD, codecGetAmplifier }, 430 {0x00070600, CODEC_VERB_8BIT_CMD, stac9220Set706 }, 431 {0x000F0700, CODEC_VERB_8BIT_CMD, stac9220SetPinCtrl}, 432 {0x00070700, CODEC_VERB_8BIT_CMD, stac9220GetPinCtrl}, 433 {0x000F0200, CODEC_VERB_8BIT_CMD, codecGetF02 }, 456 {0x00070600, CODEC_VERB_8BIT_CMD , stac9220Set706 }, 457 {0x000F0700, CODEC_VERB_8BIT_CMD , stac9220SetPinCtrl}, 458 {0x00070700, CODEC_VERB_8BIT_CMD , stac9220GetPinCtrl}, 459 {0x000F0200, CODEC_VERB_8BIT_CMD , codecGetF02 }, 460 {0x000F2000, CODEC_VERB_8BIT_CMD , codecGetSubId }, 461 #if 0 462 {0x000F0500, CODEC_VERB_8BIT_CMD , codecGetPowerState}, 463 #endif 434 464 }; 435 465 … … 441 471 { 442 472 *pfn = CODEC_CAD(cmd) != 0 ? codecUnimplemented : codecBreak; 443 //** @todo r=michaln: Why "intelHD" and not e.g. "HDAcodec"?444 473 //** @todo r=michaln: There needs to be a counter to avoid log flooding (see e.g. DevRTC.cpp) 445 LogRel((" intelHD: cmd %x was ignored\n", cmd));474 LogRel(("HDAcodec: cmd %x was ignored\n", cmd)); 446 475 return VINF_SUCCESS; 447 476 } … … 455 484 } 456 485 *pfn = codecUnimplemented; 457 LogRel((" intelHD: callback for %x wasn't found\n", CODEC_VERBDATA(cmd)));486 LogRel(("HDAcodec: callback for %x wasn't found\n", CODEC_VERBDATA(cmd))); 458 487 return rc; 459 488 } … … 554 583 pState->voice_mc = AUD_open_in(&pState->card, pState->voice_mc, "hda.mc", pState, mc_callback, &as); 555 584 if (!pState->voice_pi) 556 LogRel ((" intelHD: WARNING: Unable to open PCM IN!\n"));585 LogRel (("HDAcodec: WARNING: Unable to open PCM IN!\n")); 557 586 if (!pState->voice_mc) 558 LogRel ((" intelHD: WARNING: Unable to open PCM MC!\n"));587 LogRel (("HDAcodec: WARNING: Unable to open PCM MC!\n")); 559 588 if (!pState->voice_po) 560 LogRel ((" intelHD: WARNING: Unable to open PCM OUT!\n"));589 LogRel (("HDAcodec: WARNING: Unable to open PCM OUT!\n")); 561 590 int mute = 0; 562 591 uint8_t lvol = 0x7f;
Note:
See TracChangeset
for help on using the changeset viewer.