diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:55:40 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:01 -0500 |
commit | e4a3d145455159955d6ac1df976b2ed2a135b858 (patch) | |
tree | 71a0a4f0a71d07d153d32d88430f21ac4efcdde7 /sound/pci/ca0106/ca0106_mixer.c | |
parent | 2fd16874aa6322e8b61879a78f3b485999506833 (diff) |
[ALSA] Remove xxx_t typedefs: PCI CA0106
Modules: CA0106 driver
Remove xxx_t typedefs from the PCI CA0106 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ca0106/ca0106_mixer.c')
-rw-r--r-- | sound/pci/ca0106/ca0106_mixer.c | 99 |
1 files changed, 52 insertions, 47 deletions
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 0730dc7c66e5..39100cb62c4f 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -73,7 +73,8 @@ | |||
73 | 73 | ||
74 | #include "ca0106.h" | 74 | #include "ca0106.h" |
75 | 75 | ||
76 | static int snd_ca0106_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 76 | static int snd_ca0106_shared_spdif_info(struct snd_kcontrol *kcontrol, |
77 | struct snd_ctl_elem_info *uinfo) | ||
77 | { | 78 | { |
78 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 79 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
79 | uinfo->count = 1; | 80 | uinfo->count = 1; |
@@ -82,19 +83,19 @@ static int snd_ca0106_shared_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i | |||
82 | return 0; | 83 | return 0; |
83 | } | 84 | } |
84 | 85 | ||
85 | static int snd_ca0106_shared_spdif_get(snd_kcontrol_t * kcontrol, | 86 | static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol, |
86 | snd_ctl_elem_value_t * ucontrol) | 87 | struct snd_ctl_elem_value *ucontrol) |
87 | { | 88 | { |
88 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 89 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
89 | 90 | ||
90 | ucontrol->value.enumerated.item[0] = emu->spdif_enable; | 91 | ucontrol->value.enumerated.item[0] = emu->spdif_enable; |
91 | return 0; | 92 | return 0; |
92 | } | 93 | } |
93 | 94 | ||
94 | static int snd_ca0106_shared_spdif_put(snd_kcontrol_t * kcontrol, | 95 | static int snd_ca0106_shared_spdif_put(struct snd_kcontrol *kcontrol, |
95 | snd_ctl_elem_value_t * ucontrol) | 96 | struct snd_ctl_elem_value *ucontrol) |
96 | { | 97 | { |
97 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 98 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
98 | unsigned int val; | 99 | unsigned int val; |
99 | int change = 0; | 100 | int change = 0; |
100 | u32 mask; | 101 | u32 mask; |
@@ -125,7 +126,8 @@ static int snd_ca0106_shared_spdif_put(snd_kcontrol_t * kcontrol, | |||
125 | return change; | 126 | return change; |
126 | } | 127 | } |
127 | 128 | ||
128 | static int snd_ca0106_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 129 | static int snd_ca0106_capture_source_info(struct snd_kcontrol *kcontrol, |
130 | struct snd_ctl_elem_info *uinfo) | ||
129 | { | 131 | { |
130 | static char *texts[6] = { | 132 | static char *texts[6] = { |
131 | "SPDIF out", "i2s mixer out", "SPDIF in", "i2s in", "AC97 in", "SRC out" | 133 | "SPDIF out", "i2s mixer out", "SPDIF in", "i2s in", "AC97 in", "SRC out" |
@@ -140,19 +142,19 @@ static int snd_ca0106_capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem | |||
140 | return 0; | 142 | return 0; |
141 | } | 143 | } |
142 | 144 | ||
143 | static int snd_ca0106_capture_source_get(snd_kcontrol_t * kcontrol, | 145 | static int snd_ca0106_capture_source_get(struct snd_kcontrol *kcontrol, |
144 | snd_ctl_elem_value_t * ucontrol) | 146 | struct snd_ctl_elem_value *ucontrol) |
145 | { | 147 | { |
146 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 148 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
147 | 149 | ||
148 | ucontrol->value.enumerated.item[0] = emu->capture_source; | 150 | ucontrol->value.enumerated.item[0] = emu->capture_source; |
149 | return 0; | 151 | return 0; |
150 | } | 152 | } |
151 | 153 | ||
152 | static int snd_ca0106_capture_source_put(snd_kcontrol_t * kcontrol, | 154 | static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol, |
153 | snd_ctl_elem_value_t * ucontrol) | 155 | struct snd_ctl_elem_value *ucontrol) |
154 | { | 156 | { |
155 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 157 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
156 | unsigned int val; | 158 | unsigned int val; |
157 | int change = 0; | 159 | int change = 0; |
158 | u32 mask; | 160 | u32 mask; |
@@ -169,7 +171,8 @@ static int snd_ca0106_capture_source_put(snd_kcontrol_t * kcontrol, | |||
169 | return change; | 171 | return change; |
170 | } | 172 | } |
171 | 173 | ||
172 | static int snd_ca0106_capture_mic_line_in_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 174 | static int snd_ca0106_capture_mic_line_in_info(struct snd_kcontrol *kcontrol, |
175 | struct snd_ctl_elem_info *uinfo) | ||
173 | { | 176 | { |
174 | static char *texts[2] = { "Line in", "Mic in" }; | 177 | static char *texts[2] = { "Line in", "Mic in" }; |
175 | 178 | ||
@@ -182,19 +185,19 @@ static int snd_ca0106_capture_mic_line_in_info(snd_kcontrol_t *kcontrol, snd_ctl | |||
182 | return 0; | 185 | return 0; |
183 | } | 186 | } |
184 | 187 | ||
185 | static int snd_ca0106_capture_mic_line_in_get(snd_kcontrol_t * kcontrol, | 188 | static int snd_ca0106_capture_mic_line_in_get(struct snd_kcontrol *kcontrol, |
186 | snd_ctl_elem_value_t * ucontrol) | 189 | struct snd_ctl_elem_value *ucontrol) |
187 | { | 190 | { |
188 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 191 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
189 | 192 | ||
190 | ucontrol->value.enumerated.item[0] = emu->capture_mic_line_in; | 193 | ucontrol->value.enumerated.item[0] = emu->capture_mic_line_in; |
191 | return 0; | 194 | return 0; |
192 | } | 195 | } |
193 | 196 | ||
194 | static int snd_ca0106_capture_mic_line_in_put(snd_kcontrol_t * kcontrol, | 197 | static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol, |
195 | snd_ctl_elem_value_t * ucontrol) | 198 | struct snd_ctl_elem_value *ucontrol) |
196 | { | 199 | { |
197 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 200 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
198 | unsigned int val; | 201 | unsigned int val; |
199 | int change = 0; | 202 | int change = 0; |
200 | u32 tmp; | 203 | u32 tmp; |
@@ -219,7 +222,7 @@ static int snd_ca0106_capture_mic_line_in_put(snd_kcontrol_t * kcontrol, | |||
219 | return change; | 222 | return change; |
220 | } | 223 | } |
221 | 224 | ||
222 | static snd_kcontrol_new_t snd_ca0106_capture_mic_line_in __devinitdata = | 225 | static struct snd_kcontrol_new snd_ca0106_capture_mic_line_in __devinitdata = |
223 | { | 226 | { |
224 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 227 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
225 | .name = "Mic/Line in Capture", | 228 | .name = "Mic/Line in Capture", |
@@ -228,17 +231,18 @@ static snd_kcontrol_new_t snd_ca0106_capture_mic_line_in __devinitdata = | |||
228 | .put = snd_ca0106_capture_mic_line_in_put | 231 | .put = snd_ca0106_capture_mic_line_in_put |
229 | }; | 232 | }; |
230 | 233 | ||
231 | static int snd_ca0106_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 234 | static int snd_ca0106_spdif_info(struct snd_kcontrol *kcontrol, |
235 | struct snd_ctl_elem_info *uinfo) | ||
232 | { | 236 | { |
233 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 237 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
234 | uinfo->count = 1; | 238 | uinfo->count = 1; |
235 | return 0; | 239 | return 0; |
236 | } | 240 | } |
237 | 241 | ||
238 | static int snd_ca0106_spdif_get(snd_kcontrol_t * kcontrol, | 242 | static int snd_ca0106_spdif_get(struct snd_kcontrol *kcontrol, |
239 | snd_ctl_elem_value_t * ucontrol) | 243 | struct snd_ctl_elem_value *ucontrol) |
240 | { | 244 | { |
241 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 245 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
242 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 246 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
243 | 247 | ||
244 | ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; | 248 | ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; |
@@ -248,8 +252,8 @@ static int snd_ca0106_spdif_get(snd_kcontrol_t * kcontrol, | |||
248 | return 0; | 252 | return 0; |
249 | } | 253 | } |
250 | 254 | ||
251 | static int snd_ca0106_spdif_get_mask(snd_kcontrol_t * kcontrol, | 255 | static int snd_ca0106_spdif_get_mask(struct snd_kcontrol *kcontrol, |
252 | snd_ctl_elem_value_t * ucontrol) | 256 | struct snd_ctl_elem_value *ucontrol) |
253 | { | 257 | { |
254 | ucontrol->value.iec958.status[0] = 0xff; | 258 | ucontrol->value.iec958.status[0] = 0xff; |
255 | ucontrol->value.iec958.status[1] = 0xff; | 259 | ucontrol->value.iec958.status[1] = 0xff; |
@@ -258,10 +262,10 @@ static int snd_ca0106_spdif_get_mask(snd_kcontrol_t * kcontrol, | |||
258 | return 0; | 262 | return 0; |
259 | } | 263 | } |
260 | 264 | ||
261 | static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol, | 265 | static int snd_ca0106_spdif_put(struct snd_kcontrol *kcontrol, |
262 | snd_ctl_elem_value_t * ucontrol) | 266 | struct snd_ctl_elem_value *ucontrol) |
263 | { | 267 | { |
264 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 268 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
265 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 269 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
266 | int change; | 270 | int change; |
267 | unsigned int val; | 271 | unsigned int val; |
@@ -278,7 +282,8 @@ static int snd_ca0106_spdif_put(snd_kcontrol_t * kcontrol, | |||
278 | return change; | 282 | return change; |
279 | } | 283 | } |
280 | 284 | ||
281 | static int snd_ca0106_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 285 | static int snd_ca0106_volume_info(struct snd_kcontrol *kcontrol, |
286 | struct snd_ctl_elem_info *uinfo) | ||
282 | { | 287 | { |
283 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 288 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
284 | uinfo->count = 2; | 289 | uinfo->count = 2; |
@@ -287,10 +292,10 @@ static int snd_ca0106_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t | |||
287 | return 0; | 292 | return 0; |
288 | } | 293 | } |
289 | 294 | ||
290 | static int snd_ca0106_volume_get(snd_kcontrol_t * kcontrol, | 295 | static int snd_ca0106_volume_get(struct snd_kcontrol *kcontrol, |
291 | snd_ctl_elem_value_t * ucontrol) | 296 | struct snd_ctl_elem_value *ucontrol) |
292 | { | 297 | { |
293 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 298 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
294 | unsigned int value; | 299 | unsigned int value; |
295 | int channel_id, reg; | 300 | int channel_id, reg; |
296 | 301 | ||
@@ -303,10 +308,10 @@ static int snd_ca0106_volume_get(snd_kcontrol_t * kcontrol, | |||
303 | return 0; | 308 | return 0; |
304 | } | 309 | } |
305 | 310 | ||
306 | static int snd_ca0106_volume_put(snd_kcontrol_t * kcontrol, | 311 | static int snd_ca0106_volume_put(struct snd_kcontrol *kcontrol, |
307 | snd_ctl_elem_value_t * ucontrol) | 312 | struct snd_ctl_elem_value *ucontrol) |
308 | { | 313 | { |
309 | ca0106_t *emu = snd_kcontrol_chip(kcontrol); | 314 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
310 | unsigned int oval, nval; | 315 | unsigned int oval, nval; |
311 | int channel_id, reg; | 316 | int channel_id, reg; |
312 | 317 | ||
@@ -334,7 +339,7 @@ static int snd_ca0106_volume_put(snd_kcontrol_t * kcontrol, | |||
334 | } | 339 | } |
335 | 340 | ||
336 | 341 | ||
337 | static snd_kcontrol_new_t snd_ca0106_volume_ctls[] __devinitdata = { | 342 | static struct snd_kcontrol_new snd_ca0106_volume_ctls[] __devinitdata = { |
338 | CA_VOLUME("Analog Front Playback Volume", | 343 | CA_VOLUME("Analog Front Playback Volume", |
339 | CONTROL_FRONT_CHANNEL, PLAYBACK_VOLUME2), | 344 | CONTROL_FRONT_CHANNEL, PLAYBACK_VOLUME2), |
340 | CA_VOLUME("Analog Rear Playback Volume", | 345 | CA_VOLUME("Analog Rear Playback Volume", |
@@ -388,18 +393,18 @@ static snd_kcontrol_new_t snd_ca0106_volume_ctls[] __devinitdata = { | |||
388 | }, | 393 | }, |
389 | }; | 394 | }; |
390 | 395 | ||
391 | static int __devinit remove_ctl(snd_card_t *card, const char *name) | 396 | static int __devinit remove_ctl(struct snd_card *card, const char *name) |
392 | { | 397 | { |
393 | snd_ctl_elem_id_t id; | 398 | struct snd_ctl_elem_id id; |
394 | memset(&id, 0, sizeof(id)); | 399 | memset(&id, 0, sizeof(id)); |
395 | strcpy(id.name, name); | 400 | strcpy(id.name, name); |
396 | id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 401 | id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
397 | return snd_ctl_remove_id(card, &id); | 402 | return snd_ctl_remove_id(card, &id); |
398 | } | 403 | } |
399 | 404 | ||
400 | static snd_kcontrol_t __devinit *ctl_find(snd_card_t *card, const char *name) | 405 | static struct snd_kcontrol __devinit *ctl_find(struct snd_card *card, const char *name) |
401 | { | 406 | { |
402 | snd_ctl_elem_id_t sid; | 407 | struct snd_ctl_elem_id sid; |
403 | memset(&sid, 0, sizeof(sid)); | 408 | memset(&sid, 0, sizeof(sid)); |
404 | /* FIXME: strcpy is bad. */ | 409 | /* FIXME: strcpy is bad. */ |
405 | strcpy(sid.name, name); | 410 | strcpy(sid.name, name); |
@@ -407,9 +412,9 @@ static snd_kcontrol_t __devinit *ctl_find(snd_card_t *card, const char *name) | |||
407 | return snd_ctl_find_id(card, &sid); | 412 | return snd_ctl_find_id(card, &sid); |
408 | } | 413 | } |
409 | 414 | ||
410 | static int __devinit rename_ctl(snd_card_t *card, const char *src, const char *dst) | 415 | static int __devinit rename_ctl(struct snd_card *card, const char *src, const char *dst) |
411 | { | 416 | { |
412 | snd_kcontrol_t *kctl = ctl_find(card, src); | 417 | struct snd_kcontrol *kctl = ctl_find(card, src); |
413 | if (kctl) { | 418 | if (kctl) { |
414 | strcpy(kctl->id.name, dst); | 419 | strcpy(kctl->id.name, dst); |
415 | return 0; | 420 | return 0; |
@@ -417,10 +422,10 @@ static int __devinit rename_ctl(snd_card_t *card, const char *src, const char *d | |||
417 | return -ENOENT; | 422 | return -ENOENT; |
418 | } | 423 | } |
419 | 424 | ||
420 | int __devinit snd_ca0106_mixer(ca0106_t *emu) | 425 | int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu) |
421 | { | 426 | { |
422 | int i, err; | 427 | int i, err; |
423 | snd_card_t *card = emu->card; | 428 | struct snd_card *card = emu->card; |
424 | char **c; | 429 | char **c; |
425 | static char *ca0106_remove_ctls[] = { | 430 | static char *ca0106_remove_ctls[] = { |
426 | "Master Mono Playback Switch", | 431 | "Master Mono Playback Switch", |