Linux-kernel mailing list archive 1998-31,: PATCH ACI mixer Miro PCM12/20 as a module

# PATCH ACI mixer Miro PCM12/20 as a module

Ruurd A Reitsma (R.A.Reitsma@wbmt.tudelft.nl)
Wed, 05 Aug 1998 01:12:09 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Pal-Kristian Engstad: "SMBFS date fix."
- Previous message: Gary Anderson: "MULTIPLE COPIES OF KERNEL DIGEST :("

This is a multi-part message in MIME format.
--------------FEA2EA253908A409EC9890A9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

This patch against 2.1.111 (I didn't get 112-114 to boot) allows the ACI
mixer to be compiled as a separate module. AFAIK it used to be in
sound.o, but I never got it to work. It probably broke in recent
Makefile revisions??? It only works after loading the MAD16 module,
since the ACI mixer expects the MAD16 mixer to be already active. Please
CC me any comments, I am not on the list.

Cheers,

Ruurd
--------------FEA2EA253908A409EC9890A9
Content-Type: text/plain; charset=us-ascii; name="acipatch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="acipatch"

--- linux-2.1.111/drivers/sound/lowlevel/aci.old Tue Aug 4 18:17:12 1998
+++ linux/drivers/sound/lowlevel/aci.c Tue Aug 4 18:20:52 1998
@@ -16,6 +16,10 @@
* on the miroSOUND PCM12 card. Support for miro sound cards with
* additional ACI functions can easily be added later.
*
+ * / NOTE / When compiling as a module, make sure to load the module
+ * after loading the mad16 module. The initialisation code expects the
+ * MAD16 default mixer to be already available.
+ *
* Revision history:
*
* 1995-11-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
@@ -27,6 +31,8 @@
* 1996-05-28 Markus Kuhn
* Initialize CS4231A mixer, make ACI first mixer,
* use new private mixer API for solo mode.
+ * 1998-08-04 Ruurd Reitsma <R.A.Reitsma@wbmt.tudelft.nl>
+ * Small modification to complete modularisation.
*/
/*
@@ -59,10 +65,11 @@
*/
#include <linux/config.h> /* for CONFIG_ACI_MIXER */
+#include <linux/module.h>
#include "lowlevel.h"
#include "../sound_config.h"
-#include "lowlevel.h"
-#ifdef CONFIG_ACI_MIXER
+
+#if defined(CONFIG_ACI_MIXER) || defined(CONFIG_ACI_MIXER_MODULE)
#undef DEBUG /* if defined, produce a verbose report via syslog */
@@ -606,3 +613,17 @@
}
#endif
+
+#if defined(MODULE)
+
+int init_module(void) {
+ attach_aci();
+ return(0);
+}
+
+void cleanup_module(void) {
+ unload_aci();
+}
+
+#endif /* MODULE */
+
\ No newline at end of file

--------------FEA2EA253908A409EC9890A9--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

- Next message: Pal-Kristian Engstad: "SMBFS date fix."
- Previous message: Gary Anderson: "MULTIPLE COPIES OF KERNEL DIGEST :("