Subject: Re: Strange ESS1869 playback rate problem
To: Dave Huang <>
From: David Brownlee <>
List: current-users
Date: 07/21/2000 11:14:41
	Random (probably unrelated) datapoint - on a thinkpad with

clcs0 at pci0 dev 6 function 0: Cirrus Logic CS4280 CrystalClear Audio Interface (rev. 0x01)

	mp3 decoding works fine up to a sample rate of about 14700, but
	above that it seems to set it to around half the desired playback

			       -- A pmap for every occasion --

On Fri, 21 Jul 2000, Dave Huang wrote:

> 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++