From owner-freebsd-bugs@FreeBSD.ORG Sun Dec 28 21:20:19 2003 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 1A5EA16A4CF for ; Sun, 28 Dec 2003 21:20:19 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE38343D45 for ; Sun, 28 Dec 2003 21:20:15 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) hBT5KFFR013049 for ; Sun, 28 Dec 2003 21:20:15 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id hBT5KFAj013048; Sun, 28 Dec 2003 21:20:15 -0800 (PST) (envelope-from gnats) Resent-Date: Sun, 28 Dec 2003 21:20:15 -0800 (PST) Resent-Message-Id: <200312290520.hBT5KFAj013048@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, SHINOHARA Takahiro Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B7B316A4CE for ; Sun, 28 Dec 2003 21:11:43 -0800 (PST) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F6AD43D3F for ; Sun, 28 Dec 2003 21:11:35 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.10/8.12.10) with ESMTP id hBT5BZdL058466 for ; Sun, 28 Dec 2003 21:11:35 -0800 (PST) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.10/8.12.10/Submit) id hBT5BZsB058465; Sun, 28 Dec 2003 21:11:35 -0800 (PST) (envelope-from nobody) Message-Id: <200312290511.hBT5BZsB058465@www.freebsd.org> Date: Sun, 28 Dec 2003 21:11:35 -0800 (PST) From: SHINOHARA Takahiro To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.0 Subject: misc/60677: No reaction of volume controy key on IBM Thinkpad i1124 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: Mon, 29 Dec 2003 05:20:19 -0000 >Number: 60677 >Category: misc >Synopsis: No reaction of volume controy key on IBM Thinkpad i1124 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 28 21:20:15 PST 2003 >Closed-Date: >Last-Modified: >Originator: SHINOHARA Takahiro >Release: 5.2-CURRENT >Organization: private >Environment: FreeBSD kunkun.de.la.grant 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sun Dec 28 21:33:42 JST 2003 shino@kunkun.de.la.grant:/usr/src/sys/i386/compile/KUNKUN i386 >Description: ThinkPad i1124 has volume control keys. I push them, but volume is not changed. Because chip(CS4281) register is not set as do so. >How-To-Repeat: boot, play some mp3 or any audio file, and push volume control key. >Fix: diff -ur sys.orig/conf/options.i386 sys/conf/options.i386 --- sys.orig/conf/options.i386 Sat Apr 12 18:40:37 2003 +++ sys/conf/options.i386 Wed Jul 16 20:46:37 2003 @@ -141,6 +141,9 @@ PCVT_VT220KEYB opt_pcvt.h PCVT_GREENSAVER opt_pcvt.h +# Enable hardware volume control for PCM Audio on note PC +PCM_NOTE_HWVOL opt_sound.h + # Video spigot SPIGOT_UNSECURE opt_spigot.h diff -ur sys.orig/dev/sound/pci/cs4281.c sys/dev/sound/pci/cs4281.c --- sys.orig/dev/sound/pci/cs4281.c Fri Feb 21 02:31:11 2003 +++ sys/dev/sound/pci/cs4281.c Wed Jul 16 20:46:50 2003 @@ -29,6 +29,8 @@ * contributed towards power management. */ +#include "opt_sound.h" + #include #include @@ -639,6 +641,13 @@ cs4281_wr(sc, CS4281PCI_ACOSV, CS4281PCI_ACOSV_SLV(3) | CS4281PCI_ACOSV_SLV(4)); + +#ifdef PCM_NOTE_HWVOL + /* Set hardware volume control */ + cs4281_wr(sc, + CS4281PCI_SSCR, + CS4281PCI_SSCR_HVC); +#endif /* PCM_NOTE_HWVOL */ /* Set Master and headphone to max */ cs4281_wrcd(0, sc, AC97_MIX_AUXOUT, 0); diff -ur sys.orig/dev/sound/pci/cs4281.h sys/dev/sound/pci/cs4281.h --- sys.orig/dev/sound/pci/cs4281.h Thu Apr 19 22:23:50 2001 +++ sys/dev/sound/pci/cs4281.h Wed Jul 16 20:46:51 2003 @@ -146,6 +146,8 @@ # define CS4281PCI_SERMC_PTC_MASK 0x0000000e # define CS4281PCI_SERMC_ODSEN1 0x01000000 # define CS4281PCI_SERMC_ODSEN2 0x02000000 +# define CS4281PCI_SERMC_PLB 0x00000010 +# define CS4281PCI_SERMC_PXLB 0x00000020 #define CS4281PCI_SERC1 0x428 #define CS4281PCI_SERC2 0x42c @@ -183,6 +185,15 @@ #define CS4281PCI_DACSR 0x744 #define CS4281PCI_ADCSR 0x748 #define CS4281PCI_SSCR 0x74c +# define CS4281PCI_SSCR_HVS1 0x00800000 +# define CS4281PCI_SSCR_MVCS 0x00080000 +# define CS4281PCI_SSCR_MVLD 0x00040000 +# define CS4281PCI_SSCR_MVAD 0x00020000 +# define CS4281PCI_SSCR_MVMD 0x00010000 +# define CS4281PCI_SSCR_XLPSRC 0x00000100 +# define CS4281PCI_SSCR_LPSRC 0x00000080 +# define CS4281PCI_SSCR_CDTX 0x00000020 +# define CS4281PCI_SSCR_HVC 0x00000008 #define CS4281PCI_SRCSA 0x75c # define CS4281PCI_SRCSA_PLSS(x) (x) diff -ur sys.orig/modules/sound/driver/cs4281/Makefile sys/modules/sound/driver/cs4281/Makefile --- sys.orig/modules/sound/driver/cs4281/Makefile Wed Jul 16 21:00:11 2003 +++ sys/modules/sound/driver/cs4281/Makefile Wed Jul 16 21:08:16 2003 @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../../dev/sound/pci KMOD= snd_cs4281 -SRCS= device_if.h bus_if.h pci_if.h +SRCS= device_if.h bus_if.h pci_if.h opt_sound.h SRCS+= cs4281.c .include >Release-Note: >Audit-Trail: >Unformatted: