From owner-freebsd-multimedia@FreeBSD.ORG Tue Sep 13 21:03:50 2005 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A14316A41F; Tue, 13 Sep 2005 21:03:50 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from tomoyo.MyBSD.org.my (tomoyo.mybsd.org.my [202.157.186.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id C758943D48; Tue, 13 Sep 2005 21:03:49 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from localhost (localhost [127.0.0.1]) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 9D0E26CC2A; Wed, 14 Sep 2005 05:11:47 +0800 (MYT) Received: from tomoyo.MyBSD.org.my ([127.0.0.1]) by localhost (tomoyo.MyBSD.org.my [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 55594-08; Wed, 14 Sep 2005 05:11:45 +0800 (MYT) Received: from kasumi.MyBSD.org.my (unknown [218.111.181.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 99F226CC29; Wed, 14 Sep 2005 05:11:43 +0800 (MYT) Date: Wed, 14 Sep 2005 05:04:22 +0800 From: Ariff Abdullah To: Michael Nottebrock Message-Id: <20050914050422.39b2aa04.skywizard@MyBSD.org.my> In-Reply-To: <200509132234.25656.lofi@freebsd.org> References: <20050913075835.5f055747.skywizard@MyBSD.org.my> <200509132234.25656.lofi@freebsd.org> Organization: MyBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-antivirus-mail-gateway at TOMOYO.MYBSD.ORG.MY Cc: freebsd-multimedia@freebsd.org Subject: Re: As promised: Soft volume mixer controller (doesn't work for me) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2005 21:03:50 -0000 On Tue, 13 Sep 2005 22:34:23 +0200 Michael Nottebrock wrote: > On Tuesday, 13. September 2005 01:58, Ariff Abdullah wrote: > > > Note on giving feedback: Please include (before / after applying > > patch):- > > Before: PCM volume control is binary - 0 is silent, everything else is > full volume. > > pcm0: port 0xe800-0xe83f,0xec00-0xecff irq 17 > at device 31.5 on pci0 > pcm0: > > Mixer vol is currently set to 100:100 > Mixer pcm is currently set to 100:100 > Mixer speaker is currently set to 0:0 > Mixer line is currently set to 0:0 > Mixer mic is currently set to 0:0 > Mixer cd is currently set to 0:0 > Mixer rec is currently set to 11:11 > Mixer ogain is currently set to 50:50 > Mixer line1 is currently set to 0:0 > Mixer phin is currently set to 0:0 > Mixer phout is currently set to 0:0 > Mixer video is currently set to 0:0 > Recording source: line > > pcm0@pci0:31:5: class=0x040100 card=0x49611849 chip=0x24458086 > rev=0x05 hdr=0x00 > vendor = 'Intel Corporation' > device = '82801BA/BAM (ICH2/ICH2-M) AC'97 Audio Controller' > class = multimedia > subclass = audio > > After: Complete silence, regardless of mixer setting. > > pcm0: port 0xe800-0xe83f,0xec00-0xecff irq 17 > at device 31.5 on pci0 > pcm0: > > Mixer vol is currently set to 100:100 > Mixer pcm is currently set to 100:100 > Mixer speaker is currently set to 0:0 > Mixer line is currently set to 0:0 > Mixer mic is currently set to 0:0 > Mixer cd is currently set to 0:0 > Mixer rec is currently set to 11:11 > Mixer ogain is currently set to 50:50 > Mixer line1 is currently set to 0:0 > Mixer phin is currently set to 0:0 > Mixer phout is currently set to 0:0 > Mixer video is currently set to 0:0 > > pcm0@pci0:31:5: class=0x040100 card=0x49611849 chip=0x24458086 > rev=0x05 hdr=0x00 > vendor = 'Intel Corporation' > device = '82801BA/BAM (ICH2/ICH2-M) AC'97 Audio Controller' > class = multimedia > subclass = audio > > (sorry, I need uname -a as well..) How about applying this one: --- ac97.c.diff BEGIN --- --- sys/dev/sound/pcm/ac97.c.orig Wed Sep 14 04:54:36 2005 +++ sys/dev/sound/pcm/ac97.c Wed Sep 14 05:00:10 2005 @@ -556,17 +556,25 @@ #endif switch (codec->id) { case 0x434d4941: /* CMI9738 */ + ac97_wrcd(codec, AC97_MIX_PCM, 0x8000); + break; case 0x434d4961: /* CMI9739 */ + ac97_wrcd(codec, AC97_MIX_MASTER, 0x8000); + ac97_wrcd(codec, AC97_MIX_PCM, 0x8000); + break; case 0x434d4983: /* CMI9761 */ - bzero(&codec->mix[SOUND_MIXER_PCM], - sizeof(codec->mix[SOUND_MIXER_PCM])); - codec->flags |= AC97_F_SOFTVOL; - if (d) - d->flags |= SD_F_SOFTVOL; + ac97_wrcd(codec, AC97_MIX_MASTER, 0x8808); + ac97_wrcd(codec, AC97_MIX_PCM, 0x8808); break; default: + return; break; } + bzero(&codec->mix[SOUND_MIXER_PCM], + sizeof(codec->mix[SOUND_MIXER_PCM])); + codec->flags |= AC97_F_SOFTVOL; + if (d) + d->flags |= SD_F_SOFTVOL; } static const char* --- ac97.c.diff END --- -- Ariff Abdullah MyBSD http://www.MyBSD.org.my (IPv6/IPv4) http://staff.MyBSD.org.my (IPv6/IPv4) http://tomoyo.MyBSD.org.my (IPv6/IPv4)