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