git: e0c37c160b11 - main - snd_hdsp(4): Support AO4S-192 and AI4S-192 extension boards.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Oct 2024 18:53:42 UTC
The branch main has been updated by br:
URL: https://cgit.FreeBSD.org/src/commit/?id=e0c37c160b115b0bf41847ab60a5dabf0dc71300
commit e0c37c160b115b0bf41847ab60a5dabf0dc71300
Author: Florian Walpen <dev@submerge.ch>
AuthorDate: 2024-10-04 18:51:38 +0000
Commit: Ruslan Bukin <br@FreeBSD.org>
CommitDate: 2024-10-04 18:51:49 +0000
snd_hdsp(4): Support AO4S-192 and AI4S-192 extension boards.
Create an additional 4 channel pcm device for RME HDSP 9632 sound cards,
to support the optional AO4S-192 and AI4S-192 extension boards. For
simplicity, the <HDSP 9632 [ext]> pcm device is always present, even if
the extension boards are not installed.
Unfortunately I cannot test this with actual hardware, but I made sure
the additional channels do not affect the functionality of the HDSP 9632
as currently in src.
Reviewed by: christos, br
Differential Revision: https://reviews.freebsd.org/D46837
---
share/man/man4/snd_hdsp.4 | 6 +++---
sys/dev/sound/pci/hdsp-pcm.c | 2 +-
sys/dev/sound/pci/hdsp.c | 1 +
sys/dev/sound/pci/hdsp.h | 5 +++--
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/share/man/man4/snd_hdsp.4 b/share/man/man4/snd_hdsp.4
index 23eb98a3ccc2..d6661c80b2ea 100644
--- a/share/man/man4/snd_hdsp.4
+++ b/share/man/man4/snd_hdsp.4
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 1, 2024
+.Dd September 28, 2024
.Dt SND_HDSP 4
.Os
.Sh NAME
@@ -56,7 +56,7 @@ driver supports the following audio devices:
.Pp
.Bl -bullet -compact
.It
-RME HDSP 9632
+RME HDSP 9632 (optional AO4S-192 and AIS-192 extension boards)
.It
RME HDSP 9652
.El
@@ -86,7 +86,7 @@ For resulting channel numbers consult the following table:
.Bl -column "Sound Card" "Single Speed" "Double Speed" "Quad Speed"
.Sy "Sound Card" Ta Sy "Single Speed" Ta Sy "Double Speed" Ta Sy "Quad Speed"
.It "" Ta "Play | Rec" Ta "Play | Rec" Ta "Play | Rec"
-.It HDSP 9632 Ta " 12 | 12" Ta " 8 | 8" Ta " 4 | 4"
+.It HDSP 9632 Ta " 16 | 16" Ta " 12 | 12" Ta " 8 | 8"
.It HDSP 9652 Ta " 26 | 26" Ta " 14 | 14" Ta " - | -"
.El
.Sh SYSCTL TUNABLES
diff --git a/sys/dev/sound/pci/hdsp-pcm.c b/sys/dev/sound/pci/hdsp-pcm.c
index 29bd0bc70ee4..a50fc2b52fc0 100644
--- a/sys/dev/sound/pci/hdsp-pcm.c
+++ b/sys/dev/sound/pci/hdsp-pcm.c
@@ -107,7 +107,7 @@ hdsp_port_slot_map(uint32_t ports, uint32_t speed)
slot_map |= (0x03 << 8); /* 2 channels SPDIF. */
if (ports & HDSP_CHAN_9632_LINE)
slot_map |= (0x03 << 10); /* 2 channels line. */
- if (ports & HDSP_CHAN_9632_EXT_BOARD)
+ if (ports & HDSP_CHAN_9632_EXT)
slot_map |= (0x0f << 12); /* 4 channels extension. */
} else if ((ports & HDSP_CHAN_9652_ALL) && (speed <= 96000)) {
/* Map HDSP 9652 ports to slot bitmap, no quad speed. */
diff --git a/sys/dev/sound/pci/hdsp.c b/sys/dev/sound/pci/hdsp.c
index 769615cb1f4b..cf251a5636a1 100644
--- a/sys/dev/sound/pci/hdsp.c
+++ b/sys/dev/sound/pci/hdsp.c
@@ -74,6 +74,7 @@ static struct hdsp_channel chan_map_9632[] = {
{ HDSP_CHAN_9632_ADAT, "adat" },
{ HDSP_CHAN_9632_SPDIF, "s/pdif" },
{ HDSP_CHAN_9632_LINE, "line" },
+ { HDSP_CHAN_9632_EXT, "ext" },
{ 0, NULL },
};
diff --git a/sys/dev/sound/pci/hdsp.h b/sys/dev/sound/pci/hdsp.h
index 5ff622892c52..981188ad8aff 100644
--- a/sys/dev/sound/pci/hdsp.h
+++ b/sys/dev/sound/pci/hdsp.h
@@ -130,10 +130,11 @@
#define HDSP_CHAN_9632_ADAT (1 << 0)
#define HDSP_CHAN_9632_SPDIF (1 << 1)
#define HDSP_CHAN_9632_LINE (1 << 2)
+#define HDSP_CHAN_9632_EXT (1 << 3) /* Extension boards */
#define HDSP_CHAN_9632_ALL (HDSP_CHAN_9632_ADAT | \
HDSP_CHAN_9632_SPDIF | \
- HDSP_CHAN_9632_LINE)
-#define HDSP_CHAN_9632_EXT_BOARD (1 << 3)
+ HDSP_CHAN_9632_LINE | \
+ HDSP_CHAN_9632_EXT)
#define HDSP_CHAN_9652_ADAT1 (1 << 5)
#define HDSP_CHAN_9652_ADAT2 (1 << 6)