VirtualBox

Changeset 88159 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 17, 2021 2:42:40 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
143308
Message:

DevHDA: Restructured the input DMA code, getting rid of the FIFO bounce buffering and adding a silence pre-buffering period at the start of the stream (till we get a bit of data from the host device). [fix] bugref:9890

File:
1 edited

Legend:

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

    r88158 r88159  
    15731573static void hdaR3StreamPullFromMixer(PHDASTREAM pStreamShared, PHDASTREAMR3 pStreamR3, PAUDMIXSINK pSink)
    15741574{
     1575    RT_NOREF(pStreamShared);
    15751576    int rc = AudioMixerSinkUpdate(pSink);
    15761577    AssertRC(rc);
     
    22862287            if (pStreamShared->State.fInputPreBuffered && cbStreamUsed >= cbPeriod)
    22872288            { /*likely*/ }
    2288             /* Because it may take a while for the input stream to get going (at
    2289                least with pulseaudio), we feed the guest silence till we've
    2290                pre-buffer a reasonable amount of audio. */
     2289            /*
     2290             * Because it may take a while for the input stream to get going (at
     2291             * least with pulseaudio), we feed the guest silence till we've
     2292             * pre-buffer a reasonable amount of audio.
     2293             */
    22912294            else if (!pStreamShared->State.fInputPreBuffered)
    22922295            {
     
    23122315            else
    23132316            {
     2317                /** @todo We're ending up here to frequently with pulse audio at least (just
     2318                 *        watch the stream stats in the statistcs viewer, and way to often we
     2319                 *        have to inject silence bytes.  I suspect part of the problem is
     2320                 *        that the HDA device require a much better latency than what the
     2321                 *        pulse audio is configured for by default (10 ms vs 150ms). */
    23142322                STAM_REL_COUNTER_INC(&pStreamR3->State.StatDmaFlowProblems);
    23152323                Log(("hdaR3StreamUpdate: Warning! Stream #%u has insufficient data available: %u bytes, need %u.  Will try move pull more data into the buffer...\n",
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