[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mp3 players



Theo de Raadt <deraadt_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org> wrote:

> How about a kernel solution.
> 
> Instead of always rounding up, we can make the code round to farthest
> thing.

There is no single rounding function in the kernel, it's in the
hands of the individual drivers.  Most modern hardware goes through
dev/ic/ac97.c.  The rounding up is incidental for hardware that
requires inverted values; rather than ~vol ac97_mixer_[gs]et_port()
does vol=255-vol.

(Interestingly, the minimum delta is available in struct mixer_devinfo,
although at first glance only ac97 and uaudio bother to fill it in,
and of course it is not available through the libossaudio interface
most mixer apps use.)

-- 
Christian "naddy" Weisgerber                          naddy_(_at_)_mips_(_dot_)_inka_(_dot_)_de



Visit your host, monkey.org