aboutsummaryrefslogtreecommitdiffstats
path: root/sound/synth/emux
diff options
context:
space:
mode:
Diffstat (limited to 'sound/synth/emux')
-rw-r--r--sound/synth/emux/emux.c2
-rw-r--r--sound/synth/emux/emux_oss.c12
-rw-r--r--sound/synth/emux/emux_proc.c8
-rw-r--r--sound/synth/emux/emux_seq.c12
-rw-r--r--sound/synth/emux/soundfont.c6
5 files changed, 20 insertions, 20 deletions
diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c
index 7c8e328fae62..fc733bbf4487 100644
--- a/sound/synth/emux/emux.c
+++ b/sound/synth/emux/emux.c
@@ -45,7 +45,7 @@ int snd_emux_new(struct snd_emux **remu)
45 return -ENOMEM; 45 return -ENOMEM;
46 46
47 spin_lock_init(&emu->voice_lock); 47 spin_lock_init(&emu->voice_lock);
48 init_MUTEX(&emu->register_mutex); 48 mutex_init(&emu->register_mutex);
49 49
50 emu->client = -1; 50 emu->client = -1;
51#ifdef CONFIG_SND_SEQUENCER_OSS 51#ifdef CONFIG_SND_SEQUENCER_OSS
diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c
index dfbfcfbe5dd2..3436816727c8 100644
--- a/sound/synth/emux/emux_oss.c
+++ b/sound/synth/emux/emux_oss.c
@@ -117,10 +117,10 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
117 emu = closure; 117 emu = closure;
118 snd_assert(arg != NULL && emu != NULL, return -ENXIO); 118 snd_assert(arg != NULL && emu != NULL, return -ENXIO);
119 119
120 down(&emu->register_mutex); 120 mutex_lock(&emu->register_mutex);
121 121
122 if (!snd_emux_inc_count(emu)) { 122 if (!snd_emux_inc_count(emu)) {
123 up(&emu->register_mutex); 123 mutex_unlock(&emu->register_mutex);
124 return -EFAULT; 124 return -EFAULT;
125 } 125 }
126 126
@@ -134,7 +134,7 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
134 if (p == NULL) { 134 if (p == NULL) {
135 snd_printk("can't create port\n"); 135 snd_printk("can't create port\n");
136 snd_emux_dec_count(emu); 136 snd_emux_dec_count(emu);
137 up(&emu->register_mutex); 137 mutex_unlock(&emu->register_mutex);
138 return -ENOMEM; 138 return -ENOMEM;
139 } 139 }
140 140
@@ -148,7 +148,7 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
148 148
149 snd_emux_reset_port(p); 149 snd_emux_reset_port(p);
150 150
151 up(&emu->register_mutex); 151 mutex_unlock(&emu->register_mutex);
152 return 0; 152 return 0;
153} 153}
154 154
@@ -191,13 +191,13 @@ snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg)
191 emu = p->emu; 191 emu = p->emu;
192 snd_assert(emu != NULL, return -ENXIO); 192 snd_assert(emu != NULL, return -ENXIO);
193 193
194 down(&emu->register_mutex); 194 mutex_lock(&emu->register_mutex);
195 snd_emux_sounds_off_all(p); 195 snd_emux_sounds_off_all(p);
196 snd_soundfont_close_check(emu->sflist, SF_CLIENT_NO(p->chset.port)); 196 snd_soundfont_close_check(emu->sflist, SF_CLIENT_NO(p->chset.port));
197 snd_seq_event_port_detach(p->chset.client, p->chset.port); 197 snd_seq_event_port_detach(p->chset.client, p->chset.port);
198 snd_emux_dec_count(emu); 198 snd_emux_dec_count(emu);
199 199
200 up(&emu->register_mutex); 200 mutex_unlock(&emu->register_mutex);
201 return 0; 201 return 0;
202} 202}
203 203
diff --git a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c
index a70a179f6947..1ba68ce30279 100644
--- a/sound/synth/emux/emux_proc.c
+++ b/sound/synth/emux/emux_proc.c
@@ -37,7 +37,7 @@ snd_emux_proc_info_read(struct snd_info_entry *entry,
37 int i; 37 int i;
38 38
39 emu = entry->private_data; 39 emu = entry->private_data;
40 down(&emu->register_mutex); 40 mutex_lock(&emu->register_mutex);
41 if (emu->name) 41 if (emu->name)
42 snd_iprintf(buf, "Device: %s\n", emu->name); 42 snd_iprintf(buf, "Device: %s\n", emu->name);
43 snd_iprintf(buf, "Ports: %d\n", emu->num_ports); 43 snd_iprintf(buf, "Ports: %d\n", emu->num_ports);
@@ -56,13 +56,13 @@ snd_emux_proc_info_read(struct snd_info_entry *entry,
56 snd_iprintf(buf, "Memory Size: 0\n"); 56 snd_iprintf(buf, "Memory Size: 0\n");
57 } 57 }
58 if (emu->sflist) { 58 if (emu->sflist) {
59 down(&emu->sflist->presets_mutex); 59 mutex_lock(&emu->sflist->presets_mutex);
60 snd_iprintf(buf, "SoundFonts: %d\n", emu->sflist->fonts_size); 60 snd_iprintf(buf, "SoundFonts: %d\n", emu->sflist->fonts_size);
61 snd_iprintf(buf, "Instruments: %d\n", emu->sflist->zone_counter); 61 snd_iprintf(buf, "Instruments: %d\n", emu->sflist->zone_counter);
62 snd_iprintf(buf, "Samples: %d\n", emu->sflist->sample_counter); 62 snd_iprintf(buf, "Samples: %d\n", emu->sflist->sample_counter);
63 snd_iprintf(buf, "Locked Instruments: %d\n", emu->sflist->zone_locked); 63 snd_iprintf(buf, "Locked Instruments: %d\n", emu->sflist->zone_locked);
64 snd_iprintf(buf, "Locked Samples: %d\n", emu->sflist->sample_locked); 64 snd_iprintf(buf, "Locked Samples: %d\n", emu->sflist->sample_locked);
65 up(&emu->sflist->presets_mutex); 65 mutex_unlock(&emu->sflist->presets_mutex);
66 } 66 }
67#if 0 /* debug */ 67#if 0 /* debug */
68 if (emu->voices[0].state != SNDRV_EMUX_ST_OFF && emu->voices[0].ch >= 0) { 68 if (emu->voices[0].state != SNDRV_EMUX_ST_OFF && emu->voices[0].ch >= 0) {
@@ -103,7 +103,7 @@ snd_emux_proc_info_read(struct snd_info_entry *entry,
103 snd_iprintf(buf, "sample_mode=%x, rate=%x\n", vp->reg.sample_mode, vp->reg.rate_offset); 103 snd_iprintf(buf, "sample_mode=%x, rate=%x\n", vp->reg.sample_mode, vp->reg.rate_offset);
104 } 104 }
105#endif 105#endif
106 up(&emu->register_mutex); 106 mutex_unlock(&emu->register_mutex);
107} 107}
108 108
109 109
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index 1a973d7a90f8..8f00f07701c4 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -123,12 +123,12 @@ snd_emux_detach_seq(struct snd_emux *emu)
123 if (emu->voices) 123 if (emu->voices)
124 snd_emux_terminate_all(emu); 124 snd_emux_terminate_all(emu);
125 125
126 down(&emu->register_mutex); 126 mutex_lock(&emu->register_mutex);
127 if (emu->client >= 0) { 127 if (emu->client >= 0) {
128 snd_seq_delete_kernel_client(emu->client); 128 snd_seq_delete_kernel_client(emu->client);
129 emu->client = -1; 129 emu->client = -1;
130 } 130 }
131 up(&emu->register_mutex); 131 mutex_unlock(&emu->register_mutex);
132} 132}
133 133
134 134
@@ -311,10 +311,10 @@ snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info)
311 emu = p->emu; 311 emu = p->emu;
312 snd_assert(emu != NULL, return -EINVAL); 312 snd_assert(emu != NULL, return -EINVAL);
313 313
314 down(&emu->register_mutex); 314 mutex_lock(&emu->register_mutex);
315 snd_emux_init_port(p); 315 snd_emux_init_port(p);
316 snd_emux_inc_count(emu); 316 snd_emux_inc_count(emu);
317 up(&emu->register_mutex); 317 mutex_unlock(&emu->register_mutex);
318 return 0; 318 return 0;
319} 319}
320 320
@@ -332,10 +332,10 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info)
332 emu = p->emu; 332 emu = p->emu;
333 snd_assert(emu != NULL, return -EINVAL); 333 snd_assert(emu != NULL, return -EINVAL);
334 334
335 down(&emu->register_mutex); 335 mutex_lock(&emu->register_mutex);
336 snd_emux_sounds_off_all(p); 336 snd_emux_sounds_off_all(p);
337 snd_emux_dec_count(emu); 337 snd_emux_dec_count(emu);
338 up(&emu->register_mutex); 338 mutex_unlock(&emu->register_mutex);
339 return 0; 339 return 0;
340} 340}
341 341
diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c
index 4c5754d4a2e8..32c27162dfb6 100644
--- a/sound/synth/emux/soundfont.c
+++ b/sound/synth/emux/soundfont.c
@@ -79,7 +79,7 @@ static void
79lock_preset(struct snd_sf_list *sflist) 79lock_preset(struct snd_sf_list *sflist)
80{ 80{
81 unsigned long flags; 81 unsigned long flags;
82 down(&sflist->presets_mutex); 82 mutex_lock(&sflist->presets_mutex);
83 spin_lock_irqsave(&sflist->lock, flags); 83 spin_lock_irqsave(&sflist->lock, flags);
84 sflist->presets_locked = 1; 84 sflist->presets_locked = 1;
85 spin_unlock_irqrestore(&sflist->lock, flags); 85 spin_unlock_irqrestore(&sflist->lock, flags);
@@ -96,7 +96,7 @@ unlock_preset(struct snd_sf_list *sflist)
96 spin_lock_irqsave(&sflist->lock, flags); 96 spin_lock_irqsave(&sflist->lock, flags);
97 sflist->presets_locked = 0; 97 sflist->presets_locked = 0;
98 spin_unlock_irqrestore(&sflist->lock, flags); 98 spin_unlock_irqrestore(&sflist->lock, flags);
99 up(&sflist->presets_mutex); 99 mutex_unlock(&sflist->presets_mutex);
100} 100}
101 101
102 102
@@ -1390,7 +1390,7 @@ snd_sf_new(struct snd_sf_callback *callback, struct snd_util_memhdr *hdr)
1390 if ((sflist = kzalloc(sizeof(*sflist), GFP_KERNEL)) == NULL) 1390 if ((sflist = kzalloc(sizeof(*sflist), GFP_KERNEL)) == NULL)
1391 return NULL; 1391 return NULL;
1392 1392
1393 init_MUTEX(&sflist->presets_mutex); 1393 mutex_init(&sflist->presets_mutex);
1394 spin_lock_init(&sflist->lock); 1394 spin_lock_init(&sflist->lock);
1395 sflist->memhdr = hdr; 1395 sflist->memhdr = hdr;
1396 1396