NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/37613 (esa doesn't work after resume on Compaq Evo N600c)
Bernhard Moellemann wrote:
Hi!
You wrote:
Can you please provide the output of 'pcictl pci0 dump -d <pci devid>'
for this device before and after suspend with the GENERIC kernel?
Since esa seems to reside on pci2:
esa0 at pci2 dev 9 function 0: ESS Technology Allegro-1 PCI Audio Accelerator
(rev. 0x12)
esa0: interrupting at irq 11
esa0: ac97: ESS Technology ES1921 codec; 20 bit DAC, 20 bit ADC, ESS Technology
esa0: ac97: ext id 2<DRA>
I changed the pci0 to pci2
# pcictl pci2 dump -d 9
[...]
And after the wake. Unfortunately there seems to be no difference:
>
> [...]
That's good news. Can you please try the attached patch?
Cheers,
Jared
Index: esa.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/esa.c,v
retrieving revision 1.43
diff -u -r1.43 esa.c
--- esa.c 9 Dec 2007 20:28:07 -0000 1.43
+++ esa.c 24 Jan 2008 12:04:44 -0000
@@ -1669,15 +1669,23 @@
bus_space_handle_t ioh = sc->sc_ioh;
int i, index;
uint8_t reset_state;
+ pcireg_t data;
index = 0;
delay(10000);
+ data = pci_conf_read(sc->sc_pc, sc->sc_pct, PCI_LEGACY_AUDIO_CTRL);
+ pci_conf_write(sc->sc_pc, sc->sc_pct, PCI_LEGACY_AUDIO_CTRL,
+ data | DISABLE_LEGACY);
+
+ bus_space_write_4(sc->sc_iot, sc->sc_ioh, ESA_PCI_ACPI_CONTROL,
ESA_PCI_ACPI_D0);
+
esa_config(sc);
reset_state = esa_assp_halt(sc);
+ esa_init_codec(sc);
esa_codec_reset(sc);
/* restore ASSP */
@@ -1694,8 +1702,11 @@
bus_space_write_1(iot, ioh, ESA_DSP_PORT_CONTROL_REG_B,
reset_state | ESA_REGB_ENABLE_RESET);
- esa_enable_interrupts(sc);
esa_amp_enable(sc);
+ esa_enable_interrupts(sc);
+
+ bus_space_write_1(sc->sc_iot, sc->sc_ioh, ESA_DSP_PORT_CONTROL_REG_B,
+ reset_state | ESA_REGB_ENABLE_RESET);
return true;
}
Home |
Main Index |
Thread Index |
Old Index