lkml.org 
[lkml]   [2008]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [build bug] sound/drivers/opl3/opl3_synth.c
At Fri, 1 Feb 2008 11:17:23 +0100,
Ingo Molnar wrote:
>
> today's upstream ALSA merge brought us build failures (exposed by
> randconfig testing):
>
> sound/drivers/opl3/opl3_synth.c: In function 'snd_opl3_find_patch':
> sound/drivers/opl3/opl3_synth.c:308: error: 'OPL3_PATCH_HASH_SIZE' undeclared (first use in this function)
> sound/drivers/opl3/opl3_synth.c:308: error: (Each undeclared identifier is reported only once
> sound/drivers/opl3/opl3_synth.c:308: error: for each function it appears in.)
>
> config attached.

Thanks. Could you try the fix patch below?


Takashi


[PATCH] Fix compilation of opl3 driver without sequencer support

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
diff -r a4c88cbfe2f1 sound/drivers/opl3/opl3_synth.c
--- a/sound/drivers/opl3/opl3_synth.c Wed Jan 30 09:06:47 2008 +0100
+++ b/sound/drivers/opl3/opl3_synth.c Fri Feb 01 11:42:12 2008 +0100
@@ -21,6 +21,10 @@

#include <sound/opl3.h>
#include <sound/asound_fm.h>
+
+#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
+#define OPL3_SUPPORT_SYNTH
+#endif

/*
* There is 18 possible 2 OP voices
@@ -155,9 +159,11 @@ int snd_opl3_ioctl(struct snd_hwdep * hw
#endif
return snd_opl3_set_connection(opl3, (int) arg);

+#ifdef OPL3_SUPPORT_SYNTH
case SNDRV_DM_FM_IOCTL_CLEAR_PATCHES:
snd_opl3_clear_patches(opl3);
return 0;
+#endif

#ifdef CONFIG_SND_DEBUG
default:
@@ -178,6 +184,7 @@ int snd_opl3_release(struct snd_hwdep *
return 0;
}

+#ifdef OPL3_SUPPORT_SYNTH
/*
* write the device - load patches
*/
@@ -341,6 +348,7 @@ void snd_opl3_clear_patches(struct snd_o
}
memset(opl3->patch_table, 0, sizeof(opl3->patch_table));
}
+#endif /* OPL3_SUPPORT_SYNTH */

/* ------------------------------ */

diff -r a4c88cbfe2f1 include/sound/opl3.h
--- a/include/sound/opl3.h Wed Jan 30 09:06:47 2008 +0100
+++ b/include/sound/opl3.h Fri Feb 01 11:42:12 2008 +0100
@@ -370,12 +370,13 @@ int snd_opl3_open(struct snd_hwdep * hw,
int snd_opl3_open(struct snd_hwdep * hw, struct file *file);
int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
unsigned int cmd, unsigned long arg);
-long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
- loff_t *offset);
int snd_opl3_release(struct snd_hwdep * hw, struct file *file);

void snd_opl3_reset(struct snd_opl3 * opl3);

+#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
+long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
+ loff_t *offset);
int snd_opl3_load_patch(struct snd_opl3 *opl3,
int prog, int bank, int type,
const char *name,
@@ -384,5 +385,9 @@ struct fm_patch *snd_opl3_find_patch(str
struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank,
int create_patch);
void snd_opl3_clear_patches(struct snd_opl3 *opl3);
+#else
+#define snd_opl3_write NULL
+static inline void snd_opl3_clear_patches(struct snd_opl3 *opl3) {}
+#endif

#endif /* __SOUND_OPL3_H */

\
 
 \ /
  Last update: 2008-02-01 11:43    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site