xref: /freebsd/share/man/man4/snd_emu10kx.4 (revision 139ce056e6d237c44ec2238a61c78b54d57b5cba)
1bef800b3SAlexander Leidinger.\"
2b28624fdSAriff Abdullah.\" Copyright (c) 2003-2007 Yuriy Tsibizov
3bef800b3SAlexander Leidinger.\" All rights reserved.
4bef800b3SAlexander Leidinger.\"
5bef800b3SAlexander Leidinger.\" Redistribution and use in source and binary forms, with or without
6bef800b3SAlexander Leidinger.\" modification, are permitted provided that the following conditions
7bef800b3SAlexander Leidinger.\" are met:
8bef800b3SAlexander Leidinger.\" 1. Redistributions of source code must retain the above copyright
9bef800b3SAlexander Leidinger.\"    notice, this list of conditions and the following disclaimer.
10bef800b3SAlexander Leidinger.\" 2. Redistributions in binary form must reproduce the above copyright
11bef800b3SAlexander Leidinger.\"    notice, this list of conditions and the following disclaimer in the
12bef800b3SAlexander Leidinger.\"    documentation and/or other materials provided with the distribution.
13bef800b3SAlexander Leidinger.\"
14bef800b3SAlexander Leidinger.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15bef800b3SAlexander Leidinger.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16bef800b3SAlexander Leidinger.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17bef800b3SAlexander Leidinger.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18bef800b3SAlexander Leidinger.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19bef800b3SAlexander Leidinger.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20bef800b3SAlexander Leidinger.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21bef800b3SAlexander Leidinger.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22bef800b3SAlexander Leidinger.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23bef800b3SAlexander Leidinger.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24bef800b3SAlexander Leidinger.\" SUCH DAMAGE.
25bef800b3SAlexander Leidinger.\"
26bef800b3SAlexander Leidinger.\" $FreeBSD$
27bef800b3SAlexander Leidinger.\"
289d031b92SGiorgos Keramidas.Dd May 28, 2008
29bef800b3SAlexander Leidinger.Dt SND_EMU10KX 4
30bef800b3SAlexander Leidinger.Os
31bef800b3SAlexander Leidinger.Sh NAME
32bef800b3SAlexander Leidinger.Nm snd_emu10kx
33bef800b3SAlexander Leidinger.Nd Creative SoundBlaster Live! and Audigy sound cards device driver
34bef800b3SAlexander Leidinger.Sh SYNOPSIS
3580da51efSChristian BruefferTo compile this driver into the kernel, place the following lines in your
3680da51efSChristian Bruefferkernel configuration file:
3780da51efSChristian Brueffer.Bd -ragged -offset indent
38bef800b3SAlexander Leidinger.Cd "device sound"
39bef800b3SAlexander Leidinger.Cd "device snd_emu10kx"
4080da51efSChristian Brueffer.Ed
4180da51efSChristian Brueffer.Pp
4280da51efSChristian BruefferAlternatively, to load the driver as a module at boot time, place the
4380da51efSChristian Bruefferfollowing line in
4480da51efSChristian Brueffer.Xr loader.conf 5 :
4580da51efSChristian Brueffer.Bd -literal -offset indent
4680da51efSChristian Brueffersnd_emu10kx_load="YES"
4780da51efSChristian Brueffer.Ed
48bef800b3SAlexander Leidinger.Sh DESCRIPTION
49bef800b3SAlexander LeidingerThe
50bef800b3SAlexander Leidinger.Nm
51bef800b3SAlexander Leidingerbridge driver allows the generic audio driver
52bef800b3SAlexander Leidinger.Xr sound 4
53b28624fdSAriff Abdullahto attach to Creative sound cards based on the EMU10K1, CA0100, CA0101, CA0102
54bef800b3SAlexander Leidingerand CA0108 DSPs.
55bef800b3SAlexander Leidinger.Pp
56ae91966bSRuslan ErmilovThe
57bef800b3SAlexander Leidinger.Nm
5880da51efSChristian Brueffersound cards have a PCM part, which is accessible through one to five
59bef800b3SAlexander Leidinger.Xr pcm 4
60bef800b3SAlexander Leidingerdevices (see
61bef800b3SAlexander Leidinger.Sx MULTICHANNEL PLAYBACK
6280da51efSChristian Bruefferfor details), and MPU401-compatible MIDI I/O controller, which is accessible
63bef800b3SAlexander Leidingerthrough the midi device.
649d031b92SGiorgos KeramidasWave table synthesizer support is not available.
65bef800b3SAlexander Leidinger.Sh HARDWARE
66bef800b3SAlexander LeidingerThe
67bef800b3SAlexander Leidinger.Nm
68bef800b3SAlexander Leidingerdriver supports the following sound cards:
69bef800b3SAlexander Leidinger.Pp
70bef800b3SAlexander Leidinger.Bl -bullet -compact
71bef800b3SAlexander Leidinger.It
7280da51efSChristian BruefferCreative Sound Blaster Live!\& (EMU10K1 Chipset).
7380da51efSChristian BruefferBoth PCM and MIDI interfaces are available.
74bef800b3SAlexander Leidinger.It
7580da51efSChristian BruefferCreative Sound Blaster Audigy (CA0100 and CA0101 Chipset).
7680da51efSChristian BruefferPCM and two MIDI interfaces available.
77bef800b3SAlexander Leidinger.It
78bef800b3SAlexander LeidingerCreative Sound Blaster Audigy 2 and Creative Sound Blaster Audigy 4 (CA0102
7980da51efSChristian BruefferChipset).
8080da51efSChristian BruefferPCM support is limited to 48kHz/16 bit stereo (192kHz/24 bit part
81bef800b3SAlexander Leidingerof this chipset is not supported).
82bef800b3SAlexander Leidinger.It
8380da51efSChristian BruefferCreative Sound Blaster Audigy 2 Value (CA0108 Chipset).
8480da51efSChristian BruefferPCM support is limited
85ae91966bSRuslan Ermilovto 48kHz/16 bit stereo (192kHz/24 bit part of this chipset is not supported).
86bef800b3SAlexander LeidingerThere is no MIDI support for this card.
87bef800b3SAlexander Leidinger.El
88bef800b3SAlexander Leidinger.Pp
89bef800b3SAlexander LeidingerThe
90bef800b3SAlexander Leidinger.Nm
9180da51efSChristian Bruefferdriver does
9280da51efSChristian Brueffer.Em not
939d031b92SGiorgos Keramidassupport the following sound cards (although they have names
94bef800b3SAlexander Leidingersimilar to some supported ones):
95bef800b3SAlexander Leidinger.Pp
96bef800b3SAlexander Leidinger.Bl -bullet -compact
97bef800b3SAlexander Leidinger.It
98ae91966bSRuslan ErmilovCreative Sound Blaster Live!\& 24-Bit, identified by
99ae91966bSRuslan Ermilov.Fx
100ae91966bSRuslan Ermilovas
101ae91966bSRuslan Ermilov.Qq Li "emu10k1x Soundblaster Live! 5.1" .
102bef800b3SAlexander Leidinger.It
103ae91966bSRuslan ErmilovCreative Sound Blaster Audigy LS / ES, identified by
104ae91966bSRuslan Ermilov.Fx
105ae91966bSRuslan Ermilovas
106ae91966bSRuslan Ermilov.Qq Li "CA0106-DAT Audigy LS" .
107bef800b3SAlexander Leidinger.It
108b28624fdSAriff AbdullahAll other Creative sound cards with -DAT chipsets.
109b28624fdSAriff Abdullah.It
110b28624fdSAriff AbdullahAll Creative X-Fi series sound cards.
111bef800b3SAlexander Leidinger.El
112bef800b3SAlexander Leidinger.Sh MULTICHANNEL PLAYBACK
1139d031b92SGiorgos KeramidasBy default the
1149d031b92SGiorgos Keramidas.Nm
1159d031b92SGiorgos Keramidasdriver is loaded with multichannel playback capabilities enabled.
116b28624fdSAriff AbdullahIf you do not set the
117b28624fdSAriff Abdullah.Dv hint.emu10kx.0.multichannel_disabled
118b28624fdSAriff Abdullahoption in your
119b28624fdSAriff Abdullah.Xr loader.conf 5
1209d031b92SGiorgos Keramidasconfiguration file you will get up to five DSP devices, one for each
1219d031b92SGiorgos Keramidassound card output.
122b28624fdSAriff AbdullahYou can use additional software (like
123b28624fdSAriff Abdullah.Em audio/pulseaudio
124b28624fdSAriff Abdullahfrom
1259d031b92SGiorgos Keramidas.Em The Ports Collection )
1269d031b92SGiorgos Keramidasto do sound stream demultiplexing.
12780da51efSChristian BruefferOnly
12880da51efSChristian Brueffer.Dq FRONT
12980da51efSChristian Bruefferoutput can play and record sound from external
130bef800b3SAlexander Leidingersources (like line or S/PDIF inputs).
131b28624fdSAriff Abdullah.Sh MULTICHANNEL RECORDING
132b28624fdSAriff AbdullahBy default multichannel recording capabilities are not enabled when you load
1339d031b92SGiorgos Keramidasthe
1349d031b92SGiorgos Keramidas.Nm
1359d031b92SGiorgos Keramidasdriver.
136b28624fdSAriff AbdullahIf you enable the
137b28624fdSAriff Abdullah.Dv hint.emu10kx.0.multichannel_recording
138b28624fdSAriff Abdullahoption in
139b28624fdSAriff Abdullah.Xr loader.conf 5
140b28624fdSAriff Abdullahyou will get one more DSP device that is rate-locked to 48kHz/16bit/mono.
141b28624fdSAriff AbdullahThis is actually 48kHz/16bit/32 channels on SB Live! cards and
142b28624fdSAriff Abdullah48kHz/16bit/64channels on Audigy cards, but the current implementation of
1439d031b92SGiorgos Keramidasthe sound subsystem does not support such an amount of PCM channels.
144b28624fdSAriff AbdullahThis device can not be opened for read, thus confusing many applications.
145b28624fdSAriff Abdullah.Pp
1469d031b92SGiorgos KeramidasWithin a multichannel stream, the first half (0-15 or 0-31) is a copy of all DSP
1479d031b92SGiorgos Keramidasoutputs, the second half (15-30 or 32-63) is a copy of some DSP inputs.
1489d031b92SGiorgos KeramidasOn Live! cards the last substream (31) is used as a sync stream and is always
149b28624fdSAriff Abdullahset to 0xc0de.
1509d031b92SGiorgos KeramidasAudigy cards do not need such sync data, because a stream always starts with
151b28624fdSAriff Abdullahsubstream 0.
152b28624fdSAriff Abdullah.Ss SB Live! substream map (in byte offsets, each substream is 2 bytes LE)
153b28624fdSAriff Abdullah.Bl -tag -width ".Dv +0x00..+0x1E"
154b28624fdSAriff Abdullah.It Dv Offset
155b28624fdSAriff AbdullahSubstream
156b28624fdSAriff Abdullah.It +0x00..+0x1E
157b28624fdSAriff AbdullahPCM streams 0..15
158b28624fdSAriff Abdullah.It +0x20, +0x22
159b28624fdSAriff AbdullahEmpty
160b28624fdSAriff Abdullah.It +0x24..+0x2A
161b28624fdSAriff AbdullahPCM inputs: front left, front right, rear left, rear right, center, sub
162b28624fdSAriff Abdullah.It +0x2C..+0x3C
163b28624fdSAriff AbdullahDSP inputs 0..8:
164b28624fdSAriff Abdullah.It +0x3E
165b28624fdSAriff Abdullahsync substream (0xc0de)
166b28624fdSAriff Abdullah.El
167b28624fdSAriff Abdullah.Pp
168b28624fdSAriff Abdullah.Ss Audigy substream map (in byte offsets, each substream is 2 bytes LE)
169b28624fdSAriff Abdullah.Bl -tag -width ".Dv +0x00..+0x3E"
170b28624fdSAriff Abdullah.It Dv Offset
171b28624fdSAriff AbdullahSubstream
172b28624fdSAriff Abdullah.It +0x00..+0x3E
173b28624fdSAriff AbdullahPCM streams 0..31
174b28624fdSAriff Abdullah.It +0x40..+0x5E
175b28624fdSAriff AbdullahPCM inputs: front LR, rear LR, center, sub, ...
176b28624fdSAriff Abdullah.It +0x60..+0x7E
177b28624fdSAriff AbdullahDSP inputs 0..16
178b28624fdSAriff Abdullah.El
179bef800b3SAlexander Leidinger.Sh OSS MIXER CONTROLS
180b28624fdSAriff AbdullahThese are the controls available through the standard OSS programming interface.
181bef800b3SAlexander LeidingerYou can use
182bef800b3SAlexander Leidinger.Xr mixer 8
183bef800b3SAlexander Leidingerto change them.
184bef800b3SAlexander Leidinger.Pp
185b28624fdSAriff AbdullahOn EMU10K1-based cards the OSS mixer directly controls the AC97 codec.
18680da51efSChristian BruefferOn newer cards the OSS mixer controls some parameters of the AC97 codec and
187bef800b3SAlexander Leidingersome DSP-based mixer controls.
188ae91966bSRuslan Ermilov.Bl -inset
189ae91966bSRuslan Ermilov.It Qq vol
1909d031b92SGiorgos Keramidasmixer control for the overall sound volume.
191ae91966bSRuslan Ermilov.It Qq pcm
1929d031b92SGiorgos Keramidasmixer control for the PCM playback volume.
19380da51efSChristian BruefferIt controls only front output
1940af22117SMike Pritchardvolume in multichannel mode and all output volume in single channel mode.
195ae91966bSRuslan Ermilov.It Qq rec
196139ce056SDaniel Gerzomixer control acts very differently on EMU10K1 and other cards.
19780da51efSChristian BruefferOn EMU10K1 cards it controls the AC97 codec recording level.
1989d031b92SGiorgos KeramidasOn non-EMU10K1 cards it controls the amount of AC97
1999d031b92SGiorgos Keramidas.Dq stereo mix
2009d031b92SGiorgos Keramidas entering the DSP.
201b28624fdSAriff AbdullahAC97 recording level and AC97 recording source are fixed on CA0100, CA0101,
202b28624fdSAriff AbdullahCA0102 and CA0108 cards.
2039d031b92SGiorgos KeramidasThe AC97 recording levels are always set to maximum and recording source is always
204ae91966bSRuslan Ermilov.Dq Li "stereo mix" .
205b28624fdSAriff Abdullah.It Qq dig1
206b28624fdSAriff Abdullahis a CD S/PDIF (on-card) volume control
207b28624fdSAriff Abdullah.It Qq dig2
208b28624fdSAriff Abdullahis an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume
209b28624fdSAriff Abdullahcontrol
210b28624fdSAriff Abdullah.It Qq dig3
211b28624fdSAriff Abdullahis an on-card S/PDIF volume control
212b28624fdSAriff Abdullah.It Qq line2
213b28624fdSAriff Abdullahis AudigyDrive "Line In 2" volume control
214b28624fdSAriff Abdullah.It Qq line3
215b28624fdSAriff Abdullahis AudigyDrive "AUX In 2" volume control
216ae91966bSRuslan Ermilov.El
217bef800b3SAlexander Leidinger.Pp
2189d031b92SGiorgos KeramidasOther OSS mixer controls control the inputs of the AC97 codec.
219bef800b3SAlexander Leidinger.Sh PRIVATE DEVICE CONTROLS
2209d031b92SGiorgos KeramidasYou can control some of EMU10Kx's operation and configuration parameters through
221ae91966bSRuslan Ermilov.Va dev.emu10kx. Ns Aq Ar X
222ae91966bSRuslan Ermilovsysctls.
22380da51efSChristian BruefferThese
22480da51efSChristian Brueffer.Xr sysctl 8
2259d031b92SGiorgos Keramidasvalues are temporary and should not be relied upon.
226bef800b3SAlexander Leidinger.Sh DRIVER CONFIGURATION
227b28624fdSAriff AbdullahLoader tunables are used to set driver configuration.
228b28624fdSAriff AbdullahTunables can be set at the
229b28624fdSAriff Abdullah.Xr loader 8
230b28624fdSAriff Abdullahprompt before booting the kernel or they can be stored in
231b28624fdSAriff Abdullah.Pa /boot/loader.conf .
2329d031b92SGiorgos KeramidasThese tunables cannot be changed from a machine
233b28624fdSAriff Abdullah.Xr sysctl 8
234b28624fdSAriff Abdullahentry after boot, but you can change them using
235b28624fdSAriff Abdullah.Xr kenv 1
2369d031b92SGiorgos Keramidasbefore loading the
2379d031b92SGiorgos Keramidas.Nm
2389d031b92SGiorgos Keramidasdriver.
239b28624fdSAriff Abdullah.Bl -tag -width indent
240b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .disabled
241b28624fdSAriff AbdullahDisables loading a driver instance.
242b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_disabled
243b28624fdSAriff AbdullahDisables multichannel playback support, when one card is represented as
244b28624fdSAriff Abdullahseveral PCM devices.
245b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_recording
246b28624fdSAriff AbdullahEnables experimental multichannel recording support.
247b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .debug
248b28624fdSAriff AbdullahSet debug output level.
249b28624fdSAriff Abdullah.Bl -tag -width 2n
250b28624fdSAriff Abdullah.It 0
251b28624fdSAriff AbdullahNo additional debug options enabled
252b28624fdSAriff Abdullah.It 1
253b28624fdSAriff AbdullahEnables all DSP outputs to be connected, even those
254b28624fdSAriff Abdullahthat are known to be unused on a particular card.
255b28624fdSAriff Abdullah.It 2
256b28624fdSAriff AbdullahAdditional debug messages about in-driver events will be printed.
257b28624fdSAriff Abdullah.It 2
258b28624fdSAriff AbdullahAdditional debug messages will be printed when memory allocation fails.
259b28624fdSAriff Abdullah.El
260bef800b3SAlexander Leidinger.El
261bef800b3SAlexander Leidinger.Sh FILES
262ae91966bSRuslan Ermilov.Bl -tag -width ".Pa /dev/emu10kx?" -compact
263bef800b3SAlexander Leidinger.It Pa /dev/emu10kx?
264ae91966bSRuslan Ermilov.Nm
265ae91966bSRuslan Ermilovmanagement interface
266bef800b3SAlexander Leidinger.El
267bef800b3SAlexander Leidinger.Sh SEE ALSO
26880da51efSChristian Brueffer.Xr sound 4
269bef800b3SAlexander Leidinger.Sh HISTORY
270bef800b3SAlexander LeidingerThe
271bef800b3SAlexander Leidinger.Nm
272bef800b3SAlexander Leidingerdevice driver first appeared in
27380da51efSChristian Brueffer.Fx 7.0 .
274bef800b3SAlexander Leidinger.Sh AUTHORS
275ae91966bSRuslan Ermilov.An -nosplit
27680da51efSChristian BruefferThe PCM part of the driver is based on the
27780da51efSChristian Brueffer.Xr snd_emu10k1 4
278ae91966bSRuslan ErmilovSB Live!\& driver by
279b28624fdSAriff Abdullah.An "Cameron Grant" Aq cg@freebsd.org .
28080da51efSChristian BruefferThe MIDI interface is based on the
28180da51efSChristian Brueffer.Xr snd_emu10k1 4
282ae91966bSRuslan ErmilovMIDI interface code by
283b28624fdSAriff Abdullah.An "Mathew Kanner" Aq matk@freebsd.org .
28480da51efSChristian BruefferThe
285bef800b3SAlexander Leidinger.Nm
286bef800b3SAlexander Leidingerdevice driver and this manual page were written by
287bef800b3SAlexander Leidinger.An Yuriy Tsibizov .
288bef800b3SAlexander Leidinger.Sh BUGS
289bef800b3SAlexander Leidinger.Pp
290b28624fdSAriff AbdullahThe driver does not detect lost S/PDIF signals and produces noise when
291b28624fdSAriff AbdullahS/PDIF is not connected and S/PDIF volume is not zero.
292bef800b3SAlexander Leidinger.Pp
29380da51efSChristian BruefferThe PCM driver cannot detect the presence of Live!Drive or AudigyDrive
294b28624fdSAriff Abdullahbreakout boxes and tries to use them (and list their connectors in the
295b28624fdSAriff Abdullahmixer).
296bef800b3SAlexander Leidinger.Pp
29780da51efSChristian BruefferThe MIDI driver cannot detect the presence of Live!Drive or AudigyDrive
29880da51efSChristian Bruefferbreakout boxes and tries to enable the IR receiver on them anyway.
299