VirtualBox

Changeset 89379 in vbox for trunk


Ignore:
Timestamp:
May 30, 2021 2:33:49 PM (4 years ago)
Author:
vboxsync
Message:

Audio: Removed PDMAUDIOSTREAMCFG::enmLayout and PDMAUDIOSTREAMLAYOUT. bugref:9890

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioifs.h

    r89372 r89379  
    503503
    504504/**
    505  * Audio stream (data) layout.
    506  */
    507 typedef enum PDMAUDIOSTREAMLAYOUT
    508 {
    509     /** Invalid zero value as per usual (guards against using unintialized values). */
    510     PDMAUDIOSTREAMLAYOUT_INVALID = 0,
    511     /** Unknown access type; do not use (hdaR3StreamMapReset uses it). */
    512     PDMAUDIOSTREAMLAYOUT_UNKNOWN,
    513     /** Non-interleaved access, that is, consecutive access to the data.
    514      * @todo r=bird: For plain stereo this is actually interleaves left/right.  What
    515      *       I guess non-interleaved means, is that there are no additional
    516      *       information interleaved next to the interleaved stereo.
    517      *       https://stackoverflow.com/questions/17879933/whats-the-interleaved-audio */
    518     PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED,
    519     /** Interleaved access, where the data can be mixed together with data of other audio streams. */
    520     PDMAUDIOSTREAMLAYOUT_INTERLEAVED,
    521     /** Complex layout, which does not fit into the interleaved / non-interleaved layouts. */
    522     PDMAUDIOSTREAMLAYOUT_COMPLEX,
    523     /** Raw (pass through) data, with no data layout processing done.
    524      *
    525      *  This means that this stream will operate on PDMAUDIOFRAME data
    526      *  directly. Don't use this if you don't have to.
    527      *
    528      * @deprecated Replaced by S64 (signed, 64-bit sample size).  */
    529     PDMAUDIOSTREAMLAYOUT_RAW,
    530     /** End of valid values. */
    531     PDMAUDIOSTREAMLAYOUT_END,
    532     /** Hack to blow the type up to 32-bit. */
    533     PDMAUDIOSTREAMLAYOUT_32BIT_HACK = 0x7fffffff
    534 } PDMAUDIOSTREAMLAYOUT;
    535 
    536 /**
    537505 * Stream channel data block.
    538506 */
     
    718686    /** The stream's PCM properties. */
    719687    PDMAUDIOPCMPROPS        Props;
    720     /** The stream's audio data layout.
    721      *  This indicates how the audio data buffers to/from the backend is being layouted.
    722      *
    723      *  Currently, the following layouts are supported by the audio connector:
    724      *
    725      *  PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED:
    726      *      One stream at once. The consecutive audio data is exactly in the format and frame width
    727      *      like defined in the PCM properties. This is the default.
    728      *
    729      *  PDMAUDIOSTREAMLAYOUT_RAW:
    730      *      Can be one or many streams at once, depending on the stream's mixing buffer setup.
    731      *      The audio data will get handled as PDMAUDIOFRAME frames without any modification done.
    732      *
    733      * @todo r=bird: See PDMAUDIOSTREAMLAYOUT comments. */
    734     PDMAUDIOSTREAMLAYOUT    enmLayout;
    735688    /** Device emulation-specific data needed for the audio connector. */
    736689    struct
     
    760713        uint32_t            cFramesPreBuffering;
    761714    } Backend;
    762     uint32_t                u32Padding;
    763715    /** Friendly name of the stream. */
    764716    char                    szName[64];
     
    11851137
    11861138/** PDMIAUDIOCONNECTOR interface ID. */
    1187 #define PDMIAUDIOCONNECTOR_IID                  "36fee65e-cbb3-4bb7-a028-e88e6acc1c46"
     1139#define PDMIAUDIOCONNECTOR_IID                  "ae82616d-0da7-489a-aa4c-3e74d112ca9c"
    11881140
    11891141
     
    14791431
    14801432/** PDMIHOSTAUDIO interface ID. */
    1481 #define PDMIHOSTAUDIO_IID                           "da3c9d33-e532-415b-9156-db31521f59ef"
     1433#define PDMIHOSTAUDIO_IID                           "b942d1cd-ffbf-490b-a296-74f30884bbd6"
    14821434
    14831435
     
    15641516
    15651517/** PDMIHOSTAUDIOPORT interface ID. */
    1566 #define PDMIHOSTAUDIOPORT_IID                    "9f91ec59-95ba-4925-92dc-e75be1c63352"
     1518#define PDMIHOSTAUDIOPORT_IID                    "d42144e9-867e-4d1c-86d4-acb92b47f013"
    15671519
    15681520/** @} */
  • trunk/include/VBox/vmm/pdmaudioinline.h

    r89342 r89379  
    946946        return pCfg1->enmDir    == pCfg2->enmDir
    947947            && pCfg1->enmPath   == pCfg2->enmPath
    948             && pCfg1->enmLayout == pCfg2->enmLayout
    949948            && pCfg1->Device.cMsSchedulingHint == pCfg2->Device.cMsSchedulingHint
    950949            && pCfg1->Backend.cFramesPeriod == pCfg2->Backend.cFramesPeriod
     
    980979{
    981980    AssertPtrReturn(pCfg, false);
    982     AssertMsgReturn(pCfg->enmDir    >= PDMAUDIODIR_UNKNOWN          && pCfg->enmDir    < PDMAUDIODIR_END,
    983                     ("%d\n", pCfg->enmDir), false);
    984     AssertMsgReturn(pCfg->enmLayout >= PDMAUDIOSTREAMLAYOUT_UNKNOWN && pCfg->enmLayout < PDMAUDIOSTREAMLAYOUT_END,
    985                     ("%d\n", pCfg->enmLayout), false);
     981    AssertMsgReturn(pCfg->enmDir >= PDMAUDIODIR_UNKNOWN && pCfg->enmDir < PDMAUDIODIR_END, ("%d\n", pCfg->enmDir), false);
    986982    return PDMAudioPropsAreValid(&pCfg->Props);
    987983}
  • trunk/src/VBox/Devices/Audio/AudioHlp.cpp

    r89342 r89379  
    153153{
    154154    /* Ugly! HDA attach code calls us with uninitialized (all zero) config. */
    155     if (   pCfg->enmLayout != PDMAUDIOSTREAMLAYOUT_INVALID
    156         || PDMAudioPropsHz(&pCfg->Props) != 0)
     155    if (PDMAudioPropsHz(&pCfg->Props) != 0)
    157156    {
    158157        if (PDMAudioStrmCfgIsValid(pCfg))
     
    160159            if (   pCfg->enmDir == PDMAUDIODIR_IN
    161160                || pCfg->enmDir == PDMAUDIODIR_OUT)
    162             {
    163                 /* As stated elsewhere, the following is non-sense and must be eliminated. */
    164                 if (   pCfg->enmLayout == PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED
    165                     || pCfg->enmLayout == PDMAUDIOSTREAMLAYOUT_INTERLEAVED
    166                     || pCfg->enmLayout == PDMAUDIOSTREAMLAYOUT_RAW)
    167                     return AudioHlpPcmPropsAreValid(&pCfg->Props);
    168             }
     161                return AudioHlpPcmPropsAreValid(&pCfg->Props);
    169162        }
    170163    }
  • trunk/src/VBox/Devices/Audio/AudioMixer.cpp

    r89371 r89379  
    22712271                CfgHost.enmDir    = pSink->enmDir;
    22722272                CfgHost.enmPath   = pCfg->enmPath;
    2273                 CfgHost.enmLayout = pCfg->enmLayout;
    22742273                CfgHost.Device    = pCfg->Device;
    22752274                RTStrCopy(CfgHost.szName, sizeof(CfgHost.szName), pCfg->szName);
  • trunk/src/VBox/Devices/Audio/DevHda.cpp

    r89346 r89379  
    16731673            RTStrPrintf(pCfg->szName, RT_ELEMENTS(pCfg->szName), "Front");
    16741674
    1675             pCfg->enmPath           = PDMAUDIOPATH_OUT_FRONT;
    1676             pCfg->enmLayout         = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
     1675            pCfg->enmPath = PDMAUDIOPATH_OUT_FRONT;
    16771676            /// @todo PDMAudioPropsSetChannels(&pCfg->Props, 2); ?
    16781677
     
    16861685            RTStrPrintf(pCfg->szName, RT_ELEMENTS(pCfg->szName), "Center/LFE");
    16871686
    1688             pCfg->enmPath           = PDMAUDIOPATH_OUT_CENTER_LFE;
    1689             pCfg->enmLayout         = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
     1687            pCfg->enmPath = PDMAUDIOPATH_OUT_CENTER_LFE;
    16901688            PDMAudioPropsSetChannels(&pCfg->Props, fUseCenter && fUseLFE ? 2 : 1);
    16911689
     
    16981696            RTStrPrintf(pCfg->szName, RT_ELEMENTS(pCfg->szName), "Rear");
    16991697
    1700             pCfg->enmPath           = PDMAUDIOPATH_OUT_REAR;
    1701             pCfg->enmLayout         = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
     1698            pCfg->enmPath = PDMAUDIOPATH_OUT_REAR;
    17021699            PDMAudioPropsSetChannels(&pCfg->Props, 2);
    17031700
     
    44024399                    Cfg.enmDir                        = PDMAUDIODIR_OUT;
    44034400                    Cfg.enmPath                       = PDMAUDIOPATH_OUT_FRONT;
    4404                     Cfg.enmLayout                     = PDMAUDIOSTREAMLAYOUT_INTERLEAVED;
    44054401                    Cfg.Device.cMsSchedulingHint      = 10;
    44064402                    Cfg.Backend.cFramesPreBuffering   = UINT32_MAX;
  • trunk/src/VBox/Devices/Audio/DevHdaStream.cpp

    r89302 r89379  
    548548#  error "Implement me!"
    549549# else
    550             pCfg->enmPath   = PDMAUDIOPATH_IN_LINE;
    551             pCfg->enmLayout = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
     550            pCfg->enmPath = PDMAUDIOPATH_IN_LINE;
    552551            RTStrCopy(pCfg->szName, sizeof(pCfg->szName), "Line In");
    553552# endif
  • trunk/src/VBox/Devices/Audio/DevHdaStream.h

    r88943 r89379  
    158158    uint32_t                idxScheduleLoop;
    159159
     160    uint64_t                u64Padding;
    160161    /** Buffer descriptors and additional timer scheduling state.
    161162     * (Same as HDABDLEDESC, with more sensible naming.)  */
  • trunk/src/VBox/Devices/Audio/DevHdaStreamMap.cpp

    r88300 r89379  
    349349
    350350            Assert(pMap->cbGuestFrame); /* Frame size must not be 0. */
    351             pMap->enmLayout = PDMAUDIOSTREAMLAYOUT_INTERLEAVED;
    352351            return VINF_SUCCESS;
    353352        }
     
    385384{
    386385    AssertPtrReturnVoid(pMap);
    387 
    388     pMap->enmLayout = PDMAUDIOSTREAMLAYOUT_UNKNOWN;
    389386
    390387    if (pMap->paMappings)
  • trunk/src/VBox/Devices/Audio/DevHdaStreamMap.h

    r88235 r89379  
    3030     * The host properties are found in HDASTREAMSTATE::Cfg::Props.  */
    3131    PDMAUDIOPCMPROPS                GuestProps;
    32     /** The stream's layout. */
    33     PDMAUDIOSTREAMLAYOUT            enmLayout;
    3432    /** The guest side frame size in bytes. */
    3533    uint8_t                         cbGuestFrame;
     
    3836    /** Number of mappings in paMappings. */
    3937    uint8_t                         cMappings;
    40     uint8_t                         aPadding[1];
     38    uint8_t                         aPadding[1+4];
    4139    /** Array of stream mappings.
    4240     *  Note: The mappings *must* be layed out in an increasing order, e.g.
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r89371 r89379  
    17511751            Cfg.enmDir      = PDMAUDIODIR_IN;
    17521752            Cfg.enmPath     = PDMAUDIOPATH_IN_LINE;
    1753             Cfg.enmLayout   = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
    17541753            RTStrCopy(Cfg.szName, sizeof(Cfg.szName), "Line-In");
    17551754
     
    17641763            Cfg.enmDir      = PDMAUDIODIR_IN;
    17651764            Cfg.enmPath     = PDMAUDIOPATH_IN_MIC;
    1766             Cfg.enmLayout   = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
    17671765            RTStrCopy(Cfg.szName, sizeof(Cfg.szName), "Mic-In");
    17681766
     
    17771775            Cfg.enmDir      = PDMAUDIODIR_OUT;
    17781776            Cfg.enmPath     = PDMAUDIOPATH_OUT_FRONT;
    1779             Cfg.enmLayout   = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
    17801777            RTStrCopy(Cfg.szName, sizeof(Cfg.szName), "Output");
    17811778
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r89347 r89379  
    21852185            pStream->Cfg.enmDir    = PDMAUDIODIR_OUT;
    21862186            pStream->Cfg.enmPath   = PDMAUDIOPATH_OUT_FRONT;
    2187             pStream->Cfg.enmLayout = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
    21882187
    21892188            PDMAudioPropsInit(&pStream->Cfg.Props, 1 /* 8-bit */, false /* fSigned */, 1 /* Mono */, 11025 /* uHz */);
     
    22242223            pStream->Cfg.enmDir      = PDMAUDIODIR_OUT;
    22252224            pStream->Cfg.enmPath     = PDMAUDIOPATH_OUT_FRONT;
    2226             pStream->Cfg.enmLayout   = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
    22272225
    22282226            RTStrCopy(pStream->Cfg.szName, sizeof(pStream->Cfg.szName), "Output");
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r89329 r89379  
    15621562 * @param   pStreamEx   Stream to initialize.
    15631563 * @param   pCfgHost    Stream configuration to use for the host side (backend).
     1564 *                      This will be adjusted.
    15641565 * @param   pCfgGuest   Stream configuration to use for the guest side.
    15651566 */
    15661567static int drvAudioStreamInitInternal(PDRVAUDIO pThis, PDRVAUDIOSTREAM pStreamEx,
    1567                                       PPDMAUDIOSTREAMCFG pCfgHost, PPDMAUDIOSTREAMCFG pCfgGuest)
     1568                                      PPDMAUDIOSTREAMCFG pCfgHost, PCPDMAUDIOSTREAMCFG pCfgGuest)
    15681569{
    15691570    /*
     
    15711572     */
    15721573    pStreamEx->Core.uMagic = PDMAUDIOSTREAM_MAGIC;
    1573 
    1574     /* Set the host's default audio data layout. */
    1575 /** @todo r=bird: Why, oh why? OTOH, the layout stuff is non-sense anyway. */
    1576     pCfgHost->enmLayout = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED;
    15771574
    15781575#ifdef LOG_ENABLED
     
    16651662    AssertRC(rc);
    16661663
    1667     /* Set the guests's default audio data layout. */
    1668     pCfgGuest->enmLayout = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED; /** @todo r=bird: WTF DO WE DO THIS?  It's input and probably should've been const... */
    16691664    rc = PDMAudioStrmCfgCopy(&pStreamEx->Guest.Cfg, pCfgGuest);
    16701665    AssertRC(rc);
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r89258 r89379  
    313313     * st_sample_t and PDMAUDIOFRAME).
    314314     */
    315     pCfgAcq->enmLayout = PDMAUDIOSTREAMLAYOUT_RAW;
    316315    PDMAudioPropsInitEx(&pCfgAcq->Props, 8 /*64-bit*/, true /*fSigned*/, 2 /*stereo*/, 22050 /*Hz*/,
    317316                        true /*fLittleEndian*/, true /*fRaw*/);
     
    343342     * see st_sample_t and PDMAUDIOFRAME).
    344343     */
    345     pCfgAcq->enmLayout = PDMAUDIOSTREAMLAYOUT_RAW;
    346344    PDMAudioPropsInitEx(&pCfgAcq->Props, 8 /*64-bit*/, true /*fSigned*/, 2 /*stereo*/, 22050 /*Hz*/,
    347345                        true /*fLittleEndian*/, true /*fRaw*/);
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