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.\" 28b28624fdSAriff Abdullah.Dd July 15, 2007 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. 64bef800b3SAlexander LeidingerWave table synthesizer is not supported. 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 9380da51efSChristian Brueffersupport the following sound cards (although they are named 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 113b28624fdSAriff AbdullahBy default driver 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 118b28624fdSAriff Abdullahconfiguration file you will get up to 119b28624fdSAriff Abdullahfive DSP devices, one for each sound card output. 120b28624fdSAriff AbdullahYou can use additional software (like 121b28624fdSAriff Abdullah.Em audio/pulseaudio 122b28624fdSAriff Abdullahfrom 123b28624fdSAriff Abdullah.Em The Ports Collection 124b28624fdSAriff Abdullah) to 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 131b28624fdSAriff Abdullahthis driver. 132b28624fdSAriff AbdullahIf you enable the 133b28624fdSAriff Abdullah.Dv hint.emu10kx.0.multichannel_recording 134b28624fdSAriff Abdullahoption in 135b28624fdSAriff Abdullah.Xr loader.conf 5 136b28624fdSAriff Abdullahyou will get one more DSP device that is rate-locked to 48kHz/16bit/mono. 137b28624fdSAriff AbdullahThis is actually 48kHz/16bit/32 channels on SB Live! cards and 138b28624fdSAriff Abdullah48kHz/16bit/64channels on Audigy cards, but the current implementation of 139b28624fdSAriff Abdullahsound subsystem does not support such an amount of PCM channels. 140b28624fdSAriff AbdullahThis device can not be opened for read, thus confusing many applications. 141b28624fdSAriff Abdullah.Pp 142b28624fdSAriff AbdullahWithin multichannel stream first half (0-15 or 0-31) is a copy of all DSP 143b28624fdSAriff Abdullahoutputs, second half (15-30 or 32-63) is a copy of some DSP inputs. 144b28624fdSAriff AbdullahOn Live! cards the last substream (31) is used as a sync stream and always 145b28624fdSAriff Abdullahset to 0xc0de. 146b28624fdSAriff AbdullahAudigy cards do not need such sync data, because stream always start with 147b28624fdSAriff Abdullahsubstream 0. 148b28624fdSAriff Abdullah.Ss SB Live! substream map (in byte offsets, each substream is 2 bytes LE) 149b28624fdSAriff Abdullah.Bl -tag -width ".Dv +0x00..+0x1E" 150b28624fdSAriff Abdullah.It Dv Offset 151b28624fdSAriff AbdullahSubstream 152b28624fdSAriff Abdullah.It +0x00..+0x1E 153b28624fdSAriff AbdullahPCM streams 0..15 154b28624fdSAriff Abdullah.It +0x20, +0x22 155b28624fdSAriff AbdullahEmpty 156b28624fdSAriff Abdullah.It +0x24..+0x2A 157b28624fdSAriff AbdullahPCM inputs: front left, front right, rear left, rear right, center, sub 158b28624fdSAriff Abdullah.It +0x2C..+0x3C 159b28624fdSAriff AbdullahDSP inputs 0..8: 160b28624fdSAriff Abdullah.It +0x3E 161b28624fdSAriff Abdullahsync substream (0xc0de) 162b28624fdSAriff Abdullah.El 163b28624fdSAriff Abdullah.Pp 164b28624fdSAriff Abdullah.Ss Audigy substream map (in byte offsets, each substream is 2 bytes LE) 165b28624fdSAriff Abdullah.Bl -tag -width ".Dv +0x00..+0x3E" 166b28624fdSAriff Abdullah.It Dv Offset 167b28624fdSAriff AbdullahSubstream 168b28624fdSAriff Abdullah.It +0x00..+0x3E 169b28624fdSAriff AbdullahPCM streams 0..31 170b28624fdSAriff Abdullah.It +0x40..+0x5E 171b28624fdSAriff AbdullahPCM inputs: front LR, rear LR, center, sub, ... 172b28624fdSAriff Abdullah.It +0x60..+0x7E 173b28624fdSAriff AbdullahDSP inputs 0..16 174b28624fdSAriff Abdullah.El 175bef800b3SAlexander Leidinger.Sh OSS MIXER CONTROLS 176b28624fdSAriff AbdullahThese are the controls available through the standard OSS programming interface. 177bef800b3SAlexander LeidingerYou can use 178bef800b3SAlexander Leidinger.Xr mixer 8 179bef800b3SAlexander Leidingerto change them. 180bef800b3SAlexander Leidinger.Pp 181b28624fdSAriff AbdullahOn EMU10K1-based cards the OSS mixer directly controls the AC97 codec. 18280da51efSChristian BruefferOn newer cards the OSS mixer controls some parameters of the AC97 codec and 183bef800b3SAlexander Leidingersome DSP-based mixer controls. 184ae91966bSRuslan Ermilov.Bl -inset 185ae91966bSRuslan Ermilov.It Qq vol 186ae91966bSRuslan Ermilovmixer control is overall sound volume. 187ae91966bSRuslan Ermilov.It Qq pcm 188ae91966bSRuslan Ermilovmixer control is PCM playback volume. 18980da51efSChristian BruefferIt controls only front output 1900af22117SMike Pritchardvolume in multichannel mode and all output volume in single channel mode. 191ae91966bSRuslan Ermilov.It Qq rec 192ae91966bSRuslan Ermilovmixer control acts very different on EMU10K1 and other cards. 19380da51efSChristian BruefferOn EMU10K1 cards it controls the AC97 codec recording level. 194b28624fdSAriff AbdullahOn non-EMU10K1 cards it controls the amount of AC97 "stereo mix" entering 195b28624fdSAriff Abdullahthe DSP. 196b28624fdSAriff AbdullahAC97 recording level and AC97 recording source are fixed on CA0100, CA0101, 197b28624fdSAriff AbdullahCA0102 and CA0108 cards. 198b28624fdSAriff AbdullahAC97 recording level are always set to maximum and recording source is always 199ae91966bSRuslan Ermilov.Dq Li "stereo mix" . 200b28624fdSAriff Abdullah.It Qq dig1 201b28624fdSAriff Abdullahis a CD S/PDIF (on-card) volume control 202b28624fdSAriff Abdullah.It Qq dig2 203b28624fdSAriff Abdullahis an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume 204b28624fdSAriff Abdullahcontrol 205b28624fdSAriff Abdullah.It Qq dig3 206b28624fdSAriff Abdullahis an on-card S/PDIF volume control 207b28624fdSAriff Abdullah.It Qq line2 208b28624fdSAriff Abdullahis AudigyDrive "Line In 2" volume control 209b28624fdSAriff Abdullah.It Qq line3 210b28624fdSAriff Abdullahis AudigyDrive "AUX In 2" volume control 211ae91966bSRuslan Ermilov.El 212bef800b3SAlexander Leidinger.Pp 213b28624fdSAriff AbdullahOther OSS mixer controls control inputs of AC97 codec. 214bef800b3SAlexander Leidinger.Sh PRIVATE DEVICE CONTROLS 215b28624fdSAriff AbdullahYou can control some of EMU10Kx operation and configuration parameters through 216ae91966bSRuslan Ermilov.Va dev.emu10kx. Ns Aq Ar X 217ae91966bSRuslan Ermilovsysctls. 21880da51efSChristian BruefferThese 21980da51efSChristian Brueffer.Xr sysctl 8 22080da51efSChristian Brueffervalues are temporary and should not be relied 221bef800b3SAlexander Leidingerupon. 222bef800b3SAlexander Leidinger.Sh DRIVER CONFIGURATION 223b28624fdSAriff AbdullahLoader tunables are used to set driver configuration. 224b28624fdSAriff AbdullahTunables can be set at the 225b28624fdSAriff Abdullah.Xr loader 8 226b28624fdSAriff Abdullahprompt before booting the kernel or they can be stored in 227b28624fdSAriff Abdullah.Pa /boot/loader.conf . 228b28624fdSAriff AbdullahThese tunables can't be changed from a maching 229b28624fdSAriff Abdullah.Xr sysctl 8 230b28624fdSAriff Abdullahentry after boot, but you can change them using 231b28624fdSAriff Abdullah.Xr kenv 1 232b28624fdSAriff Abdullahwhile the driver is not loaded. 233b28624fdSAriff Abdullah.Bl -tag -width indent 234b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .disabled 235b28624fdSAriff AbdullahDisables loading a driver instance. 236b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_disabled 237b28624fdSAriff AbdullahDisables multichannel playback support, when one card is represented as 238b28624fdSAriff Abdullahseveral PCM devices. 239b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_recording 240b28624fdSAriff AbdullahEnables experimental multichannel recording support. 241b28624fdSAriff Abdullah.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .debug 242b28624fdSAriff AbdullahSet debug output level. 243b28624fdSAriff Abdullah.Bl -tag -width 2n 244b28624fdSAriff Abdullah.It 0 245b28624fdSAriff AbdullahNo additional debug options enabled 246b28624fdSAriff Abdullah.It 1 247b28624fdSAriff AbdullahEnables all DSP outputs to be connected, even those 248b28624fdSAriff Abdullahthat are known to be unused on a particular card. 249b28624fdSAriff Abdullah.It 2 250b28624fdSAriff AbdullahAdditional debug messages about in-driver events will be printed. 251b28624fdSAriff Abdullah.It 2 252b28624fdSAriff AbdullahAdditional debug messages will be printed when memory allocation fails. 253b28624fdSAriff Abdullah.El 254bef800b3SAlexander Leidinger.El 255bef800b3SAlexander Leidinger.Sh FILES 256ae91966bSRuslan Ermilov.Bl -tag -width ".Pa /dev/emu10kx?" -compact 257bef800b3SAlexander Leidinger.It Pa /dev/emu10kx? 258ae91966bSRuslan Ermilov.Nm 259ae91966bSRuslan Ermilovmanagement interface 260bef800b3SAlexander Leidinger.El 261bef800b3SAlexander Leidinger.Sh SEE ALSO 26280da51efSChristian Brueffer.Xr sound 4 263bef800b3SAlexander Leidinger.Sh HISTORY 264bef800b3SAlexander LeidingerThe 265bef800b3SAlexander Leidinger.Nm 266bef800b3SAlexander Leidingerdevice driver first appeared in 26780da51efSChristian Brueffer.Fx 7.0 . 268bef800b3SAlexander Leidinger.Sh AUTHORS 269ae91966bSRuslan Ermilov.An -nosplit 27080da51efSChristian BruefferThe PCM part of the driver is based on the 27180da51efSChristian Brueffer.Xr snd_emu10k1 4 272ae91966bSRuslan ErmilovSB Live!\& driver by 273b28624fdSAriff Abdullah.An "Cameron Grant" Aq cg@freebsd.org . 27480da51efSChristian BruefferThe MIDI interface is based on the 27580da51efSChristian Brueffer.Xr snd_emu10k1 4 276ae91966bSRuslan ErmilovMIDI interface code by 277b28624fdSAriff Abdullah.An "Mathew Kanner" Aq matk@freebsd.org . 27880da51efSChristian BruefferThe 279bef800b3SAlexander Leidinger.Nm 280bef800b3SAlexander Leidingerdevice driver and this manual page were written by 281bef800b3SAlexander Leidinger.An Yuriy Tsibizov . 282bef800b3SAlexander Leidinger.Sh BUGS 283bef800b3SAlexander Leidinger.Pp 284b28624fdSAriff AbdullahThe driver does not detect lost S/PDIF signals and produces noise when 285b28624fdSAriff AbdullahS/PDIF is not connected and S/PDIF volume is not zero. 286bef800b3SAlexander Leidinger.Pp 28780da51efSChristian BruefferThe PCM driver cannot detect the presence of Live!Drive or AudigyDrive 288b28624fdSAriff Abdullahbreakout boxes and tries to use them (and list their connectors in the 289b28624fdSAriff Abdullahmixer). 290bef800b3SAlexander Leidinger.Pp 29180da51efSChristian BruefferThe MIDI driver cannot detect the presence of Live!Drive or AudigyDrive 29280da51efSChristian Bruefferbreakout boxes and tries to enable the IR receiver on them anyway. 293