From owner-freebsd-bugs@FreeBSD.ORG Fri Dec 31 09:20:28 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67D7916A4CF for ; Fri, 31 Dec 2004 09:20:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 36CD143D45 for ; Fri, 31 Dec 2004 09:20:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBV9KSvM034018 for ; Fri, 31 Dec 2004 09:20:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBV9KSJ9034017; Fri, 31 Dec 2004 09:20:28 GMT (envelope-from gnats) Resent-Date: Fri, 31 Dec 2004 09:20:28 GMT Resent-Message-Id: <200412310920.iBV9KSJ9034017@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, KAWATA Masahiko Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5F8516A4CF for ; Fri, 31 Dec 2004 09:20:06 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 727CF43D31 for ; Fri, 31 Dec 2004 09:20:06 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBV9K6u5044953 for ; Fri, 31 Dec 2004 09:20:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id iBV9K6vg044952; Fri, 31 Dec 2004 09:20:06 GMT (envelope-from nobody) Message-Id: <200412310920.iBV9K6vg044952@www.freebsd.org> Date: Fri, 31 Dec 2004 09:20:06 GMT From: KAWATA Masahiko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/75687: No sound on PC which is implemented ac97 eapd in an inverted sense X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2004 09:20:28 -0000 >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: port 0xe000-0xe03f,0xee00-0xeeff mem 0xffaff400-0xffaff4ff,0xffaff800-0xffaff9ff irq 9 at device 31.5 on pci0 pcm0: [GIANT-LOCKED] pcm0: 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 #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: