diff options
author | netchild <netchild@FreeBSD.org> | 2005-09-11 09:15:42 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2005-09-11 09:15:42 +0000 |
commit | 34f358a569b1716cb5f564089b4a09cdfa4d3d1e (patch) | |
tree | e40ebbcbcf32da6c641de49a08d669253304e729 | |
parent | cc90fab85a1d2daa1799b0b5bb7fb48ee4845974 (diff) | |
download | FreeBSD-src-34f358a569b1716cb5f564089b4a09cdfa4d3d1e.zip FreeBSD-src-34f358a569b1716cb5f564089b4a09cdfa4d3d1e.tar.gz |
Fix a bug in volume calculation, this sometimes gives a USB audio device an
unexpected value (when the volume is high).
Submitted by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
-rw-r--r-- | sys/dev/sound/usb/uaudio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 12bab41..e12ce71 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -4170,10 +4170,10 @@ uaudio_mixer_set(device_t dev, unsigned type, unsigned left, unsigned right) if (mc->ctl == type) { if (mc->nchan == 2) { /* set Right */ - uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*256)/100); + uaudio_ctl_set(sc, SET_CUR, mc, 1, (int)(right*255)/100); } /* set Left or Mono */ - uaudio_ctl_set(sc, SET_CUR, mc, 0, (int)(left*256)/100); + uaudio_ctl_set(sc, SET_CUR, mc, 0, (int)(left*255)/100); } } return; |