diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:59:52 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:11 -0500 |
commit | 6ca308d4edd51c4f34ffff94ae0bbf193087d89f (patch) | |
tree | 6bc0cb2ccacc6a4fd08cc35ecda4819e01f87af5 /sound/pci/ice1712/ice1712.h | |
parent | a98f90fd826913519c3f704ea24fb9bea1e0e494 (diff) |
[ALSA] Remove xxx_t typedefs: PCI ICE1712
Modules: ICE1712 driver
Remove xxx_t typedefs from the PCI ICE1712 driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/ice1712.h')
-rw-r--r-- | sound/pci/ice1712/ice1712.h | 118 |
1 files changed, 60 insertions, 58 deletions
diff --git a/sound/pci/ice1712/ice1712.h b/sound/pci/ice1712/ice1712.h index 5ad4728daa7b..ce96b3bb6531 100644 --- a/sound/pci/ice1712/ice1712.h +++ b/sound/pci/ice1712/ice1712.h | |||
@@ -215,9 +215,9 @@ | |||
215 | * | 215 | * |
216 | */ | 216 | */ |
217 | 217 | ||
218 | typedef struct _snd_ice1712 ice1712_t; | 218 | struct snd_ice1712; |
219 | 219 | ||
220 | typedef struct { | 220 | struct snd_ice1712_eeprom { |
221 | unsigned int subvendor; /* PCI[2c-2f] */ | 221 | unsigned int subvendor; /* PCI[2c-2f] */ |
222 | unsigned char size; /* size of EEPROM image in bytes */ | 222 | unsigned char size; /* size of EEPROM image in bytes */ |
223 | unsigned char version; /* must be 1 (or 2 for vt1724) */ | 223 | unsigned char version; /* must be 1 (or 2 for vt1724) */ |
@@ -225,7 +225,7 @@ typedef struct { | |||
225 | unsigned int gpiomask; | 225 | unsigned int gpiomask; |
226 | unsigned int gpiostate; | 226 | unsigned int gpiostate; |
227 | unsigned int gpiodir; | 227 | unsigned int gpiodir; |
228 | } ice1712_eeprom_t; | 228 | }; |
229 | 229 | ||
230 | enum { | 230 | enum { |
231 | ICE_EEP1_CODEC = 0, /* 06 */ | 231 | ICE_EEP1_CODEC = 0, /* 06 */ |
@@ -266,28 +266,28 @@ struct snd_ak4xxx_private { | |||
266 | unsigned int add_flags; /* additional bits at init */ | 266 | unsigned int add_flags; /* additional bits at init */ |
267 | unsigned int mask_flags; /* total mask bits */ | 267 | unsigned int mask_flags; /* total mask bits */ |
268 | struct snd_akm4xxx_ops { | 268 | struct snd_akm4xxx_ops { |
269 | void (*set_rate_val)(akm4xxx_t *ak, unsigned int rate); | 269 | void (*set_rate_val)(struct snd_akm4xxx *ak, unsigned int rate); |
270 | } ops; | 270 | } ops; |
271 | }; | 271 | }; |
272 | 272 | ||
273 | struct snd_ice1712_spdif { | 273 | struct snd_ice1712_spdif { |
274 | unsigned char cs8403_bits; | 274 | unsigned char cs8403_bits; |
275 | unsigned char cs8403_stream_bits; | 275 | unsigned char cs8403_stream_bits; |
276 | snd_kcontrol_t *stream_ctl; | 276 | struct snd_kcontrol *stream_ctl; |
277 | 277 | ||
278 | struct snd_ice1712_spdif_ops { | 278 | struct snd_ice1712_spdif_ops { |
279 | void (*open)(ice1712_t *, snd_pcm_substream_t *); | 279 | void (*open)(struct snd_ice1712 *, struct snd_pcm_substream *); |
280 | void (*setup_rate)(ice1712_t *, int rate); | 280 | void (*setup_rate)(struct snd_ice1712 *, int rate); |
281 | void (*close)(ice1712_t *, snd_pcm_substream_t *); | 281 | void (*close)(struct snd_ice1712 *, struct snd_pcm_substream *); |
282 | void (*default_get)(ice1712_t *, snd_ctl_elem_value_t * ucontrol); | 282 | void (*default_get)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); |
283 | int (*default_put)(ice1712_t *, snd_ctl_elem_value_t * ucontrol); | 283 | int (*default_put)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); |
284 | void (*stream_get)(ice1712_t *, snd_ctl_elem_value_t * ucontrol); | 284 | void (*stream_get)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); |
285 | int (*stream_put)(ice1712_t *, snd_ctl_elem_value_t * ucontrol); | 285 | int (*stream_put)(struct snd_ice1712 *, struct snd_ctl_elem_value *ucontrol); |
286 | } ops; | 286 | } ops; |
287 | }; | 287 | }; |
288 | 288 | ||
289 | 289 | ||
290 | struct _snd_ice1712 { | 290 | struct snd_ice1712 { |
291 | unsigned long conp_dma_size; | 291 | unsigned long conp_dma_size; |
292 | unsigned long conc_dma_size; | 292 | unsigned long conc_dma_size; |
293 | unsigned long prop_dma_size; | 293 | unsigned long prop_dma_size; |
@@ -300,28 +300,28 @@ struct _snd_ice1712 { | |||
300 | unsigned long profi_port; | 300 | unsigned long profi_port; |
301 | 301 | ||
302 | struct pci_dev *pci; | 302 | struct pci_dev *pci; |
303 | snd_card_t *card; | 303 | struct snd_card *card; |
304 | snd_pcm_t *pcm; | 304 | struct snd_pcm *pcm; |
305 | snd_pcm_t *pcm_ds; | 305 | struct snd_pcm *pcm_ds; |
306 | snd_pcm_t *pcm_pro; | 306 | struct snd_pcm *pcm_pro; |
307 | snd_pcm_substream_t *playback_con_substream; | 307 | struct snd_pcm_substream *playback_con_substream; |
308 | snd_pcm_substream_t *playback_con_substream_ds[6]; | 308 | struct snd_pcm_substream *playback_con_substream_ds[6]; |
309 | snd_pcm_substream_t *capture_con_substream; | 309 | struct snd_pcm_substream *capture_con_substream; |
310 | snd_pcm_substream_t *playback_pro_substream; | 310 | struct snd_pcm_substream *playback_pro_substream; |
311 | snd_pcm_substream_t *capture_pro_substream; | 311 | struct snd_pcm_substream *capture_pro_substream; |
312 | unsigned int playback_pro_size; | 312 | unsigned int playback_pro_size; |
313 | unsigned int capture_pro_size; | 313 | unsigned int capture_pro_size; |
314 | unsigned int playback_con_virt_addr[6]; | 314 | unsigned int playback_con_virt_addr[6]; |
315 | unsigned int playback_con_active_buf[6]; | 315 | unsigned int playback_con_active_buf[6]; |
316 | unsigned int capture_con_virt_addr; | 316 | unsigned int capture_con_virt_addr; |
317 | unsigned int ac97_ext_id; | 317 | unsigned int ac97_ext_id; |
318 | ac97_t *ac97; | 318 | struct snd_ac97 *ac97; |
319 | snd_rawmidi_t *rmidi[2]; | 319 | struct snd_rawmidi *rmidi[2]; |
320 | 320 | ||
321 | spinlock_t reg_lock; | 321 | spinlock_t reg_lock; |
322 | snd_info_entry_t *proc_entry; | 322 | struct snd_info_entry *proc_entry; |
323 | 323 | ||
324 | ice1712_eeprom_t eeprom; | 324 | struct snd_ice1712_eeprom eeprom; |
325 | 325 | ||
326 | unsigned int pro_volumes[20]; | 326 | unsigned int pro_volumes[20]; |
327 | unsigned int omni: 1; /* Delta Omni I/O */ | 327 | unsigned int omni: 1; /* Delta Omni I/O */ |
@@ -335,16 +335,16 @@ struct _snd_ice1712 { | |||
335 | unsigned int cur_rate; /* current rate */ | 335 | unsigned int cur_rate; /* current rate */ |
336 | 336 | ||
337 | struct semaphore open_mutex; | 337 | struct semaphore open_mutex; |
338 | snd_pcm_substream_t *pcm_reserved[4]; | 338 | struct snd_pcm_substream *pcm_reserved[4]; |
339 | snd_pcm_hw_constraint_list_t *hw_rates; /* card-specific rate constraints */ | 339 | struct snd_pcm_hw_constraint_list *hw_rates; /* card-specific rate constraints */ |
340 | 340 | ||
341 | unsigned int akm_codecs; | 341 | unsigned int akm_codecs; |
342 | akm4xxx_t *akm; | 342 | struct snd_akm4xxx *akm; |
343 | struct snd_ice1712_spdif spdif; | 343 | struct snd_ice1712_spdif spdif; |
344 | 344 | ||
345 | struct semaphore i2c_mutex; /* I2C mutex for ICE1724 registers */ | 345 | struct semaphore i2c_mutex; /* I2C mutex for ICE1724 registers */ |
346 | snd_i2c_bus_t *i2c; /* I2C bus */ | 346 | struct snd_i2c_bus *i2c; /* I2C bus */ |
347 | snd_i2c_device_t *cs8427; /* CS8427 I2C device */ | 347 | struct snd_i2c_device *cs8427; /* CS8427 I2C device */ |
348 | unsigned int cs8427_timeout; /* CS8427 reset timeout in HZ/100 */ | 348 | unsigned int cs8427_timeout; /* CS8427 reset timeout in HZ/100 */ |
349 | 349 | ||
350 | struct ice1712_gpio { | 350 | struct ice1712_gpio { |
@@ -352,20 +352,20 @@ struct _snd_ice1712 { | |||
352 | unsigned int write_mask; /* current mask bits */ | 352 | unsigned int write_mask; /* current mask bits */ |
353 | unsigned int saved[2]; /* for ewx_i2c */ | 353 | unsigned int saved[2]; /* for ewx_i2c */ |
354 | /* operators */ | 354 | /* operators */ |
355 | void (*set_mask)(ice1712_t *ice, unsigned int data); | 355 | void (*set_mask)(struct snd_ice1712 *ice, unsigned int data); |
356 | void (*set_dir)(ice1712_t *ice, unsigned int data); | 356 | void (*set_dir)(struct snd_ice1712 *ice, unsigned int data); |
357 | void (*set_data)(ice1712_t *ice, unsigned int data); | 357 | void (*set_data)(struct snd_ice1712 *ice, unsigned int data); |
358 | unsigned int (*get_data)(ice1712_t *ice); | 358 | unsigned int (*get_data)(struct snd_ice1712 *ice); |
359 | /* misc operators - move to another place? */ | 359 | /* misc operators - move to another place? */ |
360 | void (*set_pro_rate)(ice1712_t *ice, unsigned int rate); | 360 | void (*set_pro_rate)(struct snd_ice1712 *ice, unsigned int rate); |
361 | void (*i2s_mclk_changed)(ice1712_t *ice); | 361 | void (*i2s_mclk_changed)(struct snd_ice1712 *ice); |
362 | } gpio; | 362 | } gpio; |
363 | struct semaphore gpio_mutex; | 363 | struct semaphore gpio_mutex; |
364 | 364 | ||
365 | /* other board-specific data */ | 365 | /* other board-specific data */ |
366 | union { | 366 | union { |
367 | /* additional i2c devices for EWS boards */ | 367 | /* additional i2c devices for EWS boards */ |
368 | snd_i2c_device_t *i2cdevs[3]; | 368 | struct snd_i2c_device *i2cdevs[3]; |
369 | /* AC97 register cache for Aureon */ | 369 | /* AC97 register cache for Aureon */ |
370 | struct aureon_spec { | 370 | struct aureon_spec { |
371 | unsigned short stac9744[64]; | 371 | unsigned short stac9744[64]; |
@@ -385,7 +385,7 @@ struct _snd_ice1712 { | |||
385 | unsigned short boxconfig[4]; | 385 | unsigned short boxconfig[4]; |
386 | } hoontech; | 386 | } hoontech; |
387 | struct { | 387 | struct { |
388 | ak4114_t *ak4114; | 388 | struct ak4114 *ak4114; |
389 | unsigned int analog: 1; | 389 | unsigned int analog: 1; |
390 | } juli; | 390 | } juli; |
391 | } spec; | 391 | } spec; |
@@ -396,22 +396,22 @@ struct _snd_ice1712 { | |||
396 | /* | 396 | /* |
397 | * gpio access functions | 397 | * gpio access functions |
398 | */ | 398 | */ |
399 | static inline void snd_ice1712_gpio_set_dir(ice1712_t *ice, unsigned int bits) | 399 | static inline void snd_ice1712_gpio_set_dir(struct snd_ice1712 *ice, unsigned int bits) |
400 | { | 400 | { |
401 | ice->gpio.set_dir(ice, bits); | 401 | ice->gpio.set_dir(ice, bits); |
402 | } | 402 | } |
403 | 403 | ||
404 | static inline void snd_ice1712_gpio_set_mask(ice1712_t *ice, unsigned int bits) | 404 | static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits) |
405 | { | 405 | { |
406 | ice->gpio.set_mask(ice, bits); | 406 | ice->gpio.set_mask(ice, bits); |
407 | } | 407 | } |
408 | 408 | ||
409 | static inline void snd_ice1712_gpio_write(ice1712_t *ice, unsigned int val) | 409 | static inline void snd_ice1712_gpio_write(struct snd_ice1712 *ice, unsigned int val) |
410 | { | 410 | { |
411 | ice->gpio.set_data(ice, val); | 411 | ice->gpio.set_data(ice, val); |
412 | } | 412 | } |
413 | 413 | ||
414 | static inline unsigned int snd_ice1712_gpio_read(ice1712_t *ice) | 414 | static inline unsigned int snd_ice1712_gpio_read(struct snd_ice1712 *ice) |
415 | { | 415 | { |
416 | return ice->gpio.get_data(ice); | 416 | return ice->gpio.get_data(ice); |
417 | } | 417 | } |
@@ -421,14 +421,14 @@ static inline unsigned int snd_ice1712_gpio_read(ice1712_t *ice) | |||
421 | * The access to gpio will be protected by mutex, so don't forget to | 421 | * The access to gpio will be protected by mutex, so don't forget to |
422 | * restore! | 422 | * restore! |
423 | */ | 423 | */ |
424 | static inline void snd_ice1712_save_gpio_status(ice1712_t *ice) | 424 | static inline void snd_ice1712_save_gpio_status(struct snd_ice1712 *ice) |
425 | { | 425 | { |
426 | down(&ice->gpio_mutex); | 426 | down(&ice->gpio_mutex); |
427 | ice->gpio.saved[0] = ice->gpio.direction; | 427 | ice->gpio.saved[0] = ice->gpio.direction; |
428 | ice->gpio.saved[1] = ice->gpio.write_mask; | 428 | ice->gpio.saved[1] = ice->gpio.write_mask; |
429 | } | 429 | } |
430 | 430 | ||
431 | static inline void snd_ice1712_restore_gpio_status(ice1712_t *ice) | 431 | static inline void snd_ice1712_restore_gpio_status(struct snd_ice1712 *ice) |
432 | { | 432 | { |
433 | ice->gpio.set_dir(ice, ice->gpio.saved[0]); | 433 | ice->gpio.set_dir(ice, ice->gpio.saved[0]); |
434 | ice->gpio.set_mask(ice, ice->gpio.saved[1]); | 434 | ice->gpio.set_mask(ice, ice->gpio.saved[1]); |
@@ -443,14 +443,15 @@ static inline void snd_ice1712_restore_gpio_status(ice1712_t *ice) | |||
443 | .get = snd_ice1712_gpio_get, .put = snd_ice1712_gpio_put, \ | 443 | .get = snd_ice1712_gpio_get, .put = snd_ice1712_gpio_put, \ |
444 | .private_value = mask | (invert << 24) } | 444 | .private_value = mask | (invert << 24) } |
445 | 445 | ||
446 | int snd_ice1712_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); | 446 | int snd_ice1712_gpio_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); |
447 | int snd_ice1712_gpio_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); | 447 | int snd_ice1712_gpio_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); |
448 | int snd_ice1712_gpio_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); | 448 | int snd_ice1712_gpio_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); |
449 | 449 | ||
450 | /* | 450 | /* |
451 | * set gpio direction, write mask and data | 451 | * set gpio direction, write mask and data |
452 | */ | 452 | */ |
453 | static inline void snd_ice1712_gpio_write_bits(ice1712_t *ice, unsigned int mask, unsigned int bits) | 453 | static inline void snd_ice1712_gpio_write_bits(struct snd_ice1712 *ice, |
454 | unsigned int mask, unsigned int bits) | ||
454 | { | 455 | { |
455 | ice->gpio.direction |= mask; | 456 | ice->gpio.direction |= mask; |
456 | snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); | 457 | snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); |
@@ -458,21 +459,22 @@ static inline void snd_ice1712_gpio_write_bits(ice1712_t *ice, unsigned int mask | |||
458 | snd_ice1712_gpio_write(ice, mask & bits); | 459 | snd_ice1712_gpio_write(ice, mask & bits); |
459 | } | 460 | } |
460 | 461 | ||
461 | int snd_ice1712_spdif_build_controls(ice1712_t *ice); | 462 | int snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice); |
462 | 463 | ||
463 | int snd_ice1712_akm4xxx_init(akm4xxx_t *ak, const akm4xxx_t *template, const struct snd_ak4xxx_private *priv, ice1712_t *ice); | 464 | int snd_ice1712_akm4xxx_init(struct snd_akm4xxx *ak, const struct snd_akm4xxx *template, |
464 | void snd_ice1712_akm4xxx_free(ice1712_t *ice); | 465 | const struct snd_ak4xxx_private *priv, struct snd_ice1712 *ice); |
465 | int snd_ice1712_akm4xxx_build_controls(ice1712_t *ice); | 466 | void snd_ice1712_akm4xxx_free(struct snd_ice1712 *ice); |
467 | int snd_ice1712_akm4xxx_build_controls(struct snd_ice1712 *ice); | ||
466 | 468 | ||
467 | int snd_ice1712_init_cs8427(ice1712_t *ice, int addr); | 469 | int snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr); |
468 | 470 | ||
469 | static inline void snd_ice1712_write(ice1712_t * ice, u8 addr, u8 data) | 471 | static inline void snd_ice1712_write(struct snd_ice1712 * ice, u8 addr, u8 data) |
470 | { | 472 | { |
471 | outb(addr, ICEREG(ice, INDEX)); | 473 | outb(addr, ICEREG(ice, INDEX)); |
472 | outb(data, ICEREG(ice, DATA)); | 474 | outb(data, ICEREG(ice, DATA)); |
473 | } | 475 | } |
474 | 476 | ||
475 | static inline u8 snd_ice1712_read(ice1712_t * ice, u8 addr) | 477 | static inline u8 snd_ice1712_read(struct snd_ice1712 * ice, u8 addr) |
476 | { | 478 | { |
477 | outb(addr, ICEREG(ice, INDEX)); | 479 | outb(addr, ICEREG(ice, INDEX)); |
478 | return inb(ICEREG(ice, DATA)); | 480 | return inb(ICEREG(ice, DATA)); |
@@ -488,8 +490,8 @@ struct snd_ice1712_card_info { | |||
488 | char *name; | 490 | char *name; |
489 | char *model; | 491 | char *model; |
490 | char *driver; | 492 | char *driver; |
491 | int (*chip_init)(ice1712_t *); | 493 | int (*chip_init)(struct snd_ice1712 *); |
492 | int (*build_controls)(ice1712_t *); | 494 | int (*build_controls)(struct snd_ice1712 *); |
493 | unsigned int no_mpu401: 1; | 495 | unsigned int no_mpu401: 1; |
494 | unsigned int eeprom_size; | 496 | unsigned int eeprom_size; |
495 | unsigned char *eeprom_data; | 497 | unsigned char *eeprom_data; |