Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] Remove xxx_t typedefs: AC97

Modules: AC97 Codec

Remove xxx_t typedefs from the AC97 codec support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
ee42381e dc4cafba

+510 -508
+53 -52
include/sound/ac97_codec.h
··· 391 391 * 392 392 */ 393 393 394 - typedef struct _snd_ac97_bus ac97_bus_t; 395 - typedef struct _snd_ac97_bus_ops ac97_bus_ops_t; 396 - typedef struct _snd_ac97_template ac97_template_t; 397 - typedef struct _snd_ac97 ac97_t; 394 + struct snd_ac97; 398 395 399 396 struct snd_ac97_build_ops { 400 - int (*build_3d) (ac97_t *ac97); 401 - int (*build_specific) (ac97_t *ac97); 402 - int (*build_spdif) (ac97_t *ac97); 403 - int (*build_post_spdif) (ac97_t *ac97); 397 + int (*build_3d) (struct snd_ac97 *ac97); 398 + int (*build_specific) (struct snd_ac97 *ac97); 399 + int (*build_spdif) (struct snd_ac97 *ac97); 400 + int (*build_post_spdif) (struct snd_ac97 *ac97); 404 401 #ifdef CONFIG_PM 405 - void (*suspend) (ac97_t *ac97); 406 - void (*resume) (ac97_t *ac97); 402 + void (*suspend) (struct snd_ac97 *ac97); 403 + void (*resume) (struct snd_ac97 *ac97); 407 404 #endif 408 - void (*update_jacks) (ac97_t *ac97); /* for jack-sharing */ 405 + void (*update_jacks) (struct snd_ac97 *ac97); /* for jack-sharing */ 409 406 }; 410 407 411 - struct _snd_ac97_bus_ops { 412 - void (*reset) (ac97_t *ac97); 413 - void (*write) (ac97_t *ac97, unsigned short reg, unsigned short val); 414 - unsigned short (*read) (ac97_t *ac97, unsigned short reg); 415 - void (*wait) (ac97_t *ac97); 416 - void (*init) (ac97_t *ac97); 408 + struct snd_ac97_bus_ops { 409 + void (*reset) (struct snd_ac97 *ac97); 410 + void (*write) (struct snd_ac97 *ac97, unsigned short reg, unsigned short val); 411 + unsigned short (*read) (struct snd_ac97 *ac97, unsigned short reg); 412 + void (*wait) (struct snd_ac97 *ac97); 413 + void (*init) (struct snd_ac97 *ac97); 417 414 }; 418 415 419 - struct _snd_ac97_bus { 416 + struct snd_ac97_bus { 420 417 /* -- lowlevel (hardware) driver specific -- */ 421 - ac97_bus_ops_t *ops; 418 + struct snd_ac97_bus_ops *ops; 422 419 void *private_data; 423 - void (*private_free) (ac97_bus_t *bus); 420 + void (*private_free) (struct snd_ac97_bus *bus); 424 421 /* --- */ 425 - snd_card_t *card; 422 + struct snd_card *card; 426 423 unsigned short num; /* bus number */ 427 424 unsigned short no_vra: 1, /* bridge doesn't support VRA */ 428 425 dra: 1, /* bridge supports double rate */ ··· 429 432 unsigned short used_slots[2][4]; /* actually used PCM slots */ 430 433 unsigned short pcms_count; /* count of PCMs */ 431 434 struct ac97_pcm *pcms; 432 - ac97_t *codec[4]; 433 - snd_info_entry_t *proc; 435 + struct snd_ac97 *codec[4]; 436 + struct snd_info_entry *proc; 434 437 }; 435 438 436 - struct _snd_ac97_template { 439 + struct snd_ac97_template { 437 440 void *private_data; 438 - void (*private_free) (ac97_t *ac97); 441 + void (*private_free) (struct snd_ac97 *ac97); 439 442 struct pci_dev *pci; /* assigned PCI device - used for quirks */ 440 443 unsigned short num; /* number of codec: 0 = primary, 1 = secondary */ 441 444 unsigned short addr; /* physical address of codec [0-3] */ ··· 444 447 DECLARE_BITMAP(reg_accessed, 0x80); /* bit flags */ 445 448 }; 446 449 447 - struct _snd_ac97 { 450 + struct snd_ac97 { 448 451 /* -- lowlevel (hardware) driver specific -- */ 449 452 struct snd_ac97_build_ops * build_ops; 450 453 void *private_data; 451 - void (*private_free) (ac97_t *ac97); 454 + void (*private_free) (struct snd_ac97 *ac97); 452 455 /* --- */ 453 - ac97_bus_t *bus; 456 + struct snd_ac97_bus *bus; 454 457 struct pci_dev *pci; /* assigned PCI device - used for quirks */ 455 - snd_info_entry_t *proc; 456 - snd_info_entry_t *proc_regs; 458 + struct snd_info_entry *proc; 459 + struct snd_info_entry *proc_regs; 457 460 unsigned short subsystem_vendor; 458 461 unsigned short subsystem_device; 459 462 struct semaphore reg_mutex; ··· 487 490 struct device dev; 488 491 }; 489 492 490 - #define to_ac97_t(d) container_of(d, struct _snd_ac97, dev) 493 + #define to_ac97_t(d) container_of(d, struct snd_ac97, dev) 491 494 492 495 /* conditions */ 493 - static inline int ac97_is_audio(ac97_t * ac97) 496 + static inline int ac97_is_audio(struct snd_ac97 * ac97) 494 497 { 495 498 return (ac97->scaps & AC97_SCAP_AUDIO); 496 499 } 497 - static inline int ac97_is_modem(ac97_t * ac97) 500 + static inline int ac97_is_modem(struct snd_ac97 * ac97) 498 501 { 499 502 return (ac97->scaps & AC97_SCAP_MODEM); 500 503 } 501 - static inline int ac97_is_rev22(ac97_t * ac97) 504 + static inline int ac97_is_rev22(struct snd_ac97 * ac97) 502 505 { 503 506 return (ac97->ext_id & AC97_EI_REV_MASK) >= AC97_EI_REV_22; 504 507 } 505 - static inline int ac97_can_amap(ac97_t * ac97) 508 + static inline int ac97_can_amap(struct snd_ac97 * ac97) 506 509 { 507 510 return (ac97->ext_id & AC97_EI_AMAP) != 0; 508 511 } 509 - static inline int ac97_can_spdif(ac97_t * ac97) 512 + static inline int ac97_can_spdif(struct snd_ac97 * ac97) 510 513 { 511 514 return (ac97->ext_id & AC97_EI_SPDIF) != 0; 512 515 } 513 516 514 517 /* functions */ 515 - int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, void *private_data, ac97_bus_t **rbus); /* create new AC97 bus */ 516 - int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97); /* create mixer controls */ 517 - const char *snd_ac97_get_short_name(ac97_t *ac97); 518 + /* create new AC97 bus */ 519 + int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops, 520 + void *private_data, struct snd_ac97_bus **rbus); 521 + /* create mixer controls */ 522 + int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, 523 + struct snd_ac97 **rac97); 524 + const char *snd_ac97_get_short_name(struct snd_ac97 *ac97); 518 525 519 - void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value); 520 - unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg); 521 - void snd_ac97_write_cache(ac97_t *ac97, unsigned short reg, unsigned short value); 522 - int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value); 523 - int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value); 526 + void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value); 527 + unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg); 528 + void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value); 529 + int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value); 530 + int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value); 524 531 #ifdef CONFIG_PM 525 - void snd_ac97_suspend(ac97_t *ac97); 526 - void snd_ac97_resume(ac97_t *ac97); 532 + void snd_ac97_suspend(struct snd_ac97 *ac97); 533 + void snd_ac97_resume(struct snd_ac97 *ac97); 527 534 #endif 528 535 529 536 /* quirk types */ ··· 552 551 int type; /* quirk type above */ 553 552 }; 554 553 555 - int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override); 556 - int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate); 554 + int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override); 555 + int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate); 557 556 558 557 /* 559 558 * PCM allocation ··· 569 568 }; 570 569 571 570 struct ac97_pcm { 572 - ac97_bus_t *bus; 571 + struct snd_ac97_bus *bus; 573 572 unsigned int stream: 1, /* stream type: 1 = capture */ 574 573 exclusive: 1, /* exclusive mode, don't override with other pcms */ 575 574 copy_flag: 1, /* lowlevel driver must fill all entries */ ··· 580 579 unsigned short slots; /* driver input: requested AC97 slot numbers */ 581 580 unsigned short rslots[4]; /* allocated slots per codecs */ 582 581 unsigned char rate_table[4]; 583 - ac97_t *codec[4]; /* allocated codecs */ 582 + struct snd_ac97 *codec[4]; /* allocated codecs */ 584 583 } r[2]; /* 0 = standard rates, 1 = double rates */ 585 584 unsigned long private_value; /* used by the hardware driver */ 586 585 }; 587 586 588 - int snd_ac97_pcm_assign(ac97_bus_t *ac97, 587 + int snd_ac97_pcm_assign(struct snd_ac97_bus *ac97, 589 588 unsigned short pcms_count, 590 589 const struct ac97_pcm *pcms); 591 590 int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, 592 591 enum ac97_pcm_cfg cfg, unsigned short slots); 593 592 int snd_ac97_pcm_close(struct ac97_pcm *pcm); 594 - int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime); 593 + int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime); 595 594 596 595 /* ad hoc AC97 device driver access */ 597 596 extern struct bus_type ac97_bus_type;
+1 -1
sound/pci/ac97/ac97_bus.c
··· 18 18 19 19 /* 20 20 * Let drivers decide whether they want to support given codec from their 21 - * probe method. Drivers have direct access to the ac97_t structure and may 21 + * probe method. Drivers have direct access to the struct snd_ac97 structure and may 22 22 * decide based on the id field amongst other things. 23 23 */ 24 24 static int ac97_bus_match(struct device *dev, struct device_driver *drv)
+157 -156
sound/pci/ac97/ac97_codec.c
··· 50 50 51 51 */ 52 52 53 - typedef struct { 53 + struct ac97_codec_id { 54 54 unsigned int id; 55 55 unsigned int mask; 56 56 const char *name; 57 - int (*patch)(ac97_t *ac97); 58 - int (*mpatch)(ac97_t *ac97); 57 + int (*patch)(struct snd_ac97 *ac97); 58 + int (*mpatch)(struct snd_ac97 *ac97); 59 59 unsigned int flags; 60 - } ac97_codec_id_t; 60 + }; 61 61 62 - static const ac97_codec_id_t snd_ac97_codec_id_vendors[] = { 62 + static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = { 63 63 { 0x414b4d00, 0xffffff00, "Asahi Kasei", NULL, NULL }, 64 64 { 0x41445300, 0xffffff00, "Analog Devices", NULL, NULL }, 65 65 { 0x414c4300, 0xffffff00, "Realtek", NULL, NULL }, ··· 86 86 { 0, 0, NULL, NULL, NULL } 87 87 }; 88 88 89 - static const ac97_codec_id_t snd_ac97_codec_ids[] = { 89 + static const struct ac97_codec_id snd_ac97_codec_ids[] = { 90 90 { 0x414b4d00, 0xffffffff, "AK4540", NULL, NULL }, 91 91 { 0x414b4d01, 0xffffffff, "AK4542", NULL, NULL }, 92 92 { 0x414b4d02, 0xffffffff, "AK4543", NULL, NULL }, ··· 225 225 * I/O routines 226 226 */ 227 227 228 - static int snd_ac97_valid_reg(ac97_t *ac97, unsigned short reg) 228 + static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg) 229 229 { 230 230 if (ac97->limited_regs && ! test_bit(reg, ac97->reg_accessed)) 231 231 return 0; ··· 278 278 * #snd_ca97_write_cache(), so use this only when you don't want to 279 279 * reflect the change to the suspend/resume state. 280 280 */ 281 - void snd_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short value) 281 + void snd_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short value) 282 282 { 283 283 if (!snd_ac97_valid_reg(ac97, reg)) 284 284 return; ··· 301 301 * 302 302 * Returns the read value. 303 303 */ 304 - unsigned short snd_ac97_read(ac97_t *ac97, unsigned short reg) 304 + unsigned short snd_ac97_read(struct snd_ac97 *ac97, unsigned short reg) 305 305 { 306 306 if (!snd_ac97_valid_reg(ac97, reg)) 307 307 return 0; ··· 309 309 } 310 310 311 311 /* read a register - return the cached value if already read */ 312 - static inline unsigned short snd_ac97_read_cache(ac97_t *ac97, unsigned short reg) 312 + static inline unsigned short snd_ac97_read_cache(struct snd_ac97 *ac97, unsigned short reg) 313 313 { 314 314 if (! test_bit(reg, ac97->reg_accessed)) { 315 315 ac97->regs[reg] = ac97->bus->ops->read(ac97, reg); ··· 328 328 * cache. The cached values are used for the cached-read and the 329 329 * suspend/resume. 330 330 */ 331 - void snd_ac97_write_cache(ac97_t *ac97, unsigned short reg, unsigned short value) 331 + void snd_ac97_write_cache(struct snd_ac97 *ac97, unsigned short reg, unsigned short value) 332 332 { 333 333 if (!snd_ac97_valid_reg(ac97, reg)) 334 334 return; ··· 351 351 * Returns 1 if the value is changed, 0 if no change, or a negative 352 352 * code on failure. 353 353 */ 354 - int snd_ac97_update(ac97_t *ac97, unsigned short reg, unsigned short value) 354 + int snd_ac97_update(struct snd_ac97 *ac97, unsigned short reg, unsigned short value) 355 355 { 356 356 int change; 357 357 ··· 381 381 * Returns 1 if the bits are changed, 0 if no change, or a negative 382 382 * code on failure. 383 383 */ 384 - int snd_ac97_update_bits(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value) 384 + int snd_ac97_update_bits(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value) 385 385 { 386 386 int change; 387 387 ··· 394 394 } 395 395 396 396 /* no lock version - see snd_ac97_updat_bits() */ 397 - int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg, 397 + int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, 398 398 unsigned short mask, unsigned short value) 399 399 { 400 400 int change; ··· 411 411 return change; 412 412 } 413 413 414 - static int snd_ac97_ad18xx_update_pcm_bits(ac97_t *ac97, int codec, unsigned short mask, unsigned short value) 414 + static int snd_ac97_ad18xx_update_pcm_bits(struct snd_ac97 *ac97, int codec, unsigned short mask, unsigned short value) 415 415 { 416 416 int change; 417 417 unsigned short old, new, cfg; ··· 443 443 * Controls 444 444 */ 445 445 446 - int snd_ac97_info_enum_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 446 + int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 447 447 { 448 448 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value; 449 449 ··· 457 457 return 0; 458 458 } 459 459 460 - int snd_ac97_get_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 460 + int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 461 461 { 462 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 462 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 463 463 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value; 464 464 unsigned short val, bitmask; 465 465 ··· 473 473 return 0; 474 474 } 475 475 476 - int snd_ac97_put_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 476 + int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 477 477 { 478 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 478 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 479 479 struct ac97_enum *e = (struct ac97_enum *)kcontrol->private_value; 480 480 unsigned short val; 481 481 unsigned short mask, bitmask; ··· 496 496 } 497 497 498 498 /* save/restore ac97 v2.3 paging */ 499 - static int snd_ac97_page_save(ac97_t *ac97, int reg, snd_kcontrol_t *kcontrol) 499 + static int snd_ac97_page_save(struct snd_ac97 *ac97, int reg, struct snd_kcontrol *kcontrol) 500 500 { 501 501 int page_save = -1; 502 502 if ((kcontrol->private_value & (1<<25)) && ··· 510 510 return page_save; 511 511 } 512 512 513 - static void snd_ac97_page_restore(ac97_t *ac97, int page_save) 513 + static void snd_ac97_page_restore(struct snd_ac97 *ac97, int page_save) 514 514 { 515 515 if (page_save >= 0) { 516 516 snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page_save); ··· 519 519 } 520 520 521 521 /* volume and switch controls */ 522 - int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 522 + int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 523 523 { 524 524 int mask = (kcontrol->private_value >> 16) & 0xff; 525 525 int shift = (kcontrol->private_value >> 8) & 0x0f; ··· 532 532 return 0; 533 533 } 534 534 535 - int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 535 + int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 536 536 { 537 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 537 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 538 538 int reg = kcontrol->private_value & 0xff; 539 539 int shift = (kcontrol->private_value >> 8) & 0x0f; 540 540 int rshift = (kcontrol->private_value >> 12) & 0x0f; ··· 555 555 return 0; 556 556 } 557 557 558 - int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 558 + int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 559 559 { 560 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 560 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 561 561 int reg = kcontrol->private_value & 0xff; 562 562 int shift = (kcontrol->private_value >> 8) & 0x0f; 563 563 int rshift = (kcontrol->private_value >> 12) & 0x0f; ··· 584 584 return err; 585 585 } 586 586 587 - static const snd_kcontrol_new_t snd_ac97_controls_master_mono[2] = { 587 + static const struct snd_kcontrol_new snd_ac97_controls_master_mono[2] = { 588 588 AC97_SINGLE("Master Mono Playback Switch", AC97_MASTER_MONO, 15, 1, 1), 589 589 AC97_SINGLE("Master Mono Playback Volume", AC97_MASTER_MONO, 0, 31, 1) 590 590 }; 591 591 592 - static const snd_kcontrol_new_t snd_ac97_controls_tone[2] = { 592 + static const struct snd_kcontrol_new snd_ac97_controls_tone[2] = { 593 593 AC97_SINGLE("Tone Control - Bass", AC97_MASTER_TONE, 8, 15, 1), 594 594 AC97_SINGLE("Tone Control - Treble", AC97_MASTER_TONE, 0, 15, 1) 595 595 }; 596 596 597 - static const snd_kcontrol_new_t snd_ac97_controls_pc_beep[2] = { 597 + static const struct snd_kcontrol_new snd_ac97_controls_pc_beep[2] = { 598 598 AC97_SINGLE("PC Speaker Playback Switch", AC97_PC_BEEP, 15, 1, 1), 599 599 AC97_SINGLE("PC Speaker Playback Volume", AC97_PC_BEEP, 1, 15, 1) 600 600 }; 601 601 602 - static const snd_kcontrol_new_t snd_ac97_controls_mic_boost = 602 + static const struct snd_kcontrol_new snd_ac97_controls_mic_boost = 603 603 AC97_SINGLE("Mic Boost (+20dB)", AC97_MIC, 6, 1, 0); 604 604 605 605 ··· 615 615 AC97_ENUM_SINGLE(AC97_GENERAL_PURPOSE, 8, 2, std_mic), 616 616 }; 617 617 618 - static const snd_kcontrol_new_t snd_ac97_control_capture_src = 618 + static const struct snd_kcontrol_new snd_ac97_control_capture_src = 619 619 AC97_ENUM("Capture Source", std_enum[0]); 620 620 621 - static const snd_kcontrol_new_t snd_ac97_control_capture_vol = 621 + static const struct snd_kcontrol_new snd_ac97_control_capture_vol = 622 622 AC97_DOUBLE("Capture Volume", AC97_REC_GAIN, 8, 0, 15, 0); 623 623 624 - static const snd_kcontrol_new_t snd_ac97_controls_mic_capture[2] = { 624 + static const struct snd_kcontrol_new snd_ac97_controls_mic_capture[2] = { 625 625 AC97_SINGLE("Mic Capture Switch", AC97_REC_GAIN_MIC, 15, 1, 1), 626 626 AC97_SINGLE("Mic Capture Volume", AC97_REC_GAIN_MIC, 0, 15, 0) 627 627 }; 628 628 629 - typedef enum { 629 + enum { 630 630 AC97_GENERAL_PCM_OUT = 0, 631 631 AC97_GENERAL_STEREO_ENHANCEMENT, 632 632 AC97_GENERAL_3D, ··· 634 634 AC97_GENERAL_MONO, 635 635 AC97_GENERAL_MIC, 636 636 AC97_GENERAL_LOOPBACK 637 - } ac97_general_index_t; 637 + }; 638 638 639 - static const snd_kcontrol_new_t snd_ac97_controls_general[7] = { 639 + static const struct snd_kcontrol_new snd_ac97_controls_general[7] = { 640 640 AC97_ENUM("PCM Out Path & Mute", std_enum[1]), 641 641 AC97_SINGLE("Simulated Stereo Enhancement", AC97_GENERAL_PURPOSE, 14, 1, 0), 642 642 AC97_SINGLE("3D Control - Switch", AC97_GENERAL_PURPOSE, 13, 1, 0), ··· 646 646 AC97_SINGLE("ADC/DAC Loopback", AC97_GENERAL_PURPOSE, 7, 1, 0) 647 647 }; 648 648 649 - const snd_kcontrol_new_t snd_ac97_controls_3d[2] = { 649 + const struct snd_kcontrol_new snd_ac97_controls_3d[2] = { 650 650 AC97_SINGLE("3D Control - Center", AC97_3D_CONTROL, 8, 15, 0), 651 651 AC97_SINGLE("3D Control - Depth", AC97_3D_CONTROL, 0, 15, 0) 652 652 }; 653 653 654 - static const snd_kcontrol_new_t snd_ac97_controls_center[2] = { 654 + static const struct snd_kcontrol_new snd_ac97_controls_center[2] = { 655 655 AC97_SINGLE("Center Playback Switch", AC97_CENTER_LFE_MASTER, 7, 1, 1), 656 656 AC97_SINGLE("Center Playback Volume", AC97_CENTER_LFE_MASTER, 0, 31, 1) 657 657 }; 658 658 659 - static const snd_kcontrol_new_t snd_ac97_controls_lfe[2] = { 659 + static const struct snd_kcontrol_new snd_ac97_controls_lfe[2] = { 660 660 AC97_SINGLE("LFE Playback Switch", AC97_CENTER_LFE_MASTER, 15, 1, 1), 661 661 AC97_SINGLE("LFE Playback Volume", AC97_CENTER_LFE_MASTER, 8, 31, 1) 662 662 }; 663 663 664 - static const snd_kcontrol_new_t snd_ac97_control_eapd = 664 + static const struct snd_kcontrol_new snd_ac97_control_eapd = 665 665 AC97_SINGLE("External Amplifier", AC97_POWERDOWN, 15, 1, 1); 666 666 667 - static const snd_kcontrol_new_t snd_ac97_controls_modem_switches[2] = { 667 + static const struct snd_kcontrol_new snd_ac97_controls_modem_switches[2] = { 668 668 AC97_SINGLE("Off-hook Switch", AC97_GPIO_STATUS, 0, 1, 0), 669 669 AC97_SINGLE("Caller ID Switch", AC97_GPIO_STATUS, 2, 1, 0) 670 670 }; 671 671 672 672 /* change the existing EAPD control as inverted */ 673 - static void set_inv_eapd(ac97_t *ac97, snd_kcontrol_t *kctl) 673 + static void set_inv_eapd(struct snd_ac97 *ac97, struct snd_kcontrol *kctl) 674 674 { 675 675 kctl->private_value = AC97_SINGLE_VALUE(AC97_POWERDOWN, 15, 1, 0); 676 676 snd_ac97_update_bits(ac97, AC97_POWERDOWN, (1<<15), (1<<15)); /* EAPD up */ 677 677 ac97->scaps |= AC97_SCAP_INV_EAPD; 678 678 } 679 679 680 - static int snd_ac97_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 680 + static int snd_ac97_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 681 681 { 682 682 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 683 683 uinfo->count = 1; 684 684 return 0; 685 685 } 686 686 687 - static int snd_ac97_spdif_cmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) 687 + static int snd_ac97_spdif_cmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 688 688 { 689 689 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL | 690 690 IEC958_AES0_NONAUDIO | ··· 696 696 return 0; 697 697 } 698 698 699 - static int snd_ac97_spdif_pmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) 699 + static int snd_ac97_spdif_pmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 700 700 { 701 701 /* FIXME: AC'97 spec doesn't say which bits are used for what */ 702 702 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL | ··· 706 706 return 0; 707 707 } 708 708 709 - static int snd_ac97_spdif_default_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) 709 + static int snd_ac97_spdif_default_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 710 710 { 711 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 711 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 712 712 713 713 down(&ac97->reg_mutex); 714 714 ucontrol->value.iec958.status[0] = ac97->spdif_status & 0xff; ··· 719 719 return 0; 720 720 } 721 721 722 - static int snd_ac97_spdif_default_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * ucontrol) 722 + static int snd_ac97_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 723 723 { 724 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 724 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 725 725 unsigned int new = 0; 726 726 unsigned short val = 0; 727 727 int change; ··· 787 787 return change; 788 788 } 789 789 790 - static int snd_ac97_put_spsa(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 790 + static int snd_ac97_put_spsa(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 791 791 { 792 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 792 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 793 793 int reg = kcontrol->private_value & 0xff; 794 794 int shift = (kcontrol->private_value >> 8) & 0xff; 795 795 int mask = (kcontrol->private_value >> 16) & 0xff; ··· 817 817 return change; 818 818 } 819 819 820 - const snd_kcontrol_new_t snd_ac97_controls_spdif[5] = { 820 + const struct snd_kcontrol_new snd_ac97_controls_spdif[5] = { 821 821 { 822 822 .access = SNDRV_CTL_ELEM_ACCESS_READ, 823 823 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ··· 856 856 .get = snd_ac97_ad18xx_pcm_get_bits, .put = snd_ac97_ad18xx_pcm_put_bits, \ 857 857 .private_value = (codec) | ((lshift) << 8) | ((rshift) << 12) | ((mask) << 16) } 858 858 859 - static int snd_ac97_ad18xx_pcm_info_bits(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 859 + static int snd_ac97_ad18xx_pcm_info_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 860 860 { 861 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 861 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 862 862 int mask = (kcontrol->private_value >> 16) & 0x0f; 863 863 int lshift = (kcontrol->private_value >> 8) & 0x0f; 864 864 int rshift = (kcontrol->private_value >> 12) & 0x0f; ··· 873 873 return 0; 874 874 } 875 875 876 - static int snd_ac97_ad18xx_pcm_get_bits(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 876 + static int snd_ac97_ad18xx_pcm_get_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 877 877 { 878 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 878 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 879 879 int codec = kcontrol->private_value & 3; 880 880 int lshift = (kcontrol->private_value >> 8) & 0x0f; 881 881 int rshift = (kcontrol->private_value >> 12) & 0x0f; ··· 887 887 return 0; 888 888 } 889 889 890 - static int snd_ac97_ad18xx_pcm_put_bits(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 890 + static int snd_ac97_ad18xx_pcm_put_bits(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 891 891 { 892 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 892 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 893 893 int codec = kcontrol->private_value & 3; 894 894 int lshift = (kcontrol->private_value >> 8) & 0x0f; 895 895 int rshift = (kcontrol->private_value >> 12) & 0x0f; ··· 910 910 .get = snd_ac97_ad18xx_pcm_get_volume, .put = snd_ac97_ad18xx_pcm_put_volume, \ 911 911 .private_value = codec } 912 912 913 - static int snd_ac97_ad18xx_pcm_info_volume(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 913 + static int snd_ac97_ad18xx_pcm_info_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 914 914 { 915 915 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 916 916 uinfo->count = 2; ··· 919 919 return 0; 920 920 } 921 921 922 - static int snd_ac97_ad18xx_pcm_get_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 922 + static int snd_ac97_ad18xx_pcm_get_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 923 923 { 924 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 924 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 925 925 int codec = kcontrol->private_value & 3; 926 926 927 927 down(&ac97->page_mutex); ··· 931 931 return 0; 932 932 } 933 933 934 - static int snd_ac97_ad18xx_pcm_put_volume(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 934 + static int snd_ac97_ad18xx_pcm_put_volume(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 935 935 { 936 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 936 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 937 937 int codec = kcontrol->private_value & 3; 938 938 unsigned short val1, val2; 939 939 ··· 942 942 return snd_ac97_ad18xx_update_pcm_bits(ac97, codec, 0x1f1f, (val1 << 8) | val2); 943 943 } 944 944 945 - static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_pcm[2] = { 945 + static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_pcm[2] = { 946 946 AD18XX_PCM_BITS("PCM Playback Switch", 0, 15, 7, 1), 947 947 AD18XX_PCM_VOLUME("PCM Playback Volume", 0) 948 948 }; 949 949 950 - static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_surround[2] = { 950 + static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_surround[2] = { 951 951 AD18XX_PCM_BITS("Surround Playback Switch", 1, 15, 7, 1), 952 952 AD18XX_PCM_VOLUME("Surround Playback Volume", 1) 953 953 }; 954 954 955 - static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_center[2] = { 955 + static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_center[2] = { 956 956 AD18XX_PCM_BITS("Center Playback Switch", 2, 15, 15, 1), 957 957 AD18XX_PCM_BITS("Center Playback Volume", 2, 8, 8, 31) 958 958 }; 959 959 960 - static const snd_kcontrol_new_t snd_ac97_controls_ad18xx_lfe[2] = { 960 + static const struct snd_kcontrol_new snd_ac97_controls_ad18xx_lfe[2] = { 961 961 AD18XX_PCM_BITS("LFE Playback Switch", 2, 7, 7, 1), 962 962 AD18XX_PCM_BITS("LFE Playback Volume", 2, 0, 0, 31) 963 963 }; ··· 966 966 * 967 967 */ 968 968 969 - static void snd_ac97_powerdown(ac97_t *ac97); 969 + static void snd_ac97_powerdown(struct snd_ac97 *ac97); 970 970 971 - static int snd_ac97_bus_free(ac97_bus_t *bus) 971 + static int snd_ac97_bus_free(struct snd_ac97_bus *bus) 972 972 { 973 973 if (bus) { 974 974 snd_ac97_bus_proc_done(bus); ··· 980 980 return 0; 981 981 } 982 982 983 - static int snd_ac97_bus_dev_free(snd_device_t *device) 983 + static int snd_ac97_bus_dev_free(struct snd_device *device) 984 984 { 985 - ac97_bus_t *bus = device->device_data; 985 + struct snd_ac97_bus *bus = device->device_data; 986 986 return snd_ac97_bus_free(bus); 987 987 } 988 988 989 - static int snd_ac97_free(ac97_t *ac97) 989 + static int snd_ac97_free(struct snd_ac97 *ac97) 990 990 { 991 991 if (ac97) { 992 992 snd_ac97_proc_done(ac97); ··· 999 999 return 0; 1000 1000 } 1001 1001 1002 - static int snd_ac97_dev_free(snd_device_t *device) 1002 + static int snd_ac97_dev_free(struct snd_device *device) 1003 1003 { 1004 - ac97_t *ac97 = device->device_data; 1004 + struct snd_ac97 *ac97 = device->device_data; 1005 1005 snd_ac97_powerdown(ac97); /* for avoiding click noises during shut down */ 1006 1006 return snd_ac97_free(ac97); 1007 1007 } 1008 1008 1009 - static int snd_ac97_try_volume_mix(ac97_t * ac97, int reg) 1009 + static int snd_ac97_try_volume_mix(struct snd_ac97 * ac97, int reg) 1010 1010 { 1011 1011 unsigned short val, mask = 0x8000; 1012 1012 ··· 1052 1052 /* try another test */ 1053 1053 snd_ac97_write_cache(ac97, reg, val | mask); 1054 1054 val = snd_ac97_read(ac97, reg); 1055 + val = snd_ac97_read(ac97, reg); 1055 1056 if (!(val & mask)) 1056 1057 return 0; /* nothing here */ 1057 1058 } 1058 1059 return 1; /* success, useable */ 1059 1060 } 1060 1061 1061 - static void check_volume_resolution(ac97_t *ac97, int reg, unsigned char *lo_max, unsigned char *hi_max) 1062 + static void check_volume_resolution(struct snd_ac97 *ac97, int reg, unsigned char *lo_max, unsigned char *hi_max) 1062 1063 { 1063 1064 unsigned short cbit[3] = { 0x20, 0x10, 0x01 }; 1064 1065 unsigned char max[3] = { 63, 31, 15 }; ··· 1084 1083 } 1085 1084 } 1086 1085 1087 - int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit) 1086 + int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit) 1088 1087 { 1089 1088 unsigned short mask, val, orig, res; 1090 1089 ··· 1098 1097 } 1099 1098 1100 1099 /* check the volume resolution of center/lfe */ 1101 - static void snd_ac97_change_volume_params2(ac97_t * ac97, int reg, int shift, unsigned char *max) 1100 + static void snd_ac97_change_volume_params2(struct snd_ac97 * ac97, int reg, int shift, unsigned char *max) 1102 1101 { 1103 1102 unsigned short val, val1; 1104 1103 ··· 1124 1123 return x; 1125 1124 } 1126 1125 1127 - snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97) 1126 + struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97) 1128 1127 { 1129 - snd_kcontrol_new_t template; 1128 + struct snd_kcontrol_new template; 1130 1129 memcpy(&template, _template, sizeof(template)); 1131 1130 template.index = ac97->num; 1132 1131 return snd_ctl_new1(&template, ac97); ··· 1135 1134 /* 1136 1135 * create mute switch(es) for normal stereo controls 1137 1136 */ 1138 - static int snd_ac97_cmute_new_stereo(snd_card_t *card, char *name, int reg, int check_stereo, ac97_t *ac97) 1137 + static int snd_ac97_cmute_new_stereo(struct snd_card *card, char *name, int reg, int check_stereo, struct snd_ac97 *ac97) 1139 1138 { 1140 - snd_kcontrol_t *kctl; 1139 + struct snd_kcontrol *kctl; 1141 1140 int err; 1142 1141 unsigned short val, val1, mute_mask; 1143 1142 ··· 1154 1153 mute_mask = 0x8080; 1155 1154 } 1156 1155 if (mute_mask == 0x8080) { 1157 - snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 15, 7, 1, 1); 1156 + struct snd_kcontrol_new tmp = AC97_DOUBLE(name, reg, 15, 7, 1, 1); 1158 1157 tmp.index = ac97->num; 1159 1158 kctl = snd_ctl_new1(&tmp, ac97); 1160 1159 } else { 1161 - snd_kcontrol_new_t tmp = AC97_SINGLE(name, reg, 15, 1, 1); 1160 + struct snd_kcontrol_new tmp = AC97_SINGLE(name, reg, 15, 1, 1); 1162 1161 tmp.index = ac97->num; 1163 1162 kctl = snd_ctl_new1(&tmp, ac97); 1164 1163 } ··· 1173 1172 /* 1174 1173 * create a volume for normal stereo/mono controls 1175 1174 */ 1176 - static int snd_ac97_cvol_new(snd_card_t *card, char *name, int reg, unsigned int lo_max, 1177 - unsigned int hi_max, ac97_t *ac97) 1175 + static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigned int lo_max, 1176 + unsigned int hi_max, struct snd_ac97 *ac97) 1178 1177 { 1179 1178 int err; 1180 - snd_kcontrol_t *kctl; 1179 + struct snd_kcontrol *kctl; 1181 1180 1182 1181 if (! snd_ac97_valid_reg(ac97, reg)) 1183 1182 return 0; 1184 1183 if (hi_max) { 1185 1184 /* invert */ 1186 - snd_kcontrol_new_t tmp = AC97_DOUBLE(name, reg, 8, 0, lo_max, 1); 1185 + struct snd_kcontrol_new tmp = AC97_DOUBLE(name, reg, 8, 0, lo_max, 1); 1187 1186 tmp.index = ac97->num; 1188 1187 kctl = snd_ctl_new1(&tmp, ac97); 1189 1188 } else { 1190 1189 /* invert */ 1191 - snd_kcontrol_new_t tmp = AC97_SINGLE(name, reg, 0, lo_max, 1); 1190 + struct snd_kcontrol_new tmp = AC97_SINGLE(name, reg, 0, lo_max, 1); 1192 1191 tmp.index = ac97->num; 1193 1192 kctl = snd_ctl_new1(&tmp, ac97); 1194 1193 } ··· 1204 1203 /* 1205 1204 * create a mute-switch and a volume for normal stereo/mono controls 1206 1205 */ 1207 - static int snd_ac97_cmix_new_stereo(snd_card_t *card, const char *pfx, int reg, int check_stereo, ac97_t *ac97) 1206 + static int snd_ac97_cmix_new_stereo(struct snd_card *card, const char *pfx, int reg, int check_stereo, struct snd_ac97 *ac97) 1208 1207 { 1209 1208 int err; 1210 1209 char name[44]; ··· 1230 1229 #define snd_ac97_cmix_new(card, pfx, reg, ac97) snd_ac97_cmix_new_stereo(card, pfx, reg, 0, ac97) 1231 1230 #define snd_ac97_cmute_new(card, name, reg, ac97) snd_ac97_cmute_new_stereo(card, name, reg, 0, ac97) 1232 1231 1233 - static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97); 1232 + static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97); 1234 1233 1235 - static int snd_ac97_mixer_build(ac97_t * ac97) 1234 + static int snd_ac97_mixer_build(struct snd_ac97 * ac97) 1236 1235 { 1237 - snd_card_t *card = ac97->bus->card; 1238 - snd_kcontrol_t *kctl; 1236 + struct snd_card *card = ac97->bus->card; 1237 + struct snd_kcontrol *kctl; 1239 1238 int err; 1240 1239 unsigned int idx; 1241 1240 unsigned char max; ··· 1532 1531 return 0; 1533 1532 } 1534 1533 1535 - static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97) 1534 + static int snd_ac97_modem_build(struct snd_card *card, struct snd_ac97 * ac97) 1536 1535 { 1537 1536 int err, idx; 1538 1537 ··· 1556 1555 return 0; 1557 1556 } 1558 1557 1559 - static int snd_ac97_test_rate(ac97_t *ac97, int reg, int shadow_reg, int rate) 1558 + static int snd_ac97_test_rate(struct snd_ac97 *ac97, int reg, int shadow_reg, int rate) 1560 1559 { 1561 1560 unsigned short val; 1562 1561 unsigned int tmp; ··· 1569 1568 return val == (tmp & 0xffff); 1570 1569 } 1571 1570 1572 - static void snd_ac97_determine_rates(ac97_t *ac97, int reg, int shadow_reg, unsigned int *r_result) 1571 + static void snd_ac97_determine_rates(struct snd_ac97 *ac97, int reg, int shadow_reg, unsigned int *r_result) 1573 1572 { 1574 1573 unsigned int result = 0; 1575 1574 unsigned short saved; ··· 1629 1628 } 1630 1629 1631 1630 /* check AC97_SPDIF register to accept which sample rates */ 1632 - static unsigned int snd_ac97_determine_spdif_rates(ac97_t *ac97) 1631 + static unsigned int snd_ac97_determine_spdif_rates(struct snd_ac97 *ac97) 1633 1632 { 1634 1633 unsigned int result = 0; 1635 1634 int i; ··· 1649 1648 } 1650 1649 1651 1650 /* look for the codec id table matching with the given id */ 1652 - static const ac97_codec_id_t *look_for_codec_id(const ac97_codec_id_t *table, 1653 - unsigned int id) 1651 + static const struct ac97_codec_id *look_for_codec_id(const struct ac97_codec_id *table, 1652 + unsigned int id) 1654 1653 { 1655 - const ac97_codec_id_t *pid; 1654 + const struct ac97_codec_id *pid; 1656 1655 1657 1656 for (pid = table; pid->id; pid++) 1658 1657 if (pid->id == (id & pid->mask)) ··· 1660 1659 return NULL; 1661 1660 } 1662 1661 1663 - void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name, int modem) 1662 + void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int modem) 1664 1663 { 1665 - const ac97_codec_id_t *pid; 1664 + const struct ac97_codec_id *pid; 1666 1665 1667 1666 sprintf(name, "0x%x %c%c%c", id, 1668 1667 printable(id >> 24), ··· 1700 1699 * 1701 1700 * Returns the short identifying name of the codec. 1702 1701 */ 1703 - const char *snd_ac97_get_short_name(ac97_t *ac97) 1702 + const char *snd_ac97_get_short_name(struct snd_ac97 *ac97) 1704 1703 { 1705 - const ac97_codec_id_t *pid; 1704 + const struct ac97_codec_id *pid; 1706 1705 1707 1706 for (pid = snd_ac97_codec_ids; pid->id; pid++) 1708 1707 if (pid->id == (ac97->id & pid->mask)) ··· 1714 1713 /* wait for a while until registers are accessible after RESET 1715 1714 * return 0 if ok, negative not ready 1716 1715 */ 1717 - static int ac97_reset_wait(ac97_t *ac97, int timeout, int with_modem) 1716 + static int ac97_reset_wait(struct snd_ac97 *ac97, int timeout, int with_modem) 1718 1717 { 1719 1718 unsigned long end_time; 1720 1719 unsigned short val; ··· 1759 1758 * @private_data: private data pointer for the new instance 1760 1759 * @rbus: the pointer to store the new AC97 bus instance. 1761 1760 * 1762 - * Creates an AC97 bus component. An ac97_bus_t instance is newly 1761 + * Creates an AC97 bus component. An struct snd_ac97_bus instance is newly 1763 1762 * allocated and initialized. 1764 1763 * 1765 1764 * The ops table must include valid callbacks (at least read and ··· 1773 1772 * 1774 1773 * Returns zero if successful, or a negative error code on failure. 1775 1774 */ 1776 - int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops, 1777 - void *private_data, ac97_bus_t **rbus) 1775 + int snd_ac97_bus(struct snd_card *card, int num, struct snd_ac97_bus_ops *ops, 1776 + void *private_data, struct snd_ac97_bus **rbus) 1778 1777 { 1779 1778 int err; 1780 - ac97_bus_t *bus; 1781 - static snd_device_ops_t dev_ops = { 1779 + struct snd_ac97_bus *bus; 1780 + static struct snd_device_ops dev_ops = { 1782 1781 .dev_free = snd_ac97_bus_dev_free, 1783 1782 }; 1784 1783 ··· 1808 1807 } 1809 1808 1810 1809 /* register ac97 codec to bus */ 1811 - static int snd_ac97_dev_register(snd_device_t *device) 1810 + static int snd_ac97_dev_register(struct snd_device *device) 1812 1811 { 1813 - ac97_t *ac97 = device->device_data; 1812 + struct snd_ac97 *ac97 = device->device_data; 1814 1813 int err; 1815 1814 1816 1815 ac97->dev.bus = &ac97_bus_type; ··· 1826 1825 } 1827 1826 1828 1827 /* unregister ac97 codec */ 1829 - static int snd_ac97_dev_unregister(snd_device_t *device) 1828 + static int snd_ac97_dev_unregister(struct snd_device *device) 1830 1829 { 1831 - ac97_t *ac97 = device->device_data; 1830 + struct snd_ac97 *ac97 = device->device_data; 1832 1831 if (ac97->dev.bus) 1833 1832 device_unregister(&ac97->dev); 1834 1833 return snd_ac97_free(ac97); ··· 1844 1843 * the private data. 1845 1844 * @rac97: the pointer to store the new ac97 instance. 1846 1845 * 1847 - * Creates an Codec97 component. An ac97_t instance is newly 1846 + * Creates an Codec97 component. An struct snd_ac97 instance is newly 1848 1847 * allocated and initialized from the template. The codec 1849 1848 * is then initialized by the standard procedure. 1850 1849 * ··· 1856 1855 * 1857 1856 * Returns zero if successful, or a negative error code on failure. 1858 1857 */ 1859 - int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97) 1858 + int snd_ac97_mixer(struct snd_ac97_bus *bus, struct snd_ac97_template *template, struct snd_ac97 **rac97) 1860 1859 { 1861 1860 int err; 1862 - ac97_t *ac97; 1863 - snd_card_t *card; 1861 + struct snd_ac97 *ac97; 1862 + struct snd_card *card; 1864 1863 char name[64]; 1865 1864 unsigned long end_time; 1866 1865 unsigned int reg; 1867 - const ac97_codec_id_t *pid; 1868 - static snd_device_ops_t ops = { 1866 + const struct ac97_codec_id *pid; 1867 + static struct snd_device_ops ops = { 1869 1868 .dev_free = snd_ac97_dev_free, 1870 1869 .dev_register = snd_ac97_dev_register, 1871 1870 .dev_unregister = snd_ac97_dev_unregister, ··· 2149 2148 * MASTER and HEADPHONE registers are muted but the register cache values 2150 2149 * are not changed, so that the values can be restored in snd_ac97_resume(). 2151 2150 */ 2152 - static void snd_ac97_powerdown(ac97_t *ac97) 2151 + static void snd_ac97_powerdown(struct snd_ac97 *ac97) 2153 2152 { 2154 2153 unsigned short power; 2155 2154 ··· 2182 2181 * 2183 2182 * Suspends the codec, power down the chip. 2184 2183 */ 2185 - void snd_ac97_suspend(ac97_t *ac97) 2184 + void snd_ac97_suspend(struct snd_ac97 *ac97) 2186 2185 { 2187 2186 if (ac97->build_ops->suspend) 2188 2187 ac97->build_ops->suspend(ac97); ··· 2192 2191 /* 2193 2192 * restore ac97 status 2194 2193 */ 2195 - void snd_ac97_restore_status(ac97_t *ac97) 2194 + void snd_ac97_restore_status(struct snd_ac97 *ac97) 2196 2195 { 2197 2196 int i; 2198 2197 ··· 2213 2212 /* 2214 2213 * restore IEC958 status 2215 2214 */ 2216 - void snd_ac97_restore_iec958(ac97_t *ac97) 2215 + void snd_ac97_restore_iec958(struct snd_ac97 *ac97) 2217 2216 { 2218 2217 if (ac97->ext_id & AC97_EI_SPDIF) { 2219 2218 if (ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_SPDIF) { ··· 2236 2235 * Do the standard resume procedure, power up and restoring the 2237 2236 * old register values. 2238 2237 */ 2239 - void snd_ac97_resume(ac97_t *ac97) 2238 + void snd_ac97_resume(struct snd_ac97 *ac97) 2240 2239 { 2241 2240 unsigned long end_time; 2242 2241 ··· 2302 2301 } 2303 2302 2304 2303 /* remove the control with the given name and optional suffix */ 2305 - int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix) 2304 + int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, const char *suffix) 2306 2305 { 2307 - snd_ctl_elem_id_t id; 2306 + struct snd_ctl_elem_id id; 2308 2307 memset(&id, 0, sizeof(id)); 2309 2308 set_ctl_name(id.name, name, suffix); 2310 2309 id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 2311 2310 return snd_ctl_remove_id(ac97->bus->card, &id); 2312 2311 } 2313 2312 2314 - static snd_kcontrol_t *ctl_find(ac97_t *ac97, const char *name, const char *suffix) 2313 + static struct snd_kcontrol *ctl_find(struct snd_ac97 *ac97, const char *name, const char *suffix) 2315 2314 { 2316 - snd_ctl_elem_id_t sid; 2315 + struct snd_ctl_elem_id sid; 2317 2316 memset(&sid, 0, sizeof(sid)); 2318 2317 set_ctl_name(sid.name, name, suffix); 2319 2318 sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; ··· 2321 2320 } 2322 2321 2323 2322 /* rename the control with the given name and optional suffix */ 2324 - int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix) 2323 + int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst, const char *suffix) 2325 2324 { 2326 - snd_kcontrol_t *kctl = ctl_find(ac97, src, suffix); 2325 + struct snd_kcontrol *kctl = ctl_find(ac97, src, suffix); 2327 2326 if (kctl) { 2328 2327 set_ctl_name(kctl->id.name, dst, suffix); 2329 2328 return 0; ··· 2332 2331 } 2333 2332 2334 2333 /* rename both Volume and Switch controls - don't check the return value */ 2335 - void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst) 2334 + void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, const char *dst) 2336 2335 { 2337 2336 snd_ac97_rename_ctl(ac97, src, dst, "Switch"); 2338 2337 snd_ac97_rename_ctl(ac97, src, dst, "Volume"); 2339 2338 } 2340 2339 2341 2340 /* swap controls */ 2342 - int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix) 2341 + int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, const char *s2, const char *suffix) 2343 2342 { 2344 - snd_kcontrol_t *kctl1, *kctl2; 2343 + struct snd_kcontrol *kctl1, *kctl2; 2345 2344 kctl1 = ctl_find(ac97, s1, suffix); 2346 2345 kctl2 = ctl_find(ac97, s2, suffix); 2347 2346 if (kctl1 && kctl2) { ··· 2354 2353 2355 2354 #if 1 2356 2355 /* bind hp and master controls instead of using only hp control */ 2357 - static int bind_hp_volsw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2356 + static int bind_hp_volsw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2358 2357 { 2359 2358 int err = snd_ac97_put_volsw(kcontrol, ucontrol); 2360 2359 if (err > 0) { ··· 2367 2366 } 2368 2367 2369 2368 /* ac97 tune: bind Master and Headphone controls */ 2370 - static int tune_hp_only(ac97_t *ac97) 2369 + static int tune_hp_only(struct snd_ac97 *ac97) 2371 2370 { 2372 - snd_kcontrol_t *msw = ctl_find(ac97, "Master Playback Switch", NULL); 2373 - snd_kcontrol_t *mvol = ctl_find(ac97, "Master Playback Volume", NULL); 2371 + struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL); 2372 + struct snd_kcontrol *mvol = ctl_find(ac97, "Master Playback Volume", NULL); 2374 2373 if (! msw || ! mvol) 2375 2374 return -ENOENT; 2376 2375 msw->put = bind_hp_volsw_put; ··· 2382 2381 2383 2382 #else 2384 2383 /* ac97 tune: use Headphone control as master */ 2385 - static int tune_hp_only(ac97_t *ac97) 2384 + static int tune_hp_only(struct snd_ac97 *ac97) 2386 2385 { 2387 2386 if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL) 2388 2387 return -ENOENT; ··· 2394 2393 #endif 2395 2394 2396 2395 /* ac97 tune: swap Headphone and Master controls */ 2397 - static int tune_swap_hp(ac97_t *ac97) 2396 + static int tune_swap_hp(struct snd_ac97 *ac97) 2398 2397 { 2399 2398 if (ctl_find(ac97, "Headphone Playback Switch", NULL) == NULL) 2400 2399 return -ENOENT; ··· 2404 2403 } 2405 2404 2406 2405 /* ac97 tune: swap Surround and Master controls */ 2407 - static int tune_swap_surround(ac97_t *ac97) 2406 + static int tune_swap_surround(struct snd_ac97 *ac97) 2408 2407 { 2409 2408 if (snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Switch") || 2410 2409 snd_ac97_swap_ctl(ac97, "Master Playback", "Surround Playback", "Volume")) ··· 2413 2412 } 2414 2413 2415 2414 /* ac97 tune: set up mic sharing for AD codecs */ 2416 - static int tune_ad_sharing(ac97_t *ac97) 2415 + static int tune_ad_sharing(struct snd_ac97 *ac97) 2417 2416 { 2418 2417 unsigned short scfg; 2419 2418 if ((ac97->id & 0xffffff00) != 0x41445300) { ··· 2426 2425 return 0; 2427 2426 } 2428 2427 2429 - static const snd_kcontrol_new_t snd_ac97_alc_jack_detect = 2428 + static const struct snd_kcontrol_new snd_ac97_alc_jack_detect = 2430 2429 AC97_SINGLE("Jack Detect", AC97_ALC650_CLOCK, 5, 1, 0); 2431 2430 2432 2431 /* ac97 tune: set up ALC jack-select */ 2433 - static int tune_alc_jack(ac97_t *ac97) 2432 + static int tune_alc_jack(struct snd_ac97 *ac97) 2434 2433 { 2435 2434 if ((ac97->id & 0xffffff00) != 0x414c4700) { 2436 2435 snd_printk(KERN_ERR "ac97_quirk ALC_JACK is only for Realtek codecs\n"); ··· 2442 2441 } 2443 2442 2444 2443 /* ac97 tune: inversed EAPD bit */ 2445 - static int tune_inv_eapd(ac97_t *ac97) 2444 + static int tune_inv_eapd(struct snd_ac97 *ac97) 2446 2445 { 2447 - snd_kcontrol_t *kctl = ctl_find(ac97, "External Amplifier", NULL); 2446 + struct snd_kcontrol *kctl = ctl_find(ac97, "External Amplifier", NULL); 2448 2447 if (! kctl) 2449 2448 return -ENOENT; 2450 2449 set_inv_eapd(ac97, kctl); 2451 2450 return 0; 2452 2451 } 2453 2452 2454 - static int master_mute_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2453 + static int master_mute_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2455 2454 { 2456 2455 int err = snd_ac97_put_volsw(kcontrol, ucontrol); 2457 2456 if (err > 0) { 2458 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2457 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2459 2458 int shift = (kcontrol->private_value >> 8) & 0x0f; 2460 2459 int rshift = (kcontrol->private_value >> 12) & 0x0f; 2461 2460 unsigned short mask; ··· 2471 2470 } 2472 2471 2473 2472 /* ac97 tune: EAPD controls mute LED bound with the master mute */ 2474 - static int tune_mute_led(ac97_t *ac97) 2473 + static int tune_mute_led(struct snd_ac97 *ac97) 2475 2474 { 2476 - snd_kcontrol_t *msw = ctl_find(ac97, "Master Playback Switch", NULL); 2475 + struct snd_kcontrol *msw = ctl_find(ac97, "Master Playback Switch", NULL); 2477 2476 if (! msw) 2478 2477 return -ENOENT; 2479 2478 msw->put = master_mute_sw_put; ··· 2484 2483 2485 2484 struct quirk_table { 2486 2485 const char *name; 2487 - int (*func)(ac97_t *); 2486 + int (*func)(struct snd_ac97 *); 2488 2487 }; 2489 2488 2490 2489 static struct quirk_table applicable_quirks[] = { ··· 2499 2498 }; 2500 2499 2501 2500 /* apply the quirk with the given type */ 2502 - static int apply_quirk(ac97_t *ac97, int type) 2501 + static int apply_quirk(struct snd_ac97 *ac97, int type) 2503 2502 { 2504 2503 if (type <= 0) 2505 2504 return 0; ··· 2511 2510 } 2512 2511 2513 2512 /* apply the quirk with the given name */ 2514 - static int apply_quirk_str(ac97_t *ac97, const char *typestr) 2513 + static int apply_quirk_str(struct snd_ac97 *ac97, const char *typestr) 2515 2514 { 2516 2515 int i; 2517 2516 struct quirk_table *q; ··· 2540 2539 * Returns zero if successful, or a negative error code on failure. 2541 2540 */ 2542 2541 2543 - int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk, const char *override) 2542 + int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override) 2544 2543 { 2545 2544 int result; 2546 2545
+23 -22
sound/pci/ac97/ac97_local.h
··· 37 37 .get = snd_ac97_get_volsw, .put = snd_ac97_put_volsw, \ 38 38 .private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) | ((mask) << 16) | ((invert) << 24) } 39 39 40 + /* enum control */ 40 41 struct ac97_enum { 41 42 unsigned char reg; 42 43 unsigned char shift_l; ··· 58 57 59 58 /* ac97_codec.c */ 60 59 extern const char *snd_ac97_stereo_enhancements[]; 61 - extern const snd_kcontrol_new_t snd_ac97_controls_3d[]; 62 - extern const snd_kcontrol_new_t snd_ac97_controls_spdif[]; 63 - snd_kcontrol_t *snd_ac97_cnew(const snd_kcontrol_new_t *_template, ac97_t * ac97); 64 - void snd_ac97_get_name(ac97_t *ac97, unsigned int id, char *name, int modem); 65 - int snd_ac97_info_volsw(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); 66 - int snd_ac97_get_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 67 - int snd_ac97_put_volsw(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 68 - int snd_ac97_try_bit(ac97_t * ac97, int reg, int bit); 69 - int snd_ac97_remove_ctl(ac97_t *ac97, const char *name, const char *suffix); 70 - int snd_ac97_rename_ctl(ac97_t *ac97, const char *src, const char *dst, const char *suffix); 71 - int snd_ac97_swap_ctl(ac97_t *ac97, const char *s1, const char *s2, const char *suffix); 72 - void snd_ac97_rename_vol_ctl(ac97_t *ac97, const char *src, const char *dst); 73 - void snd_ac97_restore_status(ac97_t *ac97); 74 - void snd_ac97_restore_iec958(ac97_t *ac97); 75 - int snd_ac97_info_enum_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo); 76 - int snd_ac97_get_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 77 - int snd_ac97_put_enum_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol); 60 + extern const struct snd_kcontrol_new snd_ac97_controls_3d[]; 61 + extern const struct snd_kcontrol_new snd_ac97_controls_spdif[]; 62 + struct snd_kcontrol *snd_ac97_cnew(const struct snd_kcontrol_new *_template, struct snd_ac97 * ac97); 63 + void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int modem); 64 + int snd_ac97_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); 65 + int snd_ac97_get_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 66 + int snd_ac97_put_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 67 + int snd_ac97_try_bit(struct snd_ac97 * ac97, int reg, int bit); 68 + int snd_ac97_remove_ctl(struct snd_ac97 *ac97, const char *name, const char *suffix); 69 + int snd_ac97_rename_ctl(struct snd_ac97 *ac97, const char *src, const char *dst, const char *suffix); 70 + int snd_ac97_swap_ctl(struct snd_ac97 *ac97, const char *s1, const char *s2, const char *suffix); 71 + void snd_ac97_rename_vol_ctl(struct snd_ac97 *ac97, const char *src, const char *dst); 72 + void snd_ac97_restore_status(struct snd_ac97 *ac97); 73 + void snd_ac97_restore_iec958(struct snd_ac97 *ac97); 74 + int snd_ac97_info_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); 75 + int snd_ac97_get_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 76 + int snd_ac97_put_enum_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); 78 77 79 - int snd_ac97_update_bits_nolock(ac97_t *ac97, unsigned short reg, 78 + int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, 80 79 unsigned short mask, unsigned short value); 81 80 82 81 /* ac97_proc.c */ 83 82 #ifdef CONFIG_PROC_FS 84 - void snd_ac97_bus_proc_init(ac97_bus_t * ac97); 85 - void snd_ac97_bus_proc_done(ac97_bus_t * ac97); 86 - void snd_ac97_proc_init(ac97_t * ac97); 87 - void snd_ac97_proc_done(ac97_t * ac97); 83 + void snd_ac97_bus_proc_init(struct snd_ac97_bus * ac97); 84 + void snd_ac97_bus_proc_done(struct snd_ac97_bus * ac97); 85 + void snd_ac97_proc_init(struct snd_ac97 * ac97); 86 + void snd_ac97_proc_done(struct snd_ac97 * ac97); 88 87 #else 89 88 #define snd_ac97_bus_proc_init(ac97_bus_t) do { } while (0) 90 89 #define snd_ac97_bus_proc_done(ac97_bus_t) do { } while (0)
+204 -204
sound/pci/ac97/ac97_patch.c
··· 39 39 * Chip specific initialization 40 40 */ 41 41 42 - static int patch_build_controls(ac97_t * ac97, const snd_kcontrol_new_t *controls, int count) 42 + static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, int count) 43 43 { 44 44 int idx, err; 45 45 ··· 50 50 } 51 51 52 52 /* set to the page, update bits and restore the page */ 53 - static int ac97_update_bits_page(ac97_t *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page) 53 + static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value, unsigned short page) 54 54 { 55 55 unsigned short page_save; 56 56 int ret; ··· 67 67 /* 68 68 * shared line-in/mic controls 69 69 */ 70 - static int ac97_enum_text_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo, 70 + static int ac97_enum_text_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo, 71 71 const char **texts, unsigned int nums) 72 72 { 73 73 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; ··· 79 79 return 0; 80 80 } 81 81 82 - static int ac97_surround_jack_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 82 + static int ac97_surround_jack_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 83 83 { 84 84 static const char *texts[] = { "Shared", "Independent" }; 85 85 return ac97_enum_text_info(kcontrol, uinfo, texts, 2); 86 86 } 87 87 88 - static int ac97_surround_jack_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 88 + static int ac97_surround_jack_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 89 89 { 90 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 90 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 91 91 92 92 ucontrol->value.enumerated.item[0] = ac97->indep_surround; 93 93 return 0; 94 94 } 95 95 96 - static int ac97_surround_jack_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 96 + static int ac97_surround_jack_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 97 97 { 98 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 98 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 99 99 unsigned char indep = !!ucontrol->value.enumerated.item[0]; 100 100 101 101 if (indep != ac97->indep_surround) { ··· 107 107 return 0; 108 108 } 109 109 110 - static int ac97_channel_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 110 + static int ac97_channel_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 111 111 { 112 112 static const char *texts[] = { "2ch", "4ch", "6ch" }; 113 113 if (kcontrol->private_value) ··· 115 115 return ac97_enum_text_info(kcontrol, uinfo, texts, 3); 116 116 } 117 117 118 - static int ac97_channel_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 118 + static int ac97_channel_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 119 119 { 120 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 120 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 121 121 122 122 ucontrol->value.enumerated.item[0] = ac97->channel_mode; 123 123 return 0; 124 124 } 125 125 126 - static int ac97_channel_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 126 + static int ac97_channel_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 127 127 { 128 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 128 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 129 129 unsigned char mode = ucontrol->value.enumerated.item[0]; 130 130 131 131 if (mode != ac97->channel_mode) { ··· 163 163 .private_value = 1, \ 164 164 } 165 165 166 - static inline int is_surround_on(ac97_t *ac97) 166 + static inline int is_surround_on(struct snd_ac97 *ac97) 167 167 { 168 168 return ac97->channel_mode >= 1; 169 169 } 170 170 171 - static inline int is_clfe_on(ac97_t *ac97) 171 + static inline int is_clfe_on(struct snd_ac97 *ac97) 172 172 { 173 173 return ac97->channel_mode >= 2; 174 174 } 175 175 176 - static inline int is_shared_linein(ac97_t *ac97) 176 + static inline int is_shared_linein(struct snd_ac97 *ac97) 177 177 { 178 178 return ! ac97->indep_surround && is_surround_on(ac97); 179 179 } 180 180 181 - static inline int is_shared_micin(ac97_t *ac97) 181 + static inline int is_shared_micin(struct snd_ac97 *ac97) 182 182 { 183 183 return ! ac97->indep_surround && is_clfe_on(ac97); 184 184 } ··· 187 187 /* The following snd_ac97_ymf753_... items added by David Shust (dshust@shustring.com) */ 188 188 189 189 /* It is possible to indicate to the Yamaha YMF753 the type of speakers being used. */ 190 - static int snd_ac97_ymf753_info_speaker(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 190 + static int snd_ac97_ymf753_info_speaker(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 191 191 { 192 192 static char *texts[3] = { 193 193 "Standard", "Small", "Smaller" ··· 202 202 return 0; 203 203 } 204 204 205 - static int snd_ac97_ymf753_get_speaker(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 205 + static int snd_ac97_ymf753_get_speaker(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 206 206 { 207 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 207 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 208 208 unsigned short val; 209 209 210 210 val = ac97->regs[AC97_YMF753_3D_MODE_SEL]; ··· 215 215 return 0; 216 216 } 217 217 218 - static int snd_ac97_ymf753_put_speaker(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 218 + static int snd_ac97_ymf753_put_speaker(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 219 219 { 220 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 220 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 221 221 unsigned short val; 222 222 223 223 if (ucontrol->value.enumerated.item[0] > 2) ··· 226 226 return snd_ac97_update(ac97, AC97_YMF753_3D_MODE_SEL, val); 227 227 } 228 228 229 - static const snd_kcontrol_new_t snd_ac97_ymf753_controls_speaker = 229 + static const struct snd_kcontrol_new snd_ac97_ymf753_controls_speaker = 230 230 { 231 231 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 232 232 .name = "3D Control - Speaker", ··· 236 236 }; 237 237 238 238 /* It is possible to indicate to the Yamaha YMF753 the source to direct to the S/PDIF output. */ 239 - static int snd_ac97_ymf753_spdif_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 239 + static int snd_ac97_ymf753_spdif_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 240 240 { 241 241 static char *texts[2] = { "AC-Link", "A/D Converter" }; 242 242 ··· 249 249 return 0; 250 250 } 251 251 252 - static int snd_ac97_ymf753_spdif_source_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 252 + static int snd_ac97_ymf753_spdif_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 253 253 { 254 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 254 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 255 255 unsigned short val; 256 256 257 257 val = ac97->regs[AC97_YMF753_DIT_CTRL2]; ··· 259 259 return 0; 260 260 } 261 261 262 - static int snd_ac97_ymf753_spdif_source_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 262 + static int snd_ac97_ymf753_spdif_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 263 263 { 264 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 264 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 265 265 unsigned short val; 266 266 267 267 if (ucontrol->value.enumerated.item[0] > 1) ··· 274 274 The YMF753 will output the S/PDIF signal to pin 43, 47 (EAPD), or 48. 275 275 By default, no output pin is selected, and the S/PDIF signal is not output. 276 276 There is also a bit to mute S/PDIF output in a vendor-specific register. */ 277 - static int snd_ac97_ymf753_spdif_output_pin_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 277 + static int snd_ac97_ymf753_spdif_output_pin_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 278 278 { 279 279 static char *texts[3] = { "Disabled", "Pin 43", "Pin 48" }; 280 280 ··· 287 287 return 0; 288 288 } 289 289 290 - static int snd_ac97_ymf753_spdif_output_pin_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 290 + static int snd_ac97_ymf753_spdif_output_pin_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 291 291 { 292 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 292 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 293 293 unsigned short val; 294 294 295 295 val = ac97->regs[AC97_YMF753_DIT_CTRL2]; ··· 297 297 return 0; 298 298 } 299 299 300 - static int snd_ac97_ymf753_spdif_output_pin_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 300 + static int snd_ac97_ymf753_spdif_output_pin_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 301 301 { 302 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 302 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 303 303 unsigned short val; 304 304 305 305 if (ucontrol->value.enumerated.item[0] > 2) ··· 311 311 snd_ac97_write_cache(ac97, 0x62, snd_ac97_read(ac97, 0x62) | 0x0008); */ 312 312 } 313 313 314 - static const snd_kcontrol_new_t snd_ac97_ymf753_controls_spdif[3] = { 314 + static const struct snd_kcontrol_new snd_ac97_ymf753_controls_spdif[3] = { 315 315 { 316 316 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 317 317 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source", ··· 329 329 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",NONE,NONE) "Mute", AC97_YMF753_DIT_CTRL2, 2, 1, 1) 330 330 }; 331 331 332 - static int patch_yamaha_ymf753_3d(ac97_t * ac97) 332 + static int patch_yamaha_ymf753_3d(struct snd_ac97 * ac97) 333 333 { 334 - snd_kcontrol_t *kctl; 334 + struct snd_kcontrol *kctl; 335 335 int err; 336 336 337 337 if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) ··· 345 345 return 0; 346 346 } 347 347 348 - static int patch_yamaha_ymf753_post_spdif(ac97_t * ac97) 348 + static int patch_yamaha_ymf753_post_spdif(struct snd_ac97 * ac97) 349 349 { 350 350 int err; 351 351 ··· 359 359 .build_post_spdif = patch_yamaha_ymf753_post_spdif 360 360 }; 361 361 362 - int patch_yamaha_ymf753(ac97_t * ac97) 362 + int patch_yamaha_ymf753(struct snd_ac97 * ac97) 363 363 { 364 364 /* Patch for Yamaha YMF753, Copyright (c) by David Shust, dshust@shustring.com. 365 365 This chip has nonstandard and extended behaviour with regard to its S/PDIF output. ··· 380 380 * added support for WM9705,WM9708,WM9709,WM9710,WM9711,WM9712 and WM9717. 381 381 */ 382 382 383 - static const snd_kcontrol_new_t wm97xx_snd_ac97_controls[] = { 383 + static const struct snd_kcontrol_new wm97xx_snd_ac97_controls[] = { 384 384 AC97_DOUBLE("Front Playback Volume", AC97_WM97XX_FMIXER_VOL, 8, 0, 31, 1), 385 385 AC97_SINGLE("Front Playback Switch", AC97_WM97XX_FMIXER_VOL, 15, 1, 1), 386 386 }; 387 387 388 - static int patch_wolfson_wm9703_specific(ac97_t * ac97) 388 + static int patch_wolfson_wm9703_specific(struct snd_ac97 * ac97) 389 389 { 390 390 /* This is known to work for the ViewSonic ViewPad 1000 391 391 * Randolph Bentson <bentson@holmsjoen.com> ··· 405 405 .build_specific = patch_wolfson_wm9703_specific, 406 406 }; 407 407 408 - int patch_wolfson03(ac97_t * ac97) 408 + int patch_wolfson03(struct snd_ac97 * ac97) 409 409 { 410 410 ac97->build_ops = &patch_wolfson_wm9703_ops; 411 411 return 0; 412 412 } 413 413 414 - static const snd_kcontrol_new_t wm9704_snd_ac97_controls[] = { 414 + static const struct snd_kcontrol_new wm9704_snd_ac97_controls[] = { 415 415 AC97_DOUBLE("Front Playback Volume", AC97_WM97XX_FMIXER_VOL, 8, 0, 31, 1), 416 416 AC97_SINGLE("Front Playback Switch", AC97_WM97XX_FMIXER_VOL, 15, 1, 1), 417 417 AC97_DOUBLE("Rear Playback Volume", AC97_WM9704_RMIXER_VOL, 8, 0, 31, 1), ··· 420 420 AC97_DOUBLE("Surround Volume", AC97_SURROUND_MASTER, 8, 0, 31, 1), 421 421 }; 422 422 423 - static int patch_wolfson_wm9704_specific(ac97_t * ac97) 423 + static int patch_wolfson_wm9704_specific(struct snd_ac97 * ac97) 424 424 { 425 425 int err, i; 426 426 for (i = 0; i < ARRAY_SIZE(wm9704_snd_ac97_controls); i++) { ··· 436 436 .build_specific = patch_wolfson_wm9704_specific, 437 437 }; 438 438 439 - int patch_wolfson04(ac97_t * ac97) 439 + int patch_wolfson04(struct snd_ac97 * ac97) 440 440 { 441 441 /* WM9704M/9704Q */ 442 442 ac97->build_ops = &patch_wolfson_wm9704_ops; 443 443 return 0; 444 444 } 445 445 446 - static int patch_wolfson_wm9705_specific(ac97_t * ac97) 446 + static int patch_wolfson_wm9705_specific(struct snd_ac97 * ac97) 447 447 { 448 448 int err, i; 449 449 for (i = 0; i < ARRAY_SIZE(wm97xx_snd_ac97_controls); i++) { ··· 458 458 .build_specific = patch_wolfson_wm9705_specific, 459 459 }; 460 460 461 - int patch_wolfson05(ac97_t * ac97) 461 + int patch_wolfson05(struct snd_ac97 * ac97) 462 462 { 463 463 /* WM9705, WM9710 */ 464 464 ac97->build_ops = &patch_wolfson_wm9705_ops; ··· 490 490 AC97_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9711_ng_type), 491 491 }; 492 492 493 - static const snd_kcontrol_new_t wm9711_snd_ac97_controls[] = { 493 + static const struct snd_kcontrol_new wm9711_snd_ac97_controls[] = { 494 494 AC97_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0), 495 495 AC97_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0), 496 496 AC97_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0), ··· 568 568 AC97_SINGLE("Mono ZC Switch", AC97_MASTER_MONO, 7, 1, 0), 569 569 }; 570 570 571 - static int patch_wolfson_wm9711_specific(ac97_t * ac97) 571 + static int patch_wolfson_wm9711_specific(struct snd_ac97 * ac97) 572 572 { 573 573 int err, i; 574 574 ··· 589 589 .build_specific = patch_wolfson_wm9711_specific, 590 590 }; 591 591 592 - int patch_wolfson11(ac97_t * ac97) 592 + int patch_wolfson11(struct snd_ac97 * ac97) 593 593 { 594 594 /* WM9711, WM9712 */ 595 595 ac97->build_ops = &patch_wolfson_wm9711_ops; ··· 636 636 AC97_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9713_ng_type), 637 637 }; 638 638 639 - static const snd_kcontrol_new_t wm13_snd_ac97_controls[] = { 639 + static const struct snd_kcontrol_new wm13_snd_ac97_controls[] = { 640 640 AC97_DOUBLE("Line In Volume", AC97_PC_BEEP, 8, 0, 31, 1), 641 641 AC97_SINGLE("Line In to Headphone Switch", AC97_PC_BEEP, 15, 1, 1), 642 642 AC97_SINGLE("Line In to Master Switch", AC97_PC_BEEP, 14, 1, 1), ··· 728 728 AC97_SINGLE("Tone Volume", AC97_GENERAL_PURPOSE, 0, 15, 1), 729 729 }; 730 730 731 - static const snd_kcontrol_new_t wm13_snd_ac97_controls_3d[] = { 731 + static const struct snd_kcontrol_new wm13_snd_ac97_controls_3d[] = { 732 732 AC97_ENUM("Inv Input Mux", wm9713_enum[11]), 733 733 AC97_SINGLE("3D Upper Cut-off Switch", AC97_REC_GAIN_MIC, 5, 1, 0), 734 734 AC97_SINGLE("3D Lower Cut-off Switch", AC97_REC_GAIN_MIC, 4, 1, 0), 735 735 AC97_SINGLE("3D Depth", AC97_REC_GAIN_MIC, 0, 15, 1), 736 736 }; 737 737 738 - static int patch_wolfson_wm9713_3d (ac97_t * ac97) 738 + static int patch_wolfson_wm9713_3d (struct snd_ac97 * ac97) 739 739 { 740 740 int err, i; 741 741 ··· 746 746 return 0; 747 747 } 748 748 749 - static int patch_wolfson_wm9713_specific(ac97_t * ac97) 749 + static int patch_wolfson_wm9713_specific(struct snd_ac97 * ac97) 750 750 { 751 751 int err, i; 752 752 ··· 765 765 } 766 766 767 767 #ifdef CONFIG_PM 768 - static void patch_wolfson_wm9713_suspend (ac97_t * ac97) 768 + static void patch_wolfson_wm9713_suspend (struct snd_ac97 * ac97) 769 769 { 770 770 snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xfeff); 771 771 snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0xffff); 772 772 } 773 773 774 - static void patch_wolfson_wm9713_resume (ac97_t * ac97) 774 + static void patch_wolfson_wm9713_resume (struct snd_ac97 * ac97) 775 775 { 776 776 snd_ac97_write_cache(ac97, AC97_EXTENDED_MID, 0xda00); 777 777 snd_ac97_write_cache(ac97, AC97_EXTENDED_MSTATUS, 0x3810); ··· 788 788 #endif 789 789 }; 790 790 791 - int patch_wolfson13(ac97_t * ac97) 791 + int patch_wolfson13(struct snd_ac97 * ac97) 792 792 { 793 793 /* WM9713, WM9714 */ 794 794 ac97->build_ops = &patch_wolfson_wm9713_ops; ··· 808 808 /* 809 809 * Tritech codec 810 810 */ 811 - int patch_tritech_tr28028(ac97_t * ac97) 811 + int patch_tritech_tr28028(struct snd_ac97 * ac97) 812 812 { 813 813 snd_ac97_write_cache(ac97, 0x26, 0x0300); 814 814 snd_ac97_write_cache(ac97, 0x26, 0x0000); ··· 820 820 /* 821 821 * Sigmatel STAC97xx codecs 822 822 */ 823 - static int patch_sigmatel_stac9700_3d(ac97_t * ac97) 823 + static int patch_sigmatel_stac9700_3d(struct snd_ac97 * ac97) 824 824 { 825 - snd_kcontrol_t *kctl; 825 + struct snd_kcontrol *kctl; 826 826 int err; 827 827 828 828 if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) ··· 833 833 return 0; 834 834 } 835 835 836 - static int patch_sigmatel_stac9708_3d(ac97_t * ac97) 836 + static int patch_sigmatel_stac9708_3d(struct snd_ac97 * ac97) 837 837 { 838 - snd_kcontrol_t *kctl; 838 + struct snd_kcontrol *kctl; 839 839 int err; 840 840 841 841 if ((err = snd_ctl_add(ac97->bus->card, kctl = snd_ac97_cnew(&snd_ac97_controls_3d[0], ac97))) < 0) ··· 850 850 return 0; 851 851 } 852 852 853 - static const snd_kcontrol_new_t snd_ac97_sigmatel_4speaker = 853 + static const struct snd_kcontrol_new snd_ac97_sigmatel_4speaker = 854 854 AC97_SINGLE("Sigmatel 4-Speaker Stereo Playback Switch", AC97_SIGMATEL_DAC2INVERT, 2, 1, 0); 855 855 856 - static const snd_kcontrol_new_t snd_ac97_sigmatel_phaseinvert = 856 + static const struct snd_kcontrol_new snd_ac97_sigmatel_phaseinvert = 857 857 AC97_SINGLE("Sigmatel Surround Phase Inversion Playback Switch", AC97_SIGMATEL_DAC2INVERT, 3, 1, 0); 858 858 859 - static const snd_kcontrol_new_t snd_ac97_sigmatel_controls[] = { 859 + static const struct snd_kcontrol_new snd_ac97_sigmatel_controls[] = { 860 860 AC97_SINGLE("Sigmatel DAC 6dB Attenuate", AC97_SIGMATEL_ANALOG, 1, 1, 0), 861 861 AC97_SINGLE("Sigmatel ADC 6dB Attenuate", AC97_SIGMATEL_ANALOG, 0, 1, 0) 862 862 }; 863 863 864 - static int patch_sigmatel_stac97xx_specific(ac97_t * ac97) 864 + static int patch_sigmatel_stac97xx_specific(struct snd_ac97 * ac97) 865 865 { 866 866 int err; 867 867 ··· 886 886 .build_specific = patch_sigmatel_stac97xx_specific 887 887 }; 888 888 889 - int patch_sigmatel_stac9700(ac97_t * ac97) 889 + int patch_sigmatel_stac9700(struct snd_ac97 * ac97) 890 890 { 891 891 ac97->build_ops = &patch_sigmatel_stac9700_ops; 892 892 return 0; 893 893 } 894 894 895 - static int snd_ac97_stac9708_put_bias(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 895 + static int snd_ac97_stac9708_put_bias(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 896 896 { 897 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 897 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 898 898 int err; 899 899 900 900 down(&ac97->page_mutex); ··· 906 906 return err; 907 907 } 908 908 909 - static const snd_kcontrol_new_t snd_ac97_stac9708_bias_control = { 909 + static const struct snd_kcontrol_new snd_ac97_stac9708_bias_control = { 910 910 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 911 911 .name = "Sigmatel Output Bias Switch", 912 912 .info = snd_ac97_info_volsw, ··· 915 915 .private_value = AC97_SINGLE_VALUE(AC97_SIGMATEL_BIAS2, 4, 1, 0), 916 916 }; 917 917 918 - static int patch_sigmatel_stac9708_specific(ac97_t *ac97) 918 + static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97) 919 919 { 920 920 int err; 921 921 ··· 930 930 .build_specific = patch_sigmatel_stac9708_specific 931 931 }; 932 932 933 - int patch_sigmatel_stac9708(ac97_t * ac97) 933 + int patch_sigmatel_stac9708(struct snd_ac97 * ac97) 934 934 { 935 935 unsigned int codec72, codec6c; 936 936 ··· 956 956 return 0; 957 957 } 958 958 959 - int patch_sigmatel_stac9721(ac97_t * ac97) 959 + int patch_sigmatel_stac9721(struct snd_ac97 * ac97) 960 960 { 961 961 ac97->build_ops = &patch_sigmatel_stac9700_ops; 962 962 if (snd_ac97_read(ac97, AC97_SIGMATEL_ANALOG) == 0) { ··· 970 970 return 0; 971 971 } 972 972 973 - int patch_sigmatel_stac9744(ac97_t * ac97) 973 + int patch_sigmatel_stac9744(struct snd_ac97 * ac97) 974 974 { 975 975 // patch for SigmaTel 976 976 ac97->build_ops = &patch_sigmatel_stac9700_ops; ··· 982 982 return 0; 983 983 } 984 984 985 - int patch_sigmatel_stac9756(ac97_t * ac97) 985 + int patch_sigmatel_stac9756(struct snd_ac97 * ac97) 986 986 { 987 987 // patch for SigmaTel 988 988 ac97->build_ops = &patch_sigmatel_stac9700_ops; ··· 994 994 return 0; 995 995 } 996 996 997 - static int snd_ac97_stac9758_output_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 997 + static int snd_ac97_stac9758_output_jack_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 998 998 { 999 999 static char *texts[5] = { "Input/Disabled", "Front Output", 1000 1000 "Rear Output", "Center/LFE Output", "Mixer Output" }; ··· 1008 1008 return 0; 1009 1009 } 1010 1010 1011 - static int snd_ac97_stac9758_output_jack_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol) 1011 + static int snd_ac97_stac9758_output_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1012 1012 { 1013 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1013 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1014 1014 int shift = kcontrol->private_value; 1015 1015 unsigned short val; 1016 1016 ··· 1022 1022 return 0; 1023 1023 } 1024 1024 1025 - static int snd_ac97_stac9758_output_jack_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1025 + static int snd_ac97_stac9758_output_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1026 1026 { 1027 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1027 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1028 1028 int shift = kcontrol->private_value; 1029 1029 unsigned short val; 1030 1030 ··· 1038 1038 7 << shift, val << shift, 0); 1039 1039 } 1040 1040 1041 - static int snd_ac97_stac9758_input_jack_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1041 + static int snd_ac97_stac9758_input_jack_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1042 1042 { 1043 1043 static char *texts[7] = { "Mic2 Jack", "Mic1 Jack", "Line In Jack", 1044 1044 "Front Jack", "Rear Jack", "Center/LFE Jack", "Mute" }; ··· 1052 1052 return 0; 1053 1053 } 1054 1054 1055 - static int snd_ac97_stac9758_input_jack_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol) 1055 + static int snd_ac97_stac9758_input_jack_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1056 1056 { 1057 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1057 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1058 1058 int shift = kcontrol->private_value; 1059 1059 unsigned short val; 1060 1060 ··· 1063 1063 return 0; 1064 1064 } 1065 1065 1066 - static int snd_ac97_stac9758_input_jack_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1066 + static int snd_ac97_stac9758_input_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1067 1067 { 1068 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1068 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1069 1069 int shift = kcontrol->private_value; 1070 1070 1071 1071 return ac97_update_bits_page(ac97, AC97_SIGMATEL_INSEL, 7 << shift, 1072 1072 ucontrol->value.enumerated.item[0] << shift, 0); 1073 1073 } 1074 1074 1075 - static int snd_ac97_stac9758_phonesel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1075 + static int snd_ac97_stac9758_phonesel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1076 1076 { 1077 1077 static char *texts[3] = { "None", "Front Jack", "Rear Jack" }; 1078 1078 ··· 1085 1085 return 0; 1086 1086 } 1087 1087 1088 - static int snd_ac97_stac9758_phonesel_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol) 1088 + static int snd_ac97_stac9758_phonesel_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1089 1089 { 1090 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1090 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1091 1091 1092 1092 ucontrol->value.enumerated.item[0] = ac97->regs[AC97_SIGMATEL_IOMISC] & 3; 1093 1093 return 0; 1094 1094 } 1095 1095 1096 - static int snd_ac97_stac9758_phonesel_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1096 + static int snd_ac97_stac9758_phonesel_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1097 1097 { 1098 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1098 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1099 1099 1100 1100 return ac97_update_bits_page(ac97, AC97_SIGMATEL_IOMISC, 3, 1101 1101 ucontrol->value.enumerated.item[0], 0); ··· 1113 1113 .get = snd_ac97_stac9758_input_jack_get, \ 1114 1114 .put = snd_ac97_stac9758_input_jack_put, \ 1115 1115 .private_value = shift } 1116 - static const snd_kcontrol_new_t snd_ac97_sigmatel_stac9758_controls[] = { 1116 + static const struct snd_kcontrol_new snd_ac97_sigmatel_stac9758_controls[] = { 1117 1117 STAC9758_OUTPUT_JACK("Mic1 Jack", 1), 1118 1118 STAC9758_OUTPUT_JACK("LineIn Jack", 4), 1119 1119 STAC9758_OUTPUT_JACK("Front Jack", 7), ··· 1132 1132 AC97_SINGLE("Headphone +3dB Boost", AC97_SIGMATEL_IOMISC, 8, 1, 0) 1133 1133 }; 1134 1134 1135 - static int patch_sigmatel_stac9758_specific(ac97_t *ac97) 1135 + static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97) 1136 1136 { 1137 1137 int err; 1138 1138 ··· 1159 1159 .build_specific = patch_sigmatel_stac9758_specific 1160 1160 }; 1161 1161 1162 - int patch_sigmatel_stac9758(ac97_t * ac97) 1162 + int patch_sigmatel_stac9758(struct snd_ac97 * ac97) 1163 1163 { 1164 1164 static unsigned short regs[4] = { 1165 1165 AC97_SIGMATEL_OUTSEL, ··· 1202 1202 /* 1203 1203 * Cirrus Logic CS42xx codecs 1204 1204 */ 1205 - static const snd_kcontrol_new_t snd_ac97_cirrus_controls_spdif[2] = { 1205 + static const struct snd_kcontrol_new snd_ac97_cirrus_controls_spdif[2] = { 1206 1206 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), AC97_CSR_SPDIF, 15, 1, 0), 1207 1207 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "AC97-SPSA", AC97_CSR_ACMODE, 0, 3, 0) 1208 1208 }; 1209 1209 1210 - static int patch_cirrus_build_spdif(ac97_t * ac97) 1210 + static int patch_cirrus_build_spdif(struct snd_ac97 * ac97) 1211 1211 { 1212 1212 int err; 1213 1213 ··· 1233 1233 .build_spdif = patch_cirrus_build_spdif 1234 1234 }; 1235 1235 1236 - int patch_cirrus_spdif(ac97_t * ac97) 1236 + int patch_cirrus_spdif(struct snd_ac97 * ac97) 1237 1237 { 1238 1238 /* Basically, the cs4201/cs4205/cs4297a has non-standard sp/dif registers. 1239 1239 WHY CAN'T ANYONE FOLLOW THE BLOODY SPEC? *sigh* ··· 1254 1254 return 0; 1255 1255 } 1256 1256 1257 - int patch_cirrus_cs4299(ac97_t * ac97) 1257 + int patch_cirrus_cs4299(struct snd_ac97 * ac97) 1258 1258 { 1259 1259 /* force the detection of PC Beep */ 1260 1260 ac97->flags |= AC97_HAS_PC_BEEP; ··· 1265 1265 /* 1266 1266 * Conexant codecs 1267 1267 */ 1268 - static const snd_kcontrol_new_t snd_ac97_conexant_controls_spdif[1] = { 1268 + static const struct snd_kcontrol_new snd_ac97_conexant_controls_spdif[1] = { 1269 1269 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH), AC97_CXR_AUDIO_MISC, 3, 1, 0), 1270 1270 }; 1271 1271 1272 - static int patch_conexant_build_spdif(ac97_t * ac97) 1272 + static int patch_conexant_build_spdif(struct snd_ac97 * ac97) 1273 1273 { 1274 1274 int err; 1275 1275 ··· 1290 1290 .build_spdif = patch_conexant_build_spdif 1291 1291 }; 1292 1292 1293 - int patch_conexant(ac97_t * ac97) 1293 + int patch_conexant(struct snd_ac97 * ac97) 1294 1294 { 1295 1295 ac97->build_ops = &patch_conexant_ops; 1296 1296 ac97->flags |= AC97_CX_SPDIF; ··· 1303 1303 * Analog Device AD18xx, AD19xx codecs 1304 1304 */ 1305 1305 #ifdef CONFIG_PM 1306 - static void ad18xx_resume(ac97_t *ac97) 1306 + static void ad18xx_resume(struct snd_ac97 *ac97) 1307 1307 { 1308 1308 static unsigned short setup_regs[] = { 1309 1309 AC97_AD_MISC, AC97_AD_SERIAL_CFG, AC97_AD_JACK_SPDIF, ··· 1367 1367 } 1368 1368 #endif 1369 1369 1370 - int patch_ad1819(ac97_t * ac97) 1370 + int patch_ad1819(struct snd_ac97 * ac97) 1371 1371 { 1372 1372 unsigned short scfg; 1373 1373 ··· 1377 1377 return 0; 1378 1378 } 1379 1379 1380 - static unsigned short patch_ad1881_unchained(ac97_t * ac97, int idx, unsigned short mask) 1380 + static unsigned short patch_ad1881_unchained(struct snd_ac97 * ac97, int idx, unsigned short mask) 1381 1381 { 1382 1382 unsigned short val; 1383 1383 ··· 1393 1393 return mask; 1394 1394 } 1395 1395 1396 - static int patch_ad1881_chained1(ac97_t * ac97, int idx, unsigned short codec_bits) 1396 + static int patch_ad1881_chained1(struct snd_ac97 * ac97, int idx, unsigned short codec_bits) 1397 1397 { 1398 1398 static int cfg_bits[3] = { 1<<12, 1<<14, 1<<13 }; 1399 1399 unsigned short val; ··· 1411 1411 return 1; 1412 1412 } 1413 1413 1414 - static void patch_ad1881_chained(ac97_t * ac97, int unchained_idx, int cidx1, int cidx2) 1414 + static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int cidx1, int cidx2) 1415 1415 { 1416 1416 // already detected? 1417 1417 if (ac97->spec.ad18xx.unchained[cidx1] || ac97->spec.ad18xx.chained[cidx1]) ··· 1441 1441 #endif 1442 1442 }; 1443 1443 1444 - int patch_ad1881(ac97_t * ac97) 1444 + int patch_ad1881(struct snd_ac97 * ac97) 1445 1445 { 1446 1446 static const char cfg_idxs[3][2] = { 1447 1447 {2, 1}, ··· 1500 1500 return 0; 1501 1501 } 1502 1502 1503 - static const snd_kcontrol_new_t snd_ac97_controls_ad1885[] = { 1503 + static const struct snd_kcontrol_new snd_ac97_controls_ad1885[] = { 1504 1504 AC97_SINGLE("Digital Mono Direct", AC97_AD_MISC, 11, 1, 0), 1505 1505 /* AC97_SINGLE("Digital Audio Mode", AC97_AD_MISC, 12, 1, 0), */ /* seems problematic */ 1506 1506 AC97_SINGLE("Low Power Mixer", AC97_AD_MISC, 14, 1, 0), ··· 1509 1509 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 8, 1, 1), /* inverted */ 1510 1510 }; 1511 1511 1512 - static int patch_ad1885_specific(ac97_t * ac97) 1512 + static int patch_ad1885_specific(struct snd_ac97 * ac97) 1513 1513 { 1514 1514 int err; 1515 1515 ··· 1525 1525 #endif 1526 1526 }; 1527 1527 1528 - int patch_ad1885(ac97_t * ac97) 1528 + int patch_ad1885(struct snd_ac97 * ac97) 1529 1529 { 1530 1530 patch_ad1881(ac97); 1531 1531 /* This is required to deal with the Intel D815EEAL2 */ ··· 1538 1538 return 0; 1539 1539 } 1540 1540 1541 - int patch_ad1886(ac97_t * ac97) 1541 + int patch_ad1886(struct snd_ac97 * ac97) 1542 1542 { 1543 1543 patch_ad1881(ac97); 1544 1544 /* Presario700 workaround */ ··· 1569 1569 #define AC97_AD198X_DACZ 0x8000 /* DAC zero-fill mode */ 1570 1570 1571 1571 1572 - static int snd_ac97_ad198x_spdif_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1572 + static int snd_ac97_ad198x_spdif_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1573 1573 { 1574 1574 static char *texts[2] = { "AC-Link", "A/D Converter" }; 1575 1575 ··· 1582 1582 return 0; 1583 1583 } 1584 1584 1585 - static int snd_ac97_ad198x_spdif_source_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1585 + static int snd_ac97_ad198x_spdif_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1586 1586 { 1587 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1587 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1588 1588 unsigned short val; 1589 1589 1590 1590 val = ac97->regs[AC97_AD_SERIAL_CFG]; ··· 1592 1592 return 0; 1593 1593 } 1594 1594 1595 - static int snd_ac97_ad198x_spdif_source_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1595 + static int snd_ac97_ad198x_spdif_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1596 1596 { 1597 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1597 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1598 1598 unsigned short val; 1599 1599 1600 1600 if (ucontrol->value.enumerated.item[0] > 1) ··· 1603 1603 return snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 0x0004, val); 1604 1604 } 1605 1605 1606 - static const snd_kcontrol_new_t snd_ac97_ad198x_spdif_source = { 1606 + static const struct snd_kcontrol_new snd_ac97_ad198x_spdif_source = { 1607 1607 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1608 1608 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source", 1609 1609 .info = snd_ac97_ad198x_spdif_source_info, ··· 1611 1611 .put = snd_ac97_ad198x_spdif_source_put, 1612 1612 }; 1613 1613 1614 - static int patch_ad198x_post_spdif(ac97_t * ac97) 1614 + static int patch_ad198x_post_spdif(struct snd_ac97 * ac97) 1615 1615 { 1616 1616 return patch_build_controls(ac97, &snd_ac97_ad198x_spdif_source, 1); 1617 1617 } 1618 1618 1619 - static const snd_kcontrol_new_t snd_ac97_ad1981x_jack_sense[] = { 1619 + static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = { 1620 1620 AC97_SINGLE("Headphone Jack Sense", AC97_AD_JACK_SPDIF, 11, 1, 0), 1621 1621 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0), 1622 1622 }; 1623 1623 1624 - static int patch_ad1981a_specific(ac97_t * ac97) 1624 + static int patch_ad1981a_specific(struct snd_ac97 * ac97) 1625 1625 { 1626 1626 return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense, 1627 1627 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); ··· 1635 1635 #endif 1636 1636 }; 1637 1637 1638 - static void check_ad1981_hp_jack_sense(ac97_t *ac97) 1638 + static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97) 1639 1639 { 1640 1640 u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device; 1641 1641 switch (subid) { ··· 1649 1649 } 1650 1650 } 1651 1651 1652 - int patch_ad1981a(ac97_t *ac97) 1652 + int patch_ad1981a(struct snd_ac97 *ac97) 1653 1653 { 1654 1654 patch_ad1881(ac97); 1655 1655 ac97->build_ops = &patch_ad1981a_build_ops; ··· 1659 1659 return 0; 1660 1660 } 1661 1661 1662 - static const snd_kcontrol_new_t snd_ac97_ad198x_2cmic = 1662 + static const struct snd_kcontrol_new snd_ac97_ad198x_2cmic = 1663 1663 AC97_SINGLE("Stereo Mic", AC97_AD_MISC, 6, 1, 0); 1664 1664 1665 - static int patch_ad1981b_specific(ac97_t *ac97) 1665 + static int patch_ad1981b_specific(struct snd_ac97 *ac97) 1666 1666 { 1667 1667 int err; 1668 1668 ··· 1680 1680 #endif 1681 1681 }; 1682 1682 1683 - int patch_ad1981b(ac97_t *ac97) 1683 + int patch_ad1981b(struct snd_ac97 *ac97) 1684 1684 { 1685 1685 patch_ad1881(ac97); 1686 1686 ac97->build_ops = &patch_ad1981b_build_ops; ··· 1690 1690 return 0; 1691 1691 } 1692 1692 1693 - static int snd_ac97_ad1888_lohpsel_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1693 + static int snd_ac97_ad1888_lohpsel_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1694 1694 { 1695 1695 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1696 1696 uinfo->count = 1; ··· 1699 1699 return 0; 1700 1700 } 1701 1701 1702 - static int snd_ac97_ad1888_lohpsel_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol) 1702 + static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1703 1703 { 1704 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1704 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1705 1705 unsigned short val; 1706 1706 1707 1707 val = ac97->regs[AC97_AD_MISC]; ··· 1709 1709 return 0; 1710 1710 } 1711 1711 1712 - static int snd_ac97_ad1888_lohpsel_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1712 + static int snd_ac97_ad1888_lohpsel_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1713 1713 { 1714 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1714 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1715 1715 unsigned short val; 1716 1716 1717 1717 val = !ucontrol->value.integer.value[0] ··· 1720 1720 AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val); 1721 1721 } 1722 1722 1723 - static int snd_ac97_ad1888_downmix_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1723 + static int snd_ac97_ad1888_downmix_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 1724 1724 { 1725 1725 static char *texts[3] = {"Off", "6 -> 4", "6 -> 2"}; 1726 1726 ··· 1733 1733 return 0; 1734 1734 } 1735 1735 1736 - static int snd_ac97_ad1888_downmix_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t* ucontrol) 1736 + static int snd_ac97_ad1888_downmix_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1737 1737 { 1738 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1738 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1739 1739 unsigned short val; 1740 1740 1741 1741 val = ac97->regs[AC97_AD_MISC]; ··· 1746 1746 return 0; 1747 1747 } 1748 1748 1749 - static int snd_ac97_ad1888_downmix_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1749 + static int snd_ac97_ad1888_downmix_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1750 1750 { 1751 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 1751 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1752 1752 unsigned short val; 1753 1753 1754 1754 if (ucontrol->value.enumerated.item[0] > 2) ··· 1762 1762 AC97_AD198X_DMIX0 | AC97_AD198X_DMIX1, val); 1763 1763 } 1764 1764 1765 - static void ad1888_update_jacks(ac97_t *ac97) 1765 + static void ad1888_update_jacks(struct snd_ac97 *ac97) 1766 1766 { 1767 1767 unsigned short val = 0; 1768 1768 if (! is_shared_linein(ac97)) ··· 1773 1773 snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val); 1774 1774 } 1775 1775 1776 - static const snd_kcontrol_new_t snd_ac97_ad1888_controls[] = { 1776 + static const struct snd_kcontrol_new snd_ac97_ad1888_controls[] = { 1777 1777 { 1778 1778 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1779 1779 .name = "Exchange Front/Surround", ··· 1796 1796 AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0), 1797 1797 }; 1798 1798 1799 - static int patch_ad1888_specific(ac97_t *ac97) 1799 + static int patch_ad1888_specific(struct snd_ac97 *ac97) 1800 1800 { 1801 1801 /* rename 0x04 as "Master" and 0x02 as "Master Surround" */ 1802 1802 snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback"); ··· 1813 1813 .update_jacks = ad1888_update_jacks, 1814 1814 }; 1815 1815 1816 - int patch_ad1888(ac97_t * ac97) 1816 + int patch_ad1888(struct snd_ac97 * ac97) 1817 1817 { 1818 1818 unsigned short misc; 1819 1819 ··· 1833 1833 return 0; 1834 1834 } 1835 1835 1836 - static int patch_ad1980_specific(ac97_t *ac97) 1836 + static int patch_ad1980_specific(struct snd_ac97 *ac97) 1837 1837 { 1838 1838 int err; 1839 1839 ··· 1851 1851 .update_jacks = ad1888_update_jacks, 1852 1852 }; 1853 1853 1854 - int patch_ad1980(ac97_t * ac97) 1854 + int patch_ad1980(struct snd_ac97 * ac97) 1855 1855 { 1856 1856 patch_ad1888(ac97); 1857 1857 ac97->build_ops = &patch_ad1980_build_ops; 1858 1858 return 0; 1859 1859 } 1860 1860 1861 - static const snd_kcontrol_new_t snd_ac97_ad1985_controls[] = { 1861 + static const struct snd_kcontrol_new snd_ac97_ad1985_controls[] = { 1862 1862 AC97_SINGLE("Exchange Center/LFE", AC97_AD_SERIAL_CFG, 3, 1, 0) 1863 1863 }; 1864 1864 1865 - static void ad1985_update_jacks(ac97_t *ac97) 1865 + static void ad1985_update_jacks(struct snd_ac97 *ac97) 1866 1866 { 1867 1867 ad1888_update_jacks(ac97); 1868 1868 snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 1 << 9, 1869 1869 is_shared_micin(ac97) ? 0 : 1 << 9); 1870 1870 } 1871 1871 1872 - static int patch_ad1985_specific(ac97_t *ac97) 1872 + static int patch_ad1985_specific(struct snd_ac97 *ac97) 1873 1873 { 1874 1874 int err; 1875 1875 ··· 1887 1887 .update_jacks = ad1985_update_jacks, 1888 1888 }; 1889 1889 1890 - int patch_ad1985(ac97_t * ac97) 1890 + int patch_ad1985(struct snd_ac97 * ac97) 1891 1891 { 1892 1892 unsigned short misc; 1893 1893 ··· 1916 1916 /* 1917 1917 * realtek ALC65x/850 codecs 1918 1918 */ 1919 - static void alc650_update_jacks(ac97_t *ac97) 1919 + static void alc650_update_jacks(struct snd_ac97 *ac97) 1920 1920 { 1921 1921 int shared; 1922 1922 ··· 1937 1937 shared ? 0 : 0x100); 1938 1938 } 1939 1939 1940 - static const snd_kcontrol_new_t snd_ac97_controls_alc650[] = { 1940 + static const struct snd_kcontrol_new snd_ac97_controls_alc650[] = { 1941 1941 AC97_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0), 1942 1942 AC97_SINGLE("Surround Down Mix", AC97_ALC650_MULTICH, 1, 1, 0), 1943 1943 AC97_SINGLE("Center/LFE Down Mix", AC97_ALC650_MULTICH, 2, 1, 0), ··· 1963 1963 AC97_CHANNEL_MODE_CTL, 1964 1964 }; 1965 1965 1966 - static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc650[] = { 1966 + static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc650[] = { 1967 1967 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), AC97_ALC650_MULTICH, 11, 1, 0), 1968 1968 AC97_SINGLE("Analog to IEC958 Output", AC97_ALC650_MULTICH, 12, 1, 0), 1969 1969 /* disable this controls since it doesn't work as expected */ 1970 1970 /* AC97_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 13, 1, 0), */ 1971 1971 }; 1972 1972 1973 - static int patch_alc650_specific(ac97_t * ac97) 1973 + static int patch_alc650_specific(struct snd_ac97 * ac97) 1974 1974 { 1975 1975 int err; 1976 1976 ··· 1988 1988 .update_jacks = alc650_update_jacks 1989 1989 }; 1990 1990 1991 - int patch_alc650(ac97_t * ac97) 1991 + int patch_alc650(struct snd_ac97 * ac97) 1992 1992 { 1993 1993 unsigned short val; 1994 1994 ··· 2043 2043 return 0; 2044 2044 } 2045 2045 2046 - static void alc655_update_jacks(ac97_t *ac97) 2046 + static void alc655_update_jacks(struct snd_ac97 *ac97) 2047 2047 { 2048 2048 int shared; 2049 2049 ··· 2060 2060 shared ? (1 << 10) : 0, 0); 2061 2061 } 2062 2062 2063 - static const snd_kcontrol_new_t snd_ac97_controls_alc655[] = { 2063 + static const struct snd_kcontrol_new snd_ac97_controls_alc655[] = { 2064 2064 AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0), 2065 2065 AC97_SURROUND_JACK_MODE_CTL, 2066 2066 AC97_CHANNEL_MODE_CTL, 2067 2067 }; 2068 2068 2069 - static int alc655_iec958_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 2069 + static int alc655_iec958_route_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 2070 2070 { 2071 2071 static char *texts_655[3] = { "PCM", "Analog In", "IEC958 In" }; 2072 2072 static char *texts_658[4] = { "PCM", "Analog1 In", "Analog2 In", "IEC958 In" }; 2073 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2073 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2074 2074 2075 2075 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 2076 2076 uinfo->count = 1; ··· 2084 2084 return 0; 2085 2085 } 2086 2086 2087 - static int alc655_iec958_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2087 + static int alc655_iec958_route_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2088 2088 { 2089 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2089 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2090 2090 unsigned short val; 2091 2091 2092 2092 val = ac97->regs[AC97_ALC650_MULTICH]; ··· 2097 2097 return 0; 2098 2098 } 2099 2099 2100 - static int alc655_iec958_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2100 + static int alc655_iec958_route_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2101 2101 { 2102 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2102 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2103 2103 2104 2104 return ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 3 << 12, 2105 2105 (unsigned short)ucontrol->value.enumerated.item[0] << 12, 2106 2106 0); 2107 2107 } 2108 2108 2109 - static const snd_kcontrol_new_t snd_ac97_spdif_controls_alc655[] = { 2109 + static const struct snd_kcontrol_new snd_ac97_spdif_controls_alc655[] = { 2110 2110 AC97_PAGE_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), AC97_ALC650_MULTICH, 11, 1, 0, 0), 2111 2111 /* disable this controls since it doesn't work as expected */ 2112 2112 /* AC97_PAGE_SINGLE("IEC958 Input Monitor", AC97_ALC650_MULTICH, 14, 1, 0, 0), */ ··· 2119 2119 }, 2120 2120 }; 2121 2121 2122 - static int patch_alc655_specific(ac97_t * ac97) 2122 + static int patch_alc655_specific(struct snd_ac97 * ac97) 2123 2123 { 2124 2124 int err; 2125 2125 ··· 2137 2137 .update_jacks = alc655_update_jacks 2138 2138 }; 2139 2139 2140 - int patch_alc655(ac97_t * ac97) 2140 + int patch_alc655(struct snd_ac97 * ac97) 2141 2141 { 2142 2142 unsigned int val; 2143 2143 ··· 2189 2189 #define AC97_ALC850_JACK_SELECT 0x76 2190 2190 #define AC97_ALC850_MISC1 0x7a 2191 2191 2192 - static void alc850_update_jacks(ac97_t *ac97) 2192 + static void alc850_update_jacks(struct snd_ac97 *ac97) 2193 2193 { 2194 2194 int shared; 2195 2195 ··· 2211 2211 shared ? (2<<4) : (1<<4)); 2212 2212 } 2213 2213 2214 - static const snd_kcontrol_new_t snd_ac97_controls_alc850[] = { 2214 + static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = { 2215 2215 AC97_PAGE_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0, 0), 2216 2216 AC97_SINGLE("Mic Front Input Switch", AC97_ALC850_JACK_SELECT, 15, 1, 1), 2217 2217 AC97_SURROUND_JACK_MODE_CTL, 2218 2218 AC97_CHANNEL_MODE_CTL, 2219 2219 }; 2220 2220 2221 - static int patch_alc850_specific(ac97_t *ac97) 2221 + static int patch_alc850_specific(struct snd_ac97 *ac97) 2222 2222 { 2223 2223 int err; 2224 2224 ··· 2236 2236 .update_jacks = alc850_update_jacks 2237 2237 }; 2238 2238 2239 - int patch_alc850(ac97_t *ac97) 2239 + int patch_alc850(struct snd_ac97 *ac97) 2240 2240 { 2241 2241 ac97->build_ops = &patch_alc850_ops; 2242 2242 ··· 2273 2273 /* 2274 2274 * C-Media CM97xx codecs 2275 2275 */ 2276 - static void cm9738_update_jacks(ac97_t *ac97) 2276 + static void cm9738_update_jacks(struct snd_ac97 *ac97) 2277 2277 { 2278 2278 /* shared Line-In */ 2279 2279 snd_ac97_update_bits(ac97, AC97_CM9738_VENDOR_CTRL, 1 << 10, 2280 2280 is_shared_linein(ac97) ? (1 << 10) : 0); 2281 2281 } 2282 2282 2283 - static const snd_kcontrol_new_t snd_ac97_cm9738_controls[] = { 2283 + static const struct snd_kcontrol_new snd_ac97_cm9738_controls[] = { 2284 2284 AC97_SINGLE("Duplicate Front", AC97_CM9738_VENDOR_CTRL, 13, 1, 0), 2285 2285 AC97_SURROUND_JACK_MODE_CTL, 2286 2286 AC97_CHANNEL_MODE_4CH_CTL, 2287 2287 }; 2288 2288 2289 - static int patch_cm9738_specific(ac97_t * ac97) 2289 + static int patch_cm9738_specific(struct snd_ac97 * ac97) 2290 2290 { 2291 2291 return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls)); 2292 2292 } ··· 2296 2296 .update_jacks = cm9738_update_jacks 2297 2297 }; 2298 2298 2299 - int patch_cm9738(ac97_t * ac97) 2299 + int patch_cm9738(struct snd_ac97 * ac97) 2300 2300 { 2301 2301 ac97->build_ops = &patch_cm9738_ops; 2302 2302 /* FIXME: can anyone confirm below? */ ··· 2307 2307 return 0; 2308 2308 } 2309 2309 2310 - static int snd_ac97_cmedia_spdif_playback_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 2310 + static int snd_ac97_cmedia_spdif_playback_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 2311 2311 { 2312 2312 static char *texts[] = { "Analog", "Digital" }; 2313 2313 ··· 2320 2320 return 0; 2321 2321 } 2322 2322 2323 - static int snd_ac97_cmedia_spdif_playback_source_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2323 + static int snd_ac97_cmedia_spdif_playback_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2324 2324 { 2325 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2325 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2326 2326 unsigned short val; 2327 2327 2328 2328 val = ac97->regs[AC97_CM9739_SPDIF_CTRL]; ··· 2330 2330 return 0; 2331 2331 } 2332 2332 2333 - static int snd_ac97_cmedia_spdif_playback_source_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2333 + static int snd_ac97_cmedia_spdif_playback_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2334 2334 { 2335 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2335 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2336 2336 2337 2337 return snd_ac97_update_bits(ac97, AC97_CM9739_SPDIF_CTRL, 2338 2338 0x01 << 1, 2339 2339 (ucontrol->value.enumerated.item[0] & 0x01) << 1); 2340 2340 } 2341 2341 2342 - static const snd_kcontrol_new_t snd_ac97_cm9739_controls_spdif[] = { 2342 + static const struct snd_kcontrol_new snd_ac97_cm9739_controls_spdif[] = { 2343 2343 /* BIT 0: SPDI_EN - always true */ 2344 2344 { /* BIT 1: SPDIFS */ 2345 2345 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, ··· 2357 2357 /* BIT 8: SPD32 - 32bit SPDIF - not supported yet */ 2358 2358 }; 2359 2359 2360 - static void cm9739_update_jacks(ac97_t *ac97) 2360 + static void cm9739_update_jacks(struct snd_ac97 *ac97) 2361 2361 { 2362 2362 /* shared Line-In */ 2363 2363 snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 1 << 10, ··· 2367 2367 is_shared_micin(ac97) ? 0x1000 : 0x2000); 2368 2368 } 2369 2369 2370 - static const snd_kcontrol_new_t snd_ac97_cm9739_controls[] = { 2370 + static const struct snd_kcontrol_new snd_ac97_cm9739_controls[] = { 2371 2371 AC97_SURROUND_JACK_MODE_CTL, 2372 2372 AC97_CHANNEL_MODE_CTL, 2373 2373 }; 2374 2374 2375 - static int patch_cm9739_specific(ac97_t * ac97) 2375 + static int patch_cm9739_specific(struct snd_ac97 * ac97) 2376 2376 { 2377 2377 return patch_build_controls(ac97, snd_ac97_cm9739_controls, ARRAY_SIZE(snd_ac97_cm9739_controls)); 2378 2378 } 2379 2379 2380 - static int patch_cm9739_post_spdif(ac97_t * ac97) 2380 + static int patch_cm9739_post_spdif(struct snd_ac97 * ac97) 2381 2381 { 2382 2382 return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif)); 2383 2383 } ··· 2388 2388 .update_jacks = cm9739_update_jacks 2389 2389 }; 2390 2390 2391 - int patch_cm9739(ac97_t * ac97) 2391 + int patch_cm9739(struct snd_ac97 * ac97) 2392 2392 { 2393 2393 unsigned short val; 2394 2394 ··· 2447 2447 #define AC97_CM9761_FUNC 0x66 2448 2448 #define AC97_CM9761_SPDIF_CTRL 0x6c 2449 2449 2450 - static void cm9761_update_jacks(ac97_t *ac97) 2450 + static void cm9761_update_jacks(struct snd_ac97 *ac97) 2451 2451 { 2452 2452 /* FIXME: check the bits for each model 2453 2453 * model 83 is confirmed to work ··· 2482 2482 snd_ac97_update_bits(ac97, AC97_CM9761_MULTI_CHAN, 0x3c88, val); 2483 2483 } 2484 2484 2485 - static const snd_kcontrol_new_t snd_ac97_cm9761_controls[] = { 2485 + static const struct snd_kcontrol_new snd_ac97_cm9761_controls[] = { 2486 2486 AC97_SURROUND_JACK_MODE_CTL, 2487 2487 AC97_CHANNEL_MODE_CTL, 2488 2488 }; 2489 2489 2490 - static int cm9761_spdif_out_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 2490 + static int cm9761_spdif_out_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) 2491 2491 { 2492 2492 static char *texts[] = { "AC-Link", "ADC", "SPDIF-In" }; 2493 2493 ··· 2500 2500 return 0; 2501 2501 } 2502 2502 2503 - static int cm9761_spdif_out_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2503 + static int cm9761_spdif_out_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2504 2504 { 2505 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2505 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2506 2506 2507 2507 if (ac97->regs[AC97_CM9761_FUNC] & 0x1) 2508 2508 ucontrol->value.enumerated.item[0] = 2; /* SPDIF-loopback */ ··· 2513 2513 return 0; 2514 2514 } 2515 2515 2516 - static int cm9761_spdif_out_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2516 + static int cm9761_spdif_out_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 2517 2517 { 2518 - ac97_t *ac97 = snd_kcontrol_chip(kcontrol); 2518 + struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 2519 2519 2520 2520 if (ucontrol->value.enumerated.item[0] == 2) 2521 2521 return snd_ac97_update_bits(ac97, AC97_CM9761_FUNC, 0x1, 0x1); ··· 2528 2528 static const struct ac97_enum cm9761_dac_clock_enum = 2529 2529 AC97_ENUM_SINGLE(AC97_CM9761_SPDIF_CTRL, 9, 3, cm9761_dac_clock); 2530 2530 2531 - static const snd_kcontrol_new_t snd_ac97_cm9761_controls_spdif[] = { 2531 + static const struct snd_kcontrol_new snd_ac97_cm9761_controls_spdif[] = { 2532 2532 { /* BIT 1: SPDIFS */ 2533 2533 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2534 2534 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Source", ··· 2546 2546 AC97_ENUM("DAC Clock Source", cm9761_dac_clock_enum), 2547 2547 }; 2548 2548 2549 - static int patch_cm9761_post_spdif(ac97_t * ac97) 2549 + static int patch_cm9761_post_spdif(struct snd_ac97 * ac97) 2550 2550 { 2551 2551 return patch_build_controls(ac97, snd_ac97_cm9761_controls_spdif, ARRAY_SIZE(snd_ac97_cm9761_controls_spdif)); 2552 2552 } 2553 2553 2554 - static int patch_cm9761_specific(ac97_t * ac97) 2554 + static int patch_cm9761_specific(struct snd_ac97 * ac97) 2555 2555 { 2556 2556 return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls)); 2557 2557 } ··· 2562 2562 .update_jacks = cm9761_update_jacks 2563 2563 }; 2564 2564 2565 - int patch_cm9761(ac97_t *ac97) 2565 + int patch_cm9761(struct snd_ac97 *ac97) 2566 2566 { 2567 2567 unsigned short val; 2568 2568 ··· 2641 2641 static const char *cm9780_ch_select[] = { "Front", "Side", "Center/LFE", "Rear" }; 2642 2642 static const struct ac97_enum cm9780_ch_select_enum = 2643 2643 AC97_ENUM_SINGLE(AC97_CM9780_MULTI_CHAN, 6, 4, cm9780_ch_select); 2644 - static const snd_kcontrol_new_t cm9780_controls[] = { 2644 + static const struct snd_kcontrol_new cm9780_controls[] = { 2645 2645 AC97_DOUBLE("Side Playback Switch", AC97_CM9780_SIDE, 15, 7, 1, 1), 2646 2646 AC97_DOUBLE("Side Playback Volume", AC97_CM9780_SIDE, 8, 0, 31, 0), 2647 2647 AC97_ENUM("Side Playback Route", cm9780_ch_select_enum), 2648 2648 }; 2649 2649 2650 - static int patch_cm9780_specific(ac97_t *ac97) 2650 + static int patch_cm9780_specific(struct snd_ac97 *ac97) 2651 2651 { 2652 2652 return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls)); 2653 2653 } ··· 2657 2657 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */ 2658 2658 }; 2659 2659 2660 - int patch_cm9780(ac97_t *ac97) 2660 + int patch_cm9780(struct snd_ac97 *ac97) 2661 2661 { 2662 2662 unsigned short val; 2663 2663 ··· 2677 2677 /* 2678 2678 * VIA VT1616 codec 2679 2679 */ 2680 - static const snd_kcontrol_new_t snd_ac97_controls_vt1616[] = { 2680 + static const struct snd_kcontrol_new snd_ac97_controls_vt1616[] = { 2681 2681 AC97_SINGLE("DC Offset removal", 0x5a, 10, 1, 0), 2682 2682 AC97_SINGLE("Alternate Level to Surround Out", 0x5a, 15, 1, 0), 2683 2683 AC97_SINGLE("Downmix LFE and Center to Front", 0x5a, 12, 1, 0), 2684 2684 AC97_SINGLE("Downmix Surround to Front", 0x5a, 11, 1, 0), 2685 2685 }; 2686 2686 2687 - static int patch_vt1616_specific(ac97_t * ac97) 2687 + static int patch_vt1616_specific(struct snd_ac97 * ac97) 2688 2688 { 2689 2689 int err; 2690 2690 ··· 2700 2700 .build_specific = patch_vt1616_specific 2701 2701 }; 2702 2702 2703 - int patch_vt1616(ac97_t * ac97) 2703 + int patch_vt1616(struct snd_ac97 * ac97) 2704 2704 { 2705 2705 ac97->build_ops = &patch_vt1616_ops; 2706 2706 return 0; ··· 2709 2709 /* 2710 2710 * VT1617A codec 2711 2711 */ 2712 - int patch_vt1617a(ac97_t * ac97) 2712 + int patch_vt1617a(struct snd_ac97 * ac97) 2713 2713 { 2714 2714 ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */ 2715 2715 ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; ··· 2718 2718 2719 2719 /* 2720 2720 */ 2721 - static void it2646_update_jacks(ac97_t *ac97) 2721 + static void it2646_update_jacks(struct snd_ac97 *ac97) 2722 2722 { 2723 2723 /* shared Line-In */ 2724 2724 snd_ac97_update_bits(ac97, 0x76, 1 << 9, ··· 2728 2728 is_shared_micin(ac97) ? (1<<10) : 0); 2729 2729 } 2730 2730 2731 - static const snd_kcontrol_new_t snd_ac97_controls_it2646[] = { 2731 + static const struct snd_kcontrol_new snd_ac97_controls_it2646[] = { 2732 2732 AC97_SURROUND_JACK_MODE_CTL, 2733 2733 AC97_CHANNEL_MODE_CTL, 2734 2734 }; 2735 2735 2736 - static const snd_kcontrol_new_t snd_ac97_spdif_controls_it2646[] = { 2736 + static const struct snd_kcontrol_new snd_ac97_spdif_controls_it2646[] = { 2737 2737 AC97_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 0x76, 11, 1, 0), 2738 2738 AC97_SINGLE("Analog to IEC958 Output", 0x76, 12, 1, 0), 2739 2739 AC97_SINGLE("IEC958 Input Monitor", 0x76, 13, 1, 0), 2740 2740 }; 2741 2741 2742 - static int patch_it2646_specific(ac97_t * ac97) 2742 + static int patch_it2646_specific(struct snd_ac97 * ac97) 2743 2743 { 2744 2744 int err; 2745 2745 if ((err = patch_build_controls(ac97, snd_ac97_controls_it2646, ARRAY_SIZE(snd_ac97_controls_it2646))) < 0) ··· 2754 2754 .update_jacks = it2646_update_jacks 2755 2755 }; 2756 2756 2757 - int patch_it2646(ac97_t * ac97) 2757 + int patch_it2646(struct snd_ac97 * ac97) 2758 2758 { 2759 2759 ac97->build_ops = &patch_it2646_ops; 2760 2760 /* full DAC volume */ ··· 2770 2770 #define AC97_SI3036_CHIP_ID 0x5a 2771 2771 #define AC97_SI3036_LINE_CFG 0x5c 2772 2772 2773 - static const snd_kcontrol_new_t snd_ac97_controls_si3036[] = { 2773 + static const struct snd_kcontrol_new snd_ac97_controls_si3036[] = { 2774 2774 AC97_DOUBLE("Modem Speaker Volume", 0x5c, 14, 12, 3, 1) 2775 2775 }; 2776 2776 2777 - static int patch_si3036_specific(ac97_t * ac97) 2777 + static int patch_si3036_specific(struct snd_ac97 * ac97) 2778 2778 { 2779 2779 int idx, err; 2780 2780 for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_si3036); idx++) ··· 2787 2787 .build_specific = patch_si3036_specific, 2788 2788 }; 2789 2789 2790 - int mpatch_si3036(ac97_t * ac97) 2790 + int mpatch_si3036(struct snd_ac97 * ac97) 2791 2791 { 2792 2792 ac97->build_ops = &patch_si3036_ops; 2793 2793 snd_ac97_write_cache(ac97, 0x5c, 0xf210 );
+37 -37
sound/pci/ac97/ac97_patch.h
··· 22 22 * 23 23 */ 24 24 25 - int patch_yamaha_ymf753(ac97_t * ac97); 26 - int patch_wolfson00(ac97_t * ac97); 27 - int patch_wolfson03(ac97_t * ac97); 28 - int patch_wolfson04(ac97_t * ac97); 29 - int patch_wolfson05(ac97_t * ac97); 30 - int patch_wolfson11(ac97_t * ac97); 31 - int patch_wolfson13(ac97_t * ac97); 32 - int patch_tritech_tr28028(ac97_t * ac97); 33 - int patch_sigmatel_stac9700(ac97_t * ac97); 34 - int patch_sigmatel_stac9708(ac97_t * ac97); 35 - int patch_sigmatel_stac9721(ac97_t * ac97); 36 - int patch_sigmatel_stac9744(ac97_t * ac97); 37 - int patch_sigmatel_stac9756(ac97_t * ac97); 38 - int patch_sigmatel_stac9758(ac97_t * ac97); 39 - int patch_cirrus_cs4299(ac97_t * ac97); 40 - int patch_cirrus_spdif(ac97_t * ac97); 41 - int patch_conexant(ac97_t * ac97); 42 - int patch_ad1819(ac97_t * ac97); 43 - int patch_ad1881(ac97_t * ac97); 44 - int patch_ad1885(ac97_t * ac97); 45 - int patch_ad1886(ac97_t * ac97); 46 - int patch_ad1888(ac97_t * ac97); 47 - int patch_ad1980(ac97_t * ac97); 48 - int patch_ad1981a(ac97_t * ac97); 49 - int patch_ad1981b(ac97_t * ac97); 50 - int patch_ad1985(ac97_t * ac97); 51 - int patch_alc650(ac97_t * ac97); 52 - int patch_alc655(ac97_t * ac97); 53 - int patch_alc850(ac97_t * ac97); 54 - int patch_cm9738(ac97_t * ac97); 55 - int patch_cm9739(ac97_t * ac97); 56 - int patch_cm9761(ac97_t * ac97); 57 - int patch_cm9780(ac97_t * ac97); 58 - int patch_vt1616(ac97_t * ac97); 59 - int patch_vt1617a(ac97_t * ac97); 60 - int patch_it2646(ac97_t * ac97); 61 - int mpatch_si3036(ac97_t * ac97); 25 + int patch_yamaha_ymf753(struct snd_ac97 * ac97); 26 + int patch_wolfson00(struct snd_ac97 * ac97); 27 + int patch_wolfson03(struct snd_ac97 * ac97); 28 + int patch_wolfson04(struct snd_ac97 * ac97); 29 + int patch_wolfson05(struct snd_ac97 * ac97); 30 + int patch_wolfson11(struct snd_ac97 * ac97); 31 + int patch_wolfson13(struct snd_ac97 * ac97); 32 + int patch_tritech_tr28028(struct snd_ac97 * ac97); 33 + int patch_sigmatel_stac9700(struct snd_ac97 * ac97); 34 + int patch_sigmatel_stac9708(struct snd_ac97 * ac97); 35 + int patch_sigmatel_stac9721(struct snd_ac97 * ac97); 36 + int patch_sigmatel_stac9744(struct snd_ac97 * ac97); 37 + int patch_sigmatel_stac9756(struct snd_ac97 * ac97); 38 + int patch_sigmatel_stac9758(struct snd_ac97 * ac97); 39 + int patch_cirrus_cs4299(struct snd_ac97 * ac97); 40 + int patch_cirrus_spdif(struct snd_ac97 * ac97); 41 + int patch_conexant(struct snd_ac97 * ac97); 42 + int patch_ad1819(struct snd_ac97 * ac97); 43 + int patch_ad1881(struct snd_ac97 * ac97); 44 + int patch_ad1885(struct snd_ac97 * ac97); 45 + int patch_ad1886(struct snd_ac97 * ac97); 46 + int patch_ad1888(struct snd_ac97 * ac97); 47 + int patch_ad1980(struct snd_ac97 * ac97); 48 + int patch_ad1981a(struct snd_ac97 * ac97); 49 + int patch_ad1981b(struct snd_ac97 * ac97); 50 + int patch_ad1985(struct snd_ac97 * ac97); 51 + int patch_alc650(struct snd_ac97 * ac97); 52 + int patch_alc655(struct snd_ac97 * ac97); 53 + int patch_alc850(struct snd_ac97 * ac97); 54 + int patch_cm9738(struct snd_ac97 * ac97); 55 + int patch_cm9739(struct snd_ac97 * ac97); 56 + int patch_cm9761(struct snd_ac97 * ac97); 57 + int patch_cm9780(struct snd_ac97 * ac97); 58 + int patch_vt1616(struct snd_ac97 * ac97); 59 + int patch_vt1617a(struct snd_ac97 * ac97); 60 + int patch_it2646(struct snd_ac97 * ac97); 61 + int mpatch_si3036(struct snd_ac97 * ac97);
+19 -19
sound/pci/ac97/ac97_pcm.c
··· 170 170 return rate_cregs[slot - 3]; 171 171 } 172 172 173 - static int set_spdif_rate(ac97_t *ac97, unsigned short rate) 173 + static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) 174 174 { 175 175 unsigned short old, bits, reg, mask; 176 176 unsigned int sbits; ··· 254 254 * 255 255 * Returns zero if successful, or a negative error code on failure. 256 256 */ 257 - int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned int rate) 257 + int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate) 258 258 { 259 259 int dbl; 260 260 unsigned int tmp; ··· 315 315 return 0; 316 316 } 317 317 318 - static unsigned short get_pslots(ac97_t *ac97, unsigned char *rate_table, unsigned short *spdif_slots) 318 + static unsigned short get_pslots(struct snd_ac97 *ac97, unsigned char *rate_table, unsigned short *spdif_slots) 319 319 { 320 320 if (!ac97_is_audio(ac97)) 321 321 return 0; ··· 390 390 } 391 391 } 392 392 393 - static unsigned short get_cslots(ac97_t *ac97) 393 + static unsigned short get_cslots(struct snd_ac97 *ac97) 394 394 { 395 395 unsigned short slots; 396 396 ··· 437 437 * some slots are available, pcm->xxx.slots and pcm->xxx.rslots[] members 438 438 * are reduced and might be zero. 439 439 */ 440 - int snd_ac97_pcm_assign(ac97_bus_t *bus, 440 + int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, 441 441 unsigned short pcms_count, 442 442 const struct ac97_pcm *pcms) 443 443 { ··· 449 449 unsigned short tmp, slots; 450 450 unsigned short spdif_slots[4]; 451 451 unsigned int rates; 452 - ac97_t *codec; 452 + struct snd_ac97 *codec; 453 453 454 454 rpcms = kcalloc(pcms_count, sizeof(struct ac97_pcm), GFP_KERNEL); 455 455 if (rpcms == NULL) ··· 560 560 int snd_ac97_pcm_open(struct ac97_pcm *pcm, unsigned int rate, 561 561 enum ac97_pcm_cfg cfg, unsigned short slots) 562 562 { 563 - ac97_bus_t *bus; 563 + struct snd_ac97_bus *bus; 564 564 int i, cidx, r, ok_flag; 565 565 unsigned int reg_ok[4] = {0,0,0,0}; 566 566 unsigned char reg; ··· 639 639 */ 640 640 int snd_ac97_pcm_close(struct ac97_pcm *pcm) 641 641 { 642 - ac97_bus_t *bus; 642 + struct snd_ac97_bus *bus; 643 643 unsigned short slots = pcm->aslots; 644 644 int i, cidx; 645 645 ··· 656 656 return 0; 657 657 } 658 658 659 - static int double_rate_hw_constraint_rate(snd_pcm_hw_params_t *params, 660 - snd_pcm_hw_rule_t *rule) 659 + static int double_rate_hw_constraint_rate(struct snd_pcm_hw_params *params, 660 + struct snd_pcm_hw_rule *rule) 661 661 { 662 - snd_interval_t *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 662 + struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 663 663 if (channels->min > 2) { 664 - static const snd_interval_t single_rates = { 664 + static const struct snd_interval single_rates = { 665 665 .min = 1, 666 666 .max = 48000, 667 667 }; 668 - snd_interval_t *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 668 + struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 669 669 return snd_interval_refine(rate, &single_rates); 670 670 } 671 671 return 0; 672 672 } 673 673 674 - static int double_rate_hw_constraint_channels(snd_pcm_hw_params_t *params, 675 - snd_pcm_hw_rule_t *rule) 674 + static int double_rate_hw_constraint_channels(struct snd_pcm_hw_params *params, 675 + struct snd_pcm_hw_rule *rule) 676 676 { 677 - snd_interval_t *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 677 + struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 678 678 if (rate->min > 48000) { 679 - static const snd_interval_t double_rate_channels = { 679 + static const struct snd_interval double_rate_channels = { 680 680 .min = 2, 681 681 .max = 2, 682 682 }; 683 - snd_interval_t *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 683 + struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); 684 684 return snd_interval_refine(channels, &double_rate_channels); 685 685 } 686 686 return 0; ··· 693 693 * Installs the hardware constraint rules to prevent using double rates and 694 694 * more than two channels at the same time. 695 695 */ 696 - int snd_ac97_pcm_double_rate_rules(snd_pcm_runtime_t *runtime) 696 + int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime) 697 697 { 698 698 int err; 699 699
+16 -17
sound/pci/ac97/ac97_proc.c
··· 34 34 * proc interface 35 35 */ 36 36 37 - static void snd_ac97_proc_read_functions(ac97_t *ac97, snd_info_buffer_t *buffer) 37 + static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_buffer *buffer) 38 38 { 39 39 int header = 0, function; 40 40 unsigned short info, sense_info; ··· 68 68 } 69 69 } 70 70 71 - static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx) 71 + static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx) 72 72 { 73 73 char name[64]; 74 74 unsigned short val, tmp, ext, mext; ··· 79 79 80 80 snd_ac97_get_name(NULL, ac97->id, name, 0); 81 81 snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name); 82 - 83 82 84 83 if ((ac97->scaps & AC97_SCAP_AUDIO) == 0) 85 84 goto __modem; ··· 298 299 } 299 300 } 300 301 301 - static void snd_ac97_proc_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 302 + static void snd_ac97_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 302 303 { 303 - ac97_t *ac97 = entry->private_data; 304 + struct snd_ac97 *ac97 = entry->private_data; 304 305 305 306 down(&ac97->page_mutex); 306 307 if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86 ··· 333 334 334 335 #ifdef CONFIG_SND_DEBUG 335 336 /* direct register write for debugging */ 336 - static void snd_ac97_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 337 + static void snd_ac97_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer) 337 338 { 338 - ac97_t *ac97 = entry->private_data; 339 + struct snd_ac97 *ac97 = entry->private_data; 339 340 char line[64]; 340 341 unsigned int reg, val; 341 342 down(&ac97->page_mutex); ··· 350 351 } 351 352 #endif 352 353 353 - static void snd_ac97_proc_regs_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int subidx) 354 + static void snd_ac97_proc_regs_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subidx) 354 355 { 355 356 int reg, val; 356 357 ··· 360 361 } 361 362 } 362 363 363 - static void snd_ac97_proc_regs_read(snd_info_entry_t *entry, 364 - snd_info_buffer_t * buffer) 364 + static void snd_ac97_proc_regs_read(struct snd_info_entry *entry, 365 + struct snd_info_buffer *buffer) 365 366 { 366 - ac97_t *ac97 = entry->private_data; 367 + struct snd_ac97 *ac97 = entry->private_data; 367 368 368 369 down(&ac97->page_mutex); 369 370 if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86 ··· 384 385 up(&ac97->page_mutex); 385 386 } 386 387 387 - void snd_ac97_proc_init(ac97_t * ac97) 388 + void snd_ac97_proc_init(struct snd_ac97 * ac97) 388 389 { 389 - snd_info_entry_t *entry; 390 + struct snd_info_entry *entry; 390 391 char name[32]; 391 392 const char *prefix; 392 393 ··· 418 419 ac97->proc_regs = entry; 419 420 } 420 421 421 - void snd_ac97_proc_done(ac97_t * ac97) 422 + void snd_ac97_proc_done(struct snd_ac97 * ac97) 422 423 { 423 424 if (ac97->proc_regs) { 424 425 snd_info_unregister(ac97->proc_regs); ··· 430 431 } 431 432 } 432 433 433 - void snd_ac97_bus_proc_init(ac97_bus_t * bus) 434 + void snd_ac97_bus_proc_init(struct snd_ac97_bus * bus) 434 435 { 435 - snd_info_entry_t *entry; 436 + struct snd_info_entry *entry; 436 437 char name[32]; 437 438 438 439 sprintf(name, "codec97#%d", bus->num); ··· 446 447 bus->proc = entry; 447 448 } 448 449 449 - void snd_ac97_bus_proc_done(ac97_bus_t * bus) 450 + void snd_ac97_bus_proc_done(struct snd_ac97_bus * bus) 450 451 { 451 452 if (bus->proc) { 452 453 snd_info_unregister(bus->proc);