aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-05-18 12:02:04 -0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 04:11:20 -0400
commit123992f728785e05f385d23893bd5ec69871aeb4 (patch)
tree0f731b0f807903a4a5add6b0ff7ab5a9737c02ae /sound/core/seq
parent5218064c885af5c49e380d09d54f3cc86891a580 (diff)
[ALSA] sound/core/: possible cleanups
PCM Midlevel,ALSA Core,Timer Midlevel,ALSA sequencer,Virtual Midi This patch contains the following possible cleanups: - make needlessly global code static - #if 0 the following unused global functions - remove the following unneeded EXPORT_SYMBOL's Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq')
-rw-r--r--sound/core/seq/seq_midi_event.c6
-rw-r--r--sound/core/seq/seq_queue.c3
-rw-r--r--sound/core/seq/seq_queue.h1
-rw-r--r--sound/core/seq/seq_timer.c3
-rw-r--r--sound/core/seq/seq_timer.h2
-rw-r--r--sound/core/seq/seq_virmidi.c4
6 files changed, 10 insertions, 9 deletions
diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
index 21e569062bc..df1e2bb3974 100644
--- a/sound/core/seq/seq_midi_event.c
+++ b/sound/core/seq/seq_midi_event.c
@@ -171,11 +171,13 @@ void snd_midi_event_reset_decode(snd_midi_event_t *dev)
171 spin_unlock_irqrestore(&dev->lock, flags); 171 spin_unlock_irqrestore(&dev->lock, flags);
172} 172}
173 173
174#if 0
174void snd_midi_event_init(snd_midi_event_t *dev) 175void snd_midi_event_init(snd_midi_event_t *dev)
175{ 176{
176 snd_midi_event_reset_encode(dev); 177 snd_midi_event_reset_encode(dev);
177 snd_midi_event_reset_decode(dev); 178 snd_midi_event_reset_decode(dev);
178} 179}
180#endif /* 0 */
179 181
180void snd_midi_event_no_status(snd_midi_event_t *dev, int on) 182void snd_midi_event_no_status(snd_midi_event_t *dev, int on)
181{ 183{
@@ -185,6 +187,7 @@ void snd_midi_event_no_status(snd_midi_event_t *dev, int on)
185/* 187/*
186 * resize buffer 188 * resize buffer
187 */ 189 */
190#if 0
188int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize) 191int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize)
189{ 192{
190 unsigned char *new_buf, *old_buf; 193 unsigned char *new_buf, *old_buf;
@@ -204,6 +207,7 @@ int snd_midi_event_resize_buffer(snd_midi_event_t *dev, int bufsize)
204 kfree(old_buf); 207 kfree(old_buf);
205 return 0; 208 return 0;
206} 209}
210#endif /* 0 */
207 211
208/* 212/*
209 * read bytes and encode to sequencer event if finished 213 * read bytes and encode to sequencer event if finished
@@ -517,8 +521,6 @@ static int extra_decode_xrpn(snd_midi_event_t *dev, unsigned char *buf, int coun
517 521
518EXPORT_SYMBOL(snd_midi_event_new); 522EXPORT_SYMBOL(snd_midi_event_new);
519EXPORT_SYMBOL(snd_midi_event_free); 523EXPORT_SYMBOL(snd_midi_event_free);
520EXPORT_SYMBOL(snd_midi_event_resize_buffer);
521EXPORT_SYMBOL(snd_midi_event_init);
522EXPORT_SYMBOL(snd_midi_event_reset_encode); 524EXPORT_SYMBOL(snd_midi_event_reset_encode);
523EXPORT_SYMBOL(snd_midi_event_reset_decode); 525EXPORT_SYMBOL(snd_midi_event_reset_decode);
524EXPORT_SYMBOL(snd_midi_event_no_status); 526EXPORT_SYMBOL(snd_midi_event_no_status);
diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c
index 3afc7cc0c9a..98de2e711fd 100644
--- a/sound/core/seq/seq_queue.c
+++ b/sound/core/seq/seq_queue.c
@@ -672,7 +672,8 @@ static void queue_broadcast_event(queue_t *q, snd_seq_event_t *ev, int atomic, i
672 * process a received queue-control event. 672 * process a received queue-control event.
673 * this function is exported for seq_sync.c. 673 * this function is exported for seq_sync.c.
674 */ 674 */
675void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev, int atomic, int hop) 675static void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev,
676 int atomic, int hop)
676{ 677{
677 switch (ev->type) { 678 switch (ev->type) {
678 case SNDRV_SEQ_EVENT_START: 679 case SNDRV_SEQ_EVENT_START:
diff --git a/sound/core/seq/seq_queue.h b/sound/core/seq/seq_queue.h
index b1bf5519fb3..ea3c54216ea 100644
--- a/sound/core/seq/seq_queue.h
+++ b/sound/core/seq/seq_queue.h
@@ -111,7 +111,6 @@ int snd_seq_queue_use(int queueid, int client, int use);
111int snd_seq_queue_is_used(int queueid, int client); 111int snd_seq_queue_is_used(int queueid, int client);
112 112
113int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop); 113int snd_seq_control_queue(snd_seq_event_t *ev, int atomic, int hop);
114void snd_seq_queue_process_event(queue_t *q, snd_seq_event_t *ev, int atomic, int hop);
115 114
116/* 115/*
117 * 64bit division - for sync stuff.. 116 * 64bit division - for sync stuff..
diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c
index 753f1c0863c..a7f76fc9528 100644
--- a/sound/core/seq/seq_timer.c
+++ b/sound/core/seq/seq_timer.c
@@ -36,7 +36,8 @@ extern int seq_default_timer_resolution;
36 36
37#define SKEW_BASE 0x10000 /* 16bit shift */ 37#define SKEW_BASE 0x10000 /* 16bit shift */
38 38
39void snd_seq_timer_set_tick_resolution(seq_timer_tick_t *tick, int tempo, int ppq, int nticks) 39static void snd_seq_timer_set_tick_resolution(seq_timer_tick_t *tick,
40 int tempo, int ppq, int nticks)
40{ 41{
41 if (tempo < 1000000) 42 if (tempo < 1000000)
42 tick->resolution = (tempo * 1000) / ppq; 43 tick->resolution = (tempo * 1000) / ppq;
diff --git a/sound/core/seq/seq_timer.h b/sound/core/seq/seq_timer.h
index 4c0872df893..287ed68591d 100644
--- a/sound/core/seq/seq_timer.h
+++ b/sound/core/seq/seq_timer.h
@@ -64,8 +64,6 @@ extern seq_timer_t *snd_seq_timer_new(void);
64/* delete timer (destructor) */ 64/* delete timer (destructor) */
65extern void snd_seq_timer_delete(seq_timer_t **tmr); 65extern void snd_seq_timer_delete(seq_timer_t **tmr);
66 66
67void snd_seq_timer_set_tick_resolution(seq_timer_tick_t *tick, int tempo, int ppq, int nticks);
68
69/* */ 67/* */
70static inline void snd_seq_timer_update_tick(seq_timer_tick_t *tick, unsigned long resolution) 68static inline void snd_seq_timer_update_tick(seq_timer_tick_t *tick, unsigned long resolution)
71{ 69{
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index 58c56a198d2..a66484b5cf0 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -110,7 +110,7 @@ static int snd_virmidi_dev_receive_event(snd_virmidi_dev_t *rdev, snd_seq_event_
110 * handler of a remote port which is attached to the virmidi via 110 * handler of a remote port which is attached to the virmidi via
111 * SNDRV_VIRMIDI_SEQ_ATTACH. 111 * SNDRV_VIRMIDI_SEQ_ATTACH.
112 */ 112 */
113/* exported */ 113#if 0
114int snd_virmidi_receive(snd_rawmidi_t *rmidi, snd_seq_event_t *ev) 114int snd_virmidi_receive(snd_rawmidi_t *rmidi, snd_seq_event_t *ev)
115{ 115{
116 snd_virmidi_dev_t *rdev; 116 snd_virmidi_dev_t *rdev;
@@ -118,6 +118,7 @@ int snd_virmidi_receive(snd_rawmidi_t *rmidi, snd_seq_event_t *ev)
118 rdev = rmidi->private_data; 118 rdev = rmidi->private_data;
119 return snd_virmidi_dev_receive_event(rdev, ev); 119 return snd_virmidi_dev_receive_event(rdev, ev);
120} 120}
121#endif /* 0 */
121 122
122/* 123/*
123 * event handler of virmidi port 124 * event handler of virmidi port
@@ -548,4 +549,3 @@ module_init(alsa_virmidi_init)
548module_exit(alsa_virmidi_exit) 549module_exit(alsa_virmidi_exit)
549 550
550EXPORT_SYMBOL(snd_virmidi_new); 551EXPORT_SYMBOL(snd_virmidi_new);
551EXPORT_SYMBOL(snd_virmidi_receive);