~ubuntu-branches/ubuntu/maverick/linux-backports-modules-2.6.32/maverick

« back to all changes in this revision

Viewing changes to updates/alsa-driver/isa/gus/old/gus-synth.diff

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Andy Whitcroft
  • Date: 2010-02-04 23:15:51 UTC
  • Revision ID: james.westby@ubuntu.com-20100204231551-vjz5pkvxclukjxm1
Tags: 2.6.32-12.1
[ Andy Whitcroft ]

* initial LBM for lucid
* drop generated files
* printchanges -- rebase tree does not have stable tags use changelog
* printenv -- add revisions to printenv output
* formally rename compat-wireless to linux-backports-modules-wireless
* Update to compat-wireless-2.6.33-rc5
* update nouveau to mainline 2.6.33-rc4
* add new LBM package for nouveau
* nouveau -- fix major numbers and proc entry names
* fix up firmware installs for -wireless
* clean up UPDATE-NOVEAU
* update Nouveau to v2.6.33-rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -ru alsa-kernel/include/gus.h new-kernel/include/gus.h
 
2
--- alsa-kernel/include/gus.h   2007-10-30 12:01:55.000000000 +0100
 
3
+++ new-kernel/include/gus.h    2007-10-15 11:25:08.000000000 +0200
 
4
@@ -27,8 +27,13 @@
 
5
 #include "timer.h"
 
6
 #include "seq_midi_emul.h"
 
7
 #include "seq_device.h"
 
8
+#include "ainstr_iw.h"
 
9
+#include "ainstr_gf1.h"
 
10
+#include "ainstr_simple.h"
 
11
 #include <asm/io.h>
 
12
 
 
13
+#define SNDRV_SEQ_DEV_ID_GUS                   "gus-synth"
 
14
+
 
15
 /* IO ports */
 
16
 
 
17
 #define GUSP(gus, x)                   ((gus)->gf1.port + SNDRV_g_u_s_##x)
 
18
@@ -229,6 +234,16 @@
 
19
 
 
20
 struct snd_gus_voice;
 
21
 
 
22
+struct snd_gus_sample_ops {
 
23
+       void (*sample_start)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_position_t position);
 
24
+       void (*sample_stop)(struct snd_gus_card *gus, struct snd_gus_voice *voice, int mode);
 
25
+       void (*sample_freq)(struct snd_gus_card *gus, struct snd_gus_voice *voice, snd_seq_frequency_t freq);
 
26
+       void (*sample_volume)(struct snd_gus_card *gus, struct snd_gus_voice *voice, struct snd_seq_ev_volume *volume);
 
27
+       void (*sample_loop)(struct snd_gus_card *card, struct snd_gus_voice *voice, struct snd_seq_ev_loop *loop);
 
28
+       void (*sample_pos)(struct snd_gus_card *card, struct snd_gus_voice *voice, snd_seq_position_t position);
 
29
+       void (*sample_private1)(struct snd_gus_card *card, struct snd_gus_voice *voice, unsigned char *data);
 
30
+};
 
31
+
 
32
 #define SNDRV_GF1_VOICE_TYPE_PCM       0
 
33
 #define SNDRV_GF1_VOICE_TYPE_SYNTH     1
 
34
 #define SNDRV_GF1_VOICE_TYPE_MIDI      2
 
35
@@ -269,8 +284,12 @@
 
36
 
 
37
        struct snd_gus_sample_ops *sample_ops;
 
38
 
 
39
+       struct snd_seq_instr instr;
 
40
+
 
41
        /* running status / registers */
 
42
 
 
43
+       struct snd_seq_ev_volume sample_volume;
 
44
+
 
45
        unsigned short fc_register;
 
46
        unsigned short fc_lfo;
 
47
        unsigned short gf1_volume;
 
48
@@ -363,6 +382,10 @@
 
49
 
 
50
        int seq_client;
 
51
        struct snd_gus_port seq_ports[4];
 
52
+       struct snd_seq_kinstr_list *ilist;
 
