diff -ru alsa-kernel/include/trident.h new-kernel/include/trident.h
--- alsa-kernel/include/trident.h	2007-10-30 12:01:55.000000000 +0100
+++ new-kernel/include/trident.h	2007-05-02 15:28:39.000000000 +0200
@@ -26,12 +26,19 @@
 #include "pcm.h"
 #include "mpu401.h"
 #include "ac97_codec.h"
+#include "seq_midi_emul.h"
+#include "seq_device.h"
 #include "util_mem.h"
+//#include "ainstr_iw.h"
+//#include "ainstr_gf1.h"
+#include "ainstr_simple.h"
 
 #define TRIDENT_DEVICE_ID_DX		((PCI_VENDOR_ID_TRIDENT<<16)|PCI_DEVICE_ID_TRIDENT_4DWAVE_DX)
 #define TRIDENT_DEVICE_ID_NX		((PCI_VENDOR_ID_TRIDENT<<16)|PCI_DEVICE_ID_TRIDENT_4DWAVE_NX)
 #define TRIDENT_DEVICE_ID_SI7018	((PCI_VENDOR_ID_SI<<16)|PCI_DEVICE_ID_SI_7018)
 
+#define SNDRV_SEQ_DEV_ID_TRIDENT			"trident-synth"
+
 #define SNDRV_TRIDENT_VOICE_TYPE_PCM		0
 #define SNDRV_TRIDENT_VOICE_TYPE_SYNTH		1
 #define SNDRV_TRIDENT_VOICE_TYPE_MIDI		2
@@ -250,6 +257,16 @@
 struct snd_trident_voice;
 struct snd_trident_pcm_mixer;
 
+struct snd_trident_sample_ops {
+	void (*sample_start)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_position_t position);
+	void (*sample_stop)(struct snd_trident *gus, struct snd_trident_voice *voice, int mode);
+	void (*sample_freq)(struct snd_trident *gus, struct snd_trident_voice *voice, snd_seq_frequency_t freq);
+	void (*sample_volume)(struct snd_trident *gus, struct snd_trident_voice *voice, struct snd_seq_ev_volume *volume);
+	void (*sample_loop)(struct snd_trident *card, struct snd_trident_voice *voice, struct snd_seq_ev_loop *loop);
+	void (*sample_pos)(struct snd_trident *card, struct snd_trident_voice *voice, snd_seq_position_t position);
+	void (*sample_private1)(struct snd_trident *card, struct snd_trident_voice *voice, unsigned char *data);
+};
+
 struct snd_trident_port {
 	struct snd_midi_channel_set * chset;
 	struct snd_trident * trident;
@@ -283,6 +300,7 @@
 	unsigned char port;
 	unsigned char index;
 
+	struct snd_seq_instr instr;
 	struct snd_trident_sample_ops *sample_ops;
 
 	/* channel parameters */
@@ -336,6 +354,9 @@
 	int seq_client;
 
 	struct snd_trident_port seq_ports[4];
+	struct snd_simple_ops simple_ops;
+	struct snd_seq_kinstr_list *ilist;
+
 	struct snd_trident_voice voices[64];	
 
 	int ChanSynthCount;		/* number of allocated synth channels */
@@ -395,6 +416,7 @@
 	struct snd_pcm *foldback;	/* Foldback PCM */
 	struct snd_pcm *spdif;	/* SPDIF PCM */
 	struct snd_rawmidi *rmidi;
+	struct snd_seq_device *seq_dev;
 
 	struct snd_ac97_bus *ac97_bus;
 	struct snd_ac97 *ac97;
diff -ru alsa-kernel/pci/trident/Makefile new-kernel/pci/trident/Makefile
--- alsa-kernel/pci/trident/Makefile	2007-10-30 12:01:55.000000000 +0100
+++ new-kernel/pci/trident/Makefile	2007-10-15 11:25:09.000000000 +0200
@@ -4,6 +4,16 @@
 #
 
 snd-trident-objs := trident.o trident_main.o trident_memory.o
+snd-trident-synth-objs := trident_synth.o
+
+#
+# this function returns:
+#   "m" - CONFIG_SND_SEQUENCER is m
+#   <empty string> - CONFIG_SND_SEQUENCER is undefined
+#   otherwise parameter #1 value
+#
+sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1)))
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_TRIDENT) += snd-trident.o
+obj-$(call sequencer,$(CONFIG_SND_TRIDENT)) += snd-trident-synth.o
diff -ru alsa-kernel/pci/trident/trident.c new-kernel/pci/trident/trident.c
--- alsa-kernel/pci/trident/trident.c	2007-10-30 12:01:55.000000000 +0100
+++ new-kernel/pci/trident/trident.c	2007-10-15 11:25:09.000000000 +0200
@@ -155,6 +155,13 @@
 		return err;
 	}
 
+#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
+	if ((err = snd_trident_attach_synthesizer(trident)) < 0) {
+		snd_card_free(card);
+		return err;
+	}
+#endif
+
 	snd_trident_create_gameport(trident);
 
 	if ((err = snd_card_register(card)) < 0) {
diff -ru alsa-kernel/pci/trident/trident_main.c new-kernel/pci/trident/trident_main.c
--- alsa-kernel/pci/trident/trident_main.c	2007-10-30 12:01:55.000000000 +0100
+++ new-kernel/pci/trident/trident_main.c	2007-10-15 11:25:09.000000000 +0200
@@ -3313,6 +3313,12 @@
 			snd_iprintf(buffer, "Memory Free    : %d\n", snd_util_mem_avail(trident->tlb.memhdr));
 		}
 	}
+#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
+	snd_iprintf(buffer,"\nWavetable Synth\n");
+	snd_iprintf(buffer, "Memory Maximum : %d\n", trident->synth.max_size);
+	snd_iprintf(buffer, "Memory Used    : %d\n", trident->synth.current_size);
+	snd_iprintf(buffer, "Memory Free    : %d\n", (trident->synth.max_size-trident->synth.current_size));
+#endif
 }
 
 static void __devinit snd_trident_proc_init(struct snd_trident * trident)
@@ -3809,6 +3815,28 @@
 	return IRQ_HANDLED;
 }
 
+/*---------------------------------------------------------------------------
+   snd_trident_attach_synthesizer
+  
+   Description: Attach synthesizer hooks
+                
+   Paramters:   trident  - device specific private data for 4DWave card
+
+   Returns:     None.
+  
+  ---------------------------------------------------------------------------*/
+int snd_trident_attach_synthesizer(struct snd_trident *trident)
+{	
+#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
+	if (snd_seq_device_new(trident->card, 1, SNDRV_SEQ_DEV_ID_TRIDENT,
+			       sizeof(struct snd_trident *), &trident->seq_dev) >= 0) {
+		strcpy(trident->seq_dev->name, "4DWave");
+		*(struct snd_trident **)SNDRV_SEQ_DEVICE_ARGPTR(trident->seq_dev) = trident;
+	}
+#endif
+	return 0;
+}
+
 struct snd_trident_voice *snd_trident_alloc_voice(struct snd_trident * trident, int type, int client, int port)
 {
 	struct snd_trident_voice *pvoice;
