VirtualBox

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


Ignore:
Timestamp:
Aug 10, 2010 6:52:49 AM (14 years ago)
Author:
vboxsync
Message:

Audio/HDA: STAC9220 doesn't support EPSS, so "Double reset" detection isn't required. Old style reset should prevent reseting Default Configuration controls.

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

Legend:

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

    r31502 r31507  
    579579        uint8_t i;
    580580        Log(("HDAcodec: enters reset\n"));
    581         if (pState->fFirstResetDetected)
     581        for (i = 0; i < STAC9220_NODE_COUNT; ++i)
    582582        {
    583             LogRel(("HDAcodec: \"Double\" reset detected\n"));
    584             pState->fFirstResetDetected = false;
    585             for (i = 0; i < STAC9220_NODE_COUNT; ++i)
    586             {
    587                 stac9220ResetNode(pState, i, &pState->pNodes[i]);
    588             }
    589         }   
    590         else
    591             pState->fFirstResetDetected = true;
     583            stac9220ResetNode(pState, i, &pState->pNodes[i]);
     584        }
     585        pState->fInReset = false;
    592586        Log(("HDAcodec: exits reset\n"));
    593587    }
     
    980974            pNode->port.u32F08_param = 0;
    981975            pNode->port.u32F09_param = RT_BIT(31)|0x9920; /* 39.2 kOm */
    982             pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x20, 0x40, 0x21, 0x02);
     976            if (!pState->fInReset)
     977                pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x20, 0x40, 0x21, 0x02);
    983978            goto port_init;
    984979        case 0xB:
     
    988983            pNode->port.u32F09_param = 0;
    989984            pNode->port.u32F07_param = RT_BIT(5);
    990             pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x11, 0x60, 0x11, 0x01);
     985            if (!pState->fInReset)
     986                pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x11, 0x60, 0x11, 0x01);
    991987            goto port_init;
    992988        case 0xC:
     
    996992            pNode->port.u32F09_param = 0;
    997993            pNode->port.u32F07_param = RT_BIT(5);
    998             pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x10, 0x40, 0x11, 0x01);
     994            if (!pState->fInReset)
     995                pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x10, 0x40, 0x11, 0x01);
    999996            goto port_init;
    1000997        case 0xD:
     
    10151012            pNode->port.u32F07_param = RT_BIT(5);
    10161013            pNode->port.u32F09_param = 0;
    1017             pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x51, 0x30, 0x81, 0x01);
     1014            if (!pState->fInReset)
     1015                pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x51, 0x30, 0x81, 0x01);
    10181016            break;
    10191017        case 0xF:
     
    10241022            pNode->port.u32F08_param = 0;
    10251023            pNode->port.u32F07_param = 0;
    1026             pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x12, 0x60, 0x11, 0x01);
     1024            if (!pState->fInReset)
     1025                pNode->port.u32F1c_param = RT_MAKE_U32_FROM_U8(0x12, 0x60, 0x11, 0x01);
    10271026            pNode->node.au8F02_param[0] = 0x5;
    10281027            pNode->port.u32F09_param = 0;
     
    10371036            *(uint32_t *)pNode->node.au8F02_param = RT_MAKE_U32_FROM_U8(0x08, 0x17, 0x0, 0);
    10381037            pNode->digout.u32F07_param = 0;
    1039             pNode->digout.u32F1c_param = RT_MAKE_U32_FROM_U8(0x30, 0x10, 0x45, 0x01);
     1038            if (!pState->fInReset)
     1039                pNode->digout.u32F1c_param = RT_MAKE_U32_FROM_U8(0x30, 0x10, 0x45, 0x01);
    10401040        break;
    10411041        case 0x11:
     
    10481048            pNode->digin.u32F09_param = 0;
    10491049            pNode->digin.u32F0c_param = 0;
    1050             pNode->digin.u32F1c_param = (0x1 << 24) | (0xc5 << 16) | (0x10 << 8) | 0x60;
     1050            if (!pState->fInReset)
     1051                pNode->digin.u32F1c_param = (0x1 << 24) | (0xc5 << 16) | (0x10 << 8) | 0x60;
    10511052        break;
    10521053        case 0x12:
     
    10781079            pNode->node.au32F00_param[0xc] = RT_BIT(5);
    10791080            pNode->cdnode.u32F07_param = 0;
    1080             pNode->cdnode.u32F1c_param = RT_MAKE_U32_FROM_U8(0x52, 0x0, 0x33, 0x90);
     1081            if (!pState->fInReset)
     1082                pNode->cdnode.u32F1c_param = RT_MAKE_U32_FROM_U8(0x52, 0x0, 0x33, 0x90);
    10811083        break;
    10821084        case 0x16:
     
    11801182        if ((CODEC_VERBDATA(cmd) & pState->pVerbs[i].mask) == pState->pVerbs[i].verb)
    11811183        {
    1182             if(    pState->fFirstResetDetected
    1183                 && CODEC_VERBDATA(cmd) != 0x7FF00
    1184                 && CODEC_VERBDATA(cmd) != 0)
    1185                 pState->fFirstResetDetected = false;
    11861184            *pfn = pState->pVerbs[i].pfn;
    11871185            return VINF_SUCCESS;
     
    12301228    pState->pfnLookup = codecLookup;
    12311229    pState->pNodes = (PCODECNODE)RTMemAllocZ(sizeof(CODECNODE) * STAC9220_NODE_COUNT);
    1232     pState->fFirstResetDetected = false;
     1230    pState->fInReset = false;
    12331231    uint8_t i;
    12341232    for (i = 0; i < STAC9220_NODE_COUNT; ++i)
  • trunk/src/VBox/Devices/Audio/DevCodec.h

    r31502 r31507  
    223223    /** Mic in */
    224224    SWVoiceIn               *voice_mc;
    225     void *pHDAState;
    226     bool fFirstResetDetected;
     225    void                    *pHDAState;
     226    bool                    fInReset;
    227227    DECLR3CALLBACKMEMBER(int, pfnProcess, (struct CODECState *));
    228228    DECLR3CALLBACKMEMBER(int, pfnLookup, (struct CODECState *pState, uint32_t verb, PPFNCODECVERBPROCESSOR));
  • trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp

    r31502 r31507  
    12011201{
    12021202    INTELHDLinkState *pState = (INTELHDLinkState *)pCodecState->pHDAState;
    1203     pCodecState->fFirstResetDetected = true;
    12041203    return VINF_SUCCESS;
    12051204}
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