VirtualBox

Changeset 56512 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 18, 2015 12:00:19 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101131
Message:

Main/AC97: Propagate codec model setting through CFGM.

File:
1 edited

Legend:

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

    r56085 r56512  
    20762076     * Validations.
    20772077     */
    2078     if (!CFGMR3AreValuesValid(pCfg, "Type\0"))
     2078    if (!CFGMR3AreValuesValid(pCfg, "Codec\0"))
    20792079        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    20802080                                N_("Invalid configuration for the AC'97 device"));
    20812081
    20822082    /*
    2083      * Determine the chip type.
     2083     * Determine the codec model.
    20842084     */
    2085     char szType[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");
    20872087    if (RT_FAILURE(rc))
    20882088        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"));
    20902090
    20912091    /*
     
    20952095     */
    20962096    bool fChipAD1980 = false;
    2097     if (!strcmp(szType, "STAC9700"))
     2097    if (!strcmp(szCodec, "STAC9700"))
    20982098        fChipAD1980 = false;
    2099     else if (!strcmp(szType, "AD1980"))
     2099    else if (!strcmp(szCodec, "AD1980"))
    21002100        fChipAD1980 = true;
    21012101    else
    21022102    {
    21032103        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                                    szType);
     2104                                   N_("AC'97 configuration error: The \"Codec\" value \"%s\" is unsupported"),
     2105                                   szCodec);
    21062106    }
    21072107
Note: See TracChangeset for help on using the changeset viewer.

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