diff options
Diffstat (limited to 'sound/drivers/vx/vx_core.c')
-rw-r--r-- | sound/drivers/vx/vx_core.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index e6e4cf997419..5abf42351772 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c | |||
@@ -49,7 +49,7 @@ MODULE_LICENSE("GPL"); | |||
49 | * | 49 | * |
50 | * returns zero if a bit matches, or a negative error code. | 50 | * returns zero if a bit matches, or a negative error code. |
51 | */ | 51 | */ |
52 | int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time) | 52 | int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time) |
53 | { | 53 | { |
54 | unsigned long end_time = jiffies + (time * HZ + 999) / 1000; | 54 | unsigned long end_time = jiffies + (time * HZ + 999) / 1000; |
55 | #ifdef CONFIG_SND_DEBUG | 55 | #ifdef CONFIG_SND_DEBUG |
@@ -78,7 +78,7 @@ int snd_vx_check_reg_bit(vx_core_t *chip, int reg, int mask, int bit, int time) | |||
78 | * returns 0 if successful, or a negative error code. | 78 | * returns 0 if successful, or a negative error code. |
79 | * | 79 | * |
80 | */ | 80 | */ |
81 | static int vx_send_irq_dsp(vx_core_t *chip, int num) | 81 | static int vx_send_irq_dsp(struct vx_core *chip, int num) |
82 | { | 82 | { |
83 | int nirq; | 83 | int nirq; |
84 | 84 | ||
@@ -99,7 +99,7 @@ static int vx_send_irq_dsp(vx_core_t *chip, int num) | |||
99 | * | 99 | * |
100 | * returns 0 if successful, or a negative error code. | 100 | * returns 0 if successful, or a negative error code. |
101 | */ | 101 | */ |
102 | static int vx_reset_chk(vx_core_t *chip) | 102 | static int vx_reset_chk(struct vx_core *chip) |
103 | { | 103 | { |
104 | /* Reset irq CHK */ | 104 | /* Reset irq CHK */ |
105 | if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0) | 105 | if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0) |
@@ -118,7 +118,7 @@ static int vx_reset_chk(vx_core_t *chip) | |||
118 | * the error code can be VX-specific, retrieved via vx_get_error(). | 118 | * the error code can be VX-specific, retrieved via vx_get_error(). |
119 | * NB: call with spinlock held! | 119 | * NB: call with spinlock held! |
120 | */ | 120 | */ |
121 | static int vx_transfer_end(vx_core_t *chip, int cmd) | 121 | static int vx_transfer_end(struct vx_core *chip, int cmd) |
122 | { | 122 | { |
123 | int err; | 123 | int err; |
124 | 124 | ||
@@ -156,7 +156,7 @@ static int vx_transfer_end(vx_core_t *chip, int cmd) | |||
156 | * the error code can be VX-specific, retrieved via vx_get_error(). | 156 | * the error code can be VX-specific, retrieved via vx_get_error(). |
157 | * NB: call with spinlock held! | 157 | * NB: call with spinlock held! |
158 | */ | 158 | */ |
159 | static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh) | 159 | static int vx_read_status(struct vx_core *chip, struct vx_rmh *rmh) |
160 | { | 160 | { |
161 | int i, err, val, size; | 161 | int i, err, val, size; |
162 | 162 | ||
@@ -236,7 +236,7 @@ static int vx_read_status(vx_core_t *chip, struct vx_rmh *rmh) | |||
236 | * | 236 | * |
237 | * this function doesn't call spinlock at all. | 237 | * this function doesn't call spinlock at all. |
238 | */ | 238 | */ |
239 | int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh) | 239 | int vx_send_msg_nolock(struct vx_core *chip, struct vx_rmh *rmh) |
240 | { | 240 | { |
241 | int i, err; | 241 | int i, err; |
242 | 242 | ||
@@ -341,7 +341,7 @@ int vx_send_msg_nolock(vx_core_t *chip, struct vx_rmh *rmh) | |||
341 | * returns 0 if successful, or a negative error code. | 341 | * returns 0 if successful, or a negative error code. |
342 | * see vx_send_msg_nolock(). | 342 | * see vx_send_msg_nolock(). |
343 | */ | 343 | */ |
344 | int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh) | 344 | int vx_send_msg(struct vx_core *chip, struct vx_rmh *rmh) |
345 | { | 345 | { |
346 | unsigned long flags; | 346 | unsigned long flags; |
347 | int err; | 347 | int err; |
@@ -364,7 +364,7 @@ int vx_send_msg(vx_core_t *chip, struct vx_rmh *rmh) | |||
364 | * | 364 | * |
365 | * unlike RMH, no command is sent to DSP. | 365 | * unlike RMH, no command is sent to DSP. |
366 | */ | 366 | */ |
367 | int vx_send_rih_nolock(vx_core_t *chip, int cmd) | 367 | int vx_send_rih_nolock(struct vx_core *chip, int cmd) |
368 | { | 368 | { |
369 | int err; | 369 | int err; |
370 | 370 | ||
@@ -401,7 +401,7 @@ int vx_send_rih_nolock(vx_core_t *chip, int cmd) | |||
401 | * | 401 | * |
402 | * see vx_send_rih_nolock(). | 402 | * see vx_send_rih_nolock(). |
403 | */ | 403 | */ |
404 | int vx_send_rih(vx_core_t *chip, int cmd) | 404 | int vx_send_rih(struct vx_core *chip, int cmd) |
405 | { | 405 | { |
406 | unsigned long flags; | 406 | unsigned long flags; |
407 | int err; | 407 | int err; |
@@ -418,7 +418,7 @@ int vx_send_rih(vx_core_t *chip, int cmd) | |||
418 | * snd_vx_boot_xilinx - boot up the xilinx interface | 418 | * snd_vx_boot_xilinx - boot up the xilinx interface |
419 | * @boot: the boot record to load | 419 | * @boot: the boot record to load |
420 | */ | 420 | */ |
421 | int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot) | 421 | int snd_vx_load_boot_image(struct vx_core *chip, const struct firmware *boot) |
422 | { | 422 | { |
423 | unsigned int i; | 423 | unsigned int i; |
424 | int no_fillup = vx_has_new_dsp(chip); | 424 | int no_fillup = vx_has_new_dsp(chip); |
@@ -470,7 +470,7 @@ int snd_vx_load_boot_image(vx_core_t *chip, const struct firmware *boot) | |||
470 | * | 470 | * |
471 | * called from irq handler only | 471 | * called from irq handler only |
472 | */ | 472 | */ |
473 | static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret) | 473 | static int vx_test_irq_src(struct vx_core *chip, unsigned int *ret) |
474 | { | 474 | { |
475 | int err; | 475 | int err; |
476 | 476 | ||
@@ -491,7 +491,7 @@ static int vx_test_irq_src(vx_core_t *chip, unsigned int *ret) | |||
491 | */ | 491 | */ |
492 | static void vx_interrupt(unsigned long private_data) | 492 | static void vx_interrupt(unsigned long private_data) |
493 | { | 493 | { |
494 | vx_core_t *chip = (vx_core_t *) private_data; | 494 | struct vx_core *chip = (struct vx_core *) private_data; |
495 | unsigned int events; | 495 | unsigned int events; |
496 | 496 | ||
497 | if (chip->chip_status & VX_STAT_IS_STALE) | 497 | if (chip->chip_status & VX_STAT_IS_STALE) |
@@ -535,7 +535,7 @@ static void vx_interrupt(unsigned long private_data) | |||
535 | */ | 535 | */ |
536 | irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) | 536 | irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) |
537 | { | 537 | { |
538 | vx_core_t *chip = dev; | 538 | struct vx_core *chip = dev; |
539 | 539 | ||
540 | if (! (chip->chip_status & VX_STAT_CHIP_INIT) || | 540 | if (! (chip->chip_status & VX_STAT_CHIP_INIT) || |
541 | (chip->chip_status & VX_STAT_IS_STALE)) | 541 | (chip->chip_status & VX_STAT_IS_STALE)) |
@@ -548,7 +548,7 @@ irqreturn_t snd_vx_irq_handler(int irq, void *dev, struct pt_regs *regs) | |||
548 | 548 | ||
549 | /* | 549 | /* |
550 | */ | 550 | */ |
551 | static void vx_reset_board(vx_core_t *chip, int cold_reset) | 551 | static void vx_reset_board(struct vx_core *chip, int cold_reset) |
552 | { | 552 | { |
553 | snd_assert(chip->ops->reset_board, return); | 553 | snd_assert(chip->ops->reset_board, return); |
554 | 554 | ||
@@ -587,9 +587,9 @@ static void vx_reset_board(vx_core_t *chip, int cold_reset) | |||
587 | * proc interface | 587 | * proc interface |
588 | */ | 588 | */ |
589 | 589 | ||
590 | static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) | 590 | static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) |
591 | { | 591 | { |
592 | vx_core_t *chip = entry->private_data; | 592 | struct vx_core *chip = entry->private_data; |
593 | static char *audio_src_vxp[] = { "Line", "Mic", "Digital" }; | 593 | static char *audio_src_vxp[] = { "Line", "Mic", "Digital" }; |
594 | static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" }; | 594 | static char *audio_src_vx2[] = { "Analog", "Analog", "Digital" }; |
595 | static char *clock_mode[] = { "Auto", "Internal", "External" }; | 595 | static char *clock_mode[] = { "Auto", "Internal", "External" }; |
@@ -630,9 +630,9 @@ static void vx_proc_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) | |||
630 | chip->ibl.granularity); | 630 | chip->ibl.granularity); |
631 | } | 631 | } |
632 | 632 | ||
633 | static void vx_proc_init(vx_core_t *chip) | 633 | static void vx_proc_init(struct vx_core *chip) |
634 | { | 634 | { |
635 | snd_info_entry_t *entry; | 635 | struct snd_info_entry *entry; |
636 | 636 | ||
637 | if (! snd_card_proc_new(chip->card, "vx-status", &entry)) | 637 | if (! snd_card_proc_new(chip->card, "vx-status", &entry)) |
638 | snd_info_set_text_ops(entry, chip, 1024, vx_proc_read); | 638 | snd_info_set_text_ops(entry, chip, 1024, vx_proc_read); |
@@ -642,7 +642,7 @@ static void vx_proc_init(vx_core_t *chip) | |||
642 | /** | 642 | /** |
643 | * snd_vx_dsp_boot - load the DSP boot | 643 | * snd_vx_dsp_boot - load the DSP boot |
644 | */ | 644 | */ |
645 | int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot) | 645 | int snd_vx_dsp_boot(struct vx_core *chip, const struct firmware *boot) |
646 | { | 646 | { |
647 | int err; | 647 | int err; |
648 | int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT); | 648 | int cold_reset = !(chip->chip_status & VX_STAT_DEVICE_INIT); |
@@ -660,7 +660,7 @@ int snd_vx_dsp_boot(vx_core_t *chip, const struct firmware *boot) | |||
660 | /** | 660 | /** |
661 | * snd_vx_dsp_load - load the DSP image | 661 | * snd_vx_dsp_load - load the DSP image |
662 | */ | 662 | */ |
663 | int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp) | 663 | int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp) |
664 | { | 664 | { |
665 | unsigned int i; | 665 | unsigned int i; |
666 | int err; | 666 | int err; |
@@ -709,9 +709,9 @@ int snd_vx_dsp_load(vx_core_t *chip, const struct firmware *dsp) | |||
709 | /* | 709 | /* |
710 | * suspend | 710 | * suspend |
711 | */ | 711 | */ |
712 | static int snd_vx_suspend(snd_card_t *card, pm_message_t state) | 712 | static int snd_vx_suspend(struct snd_card *card, pm_message_t state) |
713 | { | 713 | { |
714 | vx_core_t *chip = card->pm_private_data; | 714 | struct vx_core *chip = card->pm_private_data; |
715 | unsigned int i; | 715 | unsigned int i; |
716 | 716 | ||
717 | snd_assert(chip, return -EINVAL); | 717 | snd_assert(chip, return -EINVAL); |
@@ -726,9 +726,9 @@ static int snd_vx_suspend(snd_card_t *card, pm_message_t state) | |||
726 | /* | 726 | /* |
727 | * resume | 727 | * resume |
728 | */ | 728 | */ |
729 | static int snd_vx_resume(snd_card_t *card) | 729 | static int snd_vx_resume(struct snd_card *card) |
730 | { | 730 | { |
731 | vx_core_t *chip = card->pm_private_data; | 731 | struct vx_core *chip = card->pm_private_data; |
732 | int i, err; | 732 | int i, err; |
733 | 733 | ||
734 | snd_assert(chip, return -EINVAL); | 734 | snd_assert(chip, return -EINVAL); |
@@ -754,7 +754,7 @@ static int snd_vx_resume(snd_card_t *card) | |||
754 | #endif | 754 | #endif |
755 | 755 | ||
756 | /** | 756 | /** |
757 | * snd_vx_create - constructor for vx_core_t | 757 | * snd_vx_create - constructor for struct vx_core |
758 | * @hw: hardware specific record | 758 | * @hw: hardware specific record |
759 | * | 759 | * |
760 | * this function allocates the instance and prepare for the hardware | 760 | * this function allocates the instance and prepare for the hardware |
@@ -762,11 +762,11 @@ static int snd_vx_resume(snd_card_t *card) | |||
762 | * | 762 | * |
763 | * return the instance pointer if successful, NULL in error. | 763 | * return the instance pointer if successful, NULL in error. |
764 | */ | 764 | */ |
765 | vx_core_t *snd_vx_create(snd_card_t *card, struct snd_vx_hardware *hw, | 765 | struct vx_core *snd_vx_create(struct snd_card *card, struct snd_vx_hardware *hw, |
766 | struct snd_vx_ops *ops, | 766 | struct snd_vx_ops *ops, |
767 | int extra_size) | 767 | int extra_size) |
768 | { | 768 | { |
769 | vx_core_t *chip; | 769 | struct vx_core *chip; |
770 | 770 | ||
771 | snd_assert(card && hw && ops, return NULL); | 771 | snd_assert(card && hw && ops, return NULL); |
772 | 772 | ||