git: 543adfcf51e0 - main - sound/midi: Do not duplicate MPU constants in snd_csa(4)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 16:38:10 UTC
The branch main has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=543adfcf51e027d5edafe222547574c0d5120b50
commit 543adfcf51e027d5edafe222547574c0d5120b50
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-11-10 14:04:53 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-11-12 16:35:49 +0000
sound/midi: Do not duplicate MPU constants in snd_csa(4)
No functional change intended.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
---
sys/dev/sound/midi/mpu401.c | 12 ++++--------
sys/dev/sound/midi/mpu401.h | 12 ++++++++++++
sys/dev/sound/pci/csamidi.c | 9 ---------
3 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c
index b117510fe889..4636843592e3 100644
--- a/sys/dev/sound/midi/mpu401.c
+++ b/sys/dev/sound/midi/mpu401.c
@@ -3,6 +3,10 @@
*
* Copyright (c) 2003 Mathew Kanner
* All rights reserved.
+ * Copyright (c) 2026 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Christos Margiolis
+ * <christos@FreeBSD.org> under sponsorship from the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,14 +46,6 @@
#include "mpu_if.h"
#include "mpufoi_if.h"
-#define MPU_DATAPORT 0
-#define MPU_CMDPORT 1
-#define MPU_STATPORT 1
-#define MPU_RESET 0xff
-#define MPU_UART 0x3f
-#define MPU_OUTPUTBUSY 0x40
-#define MPU_INPUTBUSY 0x80
-
#define CMD(m,d) MPUFOI_WRITE(m, m->cookie, MPU_CMDPORT,d)
#define STATUS(m) MPUFOI_READ(m, m->cookie, MPU_STATPORT)
#define READ(m) MPUFOI_READ(m, m->cookie, MPU_DATAPORT)
diff --git a/sys/dev/sound/midi/mpu401.h b/sys/dev/sound/midi/mpu401.h
index 7b1c9a28c4e1..335f5bb2930b 100644
--- a/sys/dev/sound/midi/mpu401.h
+++ b/sys/dev/sound/midi/mpu401.h
@@ -3,6 +3,10 @@
*
* Copyright (c) 2003 Mathew Kanner
* All rights reserved.
+ * Copyright (c) 2026 The FreeBSD Foundation
+ *
+ * Portions of this software were developed by Christos Margiolis
+ * <christos@FreeBSD.org> under sponsorship from the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,6 +33,14 @@
#ifndef MPU401_H
#define MPU401_H
+#define MPU_DATAPORT 0
+#define MPU_CMDPORT 1
+#define MPU_STATPORT 1
+#define MPU_RESET 0xff
+#define MPU_UART 0x3f
+#define MPU_OUTPUTBUSY 0x40
+#define MPU_INPUTBUSY 0x80
+
struct mpu401;
typedef int mpu401_intr_t(struct mpu401 *_obj);
diff --git a/sys/dev/sound/pci/csamidi.c b/sys/dev/sound/pci/csamidi.c
index b5a7d8b9d366..1c8d91d3a27a 100644
--- a/sys/dev/sound/pci/csamidi.c
+++ b/sys/dev/sound/pci/csamidi.c
@@ -53,15 +53,6 @@
#include "mpufoi_if.h"
-/* pulled from mpu401.c */
-#define MPU_DATAPORT 0
-#define MPU_CMDPORT 1
-#define MPU_STATPORT 1
-#define MPU_RESET 0xff
-#define MPU_UART 0x3f
-#define MPU_OUTPUTBUSY 0x40
-#define MPU_INPUTBUSY 0x80
-
/* device private data */
struct csa_midi_softc {
/* hardware resources */