VirtualBox

Changeset 87604 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 4, 2021 11:47:45 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142639
Message:

Audio/HDA: Make sure that unsupported guest speaker setups (> 2) also fall back to the right Hz rate (unless VBOX_WITH_AUDIO_HDA_51_SURROUND is set).

File:
1 edited

Legend:

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

    r87587 r87604  
    285285                                   VERR_INVALID_PARAMETER);
    286286
    287     /*
    288      * Set the stream's timer Hz rate, based on the stream channel count.
    289      * Currently this is just a rough guess and we might want to optimize this further.
    290      *
    291      * In any case, more channels per SDI/SDO means that we have to drive data more frequently.
    292      */
    293     if (pThis->uTimerHz == HDA_TIMER_HZ_DEFAULT) /* Make sure that we don't have any custom Hz rate set we want to enforce */
    294     {
    295         if (Props.cChannels >= 5)
    296             pStreamShared->State.uTimerHz = 300;
    297         else if (Props.cChannels == 4)
    298             pStreamShared->State.uTimerHz = 150;
    299         else
    300             pStreamShared->State.uTimerHz = 100;
    301     }
    302     else
    303         pStreamShared->State.uTimerHz = pThis->uTimerHz;
    304 
    305287#ifndef VBOX_WITH_AUDIO_HDA_51_SURROUND
    306288    if (Props.cChannels > 2)
     
    318300    }
    319301#endif
     302
     303    /*
     304     * Set the stream's timer Hz rate, based on the stream channel count.
     305     * Currently this is just a rough guess and we might want to optimize this further.
     306     *
     307     * In any case, more channels per SDI/SDO means that we have to drive data more frequently.
     308     */
     309    if (pThis->uTimerHz == HDA_TIMER_HZ_DEFAULT) /* Make sure that we don't have any custom Hz rate set we want to enforce */
     310    {
     311        if (Props.cChannels >= 5)
     312            pStreamShared->State.uTimerHz = 300;
     313        else if (Props.cChannels == 4)
     314            pStreamShared->State.uTimerHz = 150;
     315        else
     316            pStreamShared->State.uTimerHz = 100;
     317    }
     318    else
     319        pStreamShared->State.uTimerHz = pThis->uTimerHz;
    320320
    321321    /* Did some of the vital / critical parameters change?
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