freebsd-skq/sys
Alexander Leidinger 87506547d2 Whats New:
1. Support wide range sampling rate, as low as 1hz up to int32 max
   (which is, insane) through new feeder_rate, multiple precisions
   choice (32/64 bit converter). This is indeed, quite insane, but it
   does give us more room and flexibility. Plenty sysctl options to
   adjust resampling characteristics.
2. Support 24/32 bit pcm format conversion through new, much improved,
   simplified and optimized feeder_fmt.

Changes:
1. buffer.c / dsp.c / sound.h
   * Support for 24/32 AFMT.
2. feeder_rate.c
   * New implementation of sampling rate conversion with 32/64 bit
     precision, 1 - int32max hz (which is, ridiculous, yet very
     addictive).  Much improved / smarter buffer management to not
     cause any missing samples at the end of conversion process
   * Tunable sysctls for various aspect:
       hw.snd.feeder_rate_ratemin - minimum allowable sampling rate
       (default to 4000)
       hw.snd.feeder_rate_ratemax - maximum allowable sampling rate
       (default to 1102500)
       hw.snd.feeder_rate_buffersize - conversion buffer size
       (default to 8192)
       hw.snd.feeder_rate_scaling - scaling / conversion method
       (please refer to the source for explaination). Default to
       previous implementation type.
3. feeder_fmt.c / sound.h
   * New implementation, support for 24/32bit conversion, optimized,
     and simplified. Few routines has been removed (8 to xlaw, 16 to
     8). It just doesn't make sense.
4. channel.c
   * Support for 24/32 AFMT
   * Fix wrong xruns increment, causing incorrect underruns statistic
     while using vchans.
5. vchan.c
   * Support for 24/32 AFMT
   * Proper speed / rate detection especially for fixed rate ac97.
     User can override it using kernel hint:
     hint.pcm.<unit>.vchanrate="xxxx".

Notes / Issues:
        * Virtual Channels (vchans)
          Enabling vchans can really, really help to solve overrun
          issues.  This is quite understandable, because it operates
          entirely within its own buffering system without relying on
          hardware interrupt / state. Even if you don't need vchan,
          just enable single channel can help much. Few soundcards
          (notably via8233x, sblive, possibly others) have their own
          hardware multi channel, and this is unfortunately beyond
          vchan reachability.
        * The arrival of 24/32 also come with a price. Applications
          that can do 24/32bit playback need to be recompiled (notably
          mplayer).  Use (recompiled) mplayer to experiment / test /
          debug this various format using -af format=fmt. Note that
          24bit seeking in mplayer is a little bit broken, sometimes
          can cause silence or loud static noise. Pausing / seeking
          few times can solve this problem.
          You don't have to rebuild world entirely for this. Simply
          copy /usr/src/sys/sys/soundcard.h to
          /usr/include/sys/soundcard.h would suffice. Few drivers also
          need recompilation, and this can be done via
          /usr/src/sys/modules/sound/.
          Support for 24bit hardware playback is beyond the scope of
          this changes. That would require spessific hardware driver
          changes.
        * Don't expect playing 9999999999hz is a wise decision. Be
          reasonable. The new feeder_rate implemention provide
          flexibility, not insanity. You can easily chew up your CPU
          with this kind of mind instability. Please use proper
          mosquito repellent device for this obvious cracked brain
          attempt. As for testing purposes, you can use (again)
          mplayer to generate / play with different sampling rate. Use
          something like "mplayer -af resample=192000:0:0 <files>".

