VirtualBox

Changeset 31519 in vbox


Ignore:
Timestamp:
Aug 10, 2010 11:35:59 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64615
Message:

Audio: provide ACPI info for audio card to Mac guests

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r29250 r31519  
    161161    SYSTEM_INFO_INDEX_CPU_EVENT         = 14, /**< The CPU id the event is for */
    162162    SYSTEM_INFO_INDEX_NIC_ADDRESS       = 15, /**< NIC PCI address, or 0 */
    163     SYSTEM_INFO_INDEX_END               = 16,
     163    SYSTEM_INFO_INDEX_AUDIO_ADDRESS     = 16, /**< Audio card PCI address, or 0 */
     164    SYSTEM_INFO_INDEX_END               = 17,
    164165    SYSTEM_INFO_INDEX_INVALID           = 0x80,
    165166    SYSTEM_INFO_INDEX_VALID             = 0x200
     
    255256    bool                fCpuHotPlug;
    256257    /** Primary NIC PCI address */
    257     uint32_t             u32NicPciAddress;
     258    uint32_t            u32NicPciAddress;
     259    /** Primary audio card PCI address */
     260    uint32_t            u32AudioPciAddress;
     261    uint32_t            u32Pad0;
    258262
    259263    /** ACPI port base interface. */
     
    15061510                    break;
    15071511
     1512                case SYSTEM_INFO_INDEX_AUDIO_ADDRESS:
     1513                    *pu32 = s->u32AudioPciAddress;
     1514                    break;
     1515
    15081516                /* This is only for compatability with older saved states that
    15091517                   may include ACPI code that read these values.  Legacy is
     
    23512359                              "ShowCpu\0"
    23522360                              "NicPciAddress\0"
     2361                              "AudioPciAddress\0"
    23532362                              "CpuHotPlug\0"
    23542363                              "AmlFilePath\0"
     
    24042413        return PDMDEV_SET_ERROR(pDevIns, rc,
    24052414                                N_("Configuration error: Failed to read \"NicPciAddress\""));
     2415
     2416    /* query primary NIC PCI address */
     2417    rc = CFGMR3QueryU32Def(pCfg, "AudioPciAddress", &s->u32AudioPciAddress, 0);
     2418    if (RT_FAILURE(rc))
     2419        return PDMDEV_SET_ERROR(pDevIns, rc,
     2420                                N_("Configuration error: Failed to read \"AudioPciAddress\""));
    24062421
    24072422    /* query whether we are allow CPU hot plugging */
  • trunk/src/VBox/Devices/PC/vbox.dsl

    r30593 r31519  
    145145            CPEV,  32,
    146146            NICA,  32,
     147            HDAA,  32,
    147148            Offset (0x80),
    148149            ININ, 32,
     
    787788                 {
    788789                    if (LEqual (NICA, Zero)) {
     790                        Return (0x00)
     791                    }
     792                    else {
     793                        Return (0x0F)
     794                    }
     795                 }
     796            }
     797
     798            // HDA Audio card
     799            Device (HDEF)
     800            {
     801                Method(_ADR, 0, NotSerialized)
     802                {
     803                     Return (HDAA)
     804                }
     805
     806                Method (_STA, 0, NotSerialized)
     807                {
     808                 if (LEqual (HDAA, Zero)) {
    789809                        Return (0x00)
    790810                    }
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r31326 r31519  
    18091809         * AC'97 ICH / SoundBlaster16 audio / Intel HD Audio
    18101810         */
    1811         BOOL enabled;
     1811        BOOL fAudioEnabled;
    18121812        ComPtr<IAudioAdapter> audioAdapter;
    18131813        hrc = pMachine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam());                 H();
    18141814        if (audioAdapter)
    1815             hrc = audioAdapter->COMGETTER(Enabled)(&enabled);                               H();
    1816 
    1817         if (enabled)
     1815            hrc = audioAdapter->COMGETTER(Enabled)(&fAudioEnabled);                         H();
     1816
     1817        if (fAudioEnabled)
    18181818        {
    18191819            AudioControllerType_T audioController;
     
    22622262                uint32_t u32NicPciAddr = (aNic.mPciDev << 16) | aNic.mPciFn;
    22632263                InsertConfigInteger(pCfg, "NicPciAddress",    u32NicPciAddr);
     2264            }
     2265            if (fOsXGuest && fAudioEnabled)
     2266            {
     2267                /** @todo: don't hardcode */
     2268                uint32_t u32AudioPciAddr = (5 << 16) | 0;
     2269                InsertConfigInteger(pCfg, "AudioPciAddress",    u32AudioPciAddr);
    22642270            }
    22652271            InsertConfigInteger(pCfg,  "ShowCpu", fShowCpu);
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