diff options
Diffstat (limited to 'sound/drivers/opl4/opl4_lib.c')
-rw-r--r-- | sound/drivers/opl4/opl4_lib.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index 4ae5dd8f011e..ddfc10d04be2 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c | |||
@@ -27,14 +27,14 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); | |||
27 | MODULE_DESCRIPTION("OPL4 driver"); | 27 | MODULE_DESCRIPTION("OPL4 driver"); |
28 | MODULE_LICENSE("GPL"); | 28 | MODULE_LICENSE("GPL"); |
29 | 29 | ||
30 | static void inline snd_opl4_wait(opl4_t *opl4) | 30 | static void inline snd_opl4_wait(struct snd_opl4 *opl4) |
31 | { | 31 | { |
32 | int timeout = 10; | 32 | int timeout = 10; |
33 | while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0) | 33 | while ((inb(opl4->fm_port) & OPL4_STATUS_BUSY) && --timeout > 0) |
34 | ; | 34 | ; |
35 | } | 35 | } |
36 | 36 | ||
37 | void snd_opl4_write(opl4_t *opl4, u8 reg, u8 value) | 37 | void snd_opl4_write(struct snd_opl4 *opl4, u8 reg, u8 value) |
38 | { | 38 | { |
39 | snd_opl4_wait(opl4); | 39 | snd_opl4_wait(opl4); |
40 | outb(reg, opl4->pcm_port); | 40 | outb(reg, opl4->pcm_port); |
@@ -43,7 +43,7 @@ void snd_opl4_write(opl4_t *opl4, u8 reg, u8 value) | |||
43 | outb(value, opl4->pcm_port + 1); | 43 | outb(value, opl4->pcm_port + 1); |
44 | } | 44 | } |
45 | 45 | ||
46 | u8 snd_opl4_read(opl4_t *opl4, u8 reg) | 46 | u8 snd_opl4_read(struct snd_opl4 *opl4, u8 reg) |
47 | { | 47 | { |
48 | snd_opl4_wait(opl4); | 48 | snd_opl4_wait(opl4); |
49 | outb(reg, opl4->pcm_port); | 49 | outb(reg, opl4->pcm_port); |
@@ -52,7 +52,7 @@ u8 snd_opl4_read(opl4_t *opl4, u8 reg) | |||
52 | return inb(opl4->pcm_port + 1); | 52 | return inb(opl4->pcm_port + 1); |
53 | } | 53 | } |
54 | 54 | ||
55 | void snd_opl4_read_memory(opl4_t *opl4, char *buf, int offset, int size) | 55 | void snd_opl4_read_memory(struct snd_opl4 *opl4, char *buf, int offset, int size) |
56 | { | 56 | { |
57 | unsigned long flags; | 57 | unsigned long flags; |
58 | u8 memcfg; | 58 | u8 memcfg; |
@@ -76,7 +76,7 @@ void snd_opl4_read_memory(opl4_t *opl4, char *buf, int offset, int size) | |||
76 | spin_unlock_irqrestore(&opl4->reg_lock, flags); | 76 | spin_unlock_irqrestore(&opl4->reg_lock, flags); |
77 | } | 77 | } |
78 | 78 | ||
79 | void snd_opl4_write_memory(opl4_t *opl4, const char *buf, int offset, int size) | 79 | void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, int size) |
80 | { | 80 | { |
81 | unsigned long flags; | 81 | unsigned long flags; |
82 | u8 memcfg; | 82 | u8 memcfg; |
@@ -100,7 +100,7 @@ void snd_opl4_write_memory(opl4_t *opl4, const char *buf, int offset, int size) | |||
100 | spin_unlock_irqrestore(&opl4->reg_lock, flags); | 100 | spin_unlock_irqrestore(&opl4->reg_lock, flags); |
101 | } | 101 | } |
102 | 102 | ||
103 | static void snd_opl4_enable_opl4(opl4_t *opl4) | 103 | static void snd_opl4_enable_opl4(struct snd_opl4 *opl4) |
104 | { | 104 | { |
105 | outb(OPL3_REG_MODE, opl4->fm_port + 2); | 105 | outb(OPL3_REG_MODE, opl4->fm_port + 2); |
106 | inb(opl4->fm_port); | 106 | inb(opl4->fm_port); |
@@ -110,7 +110,7 @@ static void snd_opl4_enable_opl4(opl4_t *opl4) | |||
110 | inb(opl4->fm_port); | 110 | inb(opl4->fm_port); |
111 | } | 111 | } |
112 | 112 | ||
113 | static int snd_opl4_detect(opl4_t *opl4) | 113 | static int snd_opl4_detect(struct snd_opl4 *opl4) |
114 | { | 114 | { |
115 | u8 id1, id2; | 115 | u8 id1, id2; |
116 | 116 | ||
@@ -144,19 +144,19 @@ static int snd_opl4_detect(opl4_t *opl4) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) | 146 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
147 | static void snd_opl4_seq_dev_free(snd_seq_device_t *seq_dev) | 147 | static void snd_opl4_seq_dev_free(struct snd_seq_device *seq_dev) |
148 | { | 148 | { |
149 | opl4_t *opl4 = seq_dev->private_data; | 149 | struct snd_opl4 *opl4 = seq_dev->private_data; |
150 | opl4->seq_dev = NULL; | 150 | opl4->seq_dev = NULL; |
151 | } | 151 | } |
152 | 152 | ||
153 | static int snd_opl4_create_seq_dev(opl4_t *opl4, int seq_device) | 153 | static int snd_opl4_create_seq_dev(struct snd_opl4 *opl4, int seq_device) |
154 | { | 154 | { |
155 | opl4->seq_dev_num = seq_device; | 155 | opl4->seq_dev_num = seq_device; |
156 | if (snd_seq_device_new(opl4->card, seq_device, SNDRV_SEQ_DEV_ID_OPL4, | 156 | if (snd_seq_device_new(opl4->card, seq_device, SNDRV_SEQ_DEV_ID_OPL4, |
157 | sizeof(opl4_t *), &opl4->seq_dev) >= 0) { | 157 | sizeof(struct snd_opl4 *), &opl4->seq_dev) >= 0) { |
158 | strcpy(opl4->seq_dev->name, "OPL4 Wavetable"); | 158 | strcpy(opl4->seq_dev->name, "OPL4 Wavetable"); |
159 | *(opl4_t **)SNDRV_SEQ_DEVICE_ARGPTR(opl4->seq_dev) = opl4; | 159 | *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(opl4->seq_dev) = opl4; |
160 | opl4->seq_dev->private_data = opl4; | 160 | opl4->seq_dev->private_data = opl4; |
161 | opl4->seq_dev->private_free = snd_opl4_seq_dev_free; | 161 | opl4->seq_dev->private_free = snd_opl4_seq_dev_free; |
162 | } | 162 | } |
@@ -164,7 +164,7 @@ static int snd_opl4_create_seq_dev(opl4_t *opl4, int seq_device) | |||
164 | } | 164 | } |
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | static void snd_opl4_free(opl4_t *opl4) | 167 | static void snd_opl4_free(struct snd_opl4 *opl4) |
168 | { | 168 | { |
169 | #ifdef CONFIG_PROC_FS | 169 | #ifdef CONFIG_PROC_FS |
170 | snd_opl4_free_proc(opl4); | 170 | snd_opl4_free_proc(opl4); |
@@ -174,22 +174,22 @@ static void snd_opl4_free(opl4_t *opl4) | |||
174 | kfree(opl4); | 174 | kfree(opl4); |
175 | } | 175 | } |
176 | 176 | ||
177 | static int snd_opl4_dev_free(snd_device_t *device) | 177 | static int snd_opl4_dev_free(struct snd_device *device) |
178 | { | 178 | { |
179 | opl4_t *opl4 = device->device_data; | 179 | struct snd_opl4 *opl4 = device->device_data; |
180 | snd_opl4_free(opl4); | 180 | snd_opl4_free(opl4); |
181 | return 0; | 181 | return 0; |
182 | } | 182 | } |
183 | 183 | ||
184 | int snd_opl4_create(snd_card_t *card, | 184 | int snd_opl4_create(struct snd_card *card, |
185 | unsigned long fm_port, unsigned long pcm_port, | 185 | unsigned long fm_port, unsigned long pcm_port, |
186 | int seq_device, | 186 | int seq_device, |
187 | opl3_t **ropl3, opl4_t **ropl4) | 187 | struct snd_opl3 **ropl3, struct snd_opl4 **ropl4) |
188 | { | 188 | { |
189 | opl4_t *opl4; | 189 | struct snd_opl4 *opl4; |
190 | opl3_t *opl3; | 190 | struct snd_opl3 *opl3; |
191 | int err; | 191 | int err; |
192 | static snd_device_ops_t ops = { | 192 | static struct snd_device_ops ops = { |
193 | .dev_free = snd_opl4_dev_free | 193 | .dev_free = snd_opl4_dev_free |
194 | }; | 194 | }; |
195 | 195 | ||