Re: 2.6.25-rc2 compile error: 'OPL3_PATCH_HASH_SIZE' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
+
 
 /* ------------------------------ */
 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux