|
Lines 991-1002
Link Here
|
| 991 |
return 0; |
991 |
return 0; |
| 992 |
} |
992 |
} |
| 993 |
|
993 |
|
|
|
994 |
static int |
| 995 |
ess_resume(device_t dev) |
| 996 |
{ |
| 997 |
struct ess_info *sc; |
| 998 |
|
| 999 |
sc = pcm_getdevinfo(dev); |
| 1000 |
if (ess_reset_dsp(sc)) |
| 1001 |
goto no; |
| 1002 |
if (mixer_reinit(dev) == -1) |
| 1003 |
goto no; |
| 1004 |
port_wr(sc->io, 0x7, 0xb0, 1); /* enable irqs */ |
| 1005 |
if (sc->newspeed) |
| 1006 |
ess_setmixer(sc, 0x71, 0x2a); |
| 1007 |
return 0; |
| 1008 |
no: |
| 1009 |
device_printf(dev, "unable to reinitialize the card or mixer\n"); |
| 1010 |
return ENXIO; |
| 1011 |
} |
| 1012 |
|
| 994 |
static device_method_t ess_methods[] = { |
1013 |
static device_method_t ess_methods[] = { |
| 995 |
/* Device interface */ |
1014 |
/* Device interface */ |
| 996 |
DEVMETHOD(device_probe, ess_probe), |
1015 |
DEVMETHOD(device_probe, ess_probe), |
| 997 |
DEVMETHOD(device_attach, ess_attach), |
1016 |
DEVMETHOD(device_attach, ess_attach), |
| 998 |
DEVMETHOD(device_detach, ess_detach), |
1017 |
DEVMETHOD(device_detach, ess_detach), |
| 999 |
DEVMETHOD(device_resume, bus_generic_resume), |
1018 |
DEVMETHOD(device_resume, ess_resume), |
| 1000 |
DEVMETHOD(device_suspend, bus_generic_suspend), |
1019 |
DEVMETHOD(device_suspend, bus_generic_suspend), |
| 1001 |
|
1020 |
|
| 1002 |
{ 0, 0 } |
1021 |
{ 0, 0 } |