Submitted by:	Ariff Abdullah <skywizard@MyBSD.org.my>
Tested by:	multimedia@
2005-07-31 16:16:22 +00:00
..
alpha Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.c 2005-07-29 19:40:39 +00:00
amd64 Move MODULE_DEPEND() statements for SYSVIPC dependencies to linux_ipc.c 2005-07-29 19:40:39 +00:00
arm msdosfs_conv.c references cmos_wall_clock and adjkerntz. Since these 2005-07-27 21:19:28 +00:00
boot Fix a comparison that broke ``set console=vidconsole'' and even the 2005-07-29 12:47:42 +00:00
bsm
cam Fix the recent panics/LORs/hangs created by my kqueue commit by: 2005-07-01 16:28:32 +00:00
coda
compat Add missing dependencies on the SYSVIPC modules. 2005-07-29 19:41:04 +00:00
conf Connect GEOM_ELI class to the build. 2005-07-27 21:47:55 +00:00
contrib Prevent a race condition. As pf_send_tcp() - called for expired synproxy 2005-07-20 18:58:27 +00:00
crypto
ddb Implement functions calls from within DDB on ia64. On ia64 a function 2005-07-02 23:52:37 +00:00
dev Whats New: 2005-07-31 16:16:22 +00:00
doc
fs devfs is not yet fully MPSAFE - for example, multiple concurrent devfs(8) 2005-07-29 23:00:56 +00:00
gdb
geom MFp4: Export more informations about encrypted providers. 2005-07-27 22:31:57 +00:00
gnu Repair this: 2005-07-09 18:30:31 +00:00
i4b Fix some long standing bugs in writing to the BPF device attached to 2005-06-26 18:11:11 +00:00
i386 Print cpu_vendor and the MSR value if we don't support this processor 2005-07-31 06:42:27 +00:00
ia64 Convert the atomic_ptr() operations over to operating on uintptr_t 2005-07-15 18:17:59 +00:00
isa Fixup some more fallout from the lapic/i8254 changes: 2005-07-13 15:43:21 +00:00
isofs/cd9660
kern If a thread was removed from system run queue, kse_assign shouldn't 2005-07-31 15:11:21 +00:00
libkern Temporary restore a part of rev 1.6. 2005-07-23 16:52:57 +00:00
modules Connect GEOM_ELI class to the build. 2005-07-27 21:47:55 +00:00
net Rather than hold a mutex over calls to SYSCTL_OUT allocate a 2005-07-26 17:21:56 +00:00
net80211 close a race between reclaiming a node when a station is inactive 2005-07-31 06:12:32 +00:00
netatalk Eliminate MAC entry point mac_create_mbuf_from_mbuf(), which is 2005-07-05 23:39:51 +00:00
netatm Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
netgraph Fix typo and check correct (rsp) pointer against the NULL value. 2005-07-29 14:44:17 +00:00
netinet include scope6_var.h for in6_clearscope(). 2005-07-26 00:19:58 +00:00
netinet6 simplied the fix to FreeBSD-SA-04:06.ipv6. The previous one worried 2005-07-28 18:07:07 +00:00
netipsec Correct typo in a comment describing vshiftl(). 2005-06-02 23:56:10 +00:00
netipx Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
netkey fix build without option INET6. 2005-07-30 20:10:31 +00:00
netnatm Remove FreeBSD 2.2 protocol usrreq compatibility code. 2005-07-19 13:36:39 +00:00
netncp Change API of mb_copy_t in libmchain so that netsmb can handle 2005-07-29 13:22:37 +00:00
netsmb Change API of mb_copy_t in libmchain so that netsmb can handle 2005-07-29 13:22:37 +00:00
nfs Fixes for NFS crashes on architectures that require strict alignment. 2005-07-14 20:08:27 +00:00
nfs4client
nfsclient FIx for a bug in the change that made nfs_timer() MPSAFE. We need to 2005-07-27 15:06:26 +00:00
nfsserver
opencrypto
pc98 MFi386: revision 1.1204. 2005-07-21 11:13:12 +00:00
pccard
pci - Use callout_*() rather than timeout() to periodically poll the media. 2005-07-27 13:51:01 +00:00
posix4
powerpc Temporary band-aid to fix hang when a process exec's Altivec instructions. 2005-07-30 11:14:31 +00:00
rpc
security If a "hole" opens up in the ruleset (i.e.: remove 5), do not return 2005-07-28 13:55:12 +00:00
sparc64 Add extra constraints to tell the compiler that the memory be modified 2005-07-27 20:01:45 +00:00
sys OSS defines AFMT_x32_xE as: 2005-07-31 16:08:03 +00:00
tools Allow EVFILT_VNODE events to work on every filesystem type, not just 2005-06-09 20:20:31 +00:00
ufs Eliminate inconsistency in the setting of the B_DONE flag. Specifically, 2005-07-20 19:06:06 +00:00
vm Rename UMA_MAX_NAME to UTH_MAX_NAME, since it's a maximum in the 2005-07-25 00:47:32 +00:00
Makefile