Date: Tue, 30 May 2006 19:15:57 GMT From: Joseph Terner <jtsn@gmx.de> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/98167: [sound] ES1370 mixer volumes incorrectly calculated (patch included) Message-ID: <200605301915.k4UJFvn9069123@www.freebsd.org> Resent-Message-ID: <200605301920.k4UJKTrL071351@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 98167 >Category: kern >Synopsis: [sound] ES1370 mixer volumes incorrectly calculated (patch included) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 30 19:20:29 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Joseph Terner >Release: FreeBSD 5.4-RELEASE >Organization: >Environment: n/a >Description: The mixer on the ES1370 sound chip provides 5 significant bits for all channels except output gain. The current code in sys/dev/sound/pci/es137x.c uses only 4 of them. Therefore the lower half of the volume range is unavailable (0 represents maximum volume). >How-To-Repeat: Try to set low volumes using mixer(1) on an ES1370 sound card. With an unpatched driver there is an audible gap between mute and the lowest possible volume. >Fix: Patch for es137x.c,v 1.59 from 7-CURRENT: --- sys/dev/sound/pci/es137x.c.orig Tue May 30 20:50:27 2006 +++ sys/dev/sound/pci/es137x.c Tue May 30 20:49:43 2006 @@ -311,7 +311,7 @@ if (mixtable[dev].left == 0xf) { rl = (l < 2)? 0x80 : 7 - (l - 2) / 14; } else { - rl = (l < 10)? 0x80 : 15 - (l - 10) / 6; + rl = (l < 7)? 0x80 : 31 - (l - 7) / 3; } es = mix_getdevinfo(m); ES_LOCK(es); @@ -322,7 +322,7 @@ set_dac1 = 0; } if (mixtable[dev].stereo) { - rr = (r < 10)? 0x80 : 15 - (r - 10) / 6; + rr = (r < 7)? 0x80 : 31 - (r - 7) / 3; es1370_wrcodec(es, mixtable[dev].right, rr); if (set_dac1 && mixtable[SOUND_MIXER_SYNTH].stereo) es1370_wrcodec(es, mixtable[SOUND_MIXER_SYNTH].right, rr ); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605301915.k4UJFvn9069123>