Changeset 56512 in vbox
- Timestamp:
- Jun 18, 2015 12:00:19 PM (9 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
-
Devices/Audio/DevIchAc97.cpp (modified) (2 diffs)
-
Main/src-client/ConsoleImpl2.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r56085 r56512 2076 2076 * Validations. 2077 2077 */ 2078 if (!CFGMR3AreValuesValid(pCfg, " Type\0"))2078 if (!CFGMR3AreValuesValid(pCfg, "Codec\0")) 2079 2079 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 2080 2080 N_("Invalid configuration for the AC'97 device")); 2081 2081 2082 2082 /* 2083 * Determine the c hip type.2083 * Determine the codec model. 2084 2084 */ 2085 char sz Type[20];2086 int rc = CFGMR3QueryStringDef(pCfg, " Type", &szType[0], sizeof(szType), "STAC9700");2085 char szCodec[20]; 2086 int rc = CFGMR3QueryStringDef(pCfg, "Codec", &szCodec[0], sizeof(szCodec), "STAC9700"); 2087 2087 if (RT_FAILURE(rc)) 2088 2088 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 2089 N_("AC'97 configuration error: Querying \" Type\" as string failed"));2089 N_("AC'97 configuration error: Querying \"Codec\" as string failed")); 2090 2090 2091 2091 /* … … 2095 2095 */ 2096 2096 bool fChipAD1980 = false; 2097 if (!strcmp(sz Type, "STAC9700"))2097 if (!strcmp(szCodec, "STAC9700")) 2098 2098 fChipAD1980 = false; 2099 else if (!strcmp(sz Type, "AD1980"))2099 else if (!strcmp(szCodec, "AD1980")) 2100 2100 fChipAD1980 = true; 2101 2101 else 2102 2102 { 2103 2103 return PDMDevHlpVMSetError(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, RT_SRC_POS, 2104 N_("AC'97 configuration error: The \" Type\" value \"%s\" is unsupported"),2105 sz Type);2104 N_("AC'97 configuration error: The \"Codec\" value \"%s\" is unsupported"), 2105 szCodec); 2106 2106 } 2107 2107 -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r56319 r56512 2695 2695 AudioControllerType_T audioController; 2696 2696 hrc = audioAdapter->COMGETTER(AudioController)(&audioController); H(); 2697 AudioCodecType_T audioCodec; 2698 hrc = audioAdapter->COMGETTER(AudioCodec)(&audioCodec); H(); 2697 2699 switch (audioController) 2698 2700 { … … 2705 2707 hrc = pBusMgr->assignPCIDevice("ichac97", pInst); H(); 2706 2708 InsertConfigNode(pInst, "Config", &pCfg); 2709 switch (audioCodec) 2710 { 2711 case AudioCodecType_STAC9700: 2712 InsertConfigString(pCfg, "Codec", "STAC9700"); 2713 break; 2714 case AudioCodecType_AD1980: 2715 InsertConfigString(pCfg, "Codec", "AD1980"); 2716 break; 2717 } 2707 2718 break; 2708 2719 }
Note:
See TracChangeset
for help on using the changeset viewer.

