VirtualBox

Changeset 56689 in vbox


Ignore:
Timestamp:
Jun 29, 2015 8:15:25 PM (10 years ago)
Author:
vboxsync
Message:

Audio: Volume control debugging aids.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioMixer.h

    r55920 r56689  
    107107int AudioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol);
    108108int AudioMixerSetSinkVolume(PAUDMIXSINK pSink, PPDMAUDIOVOLUME pVol);
     109void AudioMixerDebug(PAUDIOMIXER pMixer, PCDBGFINFOHLP pHlp, const char *pszArgs);
    109110
    110111#endif /* AUDIO_MIXER_H */
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r56648 r56689  
    33213321
    33223322
     3323/**
     3324 * @callback_method_impl{FNDBGFHANDLERDEV}
     3325 */
     3326static DECLCALLBACK(void) hdaInfoMixer(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs)
     3327{
     3328    PHDASTATE pThis = PDMINS_2_DATA(pDevIns, PHDASTATE);
     3329
     3330    if (pThis->pMixer)
     3331        AudioMixerDebug(pThis->pMixer, pHlp, pszArgs);
     3332    else
     3333        pHlp->pfnPrintf(pHlp, "Mixer not available\n");
     3334}
     3335
     3336
    33233337/* PDMIBASE */
    33243338
     
    37853799        PDMDevHlpDBGFInfoRegister(pDevIns, "hdcnodes",    "HDA codec nodes.",                               hdaInfoCodecNodes);
    37863800        PDMDevHlpDBGFInfoRegister(pDevIns, "hdcselector", "HDA codec's selector states [node number].",     hdaInfoCodecSelector);
     3801        PDMDevHlpDBGFInfoRegister(pDevIns, "hdamixer",    "HDA mixer state.",                               hdaInfoMixer);
    37873802
    37883803        rc = RTStrFormatTypeRegister("sdctl",   hdaFormatStrmCtl,   NULL);
  • trunk/src/VBox/Devices/Audio/DevIchHdaCodec.cpp

    r56648 r56689  
    741741
    742742
     743
     744
     745static DECLCALLBACK(void) stac9220DbgNodes(PHDACODEC pThis, PCDBGFINFOHLP pHlp, const char *pszArgs)
     746{
     747    for (int i = 1; i < 12; i++)
     748    {
     749        PCODECNODE pNode = &pThis->paNodes[i];
     750        AMPLIFIER *pAmp = &pNode->dac.B_params;
     751
     752        uint8_t lVol = AMPLIFIER_REGISTER(*pAmp, AMPLIFIER_OUT, AMPLIFIER_LEFT, 0) & 0x7f;
     753        uint8_t rVol = AMPLIFIER_REGISTER(*pAmp, AMPLIFIER_OUT, AMPLIFIER_RIGHT, 0) & 0x7f;
     754
     755        pHlp->pfnPrintf(pHlp, "0x%x: lVol=%RU8, rVol=%RU8\n", i, lVol, rVol);
     756    }
     757}
    743758
    744759
     
    10881103    unconst(pThis->cTotalNodes) = 0x1C;
    10891104    pThis->pfnCodecNodeReset = stac9220ResetNode;
     1105    pThis->pfnCodecDbgListNodes = stac9220DbgNodes;
    10901106    pThis->u16VendorId = 0x8384;
    10911107    pThis->u16DeviceId = 0x7680;
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