1.\" Copyright (c) 2012 Ruslan Bukin <br@bsdpad.com> 2.\" Copyright (c) 2024 Florian Walpen <dev@submerge.ch> 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.Dd October 28, 2024 27.Dt SND_HDSP 4 28.Os 29.Sh NAME 30.Nm snd_hdsp 31.Nd "RME HDSP bridge device driver" 32.Sh SYNOPSIS 33To compile this driver into the kernel, place the following lines in your 34kernel configuration file: 35.Bd -ragged -offset indent 36.Cd "device sound" 37.Cd "device snd_hdsp" 38.Ed 39.Pp 40Alternatively, to load the driver as a module at boot time, place the 41following line in 42.Xr loader.conf 5 : 43.Bd -literal -offset indent 44snd_hdsp_load="YES" 45.Ed 46.Sh DESCRIPTION 47The 48.Nm 49bridge driver allows the generic audio driver 50.Xr sound 4 51to attach to RME HDSP audio devices. 52.Sh HARDWARE 53The 54.Nm 55driver supports the following audio devices: 56.Pp 57.Bl -bullet -compact 58.It 59RME HDSP 9632 (optional AO4S-192 and AIS-192 extension boards) 60.It 61RME HDSP 9652 62.El 63.Pp 64By default, each 65.Xr pcm 4 66device corresponds to a physical port on the sound card. 67For ADAT ports, 8 channel, 4 channel and 2 channel formats are supported. 68The effective number of ADAT channels is 8 channels at single speed 69(32kHz-48kHz) and 4 channels at double speed (64kHz-96kHz). 70Only the HDSP 9632 can operate at quad speed (128kHz-192kHz), ADAT is 71disabled in this mode. 72Depending on sample rate and channel format selected, not all pcm channels can 73be mapped to ADAT channels and vice versa. 74.Sh LOADER TUNABLES 75These settings can be entered at the 76.Xr loader 8 77prompt or in 78.Xr loader.conf 5 . 79.Bl -tag -width indent 80.It Va hw.hdsp.unified_pcm 81If set to 1, all physical ports are combined into one unified pcm device. 82When opened in multi-channel audio software, this makes all ports available 83at the same time, and fully synchronized. 84For resulting channel numbers consult the following table: 85.El 86.Bl -column "Sound Card" "Single Speed" "Double Speed" "Quad Speed" 87.Sy "Sound Card" Ta Sy "Single Speed" Ta Sy "Double Speed" Ta Sy "Quad Speed" 88.It "" Ta "Play | Rec" Ta "Play | Rec" Ta "Play | Rec" 89.It HDSP 9632 Ta " 16 | 16" Ta " 12 | 12" Ta " 8 | 8" 90.It HDSP 9652 Ta " 26 | 26" Ta " 14 | 14" Ta " - | -" 91.El 92.Sh SYSCTL TUNABLES 93These settings and informational values can be accessed at runtime with the 94.Xr sysctl 8 95command. 96If multiple RME HDSP sound cards are installed, each device has a separate 97configuration. 98To adjust the following sysctl identifiers for a specific sound card, insert 99the respective device number in place of 100.Ql 0 . 101.Bl -tag -width indent 102.It Va dev.hdsp.0.sample_rate 103Set a fixed sample rate from 32000, 44100, 48000, up to 192000. 104This is usually required for digital connections (AES, S/PDIF, ADAT). 105The default value of 0 adjusts the sample rate according to pcm device settings. 106.It Va dev.hdsp.0.period 107The number of samples processed per interrupt, from 32, 64, 128, up to 4096. 108Setting a lower value here results in less latency, but increases system load 109due to frequent interrupt processing. 110Extreme values may cause audio gaps and glitches. 111.It Va dev.hdsp.0.clock_list 112Lists possible clock sources to sync with, depending on the hardware model. 113This includes internal and external master clocks as well as incoming digital 114audio signals like AES, S/PDIF and ADAT. 115.It Va dev.hdsp.0.clock_preference 116Select a preferred clock source from the clock list. 117HDSP cards will sync to this clock source when available, but fall back to 118auto-sync with any other digital clock signal they receive. 119Set this to 120.Ql internal 121if the HDSP card should act as master clock. 122.It Va dev.hdsp.0.clock_source 123Shows the actual clock source in use (read only). 124This differs from what is set as clock preference when in auto-sync mode. 125.It Va dev.hdsp.0.sync_status 126Display the current sync status of all external clock sources. 127Status indications are 128.Ql none 129for no signal at all, 130.Ql lock 131for when a valid signal is present, and 132.Ql sync 133for accurately synchronized signals (required for recording digital 134audio). 135.El 136.Pp 137The following tunables are applicable to HDSP 9632 devices only: 138.Bl -tag -width indent 139.It Va dev.hdsp.0.input_level 140Select the sensitivity of the analog line input. 141Available reference levels for the input signal are 142.Ql LowGain , 143.Ql +4dBu 144and 145.Ql -10dBV . 146.It Va dev.hdsp.0.output_level 147Select the gain level of the analog line output. 148Available reference levels for the output signal are 149.Ql HighGain , 150.Ql +4dBu 151and 152.Ql -10dBV . 153.It Va dev.hdsp.0.phones_level 154Adjust the gain level of the phones output, separately from the analog line 155output. 156The signal can be lowered by 6 or 12 dB. 157.El 158.Pp 159Where appropriate these sysctl values are modeled after official RME software on 160other platforms, and adopt their terminology. 161Consult the RME user manuals for additional information. 162.Sh SEE ALSO 163.Xr sound 4 164.Sh HISTORY 165The 166.Nm 167device driver first appeared in 168.Fx 15.0 . 169.Sh AUTHORS 170.An -nosplit 171Based on 172.Xr snd_hdspe 4 173originally written by 174.An Ruslan Bukin <br@bsdpad.com> . 175All adaptation to HDSP cards by 176.An Florian Walpen <dev@submerge.ch> . 177