VirtualBox

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


Ignore:
Timestamp:
Jul 19, 2018 2:56:24 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123846
Message:

Audio/PDM: Added (tweakable) parameters to the audio stream configuration and give the audio connector(s) a scheduling hint from the device emulation(s), if available.

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

Legend:

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

    r73214 r73241  
    312312#endif
    313313    /** The stream's current configuration. */
    314     PDMAUDIOSTREAMCFG     Cfg; //+96
     314    PDMAUDIOSTREAMCFG     Cfg; //+100
     315    uint32_t              Padding;
    315316#ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
    316317    /** Asynchronous I/O state members. */
     
    16871688    AssertCompile(sizeof(pCfg->szName) >= 8);
    16881689
     1690    /* Set scheduling hint (if available). */
     1691    if (pThis->cTimerTicks)
     1692        pCfg->Device.uSchedulingHintMs = 1000 /* ms */ / (TMTimerGetFreq(pThis->pTimerR3) / pThis->cTimerTicks);
     1693
    16891694    switch (pStream->u8SD)
    16901695    {
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r73205 r73241  
    21442144    if (RT_FAILURE(rc))
    21452145        return rc;
     2146
     2147    /* Set scheduling hint (if available). */
     2148    if (pThis->cTimerTicksIO)
     2149        pThis->Out.Cfg.Device.uSchedulingHintMs = 1000 /* ms */ / (TMTimerGetFreq(pThis->pTimerIO) / pThis->cTimerTicksIO);
    21462150
    21472151    PSB16DRIVER pDrv;
  • trunk/src/VBox/Devices/Audio/HDAStream.cpp

    r73213 r73241  
    194194        return rc;
    195195    }
     196
     197    /* Set scheduling hint (if available). */
     198    if (pThis->u16TimerHz)
     199        pCfg->Device.uSchedulingHintMs = 1000 /*ms */ / pThis->u16TimerHz;
    196200
    197201    /* (Re-)Allocate the stream's internal DMA buffer, based on the PCM  properties we just got above. */
  • trunk/src/VBox/Devices/Audio/HDAStream.h

    r71754 r73241  
    165165     *  Should match SDFMT. */
    166166    PDMAUDIOSTREAMCFG       Cfg;
     167    uint32_t                aPadding3;
    167168#ifdef HDA_USE_DMA_ACCESS_HANDLER
    168169    /** List of DMA handlers. */
     
    175176    uint16_t                cbDMALeft;
    176177    /** Unused, padding. */
    177     uint8_t                 abPadding3[2+4];
     178    uint8_t                 abPadding4[2+4];
    178179} HDASTREAMSTATE;
    179180AssertCompileSizeAlignment(HDASTREAMSTATE, 8);
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