- Timestamp:
- Sep 13, 2016 1:31:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r63718 r63813 1647 1647 case AC97_CAS: 1648 1648 /* Codec Access Semaphore Register */ 1649 Log FlowFunc(("CAS %d\n", pThis->cas));1649 Log3Func(("CAS %d\n", pThis->cas)); 1650 1650 *pu32Val = pThis->cas; 1651 1651 pThis->cas = 1; … … 1656 1656 /* Current Index Value Register */ 1657 1657 *pu32Val = pRegs->civ; 1658 Log FlowFunc(("CIV[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1658 Log3Func(("CIV[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1659 1659 break; 1660 1660 case PI_LVI: … … 1663 1663 /* Last Valid Index Register */ 1664 1664 *pu32Val = pRegs->lvi; 1665 Log FlowFunc(("LVI[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1665 Log3Func(("LVI[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1666 1666 break; 1667 1667 case PI_PIV: … … 1670 1670 /* Prefetched Index Value Register */ 1671 1671 *pu32Val = pRegs->piv; 1672 Log FlowFunc(("PIV[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1672 Log3Func(("PIV[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1673 1673 break; 1674 1674 case PI_CR: … … 1677 1677 /* Control Register */ 1678 1678 *pu32Val = pRegs->cr; 1679 Log FlowFunc(("CR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1679 Log3Func(("CR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1680 1680 break; 1681 1681 case PI_SR: … … 1684 1684 /* Status Register (lower part) */ 1685 1685 *pu32Val = pRegs->sr & 0xff; /** @todo r=andy Use RT_LO_U8. */ 1686 Log FlowFunc(("SRb[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1686 Log3Func(("SRb[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1687 1687 break; 1688 1688 default: 1689 1689 *pu32Val = UINT32_MAX; 1690 LogF lowFunc(("U nabm readb %#x -> %#x\n", Port, *pu32Val));1690 LogFunc(("U nabm readb %#x -> %#x\n", Port, *pu32Val)); 1691 1691 break; 1692 1692 } … … 1703 1703 /* Status Register */ 1704 1704 *pu32Val = pRegs->sr; 1705 Log FlowFunc(("SR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1705 Log3Func(("SR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1706 1706 break; 1707 1707 case PI_PICB: … … 1710 1710 /* Position in Current Buffer */ 1711 1711 *pu32Val = pRegs->picb; 1712 Log FlowFunc(("PICB[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1712 Log3Func(("PICB[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1713 1713 break; 1714 1714 default: 1715 1715 *pu32Val = UINT32_MAX; 1716 LogF lowFunc(("U nabm readw %#x -> %#x\n", Port, *pu32Val));1716 LogFunc(("U nabm readw %#x -> %#x\n", Port, *pu32Val)); 1717 1717 break; 1718 1718 } … … 1729 1729 /* Buffer Descriptor Base Address Register */ 1730 1730 *pu32Val = pRegs->bdbar; 1731 Log FlowFunc(("BMADDR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val));1731 Log3Func(("BMADDR[%d] -> %#x\n", AC97_PORT2IDX(uPortIdx), *pu32Val)); 1732 1732 break; 1733 1733 case PI_CIV: … … 1738 1738 * Status Register */ 1739 1739 *pu32Val = pRegs->civ | (pRegs->lvi << 8) | (pRegs->sr << 16); /** @todo r=andy Use RT_MAKE_U32_FROM_U8. */ 1740 Log FlowFunc(("CIV LVI SR[%d] -> %#x, %#x, %#x\n",1741 1740 Log3Func(("CIV LVI SR[%d] -> %#x, %#x, %#x\n", 1741 AC97_PORT2IDX(uPortIdx), pRegs->civ, pRegs->lvi, pRegs->sr)); 1742 1742 break; 1743 1743 case PI_PICB: … … 1748 1748 * Control Register */ 1749 1749 *pu32Val = pRegs->picb | (pRegs->piv << 16) | (pRegs->cr << 24); /** @todo r=andy Use RT_MAKE_U32_FROM_U8. */ 1750 Log FlowFunc(("PICB PIV CR[%d] -> %#x %#x %#x %#x\n",1751 1750 Log3Func(("PICB PIV CR[%d] -> %#x %#x %#x %#x\n", 1751 AC97_PORT2IDX(uPortIdx), *pu32Val, pRegs->picb, pRegs->piv, pRegs->cr)); 1752 1752 break; 1753 1753 case AC97_GLOB_CNT: 1754 1754 /* Global Control */ 1755 1755 *pu32Val = pThis->glob_cnt; 1756 Log FlowFunc(("glob_cnt -> %#x\n", *pu32Val));1756 Log3Func(("glob_cnt -> %#x\n", *pu32Val)); 1757 1757 break; 1758 1758 case AC97_GLOB_STA: 1759 1759 /* Global Status */ 1760 1760 *pu32Val = pThis->glob_sta | AC97_GS_S0CR; 1761 Log FlowFunc(("glob_sta -> %#x\n", *pu32Val));1761 Log3Func(("glob_sta -> %#x\n", *pu32Val)); 1762 1762 break; 1763 1763 default: 1764 1764 *pu32Val = UINT32_MAX; 1765 LogF lowFunc(("U nabm readl %#x -> %#x\n", Port, *pu32Val));1765 LogFunc(("U nabm readl %#x -> %#x\n", Port, *pu32Val)); 1766 1766 break; 1767 1767 } … … 1809 1809 } 1810 1810 pRegs->lvi = u32Val % 32; 1811 Log FlowFunc(("LVI[%d] <- %#x\n", AC97_PORT2IDX(uPortIdx), u32Val));1811 Log3Func(("LVI[%d] <- %#x\n", AC97_PORT2IDX(uPortIdx), u32Val)); 1812 1812 break; 1813 1813 case PI_CR: … … 1839 1839 } 1840 1840 } 1841 Log FlowFunc(("CR[%d] <- %#x (cr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->cr));1841 Log3Func(("CR[%d] <- %#x (cr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->cr)); 1842 1842 break; 1843 1843 } … … 1848 1848 pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK); 1849 1849 ichac97StreamUpdateStatus(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK)); 1850 Log FlowFunc(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr));1850 Log3Func(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr)); 1851 1851 break; 1852 1852 default: 1853 LogF lowFunc(("U nabm writeb %#x <- %#x\n", Port, u32Val));1853 LogFunc(("U nabm writeb %#x <- %#x\n", Port, u32Val)); 1854 1854 break; 1855 1855 } … … 1867 1867 pRegs->sr |= u32Val & ~(AC97_SR_RO_MASK | AC97_SR_WCLEAR_MASK); 1868 1868 ichac97StreamUpdateStatus(pThis, pStream, pRegs->sr & ~(u32Val & AC97_SR_WCLEAR_MASK)); 1869 Log FlowFunc(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr));1869 Log3Func(("SR[%d] <- %#x (sr %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->sr)); 1870 1870 break; 1871 1871 default: 1872 LogF lowFunc(("U nabm writew %#x <- %#x\n", Port, u32Val));1872 LogFunc(("U nabm writew %#x <- %#x\n", Port, u32Val)); 1873 1873 break; 1874 1874 } … … 1885 1885 /* Buffer Descriptor list Base Address Register */ 1886 1886 pRegs->bdbar = u32Val & ~3; 1887 Log FlowFunc(("BDBAR[%d] <- %#x (bdbar %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->bdbar));1887 Log3Func(("BDBAR[%d] <- %#x (bdbar %#x)\n", AC97_PORT2IDX(uPortIdx), u32Val, pRegs->bdbar)); 1888 1888 break; 1889 1889 case AC97_GLOB_CNT: … … 1895 1895 if (!(u32Val & (AC97_GC_WR | AC97_GC_CR))) 1896 1896 pThis->glob_cnt = u32Val & AC97_GC_VALID_MASK; 1897 Log FlowFunc(("glob_cnt <- %#x (glob_cnt %#x)\n", u32Val, pThis->glob_cnt));1897 Log3Func(("glob_cnt <- %#x (glob_cnt %#x)\n", u32Val, pThis->glob_cnt)); 1898 1898 break; 1899 1899 case AC97_GLOB_STA: … … 1901 1901 pThis->glob_sta &= ~(u32Val & AC97_GS_WCLEAR_MASK); 1902 1902 pThis->glob_sta |= (u32Val & ~(AC97_GS_WCLEAR_MASK | AC97_GS_RO_MASK)) & AC97_GS_VALID_MASK; 1903 Log FlowFunc(("glob_sta <- %#x (glob_sta %#x)\n", u32Val, pThis->glob_sta));1903 Log3Func(("glob_sta <- %#x (glob_sta %#x)\n", u32Val, pThis->glob_sta)); 1904 1904 break; 1905 1905 default: 1906 LogF lowFunc(("U nabm writel %#x <- %#x\n", Port, u32Val));1906 LogFunc(("U nabm writel %#x <- %#x\n", Port, u32Val)); 1907 1907 break; 1908 1908 } … … 1929 1929 case 1: 1930 1930 { 1931 Log FlowFunc(("U nam readb %#x\n", Port));1931 Log3Func(("U nam readb %#x\n", Port)); 1932 1932 pThis->cas = 0; 1933 1933 *pu32Val = UINT32_MAX; … … 1944 1944 default: 1945 1945 *pu32Val = ichac97MixerGet(pThis, index); 1946 Log FlowFunc(("nam readw %#x -> %#x\n", Port, *pu32Val));1946 Log3Func(("nam readw %#x -> %#x\n", Port, *pu32Val)); 1947 1947 break; 1948 1948 } … … 1952 1952 case 4: 1953 1953 { 1954 Log FlowFunc(("U nam readl %#x\n", Port));1954 Log3Func(("U nam readl %#x\n", Port)); 1955 1955 pThis->cas = 0; 1956 1956 *pu32Val = UINT32_MAX; … … 1959 1959 1960 1960 default: 1961 { 1962 AssertFailed(); 1961 1963 return VERR_IOM_IOPORT_UNUSED; 1964 } 1962 1965 } 1963 1966 return VINF_SUCCESS; … … 1976 1979 case 1: 1977 1980 { 1978 Log FlowFunc(("U nam writeb %#x <- %#x\n", Port, u32Val));1981 Log3Func(("U nam writeb %#x <- %#x\n", Port, u32Val)); 1979 1982 pThis->cas = 0; 1980 1983 break; … … 2024 2027 case AC97_Vendor_ID1: 2025 2028 case AC97_Vendor_ID2: 2026 LogF lowFunc(("Attempt to write vendor ID to %#x\n", u32Val));2029 LogFunc(("Attempt to write vendor ID to %#x\n", u32Val)); 2027 2030 break; 2028 2031 case AC97_Extended_Audio_ID: 2029 LogF lowFunc(("Attempt to write extended audio ID to %#x\n", u32Val));2032 LogFunc(("Attempt to write extended audio ID to %#x\n", u32Val)); 2030 2033 break; 2031 2034 case AC97_Extended_Audio_Ctrl_Stat: … … 2043 2046 ichac97StreamReInit(pThis, &pThis->StreamMicIn); 2044 2047 } 2045 LogF lowFunc(("Setting extended audio control to %#x\n", u32Val));2048 LogFunc(("Setting extended audio control to %#x\n", u32Val)); 2046 2049 ichac97MixerSet(pThis, AC97_Extended_Audio_Ctrl_Stat, u32Val); 2047 2050 break; … … 2050 2053 { 2051 2054 ichac97MixerSet(pThis, index, u32Val); 2052 LogF lowFunc(("Set front DAC rate to %RU32\n", u32Val));2055 LogFunc(("Set front DAC rate to %RU32\n", u32Val)); 2053 2056 ichac97StreamReInit(pThis, &pThis->StreamOut); 2054 2057 } … … 2060 2063 { 2061 2064 ichac97MixerSet(pThis, index, u32Val); 2062 LogF lowFunc(("Set MIC ADC rate to %RU32\n", u32Val));2065 LogFunc(("Set MIC ADC rate to %RU32\n", u32Val)); 2063 2066 ichac97StreamReInit(pThis, &pThis->StreamMicIn); 2064 2067 } … … 2070 2073 { 2071 2074 ichac97MixerSet(pThis, index, u32Val); 2072 LogF lowFunc(("Set front LR ADC rate to %RU32\n", u32Val));2075 LogFunc(("Set front LR ADC rate to %RU32\n", u32Val)); 2073 2076 ichac97StreamReInit(pThis, &pThis->StreamLineIn); 2074 2077 } … … 2077 2080 break; 2078 2081 default: 2079 LogF lowFunc(("U nam writew %#x <- %#x\n", Port, u32Val));2082 LogFunc(("U nam writew %#x <- %#x\n", Port, u32Val)); 2080 2083 ichac97MixerSet(pThis, index, u32Val); 2081 2084 break; … … 2086 2089 case 4: 2087 2090 { 2088 Log FlowFunc(("U nam writel %#x <- %#x\n", Port, u32Val));2091 Log3Func(("U nam writel %#x <- %#x\n", Port, u32Val)); 2089 2092 pThis->cas = 0; 2090 2093 break;
Note:
See TracChangeset
for help on using the changeset viewer.