xref: /freebsd/share/man/man4/snd_hdspe.4 (revision 9398a495eb305d5bf240bc998ee2f6128d75f4ca)
1.\" Copyright (c) 2012 Ruslan Bukin <br@bsdpad.com>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd February 9, 2024
26.Dt SND_HDSPE 4
27.Os
28.Sh NAME
29.Nm snd_hdspe
30.Nd "RME HDSPe bridge device driver"
31.Sh SYNOPSIS
32To compile this driver into the kernel, place the following lines in your
33kernel configuration file:
34.Bd -ragged -offset indent
35.Cd "device sound"
36.Cd "device snd_hdspe"
37.Ed
38.Pp
39Alternatively, to load the driver as a module at boot time, place the
40following line in
41.Xr loader.conf 5 :
42.Bd -literal -offset indent
43snd_hdspe_load="YES"
44.Ed
45.Sh DESCRIPTION
46The
47.Nm
48bridge driver allows the generic audio driver
49.Xr sound 4
50to attach to RME HDSPe audio devices.
51.Sh HARDWARE
52The
53.Nm
54driver supports the following audio devices:
55.Pp
56.Bl -bullet -compact
57.It
58RME HDSPe AIO
59.It
60RME HDSPe RayDAT
61.El
62.Pp
63By default, each
64.Xr pcm 4
65device corresponds to a physical port on the sound card.
66For ADAT ports, 8 channel, 4 channel and 2 channel formats are supported.
67The effective number of ADAT channels is 8 channels at single speed
68(32kHz-48kHz), 4 channels at double speed (64kHz-96kHz), and 2 channels at
69quad speed (128kHz-192kHz).
70Depending on sample rate and channel format selected, not all pcm channels can
71be mapped to ADAT channels and vice versa.
72.Sh LOADER TUNABLES
73These settings can be entered at the
74.Xr loader 8
75prompt or in
76.Xr loader.conf 5 .
77.Bl -tag -width indent
78.It Va hw.hdspe.unified_pcm
79If set to 1, all physical ports are combined into one unified pcm device.
80When opened in multi-channel audio software, this makes all ports available
81at the same time, and fully synchronized.
82For resulting channel numbers consult the following table:
83.El
84.Bl -column "HDSPe RayDAT" "Single Speed" "Double Speed" "Quad Speed"
85.Sy "Sound Card" Ta Sy "Single Speed" Ta Sy "Double Speed" Ta Sy "Quad Speed"
86.It "" Ta "Play | Rec" Ta "Play | Rec" Ta "Play | Rec"
87.It HDSPe AIO Ta " 16  |  14" Ta " 12  |  10" Ta " 10  |   8"
88.It HDSPe RayDAT Ta " 36  |  36" Ta " 20  |  20" Ta " 12  |  12"
89.El
90.Sh SYSCTL TUNABLES
91These settings and informational values can be accessed at runtime with the
92.Xr sysctl 8
93command.
94If multiple RME HDSPe sound cards are installed, each device has a separate
95configuration.
96To adjust the following sysctl identifiers for a specific sound card, insert
97the respective device number in place of
98.Ql 0 .
99.Bl -tag -width indent
100.It Va dev.hdspe.0.sample_rate
101Set a fixed sample rate from 32000, 44100, 48000, up to 192000.
102This is usually required for digital connections (AES, S/PDIF, ADAT).
103The default value of 0 adjusts the sample rate according to pcm device settings.
104.It Va dev.hdspe.0.period
105The number of samples processed per interrupt, from 32, 64, 128, up to 4096.
106Setting a lower value here results in less latency, but increases system load
107due to frequent interrupt processing.
108Extreme values may cause audio gaps and glitches.
109.It Va dev.hdspe.0.clock_list
110Lists possible clock sources to sync with, depending on the hardware model.
111This includes internal and external master clocks as well as incoming digital
112audio signals like AES, S/PDIF and ADAT.
113.It Va dev.hdspe.0.clock_preference
114Select a preferred clock source from the clock list.
115HDSPe cards will sync to this clock source when available, but fall back to
116auto-sync with any other digital clock signal they receive.
117Set this to
118.Ql internal
119if the HDSPe card should act as master clock.
120.It Va dev.hdspe.0.clock_source
121Shows the actual clock source in use (read only).
122This differs from what is set as clock preference when in auto-sync mode.
123.It Va dev.hdspe.0.sync_status
124Display the current sync status of all external clock sources.
125Status indications are
126.Ql none
127for no signal at all,
128.Ql lock
129for when a valid signal is present, and
130.Ql sync
131for accurately synchronized signals (required for recording digital
132audio).
133.El
134.Pp
135Where appropriate these sysctl values are modeled after official RME software on
136other platforms, and adopt their terminology.
137Consult the RME user manuals for additional information.
138.Sh SEE ALSO
139.Xr sound 4
140.Sh HISTORY
141The
142.Nm
143device driver first appeared in
144.Fx 10.0 .
145.Sh AUTHORS
146.An -nosplit
147The
148.Nm
149driver was written by
150.An Ruslan Bukin <br@bsdpad.com> .
151.An Florian Walpen <dev@submerge.ch>
152contributed clock source settings and restructured the pcm device mapping.
153