SND_HDSP(4)

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

✨ SND_HDSP(4) ✨ β€” the RME HDSP bridge driver, explained by your local Unix bestie πŸŽ€

okay so real talk, this is a page from the Kernel Interfaces Manual, and it's all about snd_hdsp β€” the bridge device driver that lets your fancy RME HDSP sound card talk to FreeBSD. let's get into it πŸ’…


🌸 NAME 🌸

snd_hdsp β€” the RME HDSP bridge device driver. that's it, that's the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

bestie, you've got two ways to bring this driver into your life. choose your fighter πŸ‘‘

Way 1: compile it straight into the kernel. drop these lines into your kernel configuration file:

device sound
device snd_hdsp

Way 2: load it as a module at boot time. put this line in loader.conf(5):

snd_hdsp_load="YES"

either way, she's showing up to the party 🫢


πŸ’– DESCRIPTION πŸ’–

the snd_hdsp bridge driver is the middleman β€” the literal wingman β€” that lets the generic audio driver sound(4) attach to RME HDSP audio devices. that's the whole job. and honestly? she ate. πŸ”₯


🎧 HARDWARE 🎧

here's the hardware guest list, and yes, everyone on it is iconic:

  • RME HDSP 9632 (with optional AO4S-192 and AIS-192 extension boards)
  • RME HDSP 9652

now for the deets, because this part is lowkey important. by default, each pcm(4) device corresponds to a physical port on the sound card. for ADAT ports, 8 channel, 4 channel and 2 channel formats are supported.

the effective number of ADAT channels is 8 channels at single speed (32kHz-48kHz) and 4 channels at double speed (64kHz-96kHz).

and here's the plot twist 😭 only the HDSP 9632 can operate at quad speed (128kHz-192kHz) β€” and ADAT is disabled in this mode. so if you were expecting ADAT at quad speed, bestie, no. πŸ™ˆ

also, depending on sample rate and channel format selected, not all pcm channels can be mapped to ADAT channels and vice versa. it's giving "it depends" and honestly that's just how it is.


⭐ LOADER TUNABLES ⭐

these settings can be entered at the loader(8) prompt or in loader.conf(5). very demure, very mindful, very boot-time 🧚

  • hw.hdsp.unified_pcm β€” if set to 1, all physical ports are combined into one unified pcm device. when opened in multi-channel audio software, this makes all ports available at the same time, and fully synchronized. for the resulting channel numbers, consult the following table πŸ‘‡
Sound Card    Single Speed    Double Speed    Quad Speed
              Play | Rec      Play | Rec      Play | Rec
HDSP 9632      16  |  16       12  |  12        8  |   8
HDSP 9652      26  |  26       14  |  14        -  |   -

yes the numbers are exact, don't @ me πŸ’€


🌈 SYSCTL TUNABLES 🌈

these settings and informational values can be accessed at runtime with the sysctl(8) command. so you don't have to reboot like some kind of medieval peasant ✨

one thing though: if multiple RME HDSP sound cards are installed, each device has a separate configuration. to adjust the following sysctl identifiers for a specific sound card, insert the respective device number in place of 0. so dev.hdsp.0. becomes dev.hdsp.1. and so on. iykyk πŸ¦‹

  • dev.hdsp.0.sample_rate β€” set a fixed sample rate from 32000, 44100, 48000, up to 192000. this is usually required for digital connections (AES, S/PDIF, ADAT). the default value of 0 adjusts the sample rate according to pcm device settings.
  • dev.hdsp.0.period β€” the number of samples processed per interrupt, from 32, 64, 128, up to 4096. setting a lower value here results in less latency, but increases system load due to frequent interrupt processing. and heads up 🫢 β€” extreme values may cause audio gaps and glitches.
  • dev.hdsp.0.clock_list β€” lists possible clock sources to sync with, depending on the hardware model. this includes internal and external master clocks as well as incoming digital audio signals like AES, S/PDIF and ADAT.
  • dev.hdsp.0.clock_preference β€” select a preferred clock source from the clock list. HDSP cards will sync to this clock source when available, but fall back to auto-sync with any other digital clock signal they receive. set this to internal if the HDSP card should act as master clock. main character energy πŸ‘‘
  • dev.hdsp.0.clock_source β€” shows the actual clock source in use (read only). this differs from what is set as clock preference when in auto-sync mode. she's just reporting the truth πŸ’…
  • dev.hdsp.0.sync_status β€” display the current sync status of all external clock sources. status indications are none for no signal at all, lock for when a valid signal is present, and sync for accurately synchronized signals (required for recording digital audio). so if you're trying to record and it's stuck on lock… yeah. that's the problem. 😭

πŸ“ the HDSP 9632 exclusive club πŸ“

the following tunables are applicable to HDSP 9632 devices only. sorry to the 9652 girlies, this section isn't for you πŸ™ˆ

  • dev.hdsp.0.input_level β€” select the sensitivity of the analog line input. available reference levels for the input signal are LowGain, +4dBu and -10dBV.
  • dev.hdsp.0.output_level β€” select the gain level of the analog line output. available reference levels for the output signal are HighGain, +4dBu and -10dBV.
  • dev.hdsp.0.phones_level β€” adjust the gain level of the phones output, separately from the analog line output. the signal can be lowered by 6 or 12 dB.

ngl, where appropriate these sysctl values are modeled after official RME software on other platforms, and adopt their terminology. so if a name looks kinda weird, that's why. consult the RME user manuals for additional information πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹


πŸŽ€ HISTORY πŸŽ€

the snd_hdsp device driver first appeared in FreeBSD 15.0. a fresh icon, a rising star ⭐


πŸ‘‘ AUTHORS πŸ‘‘

  • Based on snd_hdspe(4) originally written by Ruslan Bukin <br@bsdpad.com>.
  • All adaptation to HDSP cards by Florian Walpen <dev@submerge.ch>.

shoutout to the devs, fr fr 🫢


okay that's the whole page, bestie. and before you close the tab: this beauty came out of Debian, October 28, 2024 β€” so if you're citing it in your essay, you're welcome πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from