2.6.25-rc2 compile error: 'OPL3_PATCH_HASH_SIZE' undeclared
sound/drivers/opl3/opl3_synth.c:308sound/drivers/opl3/opl3_synth.c:335
I think it's caused by the fact that I don't have the sequencer enabled. The definition inside include/sound/opl3.h is insdie an #ifdef, but the use is not.
CONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=yCONFIG_SND_HWDEP=yCONFIG_SND_RAWMIDI=y
# CONFIG_SND_SEQUENCER is not set
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
# CONFIG_SND_DYNAMIC_MINORS is not set
# CONFIG_SND_SUPPORT_OLD_API is not setCONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
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?
sound/drivers/opl3/opl3_synth.c +21 -0
@@ -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 +/* ------------------------------ */
At Sun, 17 Feb 2008 20:58:16 -0500,
Quoted 3 lines · George Spelvin
sound/drivers/opl3/opl3_synth.c:308sound/drivers/opl3/opl3_synth.c:335
Thanks, it's 7th report. The fix patch has been on ALSA tree since weeks ago...
http://lkml.org/lkml/2008/2/11/298
Takashi