VirtualBox

Changeset 89783 in vbox for trunk/include


Ignore:
Timestamp:
Jun 18, 2021 9:28:50 PM (4 years ago)
Author:
vboxsync
Message:

pdmaudioifs.h: More doc updates. bugref:9890

File:
1 edited

Legend:

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

    r89782 r89783  
    2626/** @page pg_pdm_audio  PDM Audio
    2727 *
    28  * @section sec_pdm_audio_overview  Audio architecture overview
     28 * @section sec_pdm_audio_overview  Overview
    2929 *
    3030@startuml
     
    4141          DrvStreamOut0 --> LUN0
    4242          DrvStreamOut1 --> LUN1
    43           [Output MixerBuffer] --> DrvStreamOut0
    44           [Output MixerBuffer] --> DrvStreamOut1
    45           [Output MixerBuffer] <- [Output DMA Engine]
     43          [Output Mixer Buffer] --> DrvStreamOut0
     44          [Output Mixer Buffer] --> DrvStreamOut1
     45          [Output Mixer Buffer] <-- [Output DMA Engine]
    4646      }
    4747      component "Input Sink" {
    4848          LUN0 --> DrvStreamIn0
    4949          LUN1 --> DrvStreamIn1
    50           [Input MixerBuffer] <-- DrvStreamIn0
    51           [Input MixerBuffer] <-- DrvStreamIn1
    52           [Input MixerBuffer] <- [Input DMA Engine]
     50          [Input Mixer Buffer] <-- DrvStreamIn0
     51          [Input Mixer Buffer] <-- DrvStreamIn1
     52          [Input Mixer Buffer] <-- [Input DMA Engine]
    5353      }
    5454  }
     
    7575@enduml
    7676 *
    77  * The audio architecture mainly consists of two PDM interfaces,
    78  * PDMIAUDIOCONNECTOR and PDMIHOSTAUDIO.
    79  *
    80  * The PDMIAUDIOCONNECTOR interface is responsible of connecting a device
    81  * emulation, such as SB16, AC'97 and HDA to one or multiple audio backend(s).
    82  * Its API abstracts audio stream handling and I/O functions, device enumeration
    83  * and so on.
    84  *
    85  * The PDMIHOSTAUDIO interface must be implemented by all audio backends to
    86  * provide an abstract and common way of accessing needed functions, such as
    87  * transferring output audio data for playing audio or recording input from the
    88  * host.
    89  *
    90  * A device emulation can have one or more LUNs attached to it, whereas these
    91  * LUNs in turn then all have their own PDMIAUDIOCONNECTOR, making it possible
    92  * to connect multiple backends to a certain device emulation stream
    93  * (multiplexing).
    94  *
    95  * An audio backend's job is to record and/or play audio data (depending on its
    96  * capabilities). It highly depends on the host it's running on and needs very
    97  * specific (host-OS-dependent) code. The backend itself only has very limited
    98  * ways of accessing and/or communicating with the PDMIAUDIOCONNECTOR interface
    99  * via callbacks, but never directly with the device emulation or other parts of
    100  * the audio sub system.
     77 * Actors:
     78 *      - An audio device implementation: "DevAudio"
     79 *          - Mixer instance (AudioMixer.cpp) with one or more mixer
     80 *            sinks: "Output Sink",  "Input Sink"
     81 *          - One DMA engine teamed up with each mixer sink: "Output DMA
     82 *            Engine", "Input DMA Engine"
     83 *      - The audio driver "DrvAudio" instances attached to LUN0 and LUN1
     84 *        respectively: "DrvAudio0", "DrvAudio1"
     85 *      - The Windows host audio driver attached to "DrvAudio0": "DrvHostAudioWas"
     86 *      - The VRDE/VRDP host audio driver attached to "DrvAudio1": "DrvAudioVRDE"
     87 *
     88 * Both "Output Sink" and "Input Sink" talks to all the attached driver chains
     89 * ("DrvAudio0" and "DrvAudio1"), but using different PDMAUDIOSTREAM instances.
     90 * There can be an arbritrary number of driver chains attached to an audio
     91 * device, the mixer sinks will multiplex output to each of them and blend input
     92 * from all of them, taking care of format and rate conversions.  The mixer and
     93 * mixer sinks does not fit into the PDM device/driver model, so it is
     94 * implemented as a separate component that all the audio devices share (see
     95 * AudioMixer.h, AudioMixer.cpp, AudioMixBuffer.h and AudioMixBuffer.cpp).
     96 *
     97 * The driver chains attached to LUN0, LUN1, ... LUNn typically have two
     98 * drivers attached, first DrvAudio and then a backend driver like
     99 * DrvHostAudioWasApi, DrvHostAudioPulseAudio, or DrvAudioVRDE.  DrvAudio
     100 * exposes PDMIAUDIOCONNECTOR upwards towards the device and mixer component,
     101 * and PDMIHOSTAUDIOPORT downwards towards DrvHostAudioWasApi and the other
     102 * backends.  The backend exposes the PDMIHOSTAUDIO upwards towards DrvAudio.
     103 *
     104 * The purpose of DrvAudio is to make the work of the backend as simple as
     105 * possible and try avoid needing to write the same code over and over again for
     106 * each backend.  It takes care of:
     107 *      - Stream creation, operation, re-initialization and destruction.
     108 *      - Pre-buffering.
     109 *      - Thread pool.
     110 *
     111 * The purpose of a host audio driver (aka backend) is to interface with the
     112 * host audio system (or other audio systems like VRDP and video recording).
     113 * The backend will optionally provide a list of host audio devices, switch
     114 * between them, and monitor changes to them.  By default our host backends use
     115 * the default host device and will trigger stream re-initialization if this
     116 * changes while we're using it.
    101117 *
    102118 *
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