[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-bugs
Subject:    kern/98167: [sound] ES1370 mixer volumes incorrectly calculated
From:       Joseph Terner <jtsn () gmx ! de>
Date:       2006-05-30 19:15:57
Message-ID: 200605301915.k4UJFvn9069123 () www ! freebsd ! org
[Download RAW message or body]


> 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:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic