Changeset 90149 in vbox
- Timestamp:
- Jul 10, 2021 1:18:11 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHda.cpp
r90147 r90149 4746 4746 "|BufSizeOutMs" 4747 4747 "|DebugEnabled" 4748 "|DebugPathOut", 4748 "|DebugPathOut" 4749 "|DeviceName", 4749 4750 ""); 4750 4751 … … 4781 4782 LogRel2(("HDA: Debug output will be saved to '%s'\n", pThisCC->Dbg.pszOutPath)); 4782 4783 4784 /** @devcfgm{hda,DeviceName,string} 4785 * Override the default device/vendor IDs for the emulated device: 4786 * - "" - default 4787 * - "Intel ICH6" 4788 * - "Intel Sunrise Point" - great for macOS 10.15 4789 */ 4790 char szDeviceName[32]; 4791 rc = pHlp->pfnCFGMQueryStringDef(pCfg, "DeviceName", szDeviceName, sizeof(szDeviceName), ""); 4792 if (RT_FAILURE(rc)) 4793 return PDMDEV_SET_ERROR(pDevIns, rc, N_("HDA configuration error: failed to read 'DeviceName' name string")); 4794 enum 4795 { 4796 kDevice_Default, 4797 kDevice_IntelIch6, 4798 kDevice_IntelSunrisePoint /*skylake timeframe*/ 4799 } enmDevice; 4800 if (strcmp(szDeviceName, "") == 0) 4801 enmDevice = kDevice_Default; 4802 else if (strcmp(szDeviceName, "Intel ICH6") == 0) 4803 enmDevice = kDevice_IntelIch6; 4804 else if (strcmp(szDeviceName, "Intel Sunrise Point") == 0) 4805 enmDevice = kDevice_IntelSunrisePoint; 4806 else 4807 return PDMDevHlpVMSetError(pDevIns, VERR_INVALID_PARAMETER, RT_SRC_POS, 4808 N_("HDA configuration error: Unknown 'DeviceName' name '%s'"), szDeviceName); 4809 4783 4810 /* 4784 4811 * Use our own critical section for the device instead of the default … … 4803 4830 PDMPCIDEV_ASSERT_VALID(pDevIns, pPciDev); 4804 4831 4805 PDMPciDevSetVendorId( pPciDev, HDA_PCI_VENDOR_ID); /* nVidia */ 4806 PDMPciDevSetDeviceId( pPciDev, HDA_PCI_DEVICE_ID); /* HDA */ 4832 switch (enmDevice) 4833 { 4834 case kDevice_Default: 4835 PDMPciDevSetVendorId(pPciDev, HDA_PCI_VENDOR_ID); 4836 PDMPciDevSetDeviceId(pPciDev, HDA_PCI_DEVICE_ID); 4837 break; 4838 case kDevice_IntelIch6: /* Our default intel device. */ 4839 PDMPciDevSetVendorId(pPciDev, 0x8086); 4840 PDMPciDevSetDeviceId(pPciDev, 0x2668); 4841 break; 4842 case kDevice_IntelSunrisePoint: /* this is supported by more recent macOS version, at least 10.15 */ 4843 PDMPciDevSetVendorId(pPciDev, 0x8086); 4844 PDMPciDevSetDeviceId(pPciDev, 0x9d70); 4845 break; 4846 } 4807 4847 4808 4848 PDMPciDevSetCommand( pPciDev, 0x0000); /* 04 rw,ro - pcicmd. */
Note:
See TracChangeset
for help on using the changeset viewer.