VirtualBox

Changeset 55445 in vbox


Ignore:
Timestamp:
Apr 27, 2015 12:40:15 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99791
Message:

SB16: Implemented reset handler (finally).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevSB16.cpp

    r55412 r55445  
    20872087
    20882088/**
     2089 * @interface_method_impl{PDMDEVREG,pfnReset}
     2090 */
     2091static DECLCALLBACK(void) sb16DevReset(PPDMDEVINS pDevIns)
     2092{
     2093    PSB16STATE pThis = PDMINS_2_DATA(pDevIns, PSB16STATE);
     2094
     2095    /* Bring back the device to initial state, and especially make
     2096     * sure there's no interrupt or DMA activity.
     2097     */
     2098    PDMDevHlpISASetIrq(pThis->pDevIns, pThis->irq, 0);
     2099
     2100    pThis->mixer_regs[0x82] = 0;
     2101    pThis->csp_regs[5]      = 1;
     2102    pThis->csp_regs[9]      = 0xf8;
     2103
     2104    pThis->dma_auto = 0;
     2105    pThis->in_index = 0;
     2106    pThis->out_data_len = 0;
     2107    pThis->left_till_irq = 0;
     2108    pThis->needed_bytes = 0;
     2109    pThis->block_size = -1;
     2110    pThis->nzero = 0;
     2111    pThis->highspeed = 0;
     2112    pThis->v2x6 = 0;
     2113    pThis->cmd = -1;
     2114
     2115    sb16MixerReset(pThis);
     2116    sb16SpeakerControl(pThis, 0);
     2117    sb16Control(pThis, 0);
     2118    sb16ResetLegacy(pThis);
     2119}
     2120
     2121/**
    20892122 * @interface_method_impl{PDMIBASE,pfnQueryInterface}
    20902123 */
     
    23702403    NULL,
    23712404    /* pfnReset */
    2372     NULL,
     2405    sb16DevReset,
    23732406    /* pfnSuspend */
    23742407    NULL,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette