Subject: Strange ESS1869 playback rate problem
To: None <>
From: Dave Huang <>
List: current-users
Date: 07/21/2000 04:48:37
I've got a Winbook XLi laptop that has a ESS1869 sound chip... the ess
driver pretty much works with it, except that setting the playback rate
<= 22050 actually sets the playback rate to twice the intended value.
E.g. to get 22050Hz, I need to set the rate to 11025. However, to get
44100Hz, I can set the rate to 44100.

I took a look at the driver's source, and thought ess_srtotc() looked
rather strange, but I downloaded the 1869's data sheet, and I guess the
code is correct. I don't understand the data sheet's emphasis on the
time constant being a signed value though... "The sample rate is
determined by the two's complement divider in bits 7:0" and later a
seemingly contradictory "Bits: 6:0; Name: Sample rate divider;
Description: Signed sample rate divider"

If I change the code to use the "tc = 256 - 795500L / rate" regardless
of the sample rate, it works fine... but that's not what the data sheet
says to do :)

NetBSD/i386 1.5_ALPHA, btw...
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet:   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 24 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++