aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:31:42 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:24:57 -0500
commitef9f0a42db987e7e2df72289fb4522d24027786b (patch)
tree34f3ad0c1abdbeb6df5a1d5137db6b4f34695f5a /include/sound
parent1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (diff)
[ALSA] semaphore -> mutex (driver part)
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/emux_synth.h2
-rw-r--r--include/sound/i2c.h10
-rw-r--r--include/sound/opl3.h3
-rw-r--r--include/sound/soundfont.h2
-rw-r--r--include/sound/util_mem.h4
-rw-r--r--include/sound/vx_core.h2
6 files changed, 13 insertions, 10 deletions
diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h
index b2d6b2acc7c7..d8cb51b86c20 100644
--- a/include/sound/emux_synth.h
+++ b/include/sound/emux_synth.h
@@ -113,7 +113,7 @@ struct snd_emux {
113 struct snd_emux_voice *voices; /* Voices (EMU 'channel') */ 113 struct snd_emux_voice *voices; /* Voices (EMU 'channel') */
114 int use_time; /* allocation counter */ 114 int use_time; /* allocation counter */
115 spinlock_t voice_lock; /* Lock for voice access */ 115 spinlock_t voice_lock; /* Lock for voice access */
116 struct semaphore register_mutex; 116 struct mutex register_mutex;
117 int client; /* For the sequencer client */ 117 int client; /* For the sequencer client */
118 int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */ 118 int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */
119 struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS]; 119 struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS];
diff --git a/include/sound/i2c.h b/include/sound/i2c.h
index 81eb23ed761f..d125ff8c85e8 100644
--- a/include/sound/i2c.h
+++ b/include/sound/i2c.h
@@ -55,7 +55,7 @@ struct snd_i2c_bus {
55 struct snd_card *card; /* card which I2C belongs to */ 55 struct snd_card *card; /* card which I2C belongs to */
56 char name[32]; /* some useful label */ 56 char name[32]; /* some useful label */
57 57
58 struct semaphore lock_mutex; 58 struct mutex lock_mutex;
59 59
60 struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */ 60 struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */
61 struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */ 61 struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */
@@ -84,17 +84,17 @@ int snd_i2c_device_free(struct snd_i2c_device *device);
84static inline void snd_i2c_lock(struct snd_i2c_bus *bus) 84static inline void snd_i2c_lock(struct snd_i2c_bus *bus)
85{ 85{
86 if (bus->master) 86 if (bus->master)
87 down(&bus->master->lock_mutex); 87 mutex_lock(&bus->master->lock_mutex);
88 else 88 else
89 down(&bus->lock_mutex); 89 mutex_lock(&bus->lock_mutex);
90} 90}
91 91
92static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) 92static inline void snd_i2c_unlock(struct snd_i2c_bus *bus)
93{ 93{
94 if (bus->master) 94 if (bus->master)
95 up(&bus->master->lock_mutex); 95 mutex_unlock(&bus->master->lock_mutex);
96 else 96 else
97 up(&bus->lock_mutex); 97 mutex_unlock(&bus->lock_mutex);
98} 98}
99 99
100int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count); 100int snd_i2c_sendbytes(struct snd_i2c_device *device, unsigned char *bytes, int count);
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index 83392641cb47..444907166f97 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -53,6 +53,7 @@
53 53
54#include "driver.h" 54#include "driver.h"
55#include <linux/time.h> 55#include <linux/time.h>
56#include <linux/mutex.h>
56#include "core.h" 57#include "core.h"
57#include "hwdep.h" 58#include "hwdep.h"
58#include "timer.h" 59#include "timer.h"
@@ -312,7 +313,7 @@ struct snd_opl3 {
312 int sys_timer_status; /* system timer run status */ 313 int sys_timer_status; /* system timer run status */
313 spinlock_t sys_timer_lock; /* Lock for system timer access */ 314 spinlock_t sys_timer_lock; /* Lock for system timer access */
314#endif 315#endif
315 struct semaphore access_mutex; /* locking */ 316 struct mutex access_mutex; /* locking */
316}; 317};
317 318
318/* opl3.c */ 319/* opl3.c */
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h
index 61a010c65d02..f95d99ba7f74 100644
--- a/include/sound/soundfont.h
+++ b/include/sound/soundfont.h
@@ -93,7 +93,7 @@ struct snd_sf_list {
93 int sample_locked; /* locked time for sample */ 93 int sample_locked; /* locked time for sample */
94 struct snd_sf_callback callback; /* callback functions */ 94 struct snd_sf_callback callback; /* callback functions */
95 int presets_locked; 95 int presets_locked;
96 struct semaphore presets_mutex; 96 struct mutex presets_mutex;
97 spinlock_t lock; 97 spinlock_t lock;
98 struct snd_util_memhdr *memhdr; 98 struct snd_util_memhdr *memhdr;
99}; 99};
diff --git a/include/sound/util_mem.h b/include/sound/util_mem.h
index 69944bbb5445..a1fb706b59a6 100644
--- a/include/sound/util_mem.h
+++ b/include/sound/util_mem.h
@@ -1,5 +1,7 @@
1#ifndef __SOUND_UTIL_MEM_H 1#ifndef __SOUND_UTIL_MEM_H
2#define __SOUND_UTIL_MEM_H 2#define __SOUND_UTIL_MEM_H
3
4#include <linux/mutex.h>
3/* 5/*
4 * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de> 6 * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de>
5 * 7 *
@@ -40,7 +42,7 @@ struct snd_util_memhdr {
40 int nblocks; /* # of allocated blocks */ 42 int nblocks; /* # of allocated blocks */
41 unsigned int used; /* used memory size */ 43 unsigned int used; /* used memory size */
42 int block_extra_size; /* extra data size of chunk */ 44 int block_extra_size; /* extra data size of chunk */
43 struct semaphore block_mutex; /* lock */ 45 struct mutex block_mutex; /* lock */
44}; 46};
45 47
46/* 48/*
diff --git a/include/sound/vx_core.h b/include/sound/vx_core.h
index 5fd6f3305e0d..9821a6194caa 100644
--- a/include/sound/vx_core.h
+++ b/include/sound/vx_core.h
@@ -206,7 +206,7 @@ struct vx_core {
206 int audio_monitor[4]; /* playback hw-monitor level */ 206 int audio_monitor[4]; /* playback hw-monitor level */
207 unsigned char audio_monitor_active[4]; /* playback hw-monitor mute/unmute */ 207 unsigned char audio_monitor_active[4]; /* playback hw-monitor mute/unmute */
208 208
209 struct semaphore mixer_mutex; 209 struct mutex mixer_mutex;
210 210
211 const struct firmware *firmware[4]; /* loaded firmware data */ 211 const struct firmware *firmware[4]; /* loaded firmware data */
212}; 212};