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 May 1, 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 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 " 12 | 12" Ta " 8 | 8" Ta " 4 | 4" 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 137Where appropriate these sysctl values are modeled after official RME software on 138other platforms, and adopt their terminology. 139Consult the RME user manuals for additional information. 140.Sh SEE ALSO 141.Xr sound 4 142.Sh HISTORY 143The 144.Nm 145device driver first appeared in 146.Fx 15.0 . 147.Sh AUTHORS 148.An -nosplit 149Based on 150.Xr snd_hdspe 4 151originally written by 152.An Ruslan Bukin <br@bsdpad.com> . 153All adaptation to HDSP cards by 154.An Florian Walpen <dev@submerge.ch> . 155