VirtualBox

Changeset 67907 in vbox


Ignore:
Timestamp:
Jul 11, 2017 2:00:07 PM (8 years ago)
Author:
vboxsync
Message:

Audio/DevHDA: More docs, cleanup.

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

Legend:

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

    r67901 r67907  
    137137
    138138#ifdef HDA_USE_DMA_ACCESS_HANDLER
     139/**
     140 * Struct for keeping an HDA DMA access handler context.
     141 */
    139142typedef struct HDADMAACCESSHANDLER
    140143{
     
    207210#ifndef VBOX_DEVICE_STRUCT_TESTCASE
    208211#ifdef IN_RING3
    209 static void hdaGctlReset(PHDASTATE pThis);
     212static void hdaGCTLReset(PHDASTATE pThis);
    210213#endif
    211214
     
    864867        HDA_REG(pThis, GCTL) &= ~HDA_GCTL_CRST;
    865868
    866         hdaGctlReset(pThis);
     869        hdaGCTLReset(pThis);
    867870#else
    868871        return VINF_IOM_R3_MMIO_WRITE;
     
    25222525 *
    25232526 */
    2524 static void hdaGctlReset(PHDASTATE pThis)
     2527static void hdaGCTLReset(PHDASTATE pThis)
    25252528{
    25262529    LogFlowFuncEnter();
     
    40594062    HDA_REG(pThis, WAKEEN)  = 0x0;
    40604063
    4061     hdaGctlReset(pThis);
     4064    hdaGCTLReset(pThis);
    40624065
    40634066    /* Indicate that HDA is not in reset. The firmware is supposed to (un)reset HDA,
  • trunk/src/VBox/Devices/Audio/DevHDACommon.cpp

    r67906 r67907  
    3131#include "HDAStream.h"
    3232
    33 AssertCompileSize(HDABDLEDESC, 16); /* Always 16 byte. Also must be aligned on 128-byte boundary. */
    34 AssertCompile(HDA_MAX_SDI <= HDA_MAX_SDO);
    3533
    3634#ifndef DEBUG
     
    501499#endif /* IN_RING3 */
    502500
     501/**
     502 * Returns a new INTSTS value based on the current device state.
     503 *
     504 * @returns Determined INTSTS register value.
     505 * @param   pThis               HDA state.
     506 *
     507 * @remark  This function does *not* set INTSTS!
     508 */
    503509uint32_t hdaGetINTSTS(PHDASTATE pThis)
    504510{
  • trunk/src/VBox/Devices/Audio/DevHDACommon.h

    r67902 r67907  
    7070#define HDA_MAX_SDO                 4
    7171#define HDA_MAX_STREAMS             (HDA_MAX_SDI + HDA_MAX_SDO)
     72AssertCompile(HDA_MAX_SDI <= HDA_MAX_SDO);
    7273
    7374/** Number of general registers. */
     
    535536    uint32_t     fFlags;
    536537} HDABDLEDESC, *PHDABDLEDESC;
     538AssertCompileSize(HDABDLEDESC, 16); /* Always 16 byte. Also must be aligned on 128-byte boundary. */
    537539
    538540/**
  • trunk/src/VBox/Devices/Audio/HDAStreamChannel.cpp

    r67698 r67907  
    2727#include "HDAStreamChannel.h"
    2828
     29/**
     30 * Initializes a stream channel data structure.
     31 *
     32 * @returns IPRT status code.
     33 * @param   pChanData           Channel data to initialize.
     34 * @param   fFlags
     35 */
    2936int hdaStreamChannelDataInit(PPDMAUDIOSTREAMCHANNELDATA pChanData, uint32_t fFlags)
    3037{
     
    3946
    4047/**
    41  * Frees a stream channel data block again.
     48 * Destroys a stream channel data structure.
    4249 *
    43  * @param   pChanData           Pointer to channel data to free.
     50 * @param   pChanData           Channel data to destroy.
    4451 */
    4552void hdaStreamChannelDataDestroy(PPDMAUDIOSTREAMCHANNELDATA pChanData)
     
    5764}
    5865
     66/**
     67 * Extracts HDA audio stream data and stores it into the given stream channel data block.
     68 *
     69 * @returns IPRT status code.
     70 * @param   pChan               Channel data to extract audio stream data into.
     71 * @param   pvBuf               Buffer of audio data to extract.
     72 * @param   cbBuf               Size (in bytes) of audio data to extract.
     73 */
    5974int hdaStreamChannelExtract(PPDMAUDIOSTREAMCHANNEL pChan, const void *pvBuf, size_t cbBuf)
    6075{
     
    105120}
    106121
     122/**
     123 * Advances the current read / write pointer by a certain amount.
     124 *
     125 * @returns IPRT status code.
     126 * @param   pChan               Channel data to advance read / write pointer for.
     127 * @param   cbAdv               Amount (in bytes) to advance read / write pointer.
     128 *
     129 * @remark  Currently not used / implemented.
     130 */
    107131int hdaStreamChannelAdvance(PPDMAUDIOSTREAMCHANNEL pChan, size_t cbAdv)
    108132{
     
    115139}
    116140
     141/**
     142 * Acquires (reads) audio channel data.
     143 * Must be released when done with hdaStreamChannelReleaseData().
     144 *
     145 * @returns IPRT status code.
     146 * @param   pChanData           Channel data to acquire audio channel data from.
     147 * @param   pvData              Pointer to buffer where to store the acquired data.
     148 * @param   pcbData             Size (in bytes) of acquired data.
     149 */
    117150int hdaStreamChannelAcquireData(PPDMAUDIOSTREAMCHANNELDATA pChanData, void *pvData, size_t *pcbData)
    118151{
     
    127160}
    128161
     162/**
     163 * Releases formerly acquired data by hdaStreamChannelAcquireData().
     164 *
     165 * @returns IPRT status code.
     166 * @param   pChanData           Channel data to release formerly acquired data for.
     167 */
    129168int hdaStreamChannelReleaseData(PPDMAUDIOSTREAMCHANNELDATA pChanData)
    130169{
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