cvs commit: src/sys/dev/sound/pci emu10kx-pcm.c emu10kx.c
emu10kx.h src/sys/modules/sound/driver/emu10kx Makefile
netchild at FreeBSD.org
Sat Jan 6 10:59:36 PST 2007
netchild 2007-01-06 18:59:35 UTC
FreeBSD src repository
sys/dev/sound/pci emu10kx-pcm.c emu10kx.c emu10kx.h
Extend the emu10kx driver. With the words of the author:
1. Optional multichannel recording (32 channels on Live!, 64 channels
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
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
0x10 Analog Center (Live! 5.1) / dummy (Live! 4.0)
0x11 Analog Sub (Live! 5.1) / dummy (Live! 4.0)
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
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)
0x16 ADC (multi-rate recording) L
0x17 ADC (multi-rate recording) R
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 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
4. Fix memory allocation bug when multichannel recording is not
5. Fix interrupt timeout when recording with low bitrate (8kHz).
1. Add one more known Audigy ZS card to list. Add two cards with
PCI IDs betwen old known cards and new one.
1. Do not use ALL CAPS in messages.
1. Automute S/PDIF when S/PDIF signal is lost.
Tested on i386 only, gcc 3.4.6 & gcc41/gcc42 (syntax only).
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
This is supposed to fix
Found by: Coverity Prevent
Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov at gfk.ru>
Revision Changes Path
1.5 +223 -22 src/sys/dev/sound/pci/emu10kx-pcm.c
1.6 +172 -32 src/sys/dev/sound/pci/emu10kx.c
1.3 +4 -9 src/sys/dev/sound/pci/emu10kx.h
1.2 +3 -0 src/sys/modules/sound/driver/emu10kx/Makefile
More information about the cvs-all