[alsa-devel] 2.6.25-rc2 compile error: 'OPL3_PATCH_HASH_SIZE' undeclared

George Spelvin linux at horizon.com
Mon Feb 18 04:04:47 CET 2008


In case it helps, here's a patch that at least compiles.  It still leaves
the declarations in the headers, so you might want to reorganize it.
I'm not sure if the reference to CONFIG_SND_SEQUENCER_MODULE is actually
required; doesn't that imply CONFIG_SND_SEQUENCER?


diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index a7bf7a4..2c0a8fd 100644
--- a/sound/drivers/opl3/opl3_synth.c
+++ b/sound/drivers/opl3/opl3_synth.c
@@ -178,6 +178,8 @@ int snd_opl3_release(struct snd_hwdep * hw, struct file *file)
 	return 0;
 }
 
+#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
+
 /*
  * write the device - load patches
  */
@@ -341,6 +343,25 @@ void snd_opl3_clear_patches(struct snd_opl3 *opl3)
 	}
 	memset(opl3->patch_table, 0, sizeof(opl3->patch_table));
 }
+#else /* SND_SEQUENCER not configured */
+
+/* Stub functions to avoid #ifdef in opl3_lib.c */
+long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
+		    loff_t *offset)
+{
+	(void)hw;
+	(void)buf;
+	(void)count;
+	(void)offset;
+	return -ENXIO;
+}
+void snd_opl3_clear_patches(struct snd_opl3 *opl3)
+{
+	(void)opl3;
+}
+
+#endif
+
 
 /* ------------------------------ */
 


More information about the Alsa-devel mailing list