VirtualBox

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


Ignore:
Timestamp:
Jul 23, 2010 3:33:34 AM (14 years ago)
Author:
vboxsync
Message:

audio/HDA: some todo.

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

Legend:

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

    r30992 r31028  
    9090        CODEC_CAD(cmd), CODEC_DIRECT(cmd) ? 'N' : 'Y', CODEC_NID(cmd), CODEC_VERBDATA(cmd)));
    9191    if (CODEC_CAD(cmd) != 0)
    92         *pResp = ((uint64_t)CODEC_CAD(cmd) << 4)| 0xFFFFFFFF;
     92        *pResp = ((uint64_t)CODEC_CAD(cmd) << 4)| 0x0;
    9393    else
    9494        *pResp = 0;
     
    225225        case 1:
    226226            pNode->afg.node.name = "AFG";
    227             //** @todo r=michaln: Are the comments right? Looks like copy & paste.
    228             pNode->node.au32F00_param[4] = RT_MAKE_U32_FROM_U8(0x1a, 0x00, 0x02, 0x00); /* node info (start node: 1, start id = 1) */
    229             pNode->node.au32F00_param[5] = RT_MAKE_U32_FROM_U8(0x1, 0x01, 0x00, 0x0); /* node info (start node: 1, start id = 1) */
     227            pNode->node.au32F00_param[4] = RT_MAKE_U32_FROM_U8(0x1a, 0x00, 0x02, 0x00);
     228            pNode->node.au32F00_param[5] = RT_MAKE_U32_FROM_U8(0x1, 0x01, 0x00, 0x0);
    230229            pNode->node.au32F00_param[8] = RT_MAKE_U32_FROM_U8(0x0d, 0x0d, 0x01, 0x0); /* Capabilities */
    231230            //pNode->node.au32F00_param[0xa] = RT_BIT(19)|RT_BIT(18)|RT_BIT(17)|RT_BIT(10)|RT_BIT(9)|RT_BIT(8)|RT_BIT(7)|RT_BIT(6)|RT_BIT(5);
     
    391390            pNode->node.name = "VolumeKnob";
    392391            pNode->node.au32F00_param[0x9] = (0x6 << 20);
    393             //** @todo r=michaln: The next assignment is out of array bounds (0x13 items in array);
    394             //  the array needs to be bigger.
    395392            pNode->node.au32F00_param[0x13] = RT_BIT(7)| 0x7F;
    396393            pNode->node.au32F00_param[0xe] = 0x4;
     
    582579    pState->cVerbs = STAC9220_VERB_SIZE;
    583580    pState->pfnLookup = codecLookup;
    584     //** @todo r=michaln: Where is this memory freed?
    585581    pState->pNodes = (PCODECNODE)RTMemAllocZ(sizeof(CODECNODE) * STAC9220_NODE_COUNT);
    586582    uint8_t i;
     
    610606    return VINF_SUCCESS;
    611607}
    612 int stac9220Destruct(CODECState *pCodecState);
     608int stac9220Destruct(CODECState *pCodecState)
     609{
     610    RTMemFree(pCodecState->pNodes);
     611    return VINF_SUCCESS;
     612}
  • trunk/src/VBox/Devices/Audio/DevCodec.h

    r30985 r31028  
    3232} CODECVERB;
    3333
    34 #define CODECNODE_F0_PARAM_LENGTH 0x13
     34#define CODECNODE_F0_PARAM_LENGTH 0x14
    3535typedef struct CODECCOMMONNODE
    3636{
  • trunk/src/VBox/Devices/Audio/DevIchIntelHDA.cpp

    r31015 r31028  
    8080#define ICH6_HDA_REG_STATES 7 /* range 0x0E */
    8181#define STATES(pState) (HDA_REG((pState), STATES))
    82 #define ICH6_HDA_STATES_SCSF 0x5
     82#define ICH6_HDA_STATES_SCSF 0x1
    8383
    8484#define ICH6_HDA_REG_GSTS 8 /* range 0x10-0x11*/
     
    585585    if (INTCTL_GIE(pState))
    586586    {
    587         //** @todo r=michaln: This *must* be PCISetIrq instead
    588        
    589587        Log(("hda: irq %s\n", fIrq ? "asserted" : "deasserted"));
    590588        PDMDevHlpPCISetIrq(ICH6_HDASTATE_2_DEVINS(pState), 0 , fIrq);
     
    13451343    pThis->hda.cbCorbBuf = CORBSIZE(&pThis->hda) * sizeof(uint32_t);
    13461344
    1347     //** @todo r=michaln: Where are the Corb/RirbBuf allocations freed?
    13481345    if (pThis->hda.pu32CorbBuf)
    13491346        memset(pThis->hda.pu32CorbBuf, 0, pThis->hda.cbCorbBuf);
     
    14951492    pThis->hda.Codec.pfnTransfer = hdaTransfer;
    14961493
     1494    return VINF_SUCCESS;
     1495}
     1496
     1497/**
     1498 * @interface_method_impl{PDMDEVREG,pfnDestruct}
     1499 */
     1500static DECLCALLBACK(int) hdaDestruct (PPDMDEVINS pDevIns)
     1501{
     1502    PCIINTELHDLinkState *pThis = PDMINS_2_DATA(pDevIns, PCIINTELHDLinkState *);
     1503   
     1504    int rc = stac9220Destruct(&pThis->hda.Codec);
     1505    AssertRC(rc);
     1506    if (pThis->hda.pu32CorbBuf)
     1507        RTMemFree(pThis->hda.pu32CorbBuf);
     1508    if (pThis->hda.pu32CorbBuf)
     1509        RTMemFree(pThis->hda.pu32CorbBuf);
    14971510    return VINF_SUCCESS;
    14981511}
     
    15241537    hdaConstruct,
    15251538    /* pfnDestruct */
    1526     NULL,
     1539    hdaDestruct,
    15271540    /* pfnRelocate */
    15281541    NULL,
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