VirtualBox

Changeset 59191 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Dec 18, 2015 3:20:24 PM (9 years ago)
Author:
vboxsync
Message:

Audio: Included "TimerHz" in CFGMR3AreValuesValid checks.

Location:
trunk/src/VBox/Devices/Audio
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r59190 r59191  
    22432243     * Validations.
    22442244     */
    2245     if (!CFGMR3AreValuesValid(pCfg, "Codec\0"))
     2245    if (!CFGMR3AreValuesValid(pCfg,
     2246                              "Codec\0"
     2247                              "TimerHz\0"))
    22462248        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    22472249                                N_("Invalid configuration for the AC'97 device"));
    2248     int rc;
     2250
     2251    /*
     2252     * Read config data.
     2253     */
     2254    char szCodec[20];
     2255    int rc = CFGMR3QueryStringDef(pCfg, "Codec", &szCodec[0], sizeof(szCodec), "STAC9700");
     2256    if (RT_FAILURE(rc))
     2257        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
     2258                                N_("AC'97 configuration error: Querying \"Codec\" as string failed"));
     2259
    22492260#ifndef VBOX_WITH_AUDIO_CALLBACKS
    22502261    uint16_t uTimerHz;
     
    22542265                                N_("AC'97 configuration error: failed to read Hertz (Hz) rate as unsigned integer"));
    22552266#endif
    2256 
    2257     /*
    2258      * Determine the codec model.
    2259      */
    2260     char szCodec[20];
    2261     rc = CFGMR3QueryStringDef(pCfg, "Codec", &szCodec[0], sizeof(szCodec), "STAC9700");
    2262     if (RT_FAILURE(rc))
    2263         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    2264                                 N_("AC'97 configuration error: Querying \"Codec\" as string failed"));
    22652267
    22662268    /*
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r59190 r59191  
    42974297     */
    42984298    if (!CFGMR3AreValuesValid(pCfgHandle, "R0Enabled\0"
    4299                                           "RCEnabled\0"))
     4299                                          "RCEnabled\0"
     4300                                          "TimerHz\0"))
    43004301        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    43014302                                N_ ("Invalid configuration for the Intel HDA device"));
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r59190 r59191  
    20592059                              "DMA16\0"
    20602060                              "Port\0"
    2061                               "Version\0"))
     2061                              "Version\0"
     2062                              "TimerHz\0"))
    20622063        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    20632064                                N_("Invalid configuration for SB16 device"));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette