VirtualBox

Changeset 54385 in vbox


Ignore:
Timestamp:
Feb 23, 2015 3:21:50 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98482
Message:

PDM/Audio: Ignore old AudioSniffer device when loading older saved states.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r54308 r54385  
    55
    66#
    7 # Copyright (C) 2006-2013 Oracle Corporation
     7# Copyright (C) 2006-2015 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    103103ifdef VBOX_WITH_RAW_MODE
    104104 VBoxVMM_DEFS   += VBOX_WITH_RAW_MODE VBOX_WITH_RAW_MODE_NOT_R0
     105endif
     106ifdef VBOX_WITH_PDM_AUDIO_DRIVER
     107 VBoxVMM_DEFS   += VBOX_WITH_PDM_AUDIO_DRIVER
    105108endif
    106109ifdef VBOX_WITH_VMM_R0_SWITCH_STACK
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r53442 r54385  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    278278*******************************************************************************/
    279279/** The PDM saved state version. */
    280 #define PDM_SAVED_STATE_VERSION             4
    281 #define PDM_SAVED_STATE_VERSION_PRE_NMI_FF  3
     280#define PDM_SAVED_STATE_VERSION               5
     281/** Before the PDM audio architecture was introduced there was an "AudioSniffer"
     282 *  device which took care of multiplexing input/output audio data from/to various places.
     283 *  Thus this device is not needed/used anymore. */
     284#define PDM_SAVED_STATE_VERSION_PRE_PDM_AUDIO 4
     285#define PDM_SAVED_STATE_VERSION_PRE_NMI_FF    3
    282286
    283287/** The number of nanoseconds a suspend callback needs to take before
     
    897901     */
    898902    if (    uVersion != PDM_SAVED_STATE_VERSION
    899         &&  uVersion != PDM_SAVED_STATE_VERSION_PRE_NMI_FF)
     903        &&  uVersion != PDM_SAVED_STATE_VERSION_PRE_NMI_FF
     904        &&  uVersion != PDM_SAVED_STATE_VERSION_PRE_PDM_AUDIO)
    900905    {
    901906        AssertMsgFailed(("Invalid version uVersion=%d!\n", uVersion));
     
    10181023        PPDMDEVINS pDevIns;
    10191024        for (pDevIns = pVM->pdm.s.pDevInstances; pDevIns; pDevIns = pDevIns->Internal.s.pNextR3)
    1020             if (   !strcmp(szName, pDevIns->pReg->szName)
     1025            if (   !RTStrCmp(szName, pDevIns->pReg->szName)
    10211026                && pDevIns->iInstance == iInstance)
    10221027            {
     
    10271032                break;
    10281033            }
     1034
    10291035        if (!pDevIns)
    10301036        {
    1031             LogRel(("Device '%s'/%d not found in current config\n", szName, iInstance));
    1032             if (SSMR3HandleGetAfter(pSSM) != SSMAFTER_DEBUG_IT)
    1033                 return SSMR3SetCfgError(pSSM, RT_SRC_POS, N_("Device '%s'/%d not found in current config"), szName, iInstance);
     1037            bool fSkip = false;
     1038
     1039#ifdef VBOX_WITH_PDM_AUDIO_DRIVER
     1040            /* Skip the non-existing "AudioSniffer" device stored in the saved state. */
     1041            if (   uVersion <= PDM_SAVED_STATE_VERSION_PRE_PDM_AUDIO
     1042                && !RTStrCmp(szName, "AudioSniffer"))
     1043                fSkip = true;
     1044#endif
     1045            if (!fSkip)
     1046            {
     1047                LogRel(("Device '%s'/%d not found in current config\n", szName, iInstance));
     1048                if (SSMR3HandleGetAfter(pSSM) != SSMAFTER_DEBUG_IT)
     1049                    return SSMR3SetCfgError(pSSM, RT_SRC_POS, N_("Device '%s'/%d not found in current config"), szName, iInstance);
     1050            }
    10341051        }
    10351052    }
  • trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp

    r51897 r54385  
    172172        return VINF_SUCCESS;
    173173    }
    174     Log2(("PDM: cDevs=%d!\n", cDevs));
     174    Log2(("PDM: cDevs=%u\n", cDevs));
    175175
    176176    /*
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