Changeset 71745 in vbox for trunk/src/VBox/Devices/Audio/DevSB16.cpp
- Timestamp:
- Apr 7, 2018 10:40:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r71744 r71745 1546 1546 } 1547 1547 1548 static IO_WRITE_PROTO(mixer_write_indexb) 1549 { 1550 RT_NOREF(pDevIns, cb); 1551 PSB16STATE pThis = (PSB16STATE)opaque; 1552 (void) nport; 1548 static int mixer_write_indexb(PSB16STATE pThis, uint32_t val) 1549 { 1553 1550 pThis->mixer_nreg = val; 1554 1555 1551 return VINF_SUCCESS; 1556 1552 } … … 1594 1590 } 1595 1591 1596 static IO_WRITE_PROTO(mixer_write_datab) 1597 { 1598 RT_NOREF(pDevIns, cb); 1599 PSB16STATE pThis = (PSB16STATE)opaque; 1592 1593 static int mixer_write_datab(PSB16STATE pThis, uint8_t val) 1594 { 1600 1595 bool fUpdateMaster = false; 1601 1596 bool fUpdateStream = false; 1602 1597 1603 (void) nport;1604 1598 LogFlowFunc(("mixer_write [%#x] <- %#x\n", pThis->mixer_nreg, val)); 1605 1599 … … 1728 1722 static IO_WRITE_PROTO(mixer_write) 1729 1723 { 1724 RT_NOREF(pDevIns); 1730 1725 PSB16STATE pThis = (PSB16STATE)opaque; 1731 1726 int iport = nport - pThis->port; … … 1736 1731 { 1737 1732 case 4: 1738 mixer_write_indexb (pDevIns, opaque, nport, val, 1);1733 mixer_write_indexb(pThis, val); 1739 1734 break; 1740 1735 case 5: 1741 mixer_write_datab (pDevIns, opaque, nport, val, 1);1736 mixer_write_datab(pThis, val); 1742 1737 break; 1743 1738 } 1744 1739 break; 1745 1740 case 2: 1746 mixer_write_indexb (pDevIns, opaque, nport, val & 0xff, 1);1747 mixer_write_datab (pDevIns, opaque, nport, (val >> 8) & 0xff, 1);1741 mixer_write_indexb(pThis, val & 0xff); 1742 mixer_write_datab(pThis, (val >> 8) & 0xff); 1748 1743 break; 1749 1744 default: … … 2582 2577 AssertMsgFailedReturn(("Error creating IRQ timer, rc=%Rrc\n", rc), rc); 2583 2578 2584 rc = PDMDevHlpIOPortRegister(pDevIns, pThis->port + 0x04, 2, pThis, 2585 mixer_write, mixer_read, NULL, NULL, "SB16"); 2579 rc = PDMDevHlpIOPortRegister(pDevIns, pThis->port + 0x04, 2, pThis, mixer_write, mixer_read, NULL, NULL, "SB16"); 2586 2580 if (RT_FAILURE(rc)) 2587 2581 return rc; 2588 rc = PDMDevHlpIOPortRegister(pDevIns, pThis->port + 0x06, 10, pThis, 2589 dsp_write, dsp_read, NULL, NULL, "SB16"); 2582 rc = PDMDevHlpIOPortRegister(pDevIns, pThis->port + 0x06, 10, pThis, dsp_write, dsp_read, NULL, NULL, "SB16"); 2590 2583 if (RT_FAILURE(rc)) 2591 2584 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.