FreeBSD src
Go to file
Alexander Leidinger f856af0466 Extend the emu10kx driver. With the words of the author:
---snip---
New features:
1.	Optional multichannel recording (32 channels on Live!, 64 channels
 	on Audigy).

 	All channels are 16bit/48000Hz/mono, format is fixed.
 	Half of them are copied from sound output, another half can be
 	used to record any data from DSP. What should be recorded is
 	hardcoded in DSP code. In this version it records dummy data, but
 	can be used to record all DSP inputs, for example..

 	Because there are no support of more-than-stereo sound streams
 	multichannell stream is presented as one 32(64)*48000 Hz 16bit mono
 	stream.

 	Channel map:

 	SB Live! (4.0/5.1)
 	offset (words)	substream
 	0x00		Front L
 	0x01		Front R
 	0x02		Digital Front L
 	0x03		Digital Front R
 	0x04		Digital Center
 	0x05		Digital Sub
 	0x06		Headphones L
 	0x07		Headphones R
 	0x08		Rear L
 	0x09		Rear R
 	0x0A		ADC (multi-rate recording) L
 	0x0B		ADC (multi-rate recording) R
 	0x0C		unused
 	0x0D		unused
 	0x0E		unused
 	0x0F		unused
 	0x10		Analog Center (Live! 5.1) / dummy (Live! 4.0)
 	0x11		Analog Sub (Live! 5.1) / dummy (Live! 4.0)
 	0x12..-0x1F	dummy

 	Audigy / Audigy 2 / Audigy 2 Value / Audigy 4
 	offset (words)	substream
 	0x00		Digital Front L
 	0x01		Digital Front R
 	0x02		Digital Center
 	0x03		Digital Sub
 	0x04		Digital Side L (7.1 cards) / Headphones L (5.1 cards)
 	0x05		Digital Side R (7.1 cards) / Headphones R (5.1 cards)
 	0x06		Digital Rear L
 	0x07		Digital Rear R
 	0x08		Front L
 	0x09		Front R
 	0x0A		Center
 	0x0B		Sub
 	0x0C		Side L
 	0x0D		Side R
 	0x0E		Rear L
 	0x0F		Rear R
 	0x10		output to AC97 input L (muted)
 	0x11		output to AC97 input R (muted)
 	0x12		unused
 	0x13		unused
 	0x14		unused
 	0x15		unused
 	0x16		ADC (multi-rate recording) L
 	0x17		ADC (multi-rate recording) R
 	0x18		unused
 	0x19		unused
 	0x1A		unused
 	0x1B		unused
 	0x1C		unused
 	0x1D		unused
 	0x1E		unused
 	0x1F		unused
 	0x20..0x3F	dummy

Fixes:
1.	Do not assign negative values to variables used to index emu_cards
 	array. This array was never accessed when index is negative, but
 	Alexander (netchild@) told me that Coverity does not like it.
 	After this change emu_cards[0] should never be used to identify
 	valid sound card.
2.	Fix off-by-one errors in interrupt manager. Add more checks there.
3.	Fixes to sound buffering code now allows driver to use large playback
 	buffers.
4.	Fix memory allocation bug when multichannel recording is not
 	enabled.
5.	Fix interrupt timeout when recording with low bitrate (8kHz).

Hardware:
1.	Add one more known Audigy ZS card to list. Add two cards with
 	PCI IDs betwen old known cards and new one.

Other changes:
1.	Do not use ALL CAPS in messages.

Incomplete code:
1.	Automute S/PDIF when S/PDIF signal is lost.

Tested on i386 only, gcc 3.4.6 & gcc41/gcc42 (syntax only).
---snip---

This commits enables a little bit of debugging output when the driver is
loaded as a module. I did a cross-build test for amd64.

The code has some style issues, this will be addressed later.

The multichannel recording part is some work in progress to allow playing
around with it until the generic sound code is better able to handle
multichannel streams.

This is supposed to fix
CID:		171187
Found by:	Coverity Prevent

Submitted by:	Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
2007-01-06 18:59:35 +00:00
bin Fix markup. 2006-12-27 12:14:56 +00:00
contrib Merge local diffs. 2007-01-03 04:59:33 +00:00
crypto Resolve conflicts. 2006-11-10 16:52:41 +00:00
etc Jail_ip and jail_interface local variables were renamed to _ip and _interface 2007-01-02 11:07:13 +00:00
games Add the fortunes from the PR that were not already present. 2006-12-30 21:54:41 +00:00
gnu Change RL_LIBRARY_VERSION 2006-12-31 09:27:16 +00:00
include Add function __mq_oshandle() to get file handle of a mqueue. 2007-01-06 11:30:04 +00:00
kerberos5 Kerberos/Heimdal doesn't really depend on the INET6 macro. 2006-07-28 06:33:27 +00:00
lib Change the client skipper API to use off_t instead of size_t/ssize_t; but 2007-01-05 10:48:18 +00:00
libexec Fix TLS on sparc64 for statically and dynamically linked binaries 2006-10-08 02:50:34 +00:00
release Fix 2 typos, as consequence update copyright year. 2007-01-05 10:13:01 +00:00
rescue Remove mount_ext2fs. 2006-11-22 22:55:54 +00:00
sbin Fix parsing of -o uid and -o gid options, so that -o uidxx and -o gidxx 2007-01-05 02:54:27 +00:00
secure Fix static compilation. 2006-10-07 17:32:05 +00:00
share Document Marvell 6101/6145 support. 2007-01-04 18:50:52 +00:00
sys Extend the emu10kx driver. With the words of the author: 2007-01-06 18:59:35 +00:00
tools Fix compiling. 2007-01-06 11:32:15 +00:00
usr.bin Add code to parse the utrace(2) entries generated by malloc(3) in a more 2007-01-05 21:04:37 +00:00
usr.sbin MFp4: struct fsm_opt_hdr needs to be __packed as it is used as an array for 2007-01-05 00:33:00 +00:00
COPYRIGHT Welcome to 2007 2006-12-31 16:35:29 +00:00
LOCKS Document commit constraints for RELENG_6_*. 2006-01-13 06:51:43 +00:00
MAINTAINERS Request pre-commit review of BSD.{local,x11*}.dist by portmgr, since these 2006-11-11 22:24:10 +00:00
Makefile Add arm to universe. 2006-11-28 01:03:29 +00:00
Makefile.inc1 There was a timeframe where crunchgen(1) was broken; force 2006-11-27 19:38:28 +00:00
ObsoleteFiles.inc Remove old man page. 2007-01-02 03:42:16 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING Note the second coming of MSI support in the bge driver. 2006-12-22 03:03:31 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html