FreeBSD Bugzilla – Attachment 24435 Details for
Bug 41809
ESS solo cannot be used after suspend
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.53 KB, created by
Takanori Watanabe
on 2002-08-20 08:30:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Takanori Watanabe
Created:
2002-08-20 08:30:02 UTC
Size:
1.53 KB
patch
obsolete
>Index: solo.c >=================================================================== >RCS file: /home/ncvs/src/sys/dev/sound/pci/solo.c,v >retrieving revision 1.23 >diff -u -r1.23 solo.c >--- solo.c 8 Oct 2001 05:56:56 -0000 1.23 >+++ solo.c 20 Aug 2002 07:21:30 -0000 >@@ -896,7 +896,41 @@ > #define PCI_LEGACYCONTROL 0x40 > #define PCI_CONFIG 0x50 > #define PCI_DDMACONTROL 0x60 >+static int >+ess_suspend(device_t dev) >+{ >+ return 0; >+} >+static int >+ess_resume(device_t dev) >+{ >+ uint16_t ddma; >+ uint32_t data; >+ struct ess_info *sc = pcm_getdevinfo(dev); >+ >+ data = pci_read_config(dev, PCIR_COMMAND, 2); >+ data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; >+ pci_write_config(dev, PCIR_COMMAND, data, 2); >+ data = pci_read_config(dev, PCIR_COMMAND, 2); >+ >+ ddma = rman_get_start(sc->vc) | 1; >+ pci_write_config(dev, PCI_LEGACYCONTROL, 0x805f, 2); >+ pci_write_config(dev, PCI_DDMACONTROL, ddma, 2); >+ pci_write_config(dev, PCI_CONFIG, 0, 2); > >+ if (ess_reset_dsp(sc)) >+ goto no; >+ if (mixer_reinit(dev)) >+ goto no; >+ if (sc->newspeed) >+ ess_setmixer(sc, 0x71, 0x2a); >+ >+ port_wr(sc->io, 0x7, 0xb0, 1); /* enable irqs */ >+ >+ return 0; >+ no: >+ return EIO; >+} > static int > ess_attach(device_t dev) > { >@@ -996,8 +1030,8 @@ > DEVMETHOD(device_probe, ess_probe), > DEVMETHOD(device_attach, ess_attach), > DEVMETHOD(device_detach, ess_detach), >- DEVMETHOD(device_resume, bus_generic_resume), >- DEVMETHOD(device_suspend, bus_generic_suspend), >+ DEVMETHOD(device_resume, ess_resume), >+ DEVMETHOD(device_suspend, ess_suspend), > > { 0, 0 } > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 41809
: 24435