NetBSD Problem Report #37613

From zza@serpens.de  Tue Dec 25 21:43:58 2007
Return-Path: <zza@serpens.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 28F4863B852
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Dec 2007 21:43:58 +0000 (UTC)
Message-Id: <200712252114.lBPLEqrT009245@serpens.de>
Date: Tue, 25 Dec 2007 22:14:54 +0100 (MET)
From: Bernhard Moellemann <zza@serpens.de>
Reply-To: zza@serpens.de
To: gnats-bugs@NetBSD.org
Subject: esa doesn't work after resume on Compaq Evo N600c
X-Send-Pr-Version: 3.95

>Number:         37613
>Category:       kern
>Synopsis:       esa doesn't work after resume on Compaq Evo N600c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 25 21:45:01 +0000 2007
>Last-Modified:  Wed Mar 18 13:39:09 +0000 2009
>Originator:     Bernhard Moellemann
>Release:        NetBSD 4.99.42
>Organization:
	Home, sweet home
>Environment:


System: NetBSD borg 4.99.42 NetBSD 4.99.42 (GENERIC) #0: Wed Dec 19 05:31:11 CET 2007 root@arcanic:/mnt/top/src/src/obj/sys/arch/i386/compile/GENERIC

Architecture: i386
Machine: i386
>Description:
	After resuming from sysctl -w machdep.sleep_state=3 the sound
        does no longer work. Regardless of the mixer settings no sound
        is played. The player programs seems happy and display normal behaviour.
        Sound is esa.
>How-To-Repeat:
        Install current from 2007-12-19, play sound: It works.
        Stop the sound. Suspend with sysctl -w machdep.sleep_state=3
        Play sound: Nothing to hear.
>Fix:
	Dont know.

Here my dmesg:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.42 (GENERIC) #0: Wed Dec 19 05:31:11 CET 2007
	root@arcanic:/mnt/top/src/src/obj/sys/arch/i386/compile/GENERIC
