xref: /freebsd/share/man/man4/snd_emu10kx.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
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.\"
269d031b92SGiorgos Keramidas.Dd May 28, 2008
27bef800b3SAlexander Leidinger.Dt SND_EMU10KX 4
28bef800b3SAlexander Leidinger.Os
29bef800b3SAlexander Leidinger.Sh NAME
30bef800b3SAlexander Leidinger.Nm snd_emu10kx
31bef800b3SAlexander Leidinger.Nd Creative SoundBlaster Live! and Audigy sound cards device driver
32bef800b3SAlexander Leidinger.Sh SYNOPSIS
3380da51efSChristian BruefferTo compile this driver into the kernel, place the following lines in your
3480da51efSChristian Bruefferkernel configuration file:
3580da51efSChristian Brueffer.Bd -ragged -offset indent
36bef800b3SAlexander Leidinger.Cd "device sound"
37bef800b3SAlexander Leidinger.Cd "device snd_emu10kx"
3880da51efSChristian Brueffer.Ed
3980da51efSChristian Brueffer.Pp
4080da51efSChristian BruefferAlternatively, to load the driver as a module at boot time, place the
4180da51efSChristian Bruefferfollowing line in
4280da51efSChristian Brueffer.Xr loader.conf 5 :
4380da51efSChristian Brueffer.Bd -literal -offset indent
4480da51efSChristian Brueffersnd_emu10kx_load="YES"
4580da51efSChristian Brueffer.Ed
46bef800b3SAlexander Leidinger.Sh DESCRIPTION
47bef800b3SAlexander LeidingerThe
48bef800b3SAlexander Leidinger.Nm
49bef800b3SAlexander Leidingerbridge driver allows the generic audio driver
50bef800b3SAlexander Leidinger.Xr sound 4
51b28624fdSAriff Abdullahto attach to Creative sound cards based on the EMU10K1, CA0100, CA0101, CA0102
52bef800b3SAlexander Leidingerand CA0108 DSPs.
53bef800b3SAlexander Leidinger.Pp
54ae91966bSRuslan ErmilovThe
55bef800b3SAlexander Leidinger.Nm
5680da51efSChristian Brueffersound cards have a PCM part, which is accessible through one to five
57bef800b3SAlexander Leidinger.Xr pcm 4
58bef800b3SAlexander Leidingerdevices (see
59bef800b3SAlexander Leidinger.Sx MULTICHANNEL PLAYBACK
6080da51efSChristian Bruefferfor details), and MPU401-compatible MIDI I/O controller, which is accessible
61bef800b3SAlexander Leidingerthrough the midi device.
629d031b92SGiorgos KeramidasWave table synthesizer support is not available.
63bef800b3SAlexander Leidinger.Sh HARDWARE
64bef800b3SAlexander LeidingerThe
65bef800b3SAlexander Leidinger.Nm
66bef800b3SAlexander Leidingerdriver supports the following sound cards:
67bef800b3SAlexander Leidinger.Pp
68bef800b3SAlexander Leidinger.Bl -bullet -compact
69bef800b3SAlexander Leidinger.It
7080da51efSChristian BruefferCreative Sound Blaster Live!\& (EMU10K1 Chipset).
7180da51efSChristian BruefferBoth PCM and MIDI interfaces are available.
72bef800b3SAlexander Leidinger.It
7380da51efSChristian BruefferCreative Sound Blaster Audigy (CA0100 and CA0101 Chipset).
7480da51efSChristian BruefferPCM and two MIDI interfaces available.
75bef800b3SAlexander Leidinger.It
76bef800b3SAlexander LeidingerCreative Sound Blaster Audigy 2 and Creative Sound Blaster Audigy 4 (CA0102
7780da51efSChristian BruefferChipset).
7880da51efSChristian BruefferPCM support is limited to 48kHz/16 bit stereo (192kHz/24 bit part
79bef800b3SAlexander Leidingerof this chipset is not supported).
80bef800b3SAlexander Leidinger.It
8180da51efSChristian BruefferCreative Sound Blaster Audigy 2 Value (CA0108 Chipset).
8280da51efSChristian BruefferPCM support is limited
83ae91966bSRuslan Ermilovto 48kHz/16 bit stereo (192kHz/24 bit part of this chipset is not supported).
84bef800b3SAlexander LeidingerThere is no MIDI support for this card.
85bef800b3SAlexander Leidinger.El
86bef800b3SAlexander Leidinger.Pp
87bef800b3SAlexander LeidingerThe
88bef800b3SAlexander Leidinger.Nm
8980da51efSChristian Bruefferdriver does
9080da51efSChristian Brueffer.Em not
919d031b92SGiorgos Keramidassupport the following sound cards (although they have names
92bef800b3SAlexander Leidingersimilar to some supported ones):
93bef800b3SAlexander Leidinger.Pp
94bef800b3SAlexander Leidinger.Bl -bullet -compact
95bef800b3SAlexander Leidinger.It
96ae91966bSRuslan ErmilovCreative Sound Blaster Live!\& 24-Bit, identified by
97ae91966bSRuslan Ermilov.Fx
98ae91966bSRuslan Ermilovas
99ae91966bSRuslan Ermilov.Qq Li "emu10k1x Soundblaster Live! 5.1" .
100bef800b3SAlexander Leidinger.It
101ae91966bSRuslan ErmilovCreative Sound Blaster Audigy LS / ES, identified by
102ae91966bSRuslan Ermilov.Fx
103ae91966bSRuslan Ermilovas
104ae91966bSRuslan Ermilov.Qq Li "CA0106-DAT Audigy LS" .
105bef800b3SAlexander Leidinger.It
106b28624fdSAriff AbdullahAll other Creative sound cards with -DAT chipsets.
107b28624fdSAriff Abdullah.It
108b28624fdSAriff AbdullahAll Creative X-Fi series sound cards.
109bef800b3SAlexander Leidinger.El
110bef800b3SAlexander Leidinger.Sh MULTICHANNEL PLAYBACK
1119d031b92SGiorgos KeramidasBy default the
1129d031b92SGiorgos Keramidas.Nm
1139d031b92SGiorgos Keramidasdriver is loaded with multichannel playback capabilities enabled.
114b28624fdSAriff AbdullahIf you do not set the
115b28624fdSAriff Abdullah.Dv hint.emu10kx.0.multichannel_disabled
116b28624fdSAriff Abdullahoption in your
117b28624fdSAriff Abdullah.Xr loader.conf 5
1189d031b92SGiorgos Keramidasconfiguration file you will get up to five DSP devices, one for each
1199d031b92SGiorgos Keramidassound card output.
120b28624fdSAriff AbdullahYou can use additional software (like
121b28624fdSAriff Abdullah.Em audio/pulseaudio
122b28624fdSAriff Abdullahfrom
1239d031b92SGiorgos Keramidas.Em The Ports Collection )
1249d031b92SGiorgos Keramidasto do sound stream demultiplexing.
12580da51efSChristian BruefferOnly
12680da51efSChristian Brueffer.Dq FRONT
12780da51efSChristian Bruefferoutput can play and record sound from external
128bef800b3SAlexander Leidingersources (like line or S/PDIF inputs).
129b28624fdSAriff Abdullah.Sh MULTICHANNEL RECORDING
130b28624fdSAriff AbdullahBy default multichannel recording capabilities are not enabled when you load
1319d031b92SGiorgos Keramidasthe
1329d031b92SGiorgos Keramidas.Nm
1339d031b92SGiorgos Keramidasdriver.
134b28624fdSAriff AbdullahIf you enable the
135b28624fdSAriff Abdullah.Dv hint.emu10kx.0.multichannel_recording
136b28624fdSAriff Abdullahoption in
137b28624fdSAriff Abdullah.Xr loader.conf 5
138b28624fdSAriff Abdullahyou will get one more DSP device that is rate-locked to 48kHz/16bit/mono.
139b28624fdSAriff AbdullahThis is actually 48kHz/16bit/32 channels on SB Live! cards and
140b28624fdSAriff Abdullah48kHz/16bit/64channels on Audigy cards, but the current implementation of
1419d031b92SGiorgos Keramidasthe sound subsystem does not support such an amount of PCM channels.
142b28624fdSAriff AbdullahThis device can not be opened for read, thus confusing many applications.
143b28624fdSAriff Abdullah.Pp
1449d031b92SGiorgos KeramidasWithin a multichannel stream, the first half (0-15 or 0-31) is a copy of all DSP
1459d031b92SGiorgos Keramidasoutputs, the second half (15-30 or 32-63) is a copy of some DSP inputs.
1469d031b92SGiorgos KeramidasOn Live! cards the last substream (31) is used as a sync stream and is always
147b28624fdSAriff Abdullahset to 0xc0de.
1489d031b92SGiorgos KeramidasAudigy cards do not need such sync data, because a stream always starts with
149b28624fdSAriff Abdullahsubstream 0.
150b28624fdSAriff Abdullah.Ss SB Live! substream map (in byte offsets, each substream is 2 bytes LE)
151b28624fdSAriff Abdullah.Bl -tag -width ".Dv +0x00..+0x1E"
152b28624fdSAriff Abdullah.It Dv Offset
153b28624fdSAriff AbdullahSubstream
154b28624fdSAriff Abdullah.It +0x00..+0x1E
155b28624fdSAriff AbdullahPCM streams 0..15
156b28624fdSAriff Abdullah.It +0x20, +0x22
157b28624fdSAriff AbdullahEmpty
158b28624fdSAriff Abdullah.It +0x24..+0x2A
159b28624fdSAriff AbdullahPCM inputs: front left, front right, rear left, rear right, center, sub
160b28624fdSAriff Abdullah.It +0x2C..+0x3C
161b28624fdSAriff AbdullahDSP inputs 0..8:
162b28624fdSAriff Abdullah.It +0x3E
163b28624fdSAriff Abdullahsync substream (0xc0de)
164b28624fdSAriff Abdullah.El
165b28624fdSAriff Abdullah.Ss Audigy substream map (in byte offsets, each substream is 2 bytes LE)
166b28624fdSAriff Abdullah.Bl -tag -width ".Dv +0x00..+0x3E"
167b28624fdSAriff Abdullah.It Dv Offset
168b28624fdSAriff AbdullahSubstream
169b28624fdSAriff Abdullah.It +0x00..+0x3E
170b28624fdSAriff AbdullahPCM streams 0..31
171b28624fdSAriff Abdullah.It +0x40..+0x5E
172b28624fdSAriff AbdullahPCM inputs: front LR, rear LR, center, sub, ...
173b28624fdSAriff Abdullah.It +0x60..+0x7E
174b28624fdSAriff AbdullahDSP inputs 0..16
175b28624fdSAriff Abdullah.El
176bef800b3SAlexander Leidinger.Sh OSS MIXER CONTROLS
177b28624fdSAriff AbdullahThese are the controls available through the standard OSS programming interface.
178bef800b3SAlexander LeidingerYou can use
179bef800b3SAlexander Leidinger.Xr mixer 8
180bef800b3SAlexander Leidingerto change them.
181bef800b3SAlexander Leidinger.Pp
182b28624fdSAriff AbdullahOn EMU10K1-based cards the OSS mixer directly controls the AC97 codec.
18380da51efSChristian BruefferOn newer cards the OSS mixer controls some parameters of the AC97 codec and
184bef800b3SAlexander Leidingersome DSP-based mixer controls.
185ae91966bSRuslan Ermilov.Bl -inset
186ae91966bSRuslan Ermilov.It Qq vol
1879d031b92SGiorgos Keramidasmixer control for the overall sound volume.
188ae91966bSRuslan Ermilov.It Qq pcm
1899d031b92SGiorgos Keramidasmixer control for the PCM playback volume.
19080da51efSChristian BruefferIt controls only front output
1910af22117SMike Pritchardvolume in multichannel mode and all output volume in single channel mode.
192ae91966bSRuslan Ermilov.It Qq rec
193139ce056SDaniel Gerzomixer control acts very differently on EMU10K1 and other cards.
19480da51efSChristian BruefferOn EMU10K1 cards it controls the AC97 codec recording level.
1959d031b92SGiorgos KeramidasOn non-EMU10K1 cards it controls the amount of AC97
1969d031b92SGiorgos Keramidas.Dq stereo mix
1979d031b92SGiorgos Keramidas entering the DSP.
198b28624fdSAriff AbdullahAC97 recording level and AC97 recording source are fixed on CA0100, CA0101,
199b28624fdSAriff AbdullahCA0102 and CA0108 cards.
2009d031b92SGiorgos KeramidasThe AC97 recording levels are always set to maximum and recording source is always
201ae91966bSRuslan Ermilov.Dq Li "stereo mix" .
202b28624fdSAriff Abdullah.It Qq dig1
203b28624fdSAriff Abdullahis a CD S/PDIF (on-card) volume control
204b28624fdSAriff Abdullah.It Qq dig2
205b28624fdSAriff Abdullahis an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume
206b28624fdSAriff Abdullahcontrol
207b28624fdSAriff Abdullah.It Qq dig3
208b28624fdSAriff Abdullahis an on-card S/PDIF volume control
209b28624fdSAriff Abdullah.It Qq line2
210b28624fdSAriff Abdullahis AudigyDrive "Line In 2" volume control
211b28624fdSAriff Abdullah.It Qq line3
212b28624fdSAriff Abdullahis AudigyDrive "AUX In 2" volume control
213ae91966bSRuslan Ermilov.El
214bef800b3SAlexander Leidinger.Pp
2159d031b92SGiorgos KeramidasOther OSS mixer controls control the inputs of the AC97 codec.
216bef800b3SAlexander Leidinger.Sh PRIVATE DEVICE CONTROLS
2179d031b92SGiorgos KeramidasYou can control some of EMU10Kx's operation and configuration parameters through
218ae91966bSRuslan Ermilov.Va dev.emu10kx. Ns Aq Ar X
219ae91966bSRuslan Ermilovsysctls.
22080da51efSChristian BruefferThese
22180da51efSChristian Brueffer.Xr sysctl 8
2229d031b92SGiorgos Keramidasvalues are temporary and should not be relied upon.
223bef800b3SAlexander Leidinger.Sh DRIVER CONFIGURATION
224b28624fdSAriff AbdullahLoader tunables are used to set driver configuration.
225b28624fdSAriff AbdullahTunables can be set at the
226b28624fdSAriff Abdullah.Xr loader 8
227b28624fdSAriff Abdullahprompt before booting the kernel or they can be stored in
228b28624fdSAriff Abdullah.Pa /boot/loader.conf .
2299d031b92SGiorgos KeramidasThese tunables cannot be changed from a machine
230b28624fdSAriff Abdullah.Xr sysctl 8
231b28624fdSAriff Abdullahentry after boot, but you can change them using
232b28624fdSAriff Abdullah.Xr kenv 1
2339d031b92SGiorgos Keramidasbefore loading the
2349d031b92SGiorgos Keramidas.Nm
2359d031b92SGiorgos Keramidasdriver.
236b28624fdSAriff Abdullah.Bl -tag -width indent
237b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .disabled
238b28624fdSAriff AbdullahDisables loading a driver instance.
239b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_disabled
240b28624fdSAriff AbdullahDisables multichannel playback support, when one card is represented as
241b28624fdSAriff Abdullahseveral PCM devices.
242b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_recording
243b28624fdSAriff AbdullahEnables experimental multichannel recording support.
244b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .debug
245b28624fdSAriff AbdullahSet debug output level.
246b28624fdSAriff Abdullah.Bl -tag -width 2n
247b28624fdSAriff Abdullah.It 0
248b28624fdSAriff AbdullahNo additional debug options enabled
249b28624fdSAriff Abdullah.It 1
250b28624fdSAriff AbdullahEnables all DSP outputs to be connected, even those
251b28624fdSAriff Abdullahthat are known to be unused on a particular card.
252b28624fdSAriff Abdullah.It 2
253b28624fdSAriff AbdullahAdditional debug messages about in-driver events will be printed.
254b28624fdSAriff Abdullah.It 2
255b28624fdSAriff AbdullahAdditional debug messages will be printed when memory allocation fails.
256b28624fdSAriff Abdullah.El
257bef800b3SAlexander Leidinger.El
258bef800b3SAlexander Leidinger.Sh FILES
259ae91966bSRuslan Ermilov.Bl -tag -width ".Pa /dev/emu10kx?" -compact
260bef800b3SAlexander Leidinger.It Pa /dev/emu10kx?
261ae91966bSRuslan Ermilov.Nm
262ae91966bSRuslan Ermilovmanagement interface
263bef800b3SAlexander Leidinger.El
264bef800b3SAlexander Leidinger.Sh SEE ALSO
26580da51efSChristian Brueffer.Xr sound 4
266bef800b3SAlexander Leidinger.Sh HISTORY
267bef800b3SAlexander LeidingerThe
268bef800b3SAlexander Leidinger.Nm
269bef800b3SAlexander Leidingerdevice driver first appeared in
27080da51efSChristian Brueffer.Fx 7.0 .
271bef800b3SAlexander Leidinger.Sh AUTHORS
272ae91966bSRuslan Ermilov.An -nosplit
27380da51efSChristian BruefferThe PCM part of the driver is based on the
27480da51efSChristian Brueffer.Xr snd_emu10k1 4
275ae91966bSRuslan ErmilovSB Live!\& driver by
276*6c899950SBaptiste Daroussin.An Cameron Grant Aq Mt cg@FreeBSD.org .
27780da51efSChristian BruefferThe MIDI interface is based on the
27880da51efSChristian Brueffer.Xr snd_emu10k1 4
279ae91966bSRuslan ErmilovMIDI interface code by
280*6c899950SBaptiste Daroussin.An Mathew Kanner Aq Mt matk@FreeBSD.org .
28180da51efSChristian BruefferThe
282bef800b3SAlexander Leidinger.Nm
283bef800b3SAlexander Leidingerdevice driver and this manual page were written by
284bef800b3SAlexander Leidinger.An Yuriy Tsibizov .
285bef800b3SAlexander Leidinger.Sh BUGS
286b28624fdSAriff AbdullahThe driver does not detect lost S/PDIF signals and produces noise when
287b28624fdSAriff AbdullahS/PDIF is not connected and S/PDIF volume is not zero.
288bef800b3SAlexander Leidinger.Pp
28980da51efSChristian BruefferThe PCM driver cannot detect the presence of Live!Drive or AudigyDrive
290b28624fdSAriff Abdullahbreakout boxes and tries to use them (and list their connectors in the
291b28624fdSAriff Abdullahmixer).
292bef800b3SAlexander Leidinger.Pp
29380da51efSChristian BruefferThe MIDI driver cannot detect the presence of Live!Drive or AudigyDrive
29480da51efSChristian Bruefferbreakout boxes and tries to enable the IR receiver on them anyway.
295