SND_EMU10KX(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’– snd_emu10kx(4) πŸ’–

okay so bestie, listen up β€” this is the manual page for the Creative SoundBlaster Live! and Audigy sound cards device driver, and it's literally the whole vibe for getting your EMU10Kx-based card slaying in FreeBSD. no cap, this is a Kernel Interfaces Manual situation and we're gonna go through it together. πŸŽ€


✨ SYNOPSIS ✨

so if you wanna compile this driver into the kernel (very main character energy), you drop these lines into your kernel configuration file:

device sound
device snd_emu10kx

or, alternatively β€” if you're more of a module-at-boot-time girlie β€” you put this line in loader.conf(5):

snd_emu10kx_load="YES"

slay. periodt. πŸ’…


🌸 DESCRIPTION 🌸

The snd_emu10kx bridge driver is the icon that allows the generic audio driver sound(4) to attach to Creative sound cards based on the EMU10K1, CA0100, CA0101, CA0102 and CA0108 DSPs. it's giving matchmaker, honestly. 🫢

These snd_emu10kx sound cards have a PCM part (accessible through one to five pcm(4) devices β€” see "MULTICHANNEL PLAYBACK" below for the tea) and an MPU401-compatible MIDI I/O controller (accessible through the midi device).

⚠️ heads up bestie: wave table synthesizer support is not available. sad but true. 😭

πŸ”₯ HARDWARE πŸ”₯

The snd_emu10kx driver supports these sound cards (the VIPs, the it-girls):

  • Creative Sound Blaster Live! (EMU10K1 Chipset). Both PCM and MIDI interfaces are available. πŸ’–
  • Creative Sound Blaster Audigy (CA0100 and CA0101 Chipset). PCM and two MIDI interfaces available. double the slay.
  • Creative Sound Blaster Audigy 2 and Creative Sound Blaster Audigy 4 (CA0102 Chipset). PCM support is limited to 48kHz/16 bit stereo β€” the 192kHz/24 bit part of this chipset is not supported, so don't come for her with those high-res dreams. πŸ™ˆ
  • Creative Sound Blaster Audigy 2 Value (CA0108 Chipset). PCM support is also limited to 48kHz/16 bit stereo (again, the 192kHz/24 bit part is not supported). and literally no MIDI support for this card. rip. πŸ’€

now for the cards this driver does NOT support β€” yes they have names similar to the supported ones, don't let them fool you:

  • Creative Sound Blaster Live! 24-Bit, identified by FreeBSD as "emu10k1x Soundblaster Live! 5.1". not her.
  • Creative Sound Blaster Audigy LS / ES, identified by FreeBSD as "CA0106-DAT Audigy LS". nope.
  • All other Creative sound cards with -DAT chipsets. blocked.
  • All Creative X-Fi series sound cards. not on the list, bestie.

🌈 MULTICHANNEL PLAYBACK 🌈

okay so by default, the snd_emu10kx driver is loaded with multichannel playback capabilities enabled β€” we love a generous queen. If you do not set the hint.emu10kx.0.multichannel_disabled option in your loader.conf(5) configuration file, you will get up to five DSP devices, one for each sound card output. so much room for activities. ✨

You can use additional software (like audio/pulseaudio from The Ports Collection) to do sound stream demultiplexing. iykyk.

πŸ‘‘ important: only the "FRONT" output can play and record sound from external sources (like line or S/PDIF inputs). the other outputs are playback-only girlies.

πŸ¦‹ MULTICHANNEL RECORDING πŸ¦‹

By default, multichannel recording capabilities are not enabled when you load the snd_emu10kx driver. it's an opt-in situation.

If you enable the hint.emu10kx.0.multichannel_recording option in loader.conf(5), you will get one more DSP device that is rate-locked to 48kHz/16bit/mono. and here's the gag: this is actually 48kHz/16bit/32 channels on SB Live! cards and 48kHz/16bit/64channels on Audigy cards, but the current implementation of the sound subsystem does not support such an amount of PCM channels. so she's serving mono but secretly holding 32-64 channels. the way that… 😭

πŸ’€ warning: this device can not be opened for read, thus confusing many applications. like, a lot of them. don't say i didn't warn you.

within a multichannel stream, the first half (0-15 or 0-31) is a copy of all DSP outputs, and the second half (15-30 or 32-63) is a copy of some DSP inputs.

On Live! cards, the last substream (31) is used as a sync stream and is always set to 0xc0de β€” iconic hex, honestly. Audigy cards do not need such sync data, because a stream always starts with substream 0. main character energy from Audigy. πŸ‘‘

SB Live! substream map (in byte offsets, each substream is 2 bytes LE)

OffsetSubstream
+0x00..+0x1EPCM streams 0..15
+0x20, +0x22Empty
+0x24..+0x2APCM inputs: front left, front right, rear left, rear right, center, sub
+0x2C..+0x3CDSP inputs 0..8:
+0x3Esync substream (0xc0de)

Audigy substream map (in byte offsets, each substream is 2 bytes LE)

OffsetSubstream
+0x00..+0x3EPCM streams 0..31
+0x40..+0x5EPCM inputs: front LR, rear LR, center, sub, ...
+0x60..+0x7EDSP inputs 0..16

πŸŽ€ OSS MIXER CONTROLS πŸŽ€

these are the controls available through the standard OSS programming interface. you can use mixer(8) to change them. very accessible, we love.

On EMU10K1-based cards, the OSS mixer directly controls the AC97 codec β€” she's hands-on. On newer cards, the OSS mixer controls some parameters of the AC97 codec and some DSP-based mixer controls. it's a hybrid situation. πŸ’…

here's the full rundown:

  • "vol" mixer control for the overall sound volume.
  • "pcm" mixer control for the PCM playback volume. it controls only front output volume in multichannel mode and all output volume in single channel mode.
  • "rec" mixer control acts very differently on EMU10K1 and other cards. On EMU10K1 cards it controls the AC97 codec recording level. On non-EMU10K1 cards it controls the amount of AC97 "stereo mix" entering the DSP. AC97 recording level and AC97 recording source are fixed on CA0100, CA0101, CA0102 and CA0108 cards β€” the AC97 recording levels are always set to maximum and recording source is always "stereo mix". no notes. πŸ’€
  • "dig1" is a CD S/PDIF (on-card) volume control.
  • "dig2" is an AudigyDrive S/PDIF (Audigy series) or TOSLink (SB Live! series) volume control.
  • "dig3" is an on-card S/PDIF volume control.
  • "line2" is AudigyDrive "Line In 2" volume control.
  • "line3" is AudigyDrive "AUX In 2" volume control.

Other OSS mixer controls control the inputs of the AC97 codec. the more you know. 🌈


🧚 PRIVATE DEVICE CONTROLS 🧚

You can control some of EMU10Kx's operation and configuration parameters through dev.emu10kx.⟨X⟩ sysctls. these sysctl(8) values are temporary and should not be relied upon. like a situationship, bestie. don't get attached. πŸ™ˆ


🌸 DRIVER CONFIGURATION 🌸

Loader tunables are used to set driver configuration. Tunables can be set at the loader(8) prompt before booting the kernel, or they can be stored in /boot/loader.conf.

⚠️ these tunables cannot be changed from a machine sysctl(8) entry after boot, but you can change them using kenv(1) before loading the snd_emu10kx driver. timing is everything.
  • hint.emu10kx.⟨X⟩.disabled β€” Disables loading a driver instance.
  • hint.emu10kx.⟨X⟩.multichannel_disabled β€” Disables multichannel playback support, when one card is represented as several PCM devices.
  • hint.emu10kx.⟨X⟩.multichannel_recording β€” Enables experimental multichannel recording support.
  • hint.emu10kx.⟨X⟩.debug β€” Set debug output level.
    • 0 β€” No additional debug options enabled.
    • 1 β€” Enables all DSP outputs to be connected, even those that are known to be unused on a particular card.
    • 2 β€” Additional debug messages about in-driver events will be printed.
    • 2 β€” Additional debug messages will be printed when memory allocation fails. (yes, bestie, the original lists 2 twice β€” i'm just the messenger, don't come for me. πŸ™ˆ)

πŸ“ FILES πŸ“

  • /dev/emu10kx? β€” snd_emu10kx management interface

⭐ SEE ALSO ⭐


πŸ‘‘ HISTORY πŸ‘‘

The snd_emu10kx device driver first appeared in FreeBSD 7.0. a legend was born. πŸ’–


πŸ’œ AUTHORS πŸ’œ

The PCM part of the driver is based on the snd_emu10k1(4) SB Live! driver by Cameron Grant <cg@FreeBSD.org>.

The MIDI interface is based on the snd_emu10k1(4) MIDI interface code by Mathew Kanner <matk@FreeBSD.org>.

The snd_emu10kx device driver and this manual page were written by Yuriy Tsibizov. the whole squad ate. 🫢


πŸ’€ BUGS πŸ’€

okay so there are some things you need to know, and i'm gonna be real with you:

  • The driver does not detect lost S/PDIF signals and produces noise when S/PDIF is not connected and S/PDIF volume is not zero. no cap, it will be noisy. 😭
  • The PCM driver cannot detect the presence of Live!Drive or AudigyDrive breakout boxes and tries to use them anyway (and list their connectors in the mixer). she's trying her best.
  • The MIDI driver cannot detect the presence of Live!Drive or AudigyDrive breakout boxes and tries to enable the IR receiver on them anyway. same energy. πŸ™ˆ

and that's the whole manual, bestie. this page came from the Debian crew, dated May 28, 2008 β€” a vintage icon, honestly. go forth and slay your sound card configuration. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from