Changeset 71750 in vbox for trunk/src/VBox
- Timestamp:
- Apr 8, 2018 2:52:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r71741 r71750 2532 2532 * variable regardless of what @a cbVal might say. 2533 2533 * @param cbVal Number of bytes read. 2534 * @remarks Caller enters the device critical section.2535 2534 */ 2536 2535 static DECLCALLBACK(int) ichac97IOPortNABMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, … … 2706 2705 * @param u32Val The value to output. 2707 2706 * @param cbVal The value size in bytes. 2708 * @remarks Caller enters the device critical section.2709 2707 */ 2710 2708 static DECLCALLBACK(int) ichac97IOPortNABMWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, … … 2899 2897 * variable regardless of what @a cbVal might say. 2900 2898 * @param cbVal Number of bytes read. 2901 * @remarks Caller enters the device critical section.2902 2899 */ 2903 2900 static DECLCALLBACK(int) ichac97IOPortNAMRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT uPort, uint32_t *pu32Val, unsigned cbVal) … … 2906 2903 PAC97STATE pThis = (PAC97STATE)pvUser; 2907 2904 2908 DEVAC97_LOCK(pThis); /** @todo r=bird: some disconnect between the remark of this function docs and this locking statement. */2905 DEVAC97_LOCK(pThis); 2909 2906 2910 2907 int rc = VINF_SUCCESS; … … 3697 3694 pThis->uCodecModel = AC97_CODEC_AD1981B; 3698 3695 else 3699 {3700 3696 return PDMDevHlpVMSetError(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, RT_SRC_POS, 3701 N_("AC'97 configuration error: The \"Codec\" value \"%s\" is unsupported"), 3702 szCodec); 3703 } 3697 N_("AC'97 configuration error: The \"Codec\" value \"%s\" is unsupported"), szCodec); 3704 3698 3705 3699 /* … … 3722 3716 3723 3717 /* PCI Device */ 3724 PCIDevSetVendorId 3725 PCIDevSetDeviceId 3726 PCIDevSetCommand 3727 PCIDevSetStatus (&pThis->PciDev, VBOX_PCI_STATUS_DEVSEL_MEDIUM | VBOX_PCI_STATUS_FAST_BACK); /* 06 rwc?,ro? - pcists. */Assert(pThis->PciDev.abConfig[0x06] == 0x80); Assert(pThis->PciDev.abConfig[0x07] == 0x02);3728 PCIDevSetRevisionId 3729 PCIDevSetClassProg 3730 PCIDevSetClassSub 3731 PCIDevSetClassBase (&pThis->PciDev, 0x04); /* 0b ro - bcc; 04 == multimedia. */Assert(pThis->PciDev.abConfig[0x0b] == 0x04);3732 PCIDevSetHeaderType 3733 PCIDevSetBaseAddress 3734 3735 PCIDevSetBaseAddress 3736 3737 PCIDevSetInterruptLine 3738 PCIDevSetInterruptPin 3718 PCIDevSetVendorId (&pThis->PciDev, 0x8086); /* 00 ro - intel. */ Assert(pThis->PciDev.abConfig[0x00] == 0x86); Assert(pThis->PciDev.abConfig[0x01] == 0x80); 3719 PCIDevSetDeviceId (&pThis->PciDev, 0x2415); /* 02 ro - 82801 / 82801aa(?). */ Assert(pThis->PciDev.abConfig[0x02] == 0x15); Assert(pThis->PciDev.abConfig[0x03] == 0x24); 3720 PCIDevSetCommand (&pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */ Assert(pThis->PciDev.abConfig[0x04] == 0x00); Assert(pThis->PciDev.abConfig[0x05] == 0x00); 3721 PCIDevSetStatus (&pThis->PciDev, VBOX_PCI_STATUS_DEVSEL_MEDIUM | VBOX_PCI_STATUS_FAST_BACK); /* 06 rwc?,ro? - pcists. */ Assert(pThis->PciDev.abConfig[0x06] == 0x80); Assert(pThis->PciDev.abConfig[0x07] == 0x02); 3722 PCIDevSetRevisionId (&pThis->PciDev, 0x01); /* 08 ro - rid. */ Assert(pThis->PciDev.abConfig[0x08] == 0x01); 3723 PCIDevSetClassProg (&pThis->PciDev, 0x00); /* 09 ro - pi. */ Assert(pThis->PciDev.abConfig[0x09] == 0x00); 3724 PCIDevSetClassSub (&pThis->PciDev, 0x01); /* 0a ro - scc; 01 == Audio. */ Assert(pThis->PciDev.abConfig[0x0a] == 0x01); 3725 PCIDevSetClassBase (&pThis->PciDev, 0x04); /* 0b ro - bcc; 04 == multimedia.*/Assert(pThis->PciDev.abConfig[0x0b] == 0x04); 3726 PCIDevSetHeaderType (&pThis->PciDev, 0x00); /* 0e ro - headtyp. */ Assert(pThis->PciDev.abConfig[0x0e] == 0x00); 3727 PCIDevSetBaseAddress (&pThis->PciDev, 0, /* 10 rw - nambar - native audio mixer base. */ 3728 true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.abConfig[0x10] == 0x01); Assert(pThis->PciDev.abConfig[0x11] == 0x00); Assert(pThis->PciDev.abConfig[0x12] == 0x00); Assert(pThis->PciDev.abConfig[0x13] == 0x00); 3729 PCIDevSetBaseAddress (&pThis->PciDev, 1, /* 14 rw - nabmbar - native audio bus mastering. */ 3730 true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.abConfig[0x14] == 0x01); Assert(pThis->PciDev.abConfig[0x15] == 0x00); Assert(pThis->PciDev.abConfig[0x16] == 0x00); Assert(pThis->PciDev.abConfig[0x17] == 0x00); 3731 PCIDevSetInterruptLine(&pThis->PciDev, 0x00); /* 3c rw. */ Assert(pThis->PciDev.abConfig[0x3c] == 0x00); 3732 PCIDevSetInterruptPin (&pThis->PciDev, 0x01); /* 3d ro - INTA#. */ Assert(pThis->PciDev.abConfig[0x3d] == 0x01); 3739 3733 3740 3734 if (pThis->uCodecModel == AC97_CODEC_AD1980)
Note:
See TracChangeset
for help on using the changeset viewer.