53
+       struct snd_iwffff_ops iwffff_ops;
 
54
+       struct snd_gf1_ops gf1_ops;
 
55
+       struct snd_simple_ops simple_ops;
 
56
 
 
57
        /* timer */
 
58
 
 
59
@@ -435,6 +458,8 @@
 
60
        struct snd_rawmidi_substream *midi_substream_output;
 
61
        struct snd_rawmidi_substream *midi_substream_input;
 
62
 
 
63
+       struct snd_seq_device *seq_dev;
 
64
+
 
65
        spinlock_t reg_lock;
 
66
        spinlock_t voice_alloc;
 
67
        spinlock_t active_voice_lock;
 
68
@@ -622,10 +647,48 @@
 
69
 
 
70
 int snd_gf1_rawmidi_new(struct snd_gus_card * gus, int device, struct snd_rawmidi **rrawmidi);
 
71
 
 
72
+#if 0
 
73
+extern void snd_engine_instrument_register(unsigned short mode,
 
74
+               struct _SND_INSTRUMENT_VOICE_COMMANDS *voice_cmds,
 
75
+               struct _SND_INSTRUMENT_NOTE_COMMANDS *note_cmds,
 
76
+               struct _SND_INSTRUMENT_CHANNEL_COMMANDS *channel_cmds);
 
77
+extern int snd_engine_instrument_register_ask(unsigned short mode);
 
78
+#endif
 
79
+
 
80
 /* gus_dram.c */
 
81
 int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr,
 
82
                       unsigned int addr, unsigned int size);
 
83
 int snd_gus_dram_read(struct snd_gus_card *gus, char __user *ptr,
 
84
                      unsigned int addr, unsigned int size, int rom);
 
85
 
 
86
+#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
 
87
+
 
88
+/* gus_sample.c */
 
89
+void snd_gus_sample_event(struct snd_seq_event *ev, struct snd_gus_port *p);
 
90
+
 
91
+/* gus_simple.c */
 
92
+void snd_gf1_simple_init(struct snd_gus_voice *voice);
 
93
+
 
94
+/* gus_instr.c */
 
95
+int snd_gus_iwffff_put_sample(void *private_data, struct iwffff_wave *wave,
 
96
+                             char __user *data, long len, int atomic);
 
97
+int snd_gus_iwffff_get_sample(void *private_data, struct iwffff_wave *wave,
 
98
+                             char __user *data, long len, int atomic);
 
99
+int snd_gus_iwffff_remove_sample(void *private_data, struct iwffff_wave *wave,
 
100
+                                int atomic);
 
101
+int snd_gus_gf1_put_sample(void *private_data, struct gf1_wave *wave,
 
102
+                          char __user *data, long len, int atomic);
 
103
+int snd_gus_gf1_get_sample(void *private_data, struct gf1_wave *wave,
 
104
+                          char __user *data, long len, int atomic);
 
105
+int snd_gus_gf1_remove_sample(void *private_data, struct gf1_wave *wave,
 
106
+                             int atomic);
 
107
+int snd_gus_simple_put_sample(void *private_data, struct simple_instrument *instr,
 
108
+                             char __user *data, long len, int atomic);
 
109
+int snd_gus_simple_get_sample(void *private_data, struct simple_instrument *instr,
 
110
+                             char __user *data, long len, int atomic);
 
111
+int snd_gus_simple_remove_sample(void *private_data, struct simple_instrument *instr,
 
112
+                                int atomic);
 
113
+
 
114
+#endif /* CONFIG_SND_SEQUENCER */
 
115
+
 
116
 #endif /* __SOUND_GUS_H */
 
117
diff -ru alsa-kernel/isa/gus/gus_main.c new-kernel/isa/gus/gus_main.c
 
118
--- alsa-kernel/isa/gus/gus_main.c      2007-10-30 12:01:55.000000000 +0100
 
119
+++ new-kernel/isa/gus/gus_main.c       2007-10-16 14:44:00.000000000 +0200
 