total memory = 255 MB
avail memory = 237 MB
timecounter: Timecounters tick every 10.000 msec
userconf: configure system autoconfiguration:
uc> disable lpt
[ 10] lpt0 disabled
[ 11] lpt1 disabled
[ 12] lpt2 disabled
[ 13] lpt* disabled
uc> disable fdc
[398] fdc0 disabled
uc> disable midi
[  1] midi* disabled
[  2] midi* disabled
uc> disable com
[145] com0 disabled
[146] com1 disabled
[147] com2 disabled
[148] com* disabled
[149] com* disabled
[150] com* disabled
[151] com* disabled
[152] com* disabled
[153] com* disabled
[154] com* disabled
[155] com* disabled
uc> quit
Continuing...
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
BIOS32 rev. 0 found at 0xf0000
SMBIOS rev. 2.3 @ 0xfc087 (37 entries)
Compaq Evo N600c                           
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Mobile Pentium III (686-class), 797.40 MHz, id 0x6b1
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>
cpu0: "Intel(R) Pentium(R) III Mobile CPU      1200MHz"
cpu0: I-cache 16 KB 32B/line 4-way, D-cache 16 KB 32B/line 4-way
cpu0: L2 cache 512 KB 32B/line 8-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: 16 page colors
acpi0 at mainbus0: Advanced Configuration and Power Interface
acpi0: using Intel ACPI CA subsystem version 20070320
acpi0: X/RSDT: OemId <COMPAQ,CPQ0030 ,31120320>, AslId <CPQ ,00000001>
mpacpi: could not get bus number, assuming bus 0
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BA: ACPI: Found matching pin for 0.29.INTA at func 0: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BD: ACPI: Found matching pin for 0.29.INTB at func 1: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BC: ACPI: Found matching pin for 0.29.INTC at func 2: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BC: ACPI: Found matching pin for 0.31.INTA at func 1: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BB: ACPI: Found matching pin for 1.0.INTA at func 0: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0C0: ACPI: Found matching pin for 2.3.INTA at func 0: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BF: ACPI: Found matching pin for 2.4.INTA at func 0: 11
acpi_pci_link: WARNING: powerhook_establish is deprecated
C0BE: ACPI: Found matching pin for 2.8.INTA at func 0: 11
C0BA: ACPI: Found matching pin for 2.9.INTA at func 0: 11
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
C000 (ACPI Object Type 'Processor' [0x0c]) at acpi0 not configured
C00D (PNP0C01) [System Board] at acpi0 not configured
C03E (PNP0A03) [PCI/PCI-X Host Bridge] at acpi0 not configured
C0D1 (PNP0A06) [Generic Container Device] at acpi0 not configured
C149 (PNP0501) [16550A-compatible COM port] at acpi0 not configured
C14E (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C14F (PNP0700) [PC standard floppy disk controller] at acpi0 not configured
C162 (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C166 (SMCF010) at acpi0 not configured
C167 (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C168 (PNP0401) [ECP printer port] at acpi0 not configured
C16B (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
npx1 at acpi0 (C16D, PNP0C04)
npx1: io 0xf0-0xff irq 13
npx1: reported by CPUID; using exception 16
attimer1 at acpi0 (C16E, PNP0100): AT Timer
attimer1: io 0x40-0x43 irq 0
C15C (PNP0200) [AT DMA Controller] at acpi0 not configured
pcppi1 at acpi0 (C16F, PNP0800)
pcppi1: io 0x61
sysbeep0 at pcppi1
C170 (PNP0B00) [AT Real-Time Clock] at acpi0 not configured
pckbc1 at acpi0 (C171, PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
pckbc2 at acpi0 (C172, PNP0F13): aux port
pckbc2: irq 12
C174 (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C175 (PNP0000) [AT Interrupt Controller] at acpi0 not configured
C1DA (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
C0BA (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C0BB (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C0BC (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C0BD (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C0BE (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C0BF (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C0C0 (PNP0C0F) [PCI interrupt link device] at acpi0 not configured
C1D7 (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
acpibat0 at acpi0 (C19F, PNP0C0A-1): ACPI Battery (Control Method)
acpibat1 at acpi0 (C1A0, PNP0C0A-2): ACPI Battery (Control Method)
acpiacad0 at acpi0 (C1A2, ACPI0003): ACPI AC Adapter
acpibut0 at acpi0 (C1A3, PNP0C0E): ACPI Sleep Button
acpilid0 at acpi0 (C1A4, PNP0C0D): ACPI Lid Switch
C1C1 (PNP0C02) [Plug and Play motherboard register resources] at acpi0 not configured
C1F3 (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C1F4 (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C1F5 (ACPI Object Type 'Power' [0x0b]) at acpi0 not configured
C1F6 (PNP0C0B) [ACPI Fan] at acpi0 not configured
C1F7 (PNP0C0B) [ACPI Fan] at acpi0 not configured
C1F8 (PNP0C0B) [ACPI Fan] at acpi0 not configured
acpitz0 at acpi0 (TZ1): active cooling level 0: 75.0C active cooling level 1: 65.0C active cooling level 2: 50.0C critical 108.0C passive 55.0C
apm0 at acpi0: Power Management spec V1.2
pcppi1: attached to attimer1
[...]
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>
audio0 at esa0: full duplex, mmap, independent
[...]
esa0: hardware volume interrupt
esa0: esa_intr: FIXME
[...]
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
Kernelized RAIDframe activated
Too many symbols for tree, skipping 1350 symbols
pad0: outputs: 44100Hz, 16-bit, stereo
audio1 at pad0: half duplex
[...]
acpibat0: battery info:  COMPAQ , LIon, Primary 0000004D4622660085
acpiacad0: AC adapter offline.
acpilid0: lid opened.
acpilid0: lid closed.
acpiacad0: AC adapter online.

The machine runs usually NetBSD 4.0_RC1 and I get the lines with
"esa_intr: FIXME" there too.

    Bernhard  //
            \X/

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->jmcneill
Responsible-Changed-By: jmcneill@narn.netbsd.org
Responsible-Changed-When: Tue, 22 Jan 2008 02:46:15 +0000
Responsible-Changed-Why:
Mine.


From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: gnats-bugs@NetBSD.org
Cc: jmcneill@NetBSD.org, kern-bug-people@netbsd.org, 
 netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, zza@serpens.de
Subject: Re: kern/37613 (esa doesn't work after resume on Compaq Evo N600c)
Date: Mon, 21 Jan 2008 21:50:30 -0500

 This is a multi-part message in MIME format.
 --------------080108010005000304010009
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit

 If you run eg. 'mpg123 -v file.mp3', do you see the playback running, or 
 is the play counter stalled?

 Also, can you please try the attached patch?

 Thanks!

 Jared


 --------------080108010005000304010009
 Content-Type: text/x-patch;
  name="esa.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="esa.patch"

 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	22 Jan 2008 02:48:20 -0000
 @@ -1674,6 +1674,11 @@

  	delay(10000);

 +	/* Disable legacy emulation */
 +	data = pci_conf_read(pc, tag, PCI_LEGACY_AUDIO_CTRL);
 +	data |= DISABLE_LEGACY;
 +	pci_conf_write(pc, tag, PCI_LEGACY_AUDIO_CTRL, data);
 +
  	esa_config(sc);

  	reset_state = esa_assp_halt(sc);
 @@ -1694,8 +1699,8 @@
  	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);

  	return true;
  }

 --------------080108010005000304010009--

From: Bernhard Moellemann <zza@serpens.de>
To: "Jared D. McNeill" <jmcneill@invisible.ca>
Cc: gnats-bugs@NetBSD.org, jmcneill@NetBSD.org, kern-bug-people@NetBSD.org,
        netbsd-bugs@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: kern/37613 (esa doesn't work after resume on Compaq Evo N600c)
Date: Wed, 23 Jan 2008 09:15:21 +0100

 Hi!

 Sorry for the delay, but this is my office computer and being used 8-]

 You asked:

 > If you run eg. 'mpg123 -v file.mp3', do you see the playback running, or 
 > is the play counter stalled?

 It stalls.

 > Also, can you please try the attached patch?

 It doesn't change anything: It boots, it suspends, it awaks, it no longer
 plays sound.

 I had to slightly modify it, because data, pc and tag were not defined.
 I added

   pcireg_t data;

 and used

   sc->sc_pct instead of pc
   sc->sc_tag instead of tag

 in pci_conf_read/write(). If this was the wrong choice, please correct me.

 As a (probably worthless) datapoint: With GENERIC.NOACPI suspend is working
 again on this Evo N600c and the sound works after the wake.

     Bernhard  //
             \X/

 PS: The lines

 esa0: hardware volume interrupt
 esa0: esa_intr: FIXME

 are still in the dmesg of the patched kernel and the .NOACPI version.

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Bernhard Moellemann <zza@serpens.de>
Cc: gnats-bugs@NetBSD.org, jmcneill@NetBSD.org, 
 kern-bug-people@NetBSD.org, netbsd-bugs@NetBSD.org, 
 gnats-admin@NetBSD.org
Subject: Re: kern/37613 (esa doesn't work after resume on Compaq Evo N600c)
Date: Wed, 23 Jan 2008 07:17:17 -0500

 Bernhard Moellemann wrote:
 > PS: The lines
 > 
 > esa0: hardware volume interrupt
 > esa0: esa_intr: FIXME
 > 
 > are still in the dmesg of the patched kernel and the .NOACPI version.

 That's fine -- it is a feature that I never implemented as the only card 
 I have is a PCI card so the hardware volume pins weren't wired.

 Cheers,
 Jared

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: Bernhard Moellemann <zza@serpens.de>
Cc: gnats-bugs@NetBSD.org, jmcneill@NetBSD.org, 
 kern-bug-people@NetBSD.org, netbsd-bugs@NetBSD.org, 
 gnats-admin@NetBSD.org
Subject: Re: kern/37613 (esa doesn't work after resume on Compaq Evo N600c)
Date: Wed, 23 Jan 2008 07:19:20 -0500

 Bernhard Moellemann wrote:
 > Hi!
 > 
 > Sorry for the delay, but this is my office computer and being used 8-]
 > 
 > You asked:
 > 
 >> If you run eg. 'mpg123 -v file.mp3', do you see the playback running, or 
 >> is the play counter stalled?
 > 
 > It stalls.
 > 
 >> Also, can you please try the attached patch?
 > 
 > It doesn't change anything: It boots, it suspends, it awaks, it no longer
 > plays sound.

 Can you please provide the output of 'pcictl pci0 dump -d <pci devid>' 
 for this device before and after suspend with the GENERIC kernel?

 Thanks!

 Jared

Responsible-Changed-From-To: jmcneill->kern-bug-people
Responsible-Changed-By: jmcneill@NetBSD.org
Responsible-Changed-When: Wed, 18 Mar 2009 13:39:09 +0000
Responsible-Changed-Why:
Feedback timeout, but still an issue, and I'm out of ideas.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.