xref: /freebsd/share/man/man4/snd_emu10kx.4 (revision 884a2a699669ec61e2366e3e358342dbc94be24a)
1.\"
2.\" Copyright (c) 2003-2007 Yuriy Tsibizov
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd May 28, 2008
29.Dt SND_EMU10KX 4
30.Os
31.Sh NAME
32.Nm snd_emu10kx
33.Nd Creative SoundBlaster Live! and Audigy sound cards device driver
34.Sh SYNOPSIS
35To compile this driver into the kernel, place the following lines in your
36kernel configuration file:
37.Bd -ragged -offset indent
38.Cd "device sound"
39.Cd "device snd_emu10kx"
40.Ed
41.Pp
42Alternatively, to load the driver as a module at boot time, place the
43following line in
44.Xr loader.conf 5 :
45.Bd -literal -offset indent
46snd_emu10kx_load="YES"
47.Ed
48.Sh DESCRIPTION
49The
50.Nm
51bridge driver allows the generic audio driver
52.Xr sound 4
53to attach to Creative sound cards based on the EMU10K1, CA0100, CA0101, CA0102
54and CA0108 DSPs.
55.Pp
56The
57.Nm
58sound cards have a PCM part, which is accessible through one to five
59.Xr pcm 4
60devices (see
61.Sx MULTICHANNEL PLAYBACK
62for details), and MPU401-compatible MIDI I/O controller, which is accessible
63through the midi device.
64Wave table synthesizer support is not available.
65.Sh HARDWARE
66The
67.Nm
68driver supports the following sound cards:
69.Pp
70.Bl -bullet -compact
71.It
72Creative Sound Blaster Live!\& (EMU10K1 Chipset).
73Both PCM and MIDI interfaces are available.
74.It
75Creative Sound Blaster Audigy (CA0100 and CA0101 Chipset).
76PCM and two MIDI interfaces available.
77.It
78Creative Sound Blaster Audigy 2 and Creative Sound Blaster Audigy 4 (CA0102
79Chipset).
80PCM support is limited to 48kHz/16 bit stereo (192kHz/24 bit part
81of this chipset is not supported).
82.It
83Creative Sound Blaster Audigy 2 Value (CA0108 Chipset).
84PCM support is limited
85to 48kHz/16 bit stereo (192kHz/24 bit part of this chipset is not supported).
86There is no MIDI support for this card.
87.El
88.Pp
89The
90.Nm
91driver does
92.Em not
93support the following sound cards (although they have names
94similar to some supported ones):
95.Pp
96.Bl -bullet -compact
97.It
98Creative Sound Blaster Live!\& 24-Bit, identified by
99.Fx
100as
101.Qq Li "emu10k1x Soundblaster Live! 5.1" .
102.It
103Creative Sound Blaster Audigy LS / ES, identified by
104.Fx
105as
106.Qq Li "CA0106-DAT Audigy LS" .
107.It
108All other Creative sound cards with -DAT chipsets.
109.It
110All Creative X-Fi series sound cards.
111.El
112.Sh MULTICHANNEL PLAYBACK
113By default the
114.Nm
115driver is loaded with multichannel playback capabilities enabled.
116If you do not set the
117.Dv hint.emu10kx.0.multichannel_disabled
118option in your
119.Xr loader.conf 5
120configuration file you will get up to five DSP devices, one for each
121sound card output.
122You can use additional software (like
123.Em audio/pulseaudio
124from
125.Em The Ports Collection )
126to do sound stream demultiplexing.
127Only
128.Dq FRONT
129output can play and record sound from external
130sources (like line or S/PDIF inputs).
131.Sh MULTICHANNEL RECORDING
132By default multichannel recording capabilities are not enabled when you load
133the
134.Nm
135driver.
136If you enable the
137.Dv hint.emu10kx.0.multichannel_recording
138option in
139.Xr loader.conf 5
140you will get one more DSP device that is rate-locked to 48kHz/16bit/mono.
141This is actually 48kHz/16bit/32 channels on SB Live! cards and
14248kHz/16bit/64channels on Audigy cards, but the current implementation of
143the sound subsystem does not support such an amount of PCM channels.
144This device can not be opened for read, thus confusing many applications.
145.Pp
146Within a multichannel stream, the first half (0-15 or 0-31) is a copy of all DSP
147outputs, the second half (15-30 or 32-63) is a copy of some DSP inputs.
148On Live! cards the last substream (31) is used as a sync stream and is always
149set to 0xc0de.
150Audigy cards do not need such sync data, because a stream always starts with
151substream 0.
152.Ss SB Live! substream map (in byte offsets, each substream is 2 bytes LE)
153.Bl -tag -width ".Dv +0x00..+0x1E"
154.It Dv Offset
155Substream
156.It +0x00..+0x1E
157PCM streams 0..15
158.It +0x20, +0x22
159Empty
160.It +0x24..+0x2A
161PCM inputs: front left, front right, rear left, rear right, center, sub
162.It +0x2C..+0x3C
163DSP inputs 0..8:
164.It +0x3E
165sync substream (0xc0de)
166.El
167.Pp
168.Ss Audigy substream map (in byte offsets, each substream is 2 bytes LE)
169.Bl -tag -width ".Dv +0x00..+0x3E"
170.It Dv Offset
171Substream
172.It +0x00..+0x3E
173PCM streams 0..31
174.It +0x40..+0x5E
175PCM inputs: front LR, rear LR, center, sub, ...
176.It +0x60..+0x7E
177DSP inputs 0..16
178.El
179.Sh OSS MIXER CONTROLS
180These are the controls available through the standard OSS programming interface.
181You can use
182.Xr mixer 8
183to change them.
184.Pp
185On EMU10K1-based cards the OSS mixer directly controls the AC97 codec.
186On newer cards the OSS mixer controls some parameters of the AC97 codec and
187some DSP-based mixer controls.
188.Bl -inset
189.It Qq vol
190mixer control for the overall sound volume.
191.It Qq pcm
192mixer control for the PCM playback volume.
193It controls only front output
194volume in multichannel mode and all output volume in single channel mode.
195.It Qq rec
196mixer control acts very differently on EMU10K1 and other cards.
197On EMU10K1 cards it controls the AC97 codec recording level.
198On non-EMU10K1 cards it controls the amount of AC97
199.Dq stereo mix
200 entering the DSP.
201AC97 recording level and AC97 recording source are fixed on CA0100, CA0101,
202CA0102 and CA0108 cards.
203The AC97 recording levels are always set to maximum and recording source is always
204.Dq Li "stereo mix" .
205.It Qq dig1
206is a CD S/PDIF (on-card) volume control
207.It Qq dig2
208is an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume
209control
210.It Qq dig3
211is an on-card S/PDIF volume control
212.It Qq line2
213is AudigyDrive "Line In 2" volume control
214.It Qq line3
215is AudigyDrive "AUX In 2" volume control
216.El
217.Pp
218Other OSS mixer controls control the inputs of the AC97 codec.
219.Sh PRIVATE DEVICE CONTROLS
220You can control some of EMU10Kx's operation and configuration parameters through
221.Va dev.emu10kx. Ns Aq Ar X
222sysctls.
223These
224.Xr sysctl 8
225values are temporary and should not be relied upon.
226.Sh DRIVER CONFIGURATION
227Loader tunables are used to set driver configuration.
228Tunables can be set at the
229.Xr loader 8
230prompt before booting the kernel or they can be stored in
231.Pa /boot/loader.conf .
232These tunables cannot be changed from a machine
233.Xr sysctl 8
234entry after boot, but you can change them using
235.Xr kenv 1
236before loading the
237.Nm
238driver.
239.Bl -tag -width indent
240.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .disabled
241Disables loading a driver instance.
242.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_disabled
243Disables multichannel playback support, when one card is represented as
244several PCM devices.
245.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_recording
246Enables experimental multichannel recording support.
247.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .debug
248Set debug output level.
249.Bl -tag -width 2n
250.It 0
251No additional debug options enabled
252.It 1
253Enables all DSP outputs to be connected, even those
254that are known to be unused on a particular card.
255.It 2
256Additional debug messages about in-driver events will be printed.
257.It 2
258Additional debug messages will be printed when memory allocation fails.
259.El
260.El
261.Sh FILES
262.Bl -tag -width ".Pa /dev/emu10kx?" -compact
263.It Pa /dev/emu10kx?
264.Nm
265management interface
266.El
267.Sh SEE ALSO
268.Xr sound 4
269.Sh HISTORY
270The
271.Nm
272device driver first appeared in
273.Fx 7.0 .
274.Sh AUTHORS
275.An -nosplit
276The PCM part of the driver is based on the
277.Xr snd_emu10k1 4
278SB Live!\& driver by
279.An Cameron Grant Aq cg@FreeBSD.org .
280The MIDI interface is based on the
281.Xr snd_emu10k1 4
282MIDI interface code by
283.An Mathew Kanner Aq matk@FreeBSD.org .
284The
285.Nm
286device driver and this manual page were written by
287.An Yuriy Tsibizov .
288.Sh BUGS
289.Pp
290The driver does not detect lost S/PDIF signals and produces noise when
291S/PDIF is not connected and S/PDIF volume is not zero.
292.Pp
293The PCM driver cannot detect the presence of Live!Drive or AudigyDrive
294breakout boxes and tries to use them (and list their connectors in the
295mixer).
296.Pp
297The MIDI driver cannot detect the presence of Live!Drive or AudigyDrive
298breakout boxes and tries to enable the IR receiver on them anyway.
299