120
@@ -104,6 +104,12 @@
 
121
 {
 
122
        if (gus->gf1.res_port2 == NULL)
 
123
                goto __hw_end;
 
124
+#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 
125
+       if (gus->seq_dev) {
 
126
+               snd_device_free(gus->card, gus->seq_dev);
 
127
+               gus->seq_dev = NULL;
 
128
+       }
 
129
+#endif
 
130
        snd_gf1_stop(gus);
 
131
        snd_gus_init_dma_irq(gus, 0);
 
132
       __hw_end:
 
133
@@ -402,6 +408,14 @@
 
134
        return 0;
 
135
 }
 
136
 
 
137
+#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 
138
+static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev)
 
139
+{
 
140
+       struct snd_gus_card *gus = seq_dev->private_data;
 
141
+       gus->seq_dev = NULL;
 
142
+}
 
143
+#endif
 
144
+
 
145
 int snd_gus_initialize(struct snd_gus_card *gus)
 
146
 {
 
147
        int err;
 
148
@@ -416,6 +430,15 @@
 
149
        }
 
150
        if ((err = snd_gus_init_dma_irq(gus, 1)) < 0)
 
151
                return err;
 
152
+#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
 
153
+       if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS,
 
154
+                              sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) {
 
155
+               strcpy(gus->seq_dev->name, "GUS");
 
156
+               *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
 
157
+               gus->seq_dev->private_data = gus;
 
158
+               gus->seq_dev->private_free = snd_gus_seq_dev_free;
 
159
+       }
 
160
+#endif
 
161
        snd_gf1_start(gus);
 
162
        gus->initialized = 1;
 
163
        return 0;
 
164
diff -ru alsa-kernel/isa/gus/Makefile new-kernel/isa/gus/Makefile
 
165
--- alsa-kernel/isa/gus/Makefile        2007-10-30 12:01:55.000000000 +0100
 
166
+++ new-kernel/isa/gus/Makefile 2007-10-15 11:25:09.000000000 +0200
 
167
@@ -9,6 +9,7 @@
 
168
                    gus_pcm.o gus_mixer.o \
 
169
                    gus_uart.o \
 
170
                    gus_reset.o
 
171
+snd-gus-synth-objs := gus_synth.o gus_sample.o gus_simple.o gus_instr.o
 
172
 
 
173
 snd-gusclassic-objs := gusclassic.o
 
174
 snd-gusextreme-objs := gusextreme.o
 
175
@@ -16,9 +17,20 @@
 
176
 snd-interwave-objs := interwave.o
 
177
 snd-interwave-stb-objs := interwave-stb.o
 
178
 
 
179
+#
 
180
+# this function returns:
 
181
+#   "m" - CONFIG_SND_SEQUENCER is m
 
182
+#   <empty string> - CONFIG_SND_SEQUENCER is undefined
 
183
+#   otherwise parameter #1 value
 
184
+#
 
185
+sequencer = $(if $(subst y,,$(CONFIG_SND_SEQUENCER)),$(if $(1),m),$(if $(CONFIG_SND_SEQUENCER),$(1)))
 
186
+
 
187
 # Toplevel Module Dependency
 
188
 obj-$(CONFIG_SND_GUSCLASSIC) += snd-gusclassic.o snd-gus-lib.o
 
189
 obj-$(CONFIG_SND_GUSMAX) += snd-gusmax.o snd-gus-lib.o
 
190
 obj-$(CONFIG_SND_GUSEXTREME) += snd-gusextreme.o snd-gus-lib.o
 
191
 obj-$(CONFIG_SND_INTERWAVE) += snd-interwave.o snd-gus-lib.o
 
192
 obj-$(CONFIG_SND_INTERWAVE_STB) += snd-interwave-stb.o snd-gus-lib.o
 
193
+obj-$(call sequencer,$(CONFIG_SND_GUS_SYNTH)) += snd-gus-synth.o
 
194
+
 
195
+obj-m := $(sort $(obj-m))