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 July 15, 2007 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 is not supported. 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 are named 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 driver 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 119five DSP devices, one for each sound card output. 120You can use additional software (like 121.Em audio/pulseaudio 122from 123.Em The Ports Collection 124) to 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 131this driver. 132If you enable the 133.Dv hint.emu10kx.0.multichannel_recording 134option in 135.Xr loader.conf 5 136you will get one more DSP device that is rate-locked to 48kHz/16bit/mono. 137This is actually 48kHz/16bit/32 channels on SB Live! cards and 13848kHz/16bit/64channels on Audigy cards, but the current implementation of 139sound subsystem does not support such an amount of PCM channels. 140This device can not be opened for read, thus confusing many applications. 141.Pp 142Within multichannel stream first half (0-15 or 0-31) is a copy of all DSP 143outputs, second half (15-30 or 32-63) is a copy of some DSP inputs. 144On Live! cards the last substream (31) is used as a sync stream and always 145set to 0xc0de. 146Audigy cards do not need such sync data, because stream always start with 147substream 0. 148.Ss SB Live! substream map (in byte offsets, each substream is 2 bytes LE) 149.Bl -tag -width ".Dv +0x00..+0x1E" 150.It Dv Offset 151Substream 152.It +0x00..+0x1E 153PCM streams 0..15 154.It +0x20, +0x22 155Empty 156.It +0x24..+0x2A 157PCM inputs: front left, front right, rear left, rear right, center, sub 158.It +0x2C..+0x3C 159DSP inputs 0..8: 160.It +0x3E 161sync substream (0xc0de) 162.El 163.Pp 164.Ss Audigy substream map (in byte offsets, each substream is 2 bytes LE) 165.Bl -tag -width ".Dv +0x00..+0x3E" 166.It Dv Offset 167Substream 168.It +0x00..+0x3E 169PCM streams 0..31 170.It +0x40..+0x5E 171PCM inputs: front LR, rear LR, center, sub, ... 172.It +0x60..+0x7E 173DSP inputs 0..16 174.El 175.Sh OSS MIXER CONTROLS 176These are the controls available through the standard OSS programming interface. 177You can use 178.Xr mixer 8 179to change them. 180.Pp 181On EMU10K1-based cards the OSS mixer directly controls the AC97 codec. 182On newer cards the OSS mixer controls some parameters of the AC97 codec and 183some DSP-based mixer controls. 184.Bl -inset 185.It Qq vol 186mixer control is overall sound volume. 187.It Qq pcm 188mixer control is PCM playback volume. 189It controls only front output 190volume in multichannel mode and all output volume in single channel mode. 191.It Qq rec 192mixer control acts very different on EMU10K1 and other cards. 193On EMU10K1 cards it controls the AC97 codec recording level. 194On non-EMU10K1 cards it controls the amount of AC97 "stereo mix" entering 195the DSP. 196AC97 recording level and AC97 recording source are fixed on CA0100, CA0101, 197CA0102 and CA0108 cards. 198AC97 recording level are always set to maximum and recording source is always 199.Dq Li "stereo mix" . 200.It Qq dig1 201is a CD S/PDIF (on-card) volume control 202.It Qq dig2 203is an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume 204control 205.It Qq dig3 206is an on-card S/PDIF volume control 207.It Qq line2 208is AudigyDrive "Line In 2" volume control 209.It Qq line3 210is AudigyDrive "AUX In 2" volume control 211.El 212.Pp 213Other OSS mixer controls control inputs of AC97 codec. 214.Sh PRIVATE DEVICE CONTROLS 215You can control some of EMU10Kx operation and configuration parameters through 216.Va dev.emu10kx. Ns Aq Ar X 217sysctls. 218These 219.Xr sysctl 8 220values are temporary and should not be relied 221upon. 222.Sh DRIVER CONFIGURATION 223Loader tunables are used to set driver configuration. 224Tunables can be set at the 225.Xr loader 8 226prompt before booting the kernel or they can be stored in 227.Pa /boot/loader.conf . 228These tunables can't be changed from a maching 229.Xr sysctl 8 230entry after boot, but you can change them using 231.Xr kenv 1 232while the driver is not loaded. 233.Bl -tag -width indent 234.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .disabled 235Disables loading a driver instance. 236.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_disabled 237Disables multichannel playback support, when one card is represented as 238several PCM devices. 239.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .multichannel_recording 240Enables experimental multichannel recording support. 241.It Va hint.emu10kx. Ns Ao Ar X Ac Ns Va .debug 242Set debug output level. 243.Bl -tag -width 2n 244.It 0 245No additional debug options enabled 246.It 1 247Enables all DSP outputs to be connected, even those 248that are known to be unused on a particular card. 249.It 2 250Additional debug messages about in-driver events will be printed. 251.It 2 252Additional debug messages will be printed when memory allocation fails. 253.El 254.El 255.Sh FILES 256.Bl -tag -width ".Pa /dev/emu10kx?" -compact 257.It Pa /dev/emu10kx? 258.Nm 259management interface 260.El 261.Sh SEE ALSO 262.Xr sound 4 263.Sh HISTORY 264The 265.Nm 266device driver first appeared in 267.Fx 7.0 . 268.Sh AUTHORS 269.An -nosplit 270The PCM part of the driver is based on the 271.Xr snd_emu10k1 4 272SB Live!\& driver by 273.An "Cameron Grant" Aq cg@freebsd.org . 274The MIDI interface is based on the 275.Xr snd_emu10k1 4 276MIDI interface code by 277.An "Mathew Kanner" Aq matk@freebsd.org . 278The 279.Nm 280device driver and this manual page were written by 281.An Yuriy Tsibizov . 282.Sh BUGS 283.Pp 284The driver does not detect lost S/PDIF signals and produces noise when 285S/PDIF is not connected and S/PDIF volume is not zero. 286.Pp 287The PCM driver cannot detect the presence of Live!Drive or AudigyDrive 288breakout boxes and tries to use them (and list their connectors in the 289mixer). 290.Pp 291The MIDI driver cannot detect the presence of Live!Drive or AudigyDrive 292breakout boxes and tries to enable the IR receiver on them anyway. 293