Changeset 59190 in vbox
- Timestamp:
- Dec 18, 2015 3:14:51 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104811
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r59189 r59190 2246 2246 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 2247 2247 N_("Invalid configuration for the AC'97 device")); 2248 int rc; 2249 #ifndef VBOX_WITH_AUDIO_CALLBACKS 2250 uint16_t uTimerHz; 2251 rc = CFGMR3QueryU16Def(pCfg, "TimerHz", &uTimerHz, 200 /* Hz */); 2252 if (RT_FAILURE(rc)) 2253 return PDMDEV_SET_ERROR(pDevIns, rc, 2254 N_("AC'97 configuration error: failed to read Hertz (Hz) rate as unsigned integer")); 2255 #endif 2248 2256 2249 2257 /* … … 2251 2259 */ 2252 2260 char szCodec[20]; 2253 intrc = CFGMR3QueryStringDef(pCfg, "Codec", &szCodec[0], sizeof(szCodec), "STAC9700");2261 rc = CFGMR3QueryStringDef(pCfg, "Codec", &szCodec[0], sizeof(szCodec), "STAC9700"); 2254 2262 if (RT_FAILURE(rc)) 2255 2263 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, … … 2479 2487 if (RT_SUCCESS(rc)) 2480 2488 { 2481 pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimer) / 200; /** @todo Make this configurable! */2489 pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimer) / uTimerHz; 2482 2490 pThis->uTimerTS = TMTimerGet(pThis->pTimer); 2483 LogFunc(("Timer ticks=%RU64 \n", pThis->cTimerTicks));2491 LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicks, uTimerHz)); 2484 2492 2485 2493 /* Fire off timer. */ -
trunk/src/VBox/Devices/Audio/DevIchHda.cpp
r59187 r59190 4309 4309 return PDMDEV_SET_ERROR(pDevIns, rc, 4310 4310 N_("HDA configuration error: failed to read R0Enabled as boolean")); 4311 #ifndef VBOX_WITH_AUDIO_CALLBACKS 4312 uint16_t uTimerHz; 4313 rc = CFGMR3QueryU16Def(pCfgHandle, "TimerHz", &uTimerHz, 500 /* Hz */); 4314 if (RT_FAILURE(rc)) 4315 return PDMDEV_SET_ERROR(pDevIns, rc, 4316 N_("HDA configuration error: failed to read Hertz (Hz) rate as unsigned integer")); 4317 #endif 4311 4318 4312 4319 /* … … 4615 4622 * low, e.g. "PDMDevHlpTMTimeVirtGetFreq / 200". 4616 4623 * Update: Because the guest doesn't prepare enough data at a time. */ 4617 pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimer) / 500; /** @todo Make this configurable! */4624 pThis->cTimerTicks = TMTimerGetFreq(pThis->pTimer) / uTimerHz; 4618 4625 pThis->uTimerTS = TMTimerGet(pThis->pTimer); 4619 LogFunc(("Timer ticks=%RU64 \n", pThis->cTimerTicks));4626 LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicks, uTimerHz)); 4620 4627 4621 4628 /* Fire off timer. */ -
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r59188 r59190 2048 2048 { 2049 2049 PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE); 2050 int rc;2051 2050 2052 2051 /* … … 2062 2061 "Version\0")) 2063 2062 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 2064 N_("Invalid configuration for sb16 device"));2063 N_("Invalid configuration for SB16 device")); 2065 2064 2066 2065 /* 2067 2066 * Read config data. 2068 2067 */ 2069 rc = CFGMR3QuerySIntDef(pCfgHandle, "IRQ", &pThis->irq, 5);2068 int rc = CFGMR3QuerySIntDef(pCfgHandle, "IRQ", &pThis->irq, 5); 2070 2069 if (RT_FAILURE(rc)) 2071 2070 return PDMDEV_SET_ERROR(pDevIns, rc, 2072 N_(" Configuration error: Failed to get the \"IRQ\" value"));2071 N_("SB16 configuration error: Failed to get the \"IRQ\" value")); 2073 2072 pThis->irqCfg = pThis->irq; 2074 2073 … … 2076 2075 if (RT_FAILURE(rc)) 2077 2076 return PDMDEV_SET_ERROR(pDevIns, rc, 2078 N_(" Configuration error: Failed to get the \"DMA\" value"));2077 N_("SB16 configuration error: Failed to get the \"DMA\" value")); 2079 2078 pThis->dmaCfg = pThis->dma; 2080 2079 … … 2082 2081 if (RT_FAILURE(rc)) 2083 2082 return PDMDEV_SET_ERROR(pDevIns, rc, 2084 N_(" Configuration error: Failed to get the \"DMA16\" value"));2083 N_("SB16 configuration error: Failed to get the \"DMA16\" value")); 2085 2084 pThis->hdmaCfg = pThis->hdma; 2086 2085 … … 2089 2088 if (RT_FAILURE(rc)) 2090 2089 return PDMDEV_SET_ERROR(pDevIns, rc, 2091 N_(" Configuration error: Failed to get the \"Port\" value"));2090 N_("SB16 configuration error: Failed to get the \"Port\" value")); 2092 2091 pThis->port = Port; 2093 2092 pThis->portCfg = Port; … … 2097 2096 if (RT_FAILURE(rc)) 2098 2097 return PDMDEV_SET_ERROR(pDevIns, rc, 2099 N_("Configuration error: Failed to get the \"Version\" value")); 2098 N_("SB16 configuration error: Failed to get the \"Version\" value")); 2099 2100 #ifndef VBOX_WITH_AUDIO_CALLBACKS 2101 uint16_t uTimerHz; 2102 rc = CFGMR3QueryU16Def(pCfgHandle, "TimerHz", &uTimerHz, 200 /* Hz */); 2103 if (RT_FAILURE(rc)) 2104 return PDMDEV_SET_ERROR(pDevIns, rc, 2105 N_("SB16 configuration error: failed to read Hertz (Hz) rate as unsigned integer")); 2106 #endif 2107 2100 2108 pThis->ver = u16Version; 2101 2109 pThis->verCfg = u16Version; … … 2180 2188 else 2181 2189 { 2182 pThis->cTimerTicksIO = TMTimerGetFreq(pThis->pTimerIO) / 200; /** @todo Make this configurable! */2190 pThis->cTimerTicksIO = TMTimerGetFreq(pThis->pTimerIO) / uTimerHz; 2183 2191 pThis->uTimerTSIO = TMTimerGet(pThis->pTimerIO); 2184 LogFunc(("Timer ticks=%RU64 \n", pThis->cTimerTicksIO));2192 LogFunc(("Timer ticks=%RU64 (%RU16 Hz)\n", pThis->cTimerTicksIO, uTimerHz)); 2185 2193 2186 2194 /* Fire off timer. */
Note:
See TracChangeset
for help on using the changeset viewer.