# # vim:sw=2 ts=8:et sta:ft=unknown # +------------------------------+ | | | Whatsnew for FreeBSD 8.x | | | +------------------------------+ 1) Volume Per-Channel * Provides private / stand alove volume control unique per-stream pcm channel without touching master volume / pcm. Application can directly use SNDCTL_DSP_[GET|SET][PLAY|REC]VOL or for backward compatibility, SOUND_MIXER_PCM through opened dsp device instead of /dev/mixer. Special "bypass" mode is enabled through /dev/mixer which will automatically detect if the adjustment is made through /dev/mixer and forward its request to this private volume controller. Changes to this volume object will not interfere with other channels Requirements: - SNDCTL_DSP_[GET|SET][PLAY|REC]_VOL are newer ioctls (OSSv4) which require specific application modifications (prefered). - No modifications required for using bypass mode, so things like mplayer or xmms should work out of the box. Kernel hints: - hint.pcm.%d.vpc (0=disable vpc) Kernel sysctls: - hw.snd.vpc_mixer_bypass (default: 1) Enable or disable /dev/mixer bypass mode. - hw.snd.vpc_autoreset (default: 1) By default, closing/opening /dev/dsp will reset the volume back to 0 db gain/attenuation. Setting this to 0 will preserve its settings across device closing/opening. - hw.snd.vpc_reset Panic/reset button to reset all volume settings back to 0 db. - hw.snd.vpc_0db (default: 45) 0 db relative to linear mixer value. 2) High quality fixed-point Bandlimited SINC sampling rate converter * Motivation: - FreeBSD lacks high-quality Sample Rate Converter (SRC). - Available SRCs are either too restrictive (licensing), floating point implementation (you can't do that in kernel!), lack definitive filter design program (those coefficients suddenly appear out of nowhere) or too convoluted to comprehend. * FreeBSD own implementation based on Julius O'Smith Digital Audio Resampling - http://ccrma.stanford.edu/~jos/resample/ * Includes filter design program/script written using awk. (feeder_rate_mkfilter.awk) * 100% 32bit fixed-point, 64bit accumulator * Possibly among the fastest (if not fastest) of its kind. * Resampling quality is tunable, either runtime or during kernel compilation (FEEDER_RATE_PRESETS). * Quality can be further customized during kernel compilation by defining FEEDER_RATE_PRESETS in /etc/make.conf. At its simplest form, defining FEEDER_RATE_PRESETS="8 16 32 64 128" will create resampler that will filtered through 8, 16, 32, 64 or 128 taps FIR. * FEEDER_RATE_PRESETS - "8 16 ..." simplest form, define taps per-filter. - "100:32 ..." stopband-attenuation:taps - "100:32:0.95 .." stopband-attenuation:taps:rolloff/bandwidth CAVEAT: Defining too many presets, or preset with large taps will bloat the kernel! - Default presets: "100:8 100:16 100:32:0.7929 100:64:0.8990 100:128:0.9499" Kernel sysctls: - hw.snd.feeder_rate_quality 0 - Zero-order Hold (ZOH). Fastest, bad quality 1 - Linear Interpolation (LINEAR). Slightly slower than ZOH, better quality but still does not eliminate aliasing. 2 (and above) - Sinc Interpolation (SINC). Best quality. * SINC quality always start from 2 and above. * Rough quality comparisons: http://people.freebsd.org/~ariff/zresampler/z.jpg 3) Bit-perfect (not finished) - bla bla to hell with whatever "COOKED" craps.. .... 4) EQ (not finished) - bla bla room/acoustic correction for naive and unfortunates souls with damn cheap system ....