Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Dec 2004 09:20:06 GMT
From:      KAWATA Masahiko <kawata@mta.biglobe.ne.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/75687: No sound on PC which is implemented ac97 eapd in an inverted sense
Message-ID:  <200412310920.iBV9K6vg044952@www.freebsd.org>
Resent-Message-ID: <200412310920.iBV9KSJ9034017@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         75687
>Category:       kern
>Synopsis:       No sound on PC which is implemented ac97 eapd in an inverted sense
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 31 09:20:27 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     KAWATA Masahiko
>Release:        FreeBSD 5.3-STABLE
>Organization:
>Environment:
FreeBSD owen 5.3-STABLE FreeBSD 5.3-STABLE #7: Wed Dec  8 00:46:20 UTC 2004
>Description:
      My note PC(NEC VersaPro VY10F/BH-L) has sound device as following;

      pcm0: <Intel ICH4 (82801DB)> port 0xe000-0xe03f,0xee00-0xeeff
        mem 0xffaff400-0xffaff4ff,0xffaff800-0xffaff9ff irq 9 at device 31.5 on pci0
      pcm0: [GIANT-LOCKED]
      pcm0: <Analog Devices AD1981B AC97 Codec>

      It seems recognized and work well, but sound dose not come out.
>How-To-Repeat:
      Boot PC. and execute sound application. no sound from speakers,
      nor from headphones.
>Fix:
      My PC is implemented ac97 eapd in an inverted sense.
      and some SONY note PC has same implementation(see kern/66422)
      So I propose new kernel option to slove this irregular implementation.
--- sys/dev/sound/pcm/ac97.c.orig       Sat May  8 03:41:40 2004
+++ sys/dev/sound/pcm/ac97.c    Mon Dec 13 01:26:40 2004
@@ -29,6 +29,7 @@
 #include <dev/sound/pcm/ac97_patch.h>

 #include "mixer_if.h"
+#include "opt_ac97.h"

 SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.51 2004/05/08 03:41:40 sanpei Exp $");

@@ -545,6 +546,10 @@
                snd_mtxunlock(codec->lock);
                return ENODEV;
        }
+
+#ifdef AC97_EAPD_INVERT
+       ac97_setflags(codec, AC97_F_EAPD_INV);
+#endif

        ac97_wrcd(codec, AC97_REG_POWER, (codec->flags & AC97_F_EAPD_INV)? 0x8000 : 0x0000);
        ac97_reset(codec);
--- sys/conf/options.orig       Fri Dec 31 13:58:59 2004
+++ sys/conf/options    Fri Dec 31 14:00:21 2004
@@ -682,3 +682,6 @@
 DCONS_POLL_HZ          opt_dcons.h
 DCONS_FORCE_CONSOLE    opt_dcons.h
 DCONS_FORCE_GDB                opt_dcons.h
+
+# for inverted sense AC97 EAPD
+AC97_EAPD_INVERT       opt_ac97.h
--- sys/conf/NOTES.orig Wed Nov 10 19:11:12 2004
+++ sys/conf/NOTES      Fri Dec 31 14:06:08 2004
@@ -2507,3 +2507,6 @@

 # Yet more undocumented options for linting.
 options        VGA_DEBUG
+
+# Some PC is implemented ac97 eapd in an inverted sense.
+#options       AC97_EAPD_INVERT


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412310920.iBV9K6vg044952>