diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:46:59 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:42 -0500 |
commit | af26367f69a474ed809e4a59abb5855b47daaff4 (patch) | |
tree | 8ee9ec6449b3b51953cda3d546e90c064f963684 /sound | |
parent | 9f38945fab04a0a0ea50880fa634f9bfa28f6226 (diff) |
[ALSA] Remove xxx_t typedefs: VXdriver
Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/drivers/vx/vx_core.c | 58 | ||||
-rw-r--r-- | sound/drivers/vx/vx_hwdep.c | 24 | ||||
-rw-r--r-- | sound/drivers/vx/vx_mixer.c | 162 | ||||
-rw-r--r-- | sound/drivers/vx/vx_pcm.c | 200 | ||||
-rw-r--r-- | sound/drivers/vx/vx_uer.c | 22 | ||||
-rw-r--r-- | sound/pci/vx222/vx222.c | 16 | ||||
-rw-r--r-- | sound/pci/vx222/vx222.h | 2 | ||||
-rw-r--r-- | sound/pci/vx222/vx222_ops.c | 84 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxp_mixer.c | 26 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxp_ops.c | 48 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxpocket.c | 26 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxpocket.h | 8 |
12 files changed, 349 insertions, 327 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 | ||
diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index c4993b004c42..d837783fb538 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #ifdef SND_VX_FW_LOADER | 31 | #ifdef SND_VX_FW_LOADER |
32 | 32 | ||
33 | int snd_vx_setup_firmware(vx_core_t *chip) | 33 | int snd_vx_setup_firmware(struct vx_core *chip) |
34 | { | 34 | { |
35 | static char *fw_files[VX_TYPE_NUMS][4] = { | 35 | static char *fw_files[VX_TYPE_NUMS][4] = { |
36 | [VX_TYPE_BOARD] = { | 36 | [VX_TYPE_BOARD] = { |
@@ -95,7 +95,7 @@ int snd_vx_setup_firmware(vx_core_t *chip) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | /* exported */ | 97 | /* exported */ |
98 | void snd_vx_free_firmware(vx_core_t *chip) | 98 | void snd_vx_free_firmware(struct vx_core *chip) |
99 | { | 99 | { |
100 | #ifdef CONFIG_PM | 100 | #ifdef CONFIG_PM |
101 | int i; | 101 | int i; |
@@ -106,17 +106,18 @@ void snd_vx_free_firmware(vx_core_t *chip) | |||
106 | 106 | ||
107 | #else /* old style firmware loading */ | 107 | #else /* old style firmware loading */ |
108 | 108 | ||
109 | static int vx_hwdep_open(snd_hwdep_t *hw, struct file *file) | 109 | static int vx_hwdep_open(struct snd_hwdep *hw, struct file *file) |
110 | { | 110 | { |
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int vx_hwdep_release(snd_hwdep_t *hw, struct file *file) | 114 | static int vx_hwdep_release(struct snd_hwdep *hw, struct file *file) |
115 | { | 115 | { |
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) | 119 | static int vx_hwdep_dsp_status(struct snd_hwdep *hw, |
120 | struct snd_hwdep_dsp_status *info) | ||
120 | { | 121 | { |
121 | static char *type_ids[VX_TYPE_NUMS] = { | 122 | static char *type_ids[VX_TYPE_NUMS] = { |
122 | [VX_TYPE_BOARD] = "vxboard", | 123 | [VX_TYPE_BOARD] = "vxboard", |
@@ -125,7 +126,7 @@ static int vx_hwdep_dsp_status(snd_hwdep_t *hw, snd_hwdep_dsp_status_t *info) | |||
125 | [VX_TYPE_VXPOCKET] = "vxpocket", | 126 | [VX_TYPE_VXPOCKET] = "vxpocket", |
126 | [VX_TYPE_VXP440] = "vxp440", | 127 | [VX_TYPE_VXP440] = "vxp440", |
127 | }; | 128 | }; |
128 | vx_core_t *vx = hw->private_data; | 129 | struct vx_core *vx = hw->private_data; |
129 | 130 | ||
130 | snd_assert(type_ids[vx->type], return -EINVAL); | 131 | snd_assert(type_ids[vx->type], return -EINVAL); |
131 | strcpy(info->id, type_ids[vx->type]); | 132 | strcpy(info->id, type_ids[vx->type]); |
@@ -147,9 +148,10 @@ static void free_fw(const struct firmware *fw) | |||
147 | } | 148 | } |
148 | } | 149 | } |
149 | 150 | ||
150 | static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) | 151 | static int vx_hwdep_dsp_load(struct snd_hwdep *hw, |
152 | struct snd_hwdep_dsp_image *dsp) | ||
151 | { | 153 | { |
152 | vx_core_t *vx = hw->private_data; | 154 | struct vx_core *vx = hw->private_data; |
153 | int index, err; | 155 | int index, err; |
154 | struct firmware *fw; | 156 | struct firmware *fw; |
155 | 157 | ||
@@ -216,10 +218,10 @@ static int vx_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t *dsp) | |||
216 | 218 | ||
217 | 219 | ||
218 | /* exported */ | 220 | /* exported */ |
219 | int snd_vx_setup_firmware(vx_core_t *chip) | 221 | int snd_vx_setup_firmware(struct vx_core *chip) |
220 | { | 222 | { |
221 | int err; | 223 | int err; |
222 | snd_hwdep_t *hw; | 224 | struct snd_hwdep *hw; |
223 | 225 | ||
224 | if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0) | 226 | if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0) |
225 | return err; | 227 | return err; |
@@ -238,7 +240,7 @@ int snd_vx_setup_firmware(vx_core_t *chip) | |||
238 | } | 240 | } |
239 | 241 | ||
240 | /* exported */ | 242 | /* exported */ |
241 | void snd_vx_free_firmware(vx_core_t *chip) | 243 | void snd_vx_free_firmware(struct vx_core *chip) |
242 | { | 244 | { |
243 | #ifdef CONFIG_PM | 245 | #ifdef CONFIG_PM |
244 | int i; | 246 | int i; |
diff --git a/sound/drivers/vx/vx_mixer.c b/sound/drivers/vx/vx_mixer.c index 19fc68c23378..8ec2c605d2f0 100644 --- a/sound/drivers/vx/vx_mixer.c +++ b/sound/drivers/vx/vx_mixer.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /* | 30 | /* |
31 | * write a codec data (24bit) | 31 | * write a codec data (24bit) |
32 | */ | 32 | */ |
33 | static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) | 33 | static void vx_write_codec_reg(struct vx_core *chip, int codec, unsigned int data) |
34 | { | 34 | { |
35 | unsigned long flags; | 35 | unsigned long flags; |
36 | 36 | ||
@@ -47,7 +47,7 @@ static void vx_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) | |||
47 | /* | 47 | /* |
48 | * Data type used to access the Codec | 48 | * Data type used to access the Codec |
49 | */ | 49 | */ |
50 | typedef union { | 50 | union vx_codec_data { |
51 | u32 l; | 51 | u32 l; |
52 | #ifdef SNDRV_BIG_ENDIAN | 52 | #ifdef SNDRV_BIG_ENDIAN |
53 | struct w { | 53 | struct w { |
@@ -72,7 +72,7 @@ typedef union { | |||
72 | u8 hh; | 72 | u8 hh; |
73 | } b; | 73 | } b; |
74 | #endif | 74 | #endif |
75 | } vx_codec_data_t; | 75 | }; |
76 | 76 | ||
77 | #define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) | 77 | #define SET_CDC_DATA_SEL(di,s) ((di).b.mh = (u8) (s)) |
78 | #define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) | 78 | #define SET_CDC_DATA_REG(di,r) ((di).b.ml = (u8) (r)) |
@@ -85,9 +85,9 @@ typedef union { | |||
85 | * @reg: register index | 85 | * @reg: register index |
86 | * @val: data value | 86 | * @val: data value |
87 | */ | 87 | */ |
88 | static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) | 88 | static void vx_set_codec_reg(struct vx_core *chip, int codec, int reg, int val) |
89 | { | 89 | { |
90 | vx_codec_data_t data; | 90 | union vx_codec_data data; |
91 | /* DAC control register */ | 91 | /* DAC control register */ |
92 | SET_CDC_DATA_INIT(data); | 92 | SET_CDC_DATA_INIT(data); |
93 | SET_CDC_DATA_REG(data, reg); | 93 | SET_CDC_DATA_REG(data, reg); |
@@ -102,7 +102,7 @@ static void vx_set_codec_reg(vx_core_t *chip, int codec, int reg, int val) | |||
102 | * @left: left output level, 0 = mute | 102 | * @left: left output level, 0 = mute |
103 | * @right: right output level | 103 | * @right: right output level |
104 | */ | 104 | */ |
105 | static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int right) | 105 | static void vx_set_analog_output_level(struct vx_core *chip, int codec, int left, int right) |
106 | { | 106 | { |
107 | left = chip->hw->output_level_max - left; | 107 | left = chip->hw->output_level_max - left; |
108 | right = chip->hw->output_level_max - right; | 108 | right = chip->hw->output_level_max - right; |
@@ -126,7 +126,7 @@ static void vx_set_analog_output_level(vx_core_t *chip, int codec, int left, int | |||
126 | #define DAC_ATTEN_MIN 0x08 | 126 | #define DAC_ATTEN_MIN 0x08 |
127 | #define DAC_ATTEN_MAX 0x38 | 127 | #define DAC_ATTEN_MAX 0x38 |
128 | 128 | ||
129 | void vx_toggle_dac_mute(vx_core_t *chip, int mute) | 129 | void vx_toggle_dac_mute(struct vx_core *chip, int mute) |
130 | { | 130 | { |
131 | unsigned int i; | 131 | unsigned int i; |
132 | for (i = 0; i < chip->hw->num_codecs; i++) { | 132 | for (i = 0; i < chip->hw->num_codecs; i++) { |
@@ -141,7 +141,7 @@ void vx_toggle_dac_mute(vx_core_t *chip, int mute) | |||
141 | /* | 141 | /* |
142 | * vx_reset_codec - reset and initialize the codecs | 142 | * vx_reset_codec - reset and initialize the codecs |
143 | */ | 143 | */ |
144 | void vx_reset_codec(vx_core_t *chip, int cold_reset) | 144 | void vx_reset_codec(struct vx_core *chip, int cold_reset) |
145 | { | 145 | { |
146 | unsigned int i; | 146 | unsigned int i; |
147 | int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; | 147 | int port = chip->type >= VX_TYPE_VXPOCKET ? 0x75 : 0x65; |
@@ -175,7 +175,7 @@ void vx_reset_codec(vx_core_t *chip, int cold_reset) | |||
175 | * change the audio input source | 175 | * change the audio input source |
176 | * @src: the target source (VX_AUDIO_SRC_XXX) | 176 | * @src: the target source (VX_AUDIO_SRC_XXX) |
177 | */ | 177 | */ |
178 | static void vx_change_audio_source(vx_core_t *chip, int src) | 178 | static void vx_change_audio_source(struct vx_core *chip, int src) |
179 | { | 179 | { |
180 | unsigned long flags; | 180 | unsigned long flags; |
181 | 181 | ||
@@ -192,7 +192,7 @@ static void vx_change_audio_source(vx_core_t *chip, int src) | |||
192 | * change the audio source if necessary and possible | 192 | * change the audio source if necessary and possible |
193 | * returns 1 if the source is actually changed. | 193 | * returns 1 if the source is actually changed. |
194 | */ | 194 | */ |
195 | int vx_sync_audio_source(vx_core_t *chip) | 195 | int vx_sync_audio_source(struct vx_core *chip) |
196 | { | 196 | { |
197 | if (chip->audio_source_target == chip->audio_source || | 197 | if (chip->audio_source_target == chip->audio_source || |
198 | chip->pcm_running) | 198 | chip->pcm_running) |
@@ -217,7 +217,7 @@ struct vx_audio_level { | |||
217 | short monitor_level; | 217 | short monitor_level; |
218 | }; | 218 | }; |
219 | 219 | ||
220 | static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, | 220 | static int vx_adjust_audio_level(struct vx_core *chip, int audio, int capture, |
221 | struct vx_audio_level *info) | 221 | struct vx_audio_level *info) |
222 | { | 222 | { |
223 | struct vx_rmh rmh; | 223 | struct vx_rmh rmh; |
@@ -256,7 +256,7 @@ static int vx_adjust_audio_level(vx_core_t *chip, int audio, int capture, | |||
256 | 256 | ||
257 | 257 | ||
258 | #if 0 // not used | 258 | #if 0 // not used |
259 | static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, | 259 | static int vx_read_audio_level(struct vx_core *chip, int audio, int capture, |
260 | struct vx_audio_level *info) | 260 | struct vx_audio_level *info) |
261 | { | 261 | { |
262 | int err; | 262 | int err; |
@@ -283,7 +283,7 @@ static int vx_read_audio_level(vx_core_t *chip, int audio, int capture, | |||
283 | * set the monitoring level and mute state of the given audio | 283 | * set the monitoring level and mute state of the given audio |
284 | * no more static, because must be called from vx_pcm to demute monitoring | 284 | * no more static, because must be called from vx_pcm to demute monitoring |
285 | */ | 285 | */ |
286 | int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) | 286 | int vx_set_monitor_level(struct vx_core *chip, int audio, int level, int active) |
287 | { | 287 | { |
288 | struct vx_audio_level info; | 288 | struct vx_audio_level info; |
289 | 289 | ||
@@ -301,7 +301,7 @@ int vx_set_monitor_level(vx_core_t *chip, int audio, int level, int active) | |||
301 | /* | 301 | /* |
302 | * set the mute status of the given audio | 302 | * set the mute status of the given audio |
303 | */ | 303 | */ |
304 | static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) | 304 | static int vx_set_audio_switch(struct vx_core *chip, int audio, int active) |
305 | { | 305 | { |
306 | struct vx_audio_level info; | 306 | struct vx_audio_level info; |
307 | 307 | ||
@@ -315,7 +315,7 @@ static int vx_set_audio_switch(vx_core_t *chip, int audio, int active) | |||
315 | /* | 315 | /* |
316 | * set the mute status of the given audio | 316 | * set the mute status of the given audio |
317 | */ | 317 | */ |
318 | static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) | 318 | static int vx_set_audio_gain(struct vx_core *chip, int audio, int capture, int level) |
319 | { | 319 | { |
320 | struct vx_audio_level info; | 320 | struct vx_audio_level info; |
321 | 321 | ||
@@ -329,7 +329,7 @@ static int vx_set_audio_gain(vx_core_t *chip, int audio, int capture, int level) | |||
329 | /* | 329 | /* |
330 | * reset all audio levels | 330 | * reset all audio levels |
331 | */ | 331 | */ |
332 | static void vx_reset_audio_levels(vx_core_t *chip) | 332 | static void vx_reset_audio_levels(struct vx_core *chip) |
333 | { | 333 | { |
334 | unsigned int i, c; | 334 | unsigned int i, c; |
335 | struct vx_audio_level info; | 335 | struct vx_audio_level info; |
@@ -375,7 +375,7 @@ struct vx_vu_meter { | |||
375 | * @capture: 0 = playback, 1 = capture operation | 375 | * @capture: 0 = playback, 1 = capture operation |
376 | * @info: the array of vx_vu_meter records (size = 2). | 376 | * @info: the array of vx_vu_meter records (size = 2). |
377 | */ | 377 | */ |
378 | static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct vx_vu_meter *info) | 378 | static int vx_get_audio_vu_meter(struct vx_core *chip, int audio, int capture, struct vx_vu_meter *info) |
379 | { | 379 | { |
380 | struct vx_rmh rmh; | 380 | struct vx_rmh rmh; |
381 | int i, err; | 381 | int i, err; |
@@ -413,9 +413,9 @@ static int vx_get_audio_vu_meter(vx_core_t *chip, int audio, int capture, struct | |||
413 | /* | 413 | /* |
414 | * output level control | 414 | * output level control |
415 | */ | 415 | */ |
416 | static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 416 | static int vx_output_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
417 | { | 417 | { |
418 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 418 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
419 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 419 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
420 | uinfo->count = 2; | 420 | uinfo->count = 2; |
421 | uinfo->value.integer.min = 0; | 421 | uinfo->value.integer.min = 0; |
@@ -423,9 +423,9 @@ static int vx_output_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u | |||
423 | return 0; | 423 | return 0; |
424 | } | 424 | } |
425 | 425 | ||
426 | static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 426 | static int vx_output_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
427 | { | 427 | { |
428 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 428 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
429 | int codec = kcontrol->id.index; | 429 | int codec = kcontrol->id.index; |
430 | down(&chip->mixer_mutex); | 430 | down(&chip->mixer_mutex); |
431 | ucontrol->value.integer.value[0] = chip->output_level[codec][0]; | 431 | ucontrol->value.integer.value[0] = chip->output_level[codec][0]; |
@@ -434,9 +434,9 @@ static int vx_output_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u | |||
434 | return 0; | 434 | return 0; |
435 | } | 435 | } |
436 | 436 | ||
437 | static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 437 | static int vx_output_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
438 | { | 438 | { |
439 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 439 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
440 | int codec = kcontrol->id.index; | 440 | int codec = kcontrol->id.index; |
441 | down(&chip->mixer_mutex); | 441 | down(&chip->mixer_mutex); |
442 | if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || | 442 | if (ucontrol->value.integer.value[0] != chip->output_level[codec][0] || |
@@ -453,7 +453,7 @@ static int vx_output_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u | |||
453 | return 0; | 453 | return 0; |
454 | } | 454 | } |
455 | 455 | ||
456 | static snd_kcontrol_new_t vx_control_output_level = { | 456 | static struct snd_kcontrol_new vx_control_output_level = { |
457 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 457 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
458 | .name = "Master Playback Volume", | 458 | .name = "Master Playback Volume", |
459 | .info = vx_output_level_info, | 459 | .info = vx_output_level_info, |
@@ -464,7 +464,7 @@ static snd_kcontrol_new_t vx_control_output_level = { | |||
464 | /* | 464 | /* |
465 | * audio source select | 465 | * audio source select |
466 | */ | 466 | */ |
467 | static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 467 | static int vx_audio_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
468 | { | 468 | { |
469 | static char *texts_mic[3] = { | 469 | static char *texts_mic[3] = { |
470 | "Digital", "Line", "Mic" | 470 | "Digital", "Line", "Mic" |
@@ -472,7 +472,7 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
472 | static char *texts_vx2[2] = { | 472 | static char *texts_vx2[2] = { |
473 | "Digital", "Analog" | 473 | "Digital", "Analog" |
474 | }; | 474 | }; |
475 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 475 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
476 | 476 | ||
477 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 477 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
478 | uinfo->count = 1; | 478 | uinfo->count = 1; |
@@ -492,16 +492,16 @@ static int vx_audio_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
492 | return 0; | 492 | return 0; |
493 | } | 493 | } |
494 | 494 | ||
495 | static int vx_audio_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 495 | static int vx_audio_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
496 | { | 496 | { |
497 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 497 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
498 | ucontrol->value.enumerated.item[0] = chip->audio_source_target; | 498 | ucontrol->value.enumerated.item[0] = chip->audio_source_target; |
499 | return 0; | 499 | return 0; |
500 | } | 500 | } |
501 | 501 | ||
502 | static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 502 | static int vx_audio_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
503 | { | 503 | { |
504 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 504 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
505 | down(&chip->mixer_mutex); | 505 | down(&chip->mixer_mutex); |
506 | if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { | 506 | if (chip->audio_source_target != ucontrol->value.enumerated.item[0]) { |
507 | chip->audio_source_target = ucontrol->value.enumerated.item[0]; | 507 | chip->audio_source_target = ucontrol->value.enumerated.item[0]; |
@@ -513,7 +513,7 @@ static int vx_audio_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon | |||
513 | return 0; | 513 | return 0; |
514 | } | 514 | } |
515 | 515 | ||
516 | static snd_kcontrol_new_t vx_control_audio_src = { | 516 | static struct snd_kcontrol_new vx_control_audio_src = { |
517 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 517 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
518 | .name = "Capture Source", | 518 | .name = "Capture Source", |
519 | .info = vx_audio_src_info, | 519 | .info = vx_audio_src_info, |
@@ -524,7 +524,7 @@ static snd_kcontrol_new_t vx_control_audio_src = { | |||
524 | /* | 524 | /* |
525 | * clock mode selection | 525 | * clock mode selection |
526 | */ | 526 | */ |
527 | static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 527 | static int vx_clock_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
528 | { | 528 | { |
529 | static char *texts[3] = { | 529 | static char *texts[3] = { |
530 | "Auto", "Internal", "External" | 530 | "Auto", "Internal", "External" |
@@ -540,16 +540,16 @@ static int vx_clock_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin | |||
540 | return 0; | 540 | return 0; |
541 | } | 541 | } |
542 | 542 | ||
543 | static int vx_clock_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 543 | static int vx_clock_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
544 | { | 544 | { |
545 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 545 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
546 | ucontrol->value.enumerated.item[0] = chip->clock_mode; | 546 | ucontrol->value.enumerated.item[0] = chip->clock_mode; |
547 | return 0; | 547 | return 0; |
548 | } | 548 | } |
549 | 549 | ||
550 | static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 550 | static int vx_clock_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
551 | { | 551 | { |
552 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 552 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
553 | down(&chip->mixer_mutex); | 553 | down(&chip->mixer_mutex); |
554 | if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { | 554 | if (chip->clock_mode != ucontrol->value.enumerated.item[0]) { |
555 | chip->clock_mode = ucontrol->value.enumerated.item[0]; | 555 | chip->clock_mode = ucontrol->value.enumerated.item[0]; |
@@ -561,7 +561,7 @@ static int vx_clock_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
563 | 563 | ||
564 | static snd_kcontrol_new_t vx_control_clock_mode = { | 564 | static struct snd_kcontrol_new vx_control_clock_mode = { |
565 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 565 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
566 | .name = "Clock Mode", | 566 | .name = "Clock Mode", |
567 | .info = vx_clock_mode_info, | 567 | .info = vx_clock_mode_info, |
@@ -572,7 +572,7 @@ static snd_kcontrol_new_t vx_control_clock_mode = { | |||
572 | /* | 572 | /* |
573 | * Audio Gain | 573 | * Audio Gain |
574 | */ | 574 | */ |
575 | static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 575 | static int vx_audio_gain_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
576 | { | 576 | { |
577 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 577 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
578 | uinfo->count = 2; | 578 | uinfo->count = 2; |
@@ -581,9 +581,9 @@ static int vx_audio_gain_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin | |||
581 | return 0; | 581 | return 0; |
582 | } | 582 | } |
583 | 583 | ||
584 | static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 584 | static int vx_audio_gain_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
585 | { | 585 | { |
586 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 586 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
587 | int audio = kcontrol->private_value & 0xff; | 587 | int audio = kcontrol->private_value & 0xff; |
588 | int capture = (kcontrol->private_value >> 8) & 1; | 588 | int capture = (kcontrol->private_value >> 8) & 1; |
589 | 589 | ||
@@ -594,9 +594,9 @@ static int vx_audio_gain_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | 596 | ||
597 | static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 597 | static int vx_audio_gain_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
598 | { | 598 | { |
599 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 599 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
600 | int audio = kcontrol->private_value & 0xff; | 600 | int audio = kcontrol->private_value & 0xff; |
601 | int capture = (kcontrol->private_value >> 8) & 1; | 601 | int capture = (kcontrol->private_value >> 8) & 1; |
602 | 602 | ||
@@ -612,9 +612,9 @@ static int vx_audio_gain_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
612 | return 0; | 612 | return 0; |
613 | } | 613 | } |
614 | 614 | ||
615 | static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 615 | static int vx_audio_monitor_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
616 | { | 616 | { |
617 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 617 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
618 | int audio = kcontrol->private_value & 0xff; | 618 | int audio = kcontrol->private_value & 0xff; |
619 | 619 | ||
620 | down(&chip->mixer_mutex); | 620 | down(&chip->mixer_mutex); |
@@ -624,9 +624,9 @@ static int vx_audio_monitor_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * | |||
624 | return 0; | 624 | return 0; |
625 | } | 625 | } |
626 | 626 | ||
627 | static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 627 | static int vx_audio_monitor_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
628 | { | 628 | { |
629 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 629 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
630 | int audio = kcontrol->private_value & 0xff; | 630 | int audio = kcontrol->private_value & 0xff; |
631 | 631 | ||
632 | down(&chip->mixer_mutex); | 632 | down(&chip->mixer_mutex); |
@@ -643,7 +643,7 @@ static int vx_audio_monitor_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t * | |||
643 | return 0; | 643 | return 0; |
644 | } | 644 | } |
645 | 645 | ||
646 | static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 646 | static int vx_audio_sw_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
647 | { | 647 | { |
648 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 648 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
649 | uinfo->count = 2; | 649 | uinfo->count = 2; |
@@ -652,9 +652,9 @@ static int vx_audio_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo | |||
652 | return 0; | 652 | return 0; |
653 | } | 653 | } |
654 | 654 | ||
655 | static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 655 | static int vx_audio_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
656 | { | 656 | { |
657 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 657 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
658 | int audio = kcontrol->private_value & 0xff; | 658 | int audio = kcontrol->private_value & 0xff; |
659 | 659 | ||
660 | down(&chip->mixer_mutex); | 660 | down(&chip->mixer_mutex); |
@@ -664,9 +664,9 @@ static int vx_audio_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont | |||
664 | return 0; | 664 | return 0; |
665 | } | 665 | } |
666 | 666 | ||
667 | static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 667 | static int vx_audio_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
668 | { | 668 | { |
669 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 669 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
670 | int audio = kcontrol->private_value & 0xff; | 670 | int audio = kcontrol->private_value & 0xff; |
671 | 671 | ||
672 | down(&chip->mixer_mutex); | 672 | down(&chip->mixer_mutex); |
@@ -681,9 +681,9 @@ static int vx_audio_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont | |||
681 | return 0; | 681 | return 0; |
682 | } | 682 | } |
683 | 683 | ||
684 | static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 684 | static int vx_monitor_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
685 | { | 685 | { |
686 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 686 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
687 | int audio = kcontrol->private_value & 0xff; | 687 | int audio = kcontrol->private_value & 0xff; |
688 | 688 | ||
689 | down(&chip->mixer_mutex); | 689 | down(&chip->mixer_mutex); |
@@ -693,9 +693,9 @@ static int vx_monitor_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
693 | return 0; | 693 | return 0; |
694 | } | 694 | } |
695 | 695 | ||
696 | static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 696 | static int vx_monitor_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
697 | { | 697 | { |
698 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 698 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
699 | int audio = kcontrol->private_value & 0xff; | 699 | int audio = kcontrol->private_value & 0xff; |
700 | 700 | ||
701 | down(&chip->mixer_mutex); | 701 | down(&chip->mixer_mutex); |
@@ -712,28 +712,28 @@ static int vx_monitor_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
712 | return 0; | 712 | return 0; |
713 | } | 713 | } |
714 | 714 | ||
715 | static snd_kcontrol_new_t vx_control_audio_gain = { | 715 | static struct snd_kcontrol_new vx_control_audio_gain = { |
716 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 716 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
717 | /* name will be filled later */ | 717 | /* name will be filled later */ |
718 | .info = vx_audio_gain_info, | 718 | .info = vx_audio_gain_info, |
719 | .get = vx_audio_gain_get, | 719 | .get = vx_audio_gain_get, |
720 | .put = vx_audio_gain_put | 720 | .put = vx_audio_gain_put |
721 | }; | 721 | }; |
722 | static snd_kcontrol_new_t vx_control_output_switch = { | 722 | static struct snd_kcontrol_new vx_control_output_switch = { |
723 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 723 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
724 | .name = "PCM Playback Switch", | 724 | .name = "PCM Playback Switch", |
725 | .info = vx_audio_sw_info, | 725 | .info = vx_audio_sw_info, |
726 | .get = vx_audio_sw_get, | 726 | .get = vx_audio_sw_get, |
727 | .put = vx_audio_sw_put | 727 | .put = vx_audio_sw_put |
728 | }; | 728 | }; |
729 | static snd_kcontrol_new_t vx_control_monitor_gain = { | 729 | static struct snd_kcontrol_new vx_control_monitor_gain = { |
730 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 730 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
731 | .name = "Monitoring Volume", | 731 | .name = "Monitoring Volume", |
732 | .info = vx_audio_gain_info, /* shared */ | 732 | .info = vx_audio_gain_info, /* shared */ |
733 | .get = vx_audio_monitor_get, | 733 | .get = vx_audio_monitor_get, |
734 | .put = vx_audio_monitor_put | 734 | .put = vx_audio_monitor_put |
735 | }; | 735 | }; |
736 | static snd_kcontrol_new_t vx_control_monitor_switch = { | 736 | static struct snd_kcontrol_new vx_control_monitor_switch = { |
737 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 737 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
738 | .name = "Monitoring Switch", | 738 | .name = "Monitoring Switch", |
739 | .info = vx_audio_sw_info, /* shared */ | 739 | .info = vx_audio_sw_info, /* shared */ |
@@ -745,16 +745,16 @@ static snd_kcontrol_new_t vx_control_monitor_switch = { | |||
745 | /* | 745 | /* |
746 | * IEC958 status bits | 746 | * IEC958 status bits |
747 | */ | 747 | */ |
748 | static int vx_iec958_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 748 | static int vx_iec958_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
749 | { | 749 | { |
750 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; | 750 | uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; |
751 | uinfo->count = 1; | 751 | uinfo->count = 1; |
752 | return 0; | 752 | return 0; |
753 | } | 753 | } |
754 | 754 | ||
755 | static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 755 | static int vx_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
756 | { | 756 | { |
757 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 757 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
758 | 758 | ||
759 | down(&chip->mixer_mutex); | 759 | down(&chip->mixer_mutex); |
760 | ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; | 760 | ucontrol->value.iec958.status[0] = (chip->uer_bits >> 0) & 0xff; |
@@ -765,7 +765,7 @@ static int vx_iec958_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro | |||
765 | return 0; | 765 | return 0; |
766 | } | 766 | } |
767 | 767 | ||
768 | static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) | 768 | static int vx_iec958_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
769 | { | 769 | { |
770 | ucontrol->value.iec958.status[0] = 0xff; | 770 | ucontrol->value.iec958.status[0] = 0xff; |
771 | ucontrol->value.iec958.status[1] = 0xff; | 771 | ucontrol->value.iec958.status[1] = 0xff; |
@@ -774,9 +774,9 @@ static int vx_iec958_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *u | |||
774 | return 0; | 774 | return 0; |
775 | } | 775 | } |
776 | 776 | ||
777 | static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 777 | static int vx_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
778 | { | 778 | { |
779 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 779 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
780 | unsigned int val; | 780 | unsigned int val; |
781 | 781 | ||
782 | val = (ucontrol->value.iec958.status[0] << 0) | | 782 | val = (ucontrol->value.iec958.status[0] << 0) | |
@@ -794,7 +794,7 @@ static int vx_iec958_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro | |||
794 | return 0; | 794 | return 0; |
795 | } | 795 | } |
796 | 796 | ||
797 | static snd_kcontrol_new_t vx_control_iec958_mask = { | 797 | static struct snd_kcontrol_new vx_control_iec958_mask = { |
798 | .access = SNDRV_CTL_ELEM_ACCESS_READ, | 798 | .access = SNDRV_CTL_ELEM_ACCESS_READ, |
799 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 799 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
800 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), | 800 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), |
@@ -802,7 +802,7 @@ static snd_kcontrol_new_t vx_control_iec958_mask = { | |||
802 | .get = vx_iec958_mask_get, | 802 | .get = vx_iec958_mask_get, |
803 | }; | 803 | }; |
804 | 804 | ||
805 | static snd_kcontrol_new_t vx_control_iec958 = { | 805 | static struct snd_kcontrol_new vx_control_iec958 = { |
806 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 806 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
807 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), | 807 | .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), |
808 | .info = vx_iec958_info, | 808 | .info = vx_iec958_info, |
@@ -818,7 +818,7 @@ static snd_kcontrol_new_t vx_control_iec958 = { | |||
818 | #define METER_MAX 0xff | 818 | #define METER_MAX 0xff |
819 | #define METER_SHIFT 16 | 819 | #define METER_SHIFT 16 |
820 | 820 | ||
821 | static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 821 | static int vx_vu_meter_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
822 | { | 822 | { |
823 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 823 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
824 | uinfo->count = 2; | 824 | uinfo->count = 2; |
@@ -827,9 +827,9 @@ static int vx_vu_meter_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo | |||
827 | return 0; | 827 | return 0; |
828 | } | 828 | } |
829 | 829 | ||
830 | static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 830 | static int vx_vu_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
831 | { | 831 | { |
832 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 832 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
833 | struct vx_vu_meter meter[2]; | 833 | struct vx_vu_meter meter[2]; |
834 | int audio = kcontrol->private_value & 0xff; | 834 | int audio = kcontrol->private_value & 0xff; |
835 | int capture = (kcontrol->private_value >> 8) & 1; | 835 | int capture = (kcontrol->private_value >> 8) & 1; |
@@ -840,9 +840,9 @@ static int vx_vu_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont | |||
840 | return 0; | 840 | return 0; |
841 | } | 841 | } |
842 | 842 | ||
843 | static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 843 | static int vx_peak_meter_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
844 | { | 844 | { |
845 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 845 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
846 | struct vx_vu_meter meter[2]; | 846 | struct vx_vu_meter meter[2]; |
847 | int audio = kcontrol->private_value & 0xff; | 847 | int audio = kcontrol->private_value & 0xff; |
848 | int capture = (kcontrol->private_value >> 8) & 1; | 848 | int capture = (kcontrol->private_value >> 8) & 1; |
@@ -853,7 +853,7 @@ static int vx_peak_meter_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
853 | return 0; | 853 | return 0; |
854 | } | 854 | } |
855 | 855 | ||
856 | static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 856 | static int vx_saturation_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
857 | { | 857 | { |
858 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 858 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
859 | uinfo->count = 2; | 859 | uinfo->count = 2; |
@@ -862,9 +862,9 @@ static int vx_saturation_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin | |||
862 | return 0; | 862 | return 0; |
863 | } | 863 | } |
864 | 864 | ||
865 | static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 865 | static int vx_saturation_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
866 | { | 866 | { |
867 | vx_core_t *chip = snd_kcontrol_chip(kcontrol); | 867 | struct vx_core *chip = snd_kcontrol_chip(kcontrol); |
868 | struct vx_vu_meter meter[2]; | 868 | struct vx_vu_meter meter[2]; |
869 | int audio = kcontrol->private_value & 0xff; | 869 | int audio = kcontrol->private_value & 0xff; |
870 | 870 | ||
@@ -874,7 +874,7 @@ static int vx_saturation_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco | |||
874 | return 0; | 874 | return 0; |
875 | } | 875 | } |
876 | 876 | ||
877 | static snd_kcontrol_new_t vx_control_vu_meter = { | 877 | static struct snd_kcontrol_new vx_control_vu_meter = { |
878 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 878 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
879 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 879 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
880 | /* name will be filled later */ | 880 | /* name will be filled later */ |
@@ -882,7 +882,7 @@ static snd_kcontrol_new_t vx_control_vu_meter = { | |||
882 | .get = vx_vu_meter_get, | 882 | .get = vx_vu_meter_get, |
883 | }; | 883 | }; |
884 | 884 | ||
885 | static snd_kcontrol_new_t vx_control_peak_meter = { | 885 | static struct snd_kcontrol_new vx_control_peak_meter = { |
886 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 886 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
887 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 887 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
888 | /* name will be filled later */ | 888 | /* name will be filled later */ |
@@ -890,7 +890,7 @@ static snd_kcontrol_new_t vx_control_peak_meter = { | |||
890 | .get = vx_peak_meter_get, | 890 | .get = vx_peak_meter_get, |
891 | }; | 891 | }; |
892 | 892 | ||
893 | static snd_kcontrol_new_t vx_control_saturation = { | 893 | static struct snd_kcontrol_new vx_control_saturation = { |
894 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 894 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
895 | .name = "Input Saturation", | 895 | .name = "Input Saturation", |
896 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 896 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
@@ -904,12 +904,12 @@ static snd_kcontrol_new_t vx_control_saturation = { | |||
904 | * | 904 | * |
905 | */ | 905 | */ |
906 | 906 | ||
907 | int snd_vx_mixer_new(vx_core_t *chip) | 907 | int snd_vx_mixer_new(struct vx_core *chip) |
908 | { | 908 | { |
909 | unsigned int i, c; | 909 | unsigned int i, c; |
910 | int err; | 910 | int err; |
911 | snd_kcontrol_new_t temp; | 911 | struct snd_kcontrol_new temp; |
912 | snd_card_t *card = chip->card; | 912 | struct snd_card *card = chip->card; |
913 | char name[32]; | 913 | char name[32]; |
914 | 914 | ||
915 | strcpy(card->mixername, card->driver); | 915 | strcpy(card->mixername, card->driver); |
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 2b46758fe86f..464109e421d4 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c | |||
@@ -61,7 +61,8 @@ | |||
61 | */ | 61 | */ |
62 | 62 | ||
63 | /* get the physical page pointer on the given offset */ | 63 | /* get the physical page pointer on the given offset */ |
64 | static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset) | 64 | static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, |
65 | unsigned long offset) | ||
65 | { | 66 | { |
66 | void *pageptr = subs->runtime->dma_area + offset; | 67 | void *pageptr = subs->runtime->dma_area + offset; |
67 | return vmalloc_to_page(pageptr); | 68 | return vmalloc_to_page(pageptr); |
@@ -72,9 +73,9 @@ static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned | |||
72 | * called from hw_params | 73 | * called from hw_params |
73 | * NOTE: this may be called not only once per pcm open! | 74 | * NOTE: this may be called not only once per pcm open! |
74 | */ | 75 | */ |
75 | static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) | 76 | static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size) |
76 | { | 77 | { |
77 | snd_pcm_runtime_t *runtime = subs->runtime; | 78 | struct snd_pcm_runtime *runtime = subs->runtime; |
78 | if (runtime->dma_area) { | 79 | if (runtime->dma_area) { |
79 | /* already allocated */ | 80 | /* already allocated */ |
80 | if (runtime->dma_bytes >= size) | 81 | if (runtime->dma_bytes >= size) |
@@ -94,9 +95,9 @@ static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) | |||
94 | * called from hw_free callback | 95 | * called from hw_free callback |
95 | * NOTE: this may be called not only once per pcm open! | 96 | * NOTE: this may be called not only once per pcm open! |
96 | */ | 97 | */ |
97 | static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) | 98 | static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) |
98 | { | 99 | { |
99 | snd_pcm_runtime_t *runtime = subs->runtime; | 100 | struct snd_pcm_runtime *runtime = subs->runtime; |
100 | if (runtime->dma_area) { | 101 | if (runtime->dma_area) { |
101 | vfree(runtime->dma_area); | 102 | vfree(runtime->dma_area); |
102 | runtime->dma_area = NULL; | 103 | runtime->dma_area = NULL; |
@@ -108,7 +109,8 @@ static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) | |||
108 | /* | 109 | /* |
109 | * read three pending pcm bytes via inb() | 110 | * read three pending pcm bytes via inb() |
110 | */ | 111 | */ |
111 | static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) | 112 | static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
113 | struct vx_pipe *pipe) | ||
112 | { | 114 | { |
113 | int offset = pipe->hw_ptr; | 115 | int offset = pipe->hw_ptr; |
114 | unsigned char *buf = (unsigned char *)(runtime->dma_area + offset); | 116 | unsigned char *buf = (unsigned char *)(runtime->dma_area + offset); |
@@ -135,7 +137,8 @@ static void vx_pcm_read_per_bytes(vx_core_t *chip, snd_pcm_runtime_t *runtime, v | |||
135 | * @pc_time: the pointer for the PC-time to set | 137 | * @pc_time: the pointer for the PC-time to set |
136 | * @dsp_time: the pointer for RMH status time array | 138 | * @dsp_time: the pointer for RMH status time array |
137 | */ | 139 | */ |
138 | static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int *dsp_time) | 140 | static void vx_set_pcx_time(struct vx_core *chip, pcx_time_t *pc_time, |
141 | unsigned int *dsp_time) | ||
139 | { | 142 | { |
140 | dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK; | 143 | dsp_time[0] = (unsigned int)((*pc_time) >> 24) & PCX_TIME_HI_MASK; |
141 | dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD; | 144 | dsp_time[1] = (unsigned int)(*pc_time) & MASK_DSP_WORD; |
@@ -151,7 +154,8 @@ static void vx_set_pcx_time(vx_core_t *chip, pcx_time_t *pc_time, unsigned int * | |||
151 | * | 154 | * |
152 | * returns the increase of the command length. | 155 | * returns the increase of the command length. |
153 | */ | 156 | */ |
154 | static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t *pipe) | 157 | static int vx_set_differed_time(struct vx_core *chip, struct vx_rmh *rmh, |
158 | struct vx_pipe *pipe) | ||
155 | { | 159 | { |
156 | /* Update The length added to the RMH command by the timestamp */ | 160 | /* Update The length added to the RMH command by the timestamp */ |
157 | if (! (pipe->differed_type & DC_DIFFERED_DELAY)) | 161 | if (! (pipe->differed_type & DC_DIFFERED_DELAY)) |
@@ -184,7 +188,8 @@ static int vx_set_differed_time(vx_core_t *chip, struct vx_rmh *rmh, vx_pipe_t * | |||
184 | * @pipe: the affected pipe | 188 | * @pipe: the affected pipe |
185 | * @data: format bitmask | 189 | * @data: format bitmask |
186 | */ | 190 | */ |
187 | static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int data) | 191 | static int vx_set_stream_format(struct vx_core *chip, struct vx_pipe *pipe, |
192 | unsigned int data) | ||
188 | { | 193 | { |
189 | struct vx_rmh rmh; | 194 | struct vx_rmh rmh; |
190 | 195 | ||
@@ -210,8 +215,8 @@ static int vx_set_stream_format(vx_core_t *chip, vx_pipe_t *pipe, unsigned int d | |||
210 | * | 215 | * |
211 | * returns 0 if successful, or a negative error code. | 216 | * returns 0 if successful, or a negative error code. |
212 | */ | 217 | */ |
213 | static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe, | 218 | static int vx_set_format(struct vx_core *chip, struct vx_pipe *pipe, |
214 | snd_pcm_runtime_t *runtime) | 219 | struct snd_pcm_runtime *runtime) |
215 | { | 220 | { |
216 | unsigned int header = HEADER_FMT_BASE; | 221 | unsigned int header = HEADER_FMT_BASE; |
217 | 222 | ||
@@ -239,7 +244,7 @@ static int vx_set_format(vx_core_t *chip, vx_pipe_t *pipe, | |||
239 | /* | 244 | /* |
240 | * set / query the IBL size | 245 | * set / query the IBL size |
241 | */ | 246 | */ |
242 | static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info) | 247 | static int vx_set_ibl(struct vx_core *chip, struct vx_ibl_info *info) |
243 | { | 248 | { |
244 | int err; | 249 | int err; |
245 | struct vx_rmh rmh; | 250 | struct vx_rmh rmh; |
@@ -269,7 +274,7 @@ static int vx_set_ibl(vx_core_t *chip, struct vx_ibl_info *info) | |||
269 | * | 274 | * |
270 | * called from trigger callback only | 275 | * called from trigger callback only |
271 | */ | 276 | */ |
272 | static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state) | 277 | static int vx_get_pipe_state(struct vx_core *chip, struct vx_pipe *pipe, int *state) |
273 | { | 278 | { |
274 | int err; | 279 | int err; |
275 | struct vx_rmh rmh; | 280 | struct vx_rmh rmh; |
@@ -294,7 +299,7 @@ static int vx_get_pipe_state(vx_core_t *chip, vx_pipe_t *pipe, int *state) | |||
294 | * you'll need to disconnect the host to get back to the | 299 | * you'll need to disconnect the host to get back to the |
295 | * normal mode. | 300 | * normal mode. |
296 | */ | 301 | */ |
297 | static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe) | 302 | static int vx_query_hbuffer_size(struct vx_core *chip, struct vx_pipe *pipe) |
298 | { | 303 | { |
299 | int result; | 304 | int result; |
300 | struct vx_rmh rmh; | 305 | struct vx_rmh rmh; |
@@ -318,7 +323,7 @@ static int vx_query_hbuffer_size(vx_core_t *chip, vx_pipe_t *pipe) | |||
318 | * | 323 | * |
319 | * called from trigger callback only | 324 | * called from trigger callback only |
320 | */ | 325 | */ |
321 | static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe) | 326 | static int vx_pipe_can_start(struct vx_core *chip, struct vx_pipe *pipe) |
322 | { | 327 | { |
323 | int err; | 328 | int err; |
324 | struct vx_rmh rmh; | 329 | struct vx_rmh rmh; |
@@ -339,7 +344,7 @@ static int vx_pipe_can_start(vx_core_t *chip, vx_pipe_t *pipe) | |||
339 | * vx_conf_pipe - tell the pipe to stand by and wait for IRQA. | 344 | * vx_conf_pipe - tell the pipe to stand by and wait for IRQA. |
340 | * @pipe: the pipe to be configured | 345 | * @pipe: the pipe to be configured |
341 | */ | 346 | */ |
342 | static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe) | 347 | static int vx_conf_pipe(struct vx_core *chip, struct vx_pipe *pipe) |
343 | { | 348 | { |
344 | struct vx_rmh rmh; | 349 | struct vx_rmh rmh; |
345 | 350 | ||
@@ -353,7 +358,7 @@ static int vx_conf_pipe(vx_core_t *chip, vx_pipe_t *pipe) | |||
353 | /* | 358 | /* |
354 | * vx_send_irqa - trigger IRQA | 359 | * vx_send_irqa - trigger IRQA |
355 | */ | 360 | */ |
356 | static int vx_send_irqa(vx_core_t *chip) | 361 | static int vx_send_irqa(struct vx_core *chip) |
357 | { | 362 | { |
358 | struct vx_rmh rmh; | 363 | struct vx_rmh rmh; |
359 | 364 | ||
@@ -378,7 +383,7 @@ static int vx_send_irqa(vx_core_t *chip) | |||
378 | * called from trigger callback only | 383 | * called from trigger callback only |
379 | * | 384 | * |
380 | */ | 385 | */ |
381 | static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) | 386 | static int vx_toggle_pipe(struct vx_core *chip, struct vx_pipe *pipe, int state) |
382 | { | 387 | { |
383 | int err, i, cur_state; | 388 | int err, i, cur_state; |
384 | 389 | ||
@@ -431,7 +436,7 @@ static int vx_toggle_pipe(vx_core_t *chip, vx_pipe_t *pipe, int state) | |||
431 | * | 436 | * |
432 | * called from trigger callback only | 437 | * called from trigger callback only |
433 | */ | 438 | */ |
434 | static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe) | 439 | static int vx_stop_pipe(struct vx_core *chip, struct vx_pipe *pipe) |
435 | { | 440 | { |
436 | struct vx_rmh rmh; | 441 | struct vx_rmh rmh; |
437 | vx_init_rmh(&rmh, CMD_STOP_PIPE); | 442 | vx_init_rmh(&rmh, CMD_STOP_PIPE); |
@@ -449,12 +454,12 @@ static int vx_stop_pipe(vx_core_t *chip, vx_pipe_t *pipe) | |||
449 | * | 454 | * |
450 | * return 0 on success, or a negative error code. | 455 | * return 0 on success, or a negative error code. |
451 | */ | 456 | */ |
452 | static int vx_alloc_pipe(vx_core_t *chip, int capture, | 457 | static int vx_alloc_pipe(struct vx_core *chip, int capture, |
453 | int audioid, int num_audio, | 458 | int audioid, int num_audio, |
454 | vx_pipe_t **pipep) | 459 | struct vx_pipe **pipep) |
455 | { | 460 | { |
456 | int err; | 461 | int err; |
457 | vx_pipe_t *pipe; | 462 | struct vx_pipe *pipe; |
458 | struct vx_rmh rmh; | 463 | struct vx_rmh rmh; |
459 | int data_mode; | 464 | int data_mode; |
460 | 465 | ||
@@ -499,7 +504,7 @@ static int vx_alloc_pipe(vx_core_t *chip, int capture, | |||
499 | * vx_free_pipe - release a pipe | 504 | * vx_free_pipe - release a pipe |
500 | * @pipe: pipe to be released | 505 | * @pipe: pipe to be released |
501 | */ | 506 | */ |
502 | static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe) | 507 | static int vx_free_pipe(struct vx_core *chip, struct vx_pipe *pipe) |
503 | { | 508 | { |
504 | struct vx_rmh rmh; | 509 | struct vx_rmh rmh; |
505 | 510 | ||
@@ -517,7 +522,7 @@ static int vx_free_pipe(vx_core_t *chip, vx_pipe_t *pipe) | |||
517 | * | 522 | * |
518 | * called from trigger callback only | 523 | * called from trigger callback only |
519 | */ | 524 | */ |
520 | static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe) | 525 | static int vx_start_stream(struct vx_core *chip, struct vx_pipe *pipe) |
521 | { | 526 | { |
522 | struct vx_rmh rmh; | 527 | struct vx_rmh rmh; |
523 | 528 | ||
@@ -533,7 +538,7 @@ static int vx_start_stream(vx_core_t *chip, vx_pipe_t *pipe) | |||
533 | * | 538 | * |
534 | * called from trigger callback only | 539 | * called from trigger callback only |
535 | */ | 540 | */ |
536 | static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe) | 541 | static int vx_stop_stream(struct vx_core *chip, struct vx_pipe *pipe) |
537 | { | 542 | { |
538 | struct vx_rmh rmh; | 543 | struct vx_rmh rmh; |
539 | 544 | ||
@@ -547,11 +552,12 @@ static int vx_stop_stream(vx_core_t *chip, vx_pipe_t *pipe) | |||
547 | * playback hw information | 552 | * playback hw information |
548 | */ | 553 | */ |
549 | 554 | ||
550 | static snd_pcm_hardware_t vx_pcm_playback_hw = { | 555 | static struct snd_pcm_hardware vx_pcm_playback_hw = { |
551 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 556 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
552 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ | 557 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ |
553 | /*SNDRV_PCM_INFO_RESUME*/), | 558 | /*SNDRV_PCM_INFO_RESUME*/), |
554 | .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, | 559 | .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/ |
560 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE), | ||
555 | .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, | 561 | .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, |
556 | .rate_min = 5000, | 562 | .rate_min = 5000, |
557 | .rate_max = 48000, | 563 | .rate_max = 48000, |
@@ -571,11 +577,11 @@ static void vx_pcm_delayed_start(unsigned long arg); | |||
571 | /* | 577 | /* |
572 | * vx_pcm_playback_open - open callback for playback | 578 | * vx_pcm_playback_open - open callback for playback |
573 | */ | 579 | */ |
574 | static int vx_pcm_playback_open(snd_pcm_substream_t *subs) | 580 | static int vx_pcm_playback_open(struct snd_pcm_substream *subs) |
575 | { | 581 | { |
576 | snd_pcm_runtime_t *runtime = subs->runtime; | 582 | struct snd_pcm_runtime *runtime = subs->runtime; |
577 | vx_core_t *chip = snd_pcm_substream_chip(subs); | 583 | struct vx_core *chip = snd_pcm_substream_chip(subs); |
578 | vx_pipe_t *pipe = NULL; | 584 | struct vx_pipe *pipe = NULL; |
579 | unsigned int audio; | 585 | unsigned int audio; |
580 | int err; | 586 | int err; |
581 | 587 | ||
@@ -615,10 +621,10 @@ static int vx_pcm_playback_open(snd_pcm_substream_t *subs) | |||
615 | /* | 621 | /* |
616 | * vx_pcm_playback_close - close callback for playback | 622 | * vx_pcm_playback_close - close callback for playback |
617 | */ | 623 | */ |
618 | static int vx_pcm_playback_close(snd_pcm_substream_t *subs) | 624 | static int vx_pcm_playback_close(struct snd_pcm_substream *subs) |
619 | { | 625 | { |
620 | vx_core_t *chip = snd_pcm_substream_chip(subs); | 626 | struct vx_core *chip = snd_pcm_substream_chip(subs); |
621 | vx_pipe_t *pipe; | 627 | struct vx_pipe *pipe; |
622 | 628 | ||
623 | if (! subs->runtime->private_data) | 629 | if (! subs->runtime->private_data) |
624 | return -EINVAL; | 630 | return -EINVAL; |
@@ -641,7 +647,7 @@ static int vx_pcm_playback_close(snd_pcm_substream_t *subs) | |||
641 | * | 647 | * |
642 | * NB: call with a certain lock. | 648 | * NB: call with a certain lock. |
643 | */ | 649 | */ |
644 | static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe) | 650 | static int vx_notify_end_of_buffer(struct vx_core *chip, struct vx_pipe *pipe) |
645 | { | 651 | { |
646 | int err; | 652 | int err; |
647 | struct vx_rmh rmh; /* use a temporary rmh here */ | 653 | struct vx_rmh rmh; /* use a temporary rmh here */ |
@@ -669,7 +675,9 @@ static int vx_notify_end_of_buffer(vx_core_t *chip, vx_pipe_t *pipe) | |||
669 | * | 675 | * |
670 | * return 0 if ok. | 676 | * return 0 if ok. |
671 | */ | 677 | */ |
672 | static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe, int size) | 678 | static int vx_pcm_playback_transfer_chunk(struct vx_core *chip, |
679 | struct snd_pcm_runtime *runtime, | ||
680 | struct vx_pipe *pipe, int size) | ||
673 | { | 681 | { |
674 | int space, err = 0; | 682 | int space, err = 0; |
675 | 683 | ||
@@ -705,7 +713,9 @@ static int vx_pcm_playback_transfer_chunk(vx_core_t *chip, snd_pcm_runtime_t *ru | |||
705 | * so that the caller can check the total transferred size later | 713 | * so that the caller can check the total transferred size later |
706 | * (to call snd_pcm_period_elapsed). | 714 | * (to call snd_pcm_period_elapsed). |
707 | */ | 715 | */ |
708 | static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, vx_pipe_t *pipe) | 716 | static int vx_update_pipe_position(struct vx_core *chip, |
717 | struct snd_pcm_runtime *runtime, | ||
718 | struct vx_pipe *pipe) | ||
709 | { | 719 | { |
710 | struct vx_rmh rmh; | 720 | struct vx_rmh rmh; |
711 | int err, update; | 721 | int err, update; |
@@ -731,10 +741,12 @@ static int vx_update_pipe_position(vx_core_t *chip, snd_pcm_runtime_t *runtime, | |||
731 | * transfer the pending playback buffer data to DSP | 741 | * transfer the pending playback buffer data to DSP |
732 | * called from interrupt handler | 742 | * called from interrupt handler |
733 | */ | 743 | */ |
734 | static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe, int nchunks) | 744 | static void vx_pcm_playback_transfer(struct vx_core *chip, |
745 | struct snd_pcm_substream *subs, | ||
746 | struct vx_pipe *pipe, int nchunks) | ||
735 | { | 747 | { |
736 | int i, err; | 748 | int i, err; |
737 | snd_pcm_runtime_t *runtime = subs->runtime; | 749 | struct snd_pcm_runtime *runtime = subs->runtime; |
738 | 750 | ||
739 | if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) | 751 | if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) |
740 | return; | 752 | return; |
@@ -749,10 +761,12 @@ static void vx_pcm_playback_transfer(vx_core_t *chip, snd_pcm_substream_t *subs, | |||
749 | * update the playback position and call snd_pcm_period_elapsed() if necessary | 761 | * update the playback position and call snd_pcm_period_elapsed() if necessary |
750 | * called from interrupt handler | 762 | * called from interrupt handler |
751 | */ | 763 | */ |
752 | static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) | 764 | static void vx_pcm_playback_update(struct vx_core *chip, |
765 | struct snd_pcm_substream *subs, | ||
766 | struct vx_pipe *pipe) | ||
753 | { | 767 | { |
754 | int err; | 768 | int err; |
755 | snd_pcm_runtime_t *runtime = subs->runtime; | 769 | struct snd_pcm_runtime *runtime = subs->runtime; |
756 | 770 | ||
757 | if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) { | 771 | if (pipe->running && ! (chip->chip_status & VX_STAT_IS_STALE)) { |
758 | if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0) | 772 | if ((err = vx_update_pipe_position(chip, runtime, pipe)) < 0) |
@@ -771,9 +785,9 @@ static void vx_pcm_playback_update(vx_core_t *chip, snd_pcm_substream_t *subs, v | |||
771 | */ | 785 | */ |
772 | static void vx_pcm_delayed_start(unsigned long arg) | 786 | static void vx_pcm_delayed_start(unsigned long arg) |
773 | { | 787 | { |
774 | snd_pcm_substream_t *subs = (snd_pcm_substream_t *)arg; | 788 | struct snd_pcm_substream *subs = (struct snd_pcm_substream *)arg; |
775 | vx_core_t *chip = subs->pcm->private_data; | 789 | struct vx_core *chip = subs->pcm->private_data; |
776 | vx_pipe_t *pipe = subs->runtime->private_data; | 790 | struct vx_pipe *pipe = subs->runtime->private_data; |
777 | int err; | 791 | int err; |
778 | 792 | ||
779 | /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/ | 793 | /* printk( KERN_DEBUG "DDDD tasklet delayed start jiffies = %ld\n", jiffies);*/ |
@@ -792,10 +806,10 @@ static void vx_pcm_delayed_start(unsigned long arg) | |||
792 | /* | 806 | /* |
793 | * vx_pcm_playback_trigger - trigger callback for playback | 807 | * vx_pcm_playback_trigger - trigger callback for playback |
794 | */ | 808 | */ |
795 | static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) | 809 | static int vx_pcm_trigger(struct snd_pcm_substream *subs, int cmd) |
796 | { | 810 | { |
797 | vx_core_t *chip = snd_pcm_substream_chip(subs); | 811 | struct vx_core *chip = snd_pcm_substream_chip(subs); |
798 | vx_pipe_t *pipe = subs->runtime->private_data; | 812 | struct vx_pipe *pipe = subs->runtime->private_data; |
799 | int err; | 813 | int err; |
800 | 814 | ||
801 | if (chip->chip_status & VX_STAT_IS_STALE) | 815 | if (chip->chip_status & VX_STAT_IS_STALE) |
@@ -839,18 +853,18 @@ static int vx_pcm_trigger(snd_pcm_substream_t *subs, int cmd) | |||
839 | /* | 853 | /* |
840 | * vx_pcm_playback_pointer - pointer callback for playback | 854 | * vx_pcm_playback_pointer - pointer callback for playback |
841 | */ | 855 | */ |
842 | static snd_pcm_uframes_t vx_pcm_playback_pointer(snd_pcm_substream_t *subs) | 856 | static snd_pcm_uframes_t vx_pcm_playback_pointer(struct snd_pcm_substream *subs) |
843 | { | 857 | { |
844 | snd_pcm_runtime_t *runtime = subs->runtime; | 858 | struct snd_pcm_runtime *runtime = subs->runtime; |
845 | vx_pipe_t *pipe = runtime->private_data; | 859 | struct vx_pipe *pipe = runtime->private_data; |
846 | return pipe->position; | 860 | return pipe->position; |
847 | } | 861 | } |
848 | 862 | ||
849 | /* | 863 | /* |
850 | * vx_pcm_hw_params - hw_params callback for playback and capture | 864 | * vx_pcm_hw_params - hw_params callback for playback and capture |
851 | */ | 865 | */ |
852 | static int vx_pcm_hw_params(snd_pcm_substream_t *subs, | 866 | static int vx_pcm_hw_params(struct snd_pcm_substream *subs, |
853 | snd_pcm_hw_params_t *hw_params) | 867 | struct snd_pcm_hw_params *hw_params) |
854 | { | 868 | { |
855 | return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); | 869 | return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); |
856 | } | 870 | } |
@@ -858,7 +872,7 @@ static int vx_pcm_hw_params(snd_pcm_substream_t *subs, | |||
858 | /* | 872 | /* |
859 | * vx_pcm_hw_free - hw_free callback for playback and capture | 873 | * vx_pcm_hw_free - hw_free callback for playback and capture |
860 | */ | 874 | */ |
861 | static int vx_pcm_hw_free(snd_pcm_substream_t *subs) | 875 | static int vx_pcm_hw_free(struct snd_pcm_substream *subs) |
862 | { | 876 | { |
863 | return snd_pcm_free_vmalloc_buffer(subs); | 877 | return snd_pcm_free_vmalloc_buffer(subs); |
864 | } | 878 | } |
@@ -866,11 +880,11 @@ static int vx_pcm_hw_free(snd_pcm_substream_t *subs) | |||
866 | /* | 880 | /* |
867 | * vx_pcm_prepare - prepare callback for playback and capture | 881 | * vx_pcm_prepare - prepare callback for playback and capture |
868 | */ | 882 | */ |
869 | static int vx_pcm_prepare(snd_pcm_substream_t *subs) | 883 | static int vx_pcm_prepare(struct snd_pcm_substream *subs) |
870 | { | 884 | { |
871 | vx_core_t *chip = snd_pcm_substream_chip(subs); | 885 | struct vx_core *chip = snd_pcm_substream_chip(subs); |
872 | snd_pcm_runtime_t *runtime = subs->runtime; | 886 | struct snd_pcm_runtime *runtime = subs->runtime; |
873 | vx_pipe_t *pipe = runtime->private_data; | 887 | struct vx_pipe *pipe = runtime->private_data; |
874 | int err, data_mode; | 888 | int err, data_mode; |
875 | // int max_size, nchunks; | 889 | // int max_size, nchunks; |
876 | 890 | ||
@@ -897,7 +911,8 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs) | |||
897 | } | 911 | } |
898 | 912 | ||
899 | if (chip->pcm_running && chip->freq != runtime->rate) { | 913 | if (chip->pcm_running && chip->freq != runtime->rate) { |
900 | snd_printk(KERN_ERR "vx: cannot set different clock %d from the current %d\n", runtime->rate, chip->freq); | 914 | snd_printk(KERN_ERR "vx: cannot set different clock %d " |
915 | "from the current %d\n", runtime->rate, chip->freq); | ||
901 | return -EINVAL; | 916 | return -EINVAL; |
902 | } | 917 | } |
903 | vx_set_clock(chip, runtime->rate); | 918 | vx_set_clock(chip, runtime->rate); |
@@ -930,7 +945,7 @@ static int vx_pcm_prepare(snd_pcm_substream_t *subs) | |||
930 | /* | 945 | /* |
931 | * operators for PCM playback | 946 | * operators for PCM playback |
932 | */ | 947 | */ |
933 | static snd_pcm_ops_t vx_pcm_playback_ops = { | 948 | static struct snd_pcm_ops vx_pcm_playback_ops = { |
934 | .open = vx_pcm_playback_open, | 949 | .open = vx_pcm_playback_open, |
935 | .close = vx_pcm_playback_close, | 950 | .close = vx_pcm_playback_close, |
936 | .ioctl = snd_pcm_lib_ioctl, | 951 | .ioctl = snd_pcm_lib_ioctl, |
@@ -947,11 +962,12 @@ static snd_pcm_ops_t vx_pcm_playback_ops = { | |||
947 | * playback hw information | 962 | * playback hw information |
948 | */ | 963 | */ |
949 | 964 | ||
950 | static snd_pcm_hardware_t vx_pcm_capture_hw = { | 965 | static struct snd_pcm_hardware vx_pcm_capture_hw = { |
951 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 966 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
952 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ | 967 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP_VALID /*|*/ |
953 | /*SNDRV_PCM_INFO_RESUME*/), | 968 | /*SNDRV_PCM_INFO_RESUME*/), |
954 | .formats = /*SNDRV_PCM_FMTBIT_U8 |*/ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE, | 969 | .formats = (/*SNDRV_PCM_FMTBIT_U8 |*/ |
970 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_3LE), | ||
955 | .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, | 971 | .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, |
956 | .rate_min = 5000, | 972 | .rate_min = 5000, |
957 | .rate_max = 48000, | 973 | .rate_max = 48000, |
@@ -969,12 +985,12 @@ static snd_pcm_hardware_t vx_pcm_capture_hw = { | |||
969 | /* | 985 | /* |
970 | * vx_pcm_capture_open - open callback for capture | 986 | * vx_pcm_capture_open - open callback for capture |
971 | */ | 987 | */ |
972 | static int vx_pcm_capture_open(snd_pcm_substream_t *subs) | 988 | static int vx_pcm_capture_open(struct snd_pcm_substream *subs) |
973 | { | 989 | { |
974 | snd_pcm_runtime_t *runtime = subs->runtime; | 990 | struct snd_pcm_runtime *runtime = subs->runtime; |
975 | vx_core_t *chip = snd_pcm_substream_chip(subs); | 991 | struct vx_core *chip = snd_pcm_substream_chip(subs); |
976 | vx_pipe_t *pipe; | 992 | struct vx_pipe *pipe; |
977 | vx_pipe_t *pipe_out_monitoring = NULL; | 993 | struct vx_pipe *pipe_out_monitoring = NULL; |
978 | unsigned int audio; | 994 | unsigned int audio; |
979 | int err; | 995 | int err; |
980 | 996 | ||
@@ -1005,9 +1021,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs) | |||
1005 | if an output pipe is available, it's audios still may need to be | 1021 | if an output pipe is available, it's audios still may need to be |
1006 | unmuted. hence we'll have to call a mixer entry point. | 1022 | unmuted. hence we'll have to call a mixer entry point. |
1007 | */ | 1023 | */ |
1008 | vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], chip->audio_monitor_active[audio]); | 1024 | vx_set_monitor_level(chip, audio, chip->audio_monitor[audio], |
1025 | chip->audio_monitor_active[audio]); | ||
1009 | /* assuming stereo */ | 1026 | /* assuming stereo */ |
1010 | vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], chip->audio_monitor_active[audio+1]); | 1027 | vx_set_monitor_level(chip, audio+1, chip->audio_monitor[audio+1], |
1028 | chip->audio_monitor_active[audio+1]); | ||
1011 | } | 1029 | } |
1012 | 1030 | ||
1013 | pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */ | 1031 | pipe->monitoring_pipe = pipe_out_monitoring; /* default value NULL */ |
@@ -1026,11 +1044,11 @@ static int vx_pcm_capture_open(snd_pcm_substream_t *subs) | |||
1026 | /* | 1044 | /* |
1027 | * vx_pcm_capture_close - close callback for capture | 1045 | * vx_pcm_capture_close - close callback for capture |
1028 | */ | 1046 | */ |
1029 | static int vx_pcm_capture_close(snd_pcm_substream_t *subs) | 1047 | static int vx_pcm_capture_close(struct snd_pcm_substream *subs) |
1030 | { | 1048 | { |
1031 | vx_core_t *chip = snd_pcm_substream_chip(subs); | 1049 | struct vx_core *chip = snd_pcm_substream_chip(subs); |
1032 | vx_pipe_t *pipe; | 1050 | struct vx_pipe *pipe; |
1033 | vx_pipe_t *pipe_out_monitoring; | 1051 | struct vx_pipe *pipe_out_monitoring; |
1034 | 1052 | ||
1035 | if (! subs->runtime->private_data) | 1053 | if (! subs->runtime->private_data) |
1036 | return -EINVAL; | 1054 | return -EINVAL; |
@@ -1062,10 +1080,11 @@ static int vx_pcm_capture_close(snd_pcm_substream_t *subs) | |||
1062 | /* | 1080 | /* |
1063 | * vx_pcm_capture_update - update the capture buffer | 1081 | * vx_pcm_capture_update - update the capture buffer |
1064 | */ | 1082 | */ |
1065 | static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx_pipe_t *pipe) | 1083 | static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream *subs, |
1084 | struct vx_pipe *pipe) | ||
1066 | { | 1085 | { |
1067 | int size, space, count; | 1086 | int size, space, count; |
1068 | snd_pcm_runtime_t *runtime = subs->runtime; | 1087 | struct snd_pcm_runtime *runtime = subs->runtime; |
1069 | 1088 | ||
1070 | if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) | 1089 | if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE)) |
1071 | return; | 1090 | return; |
@@ -1135,17 +1154,17 @@ static void vx_pcm_capture_update(vx_core_t *chip, snd_pcm_substream_t *subs, vx | |||
1135 | /* | 1154 | /* |
1136 | * vx_pcm_capture_pointer - pointer callback for capture | 1155 | * vx_pcm_capture_pointer - pointer callback for capture |
1137 | */ | 1156 | */ |
1138 | static snd_pcm_uframes_t vx_pcm_capture_pointer(snd_pcm_substream_t *subs) | 1157 | static snd_pcm_uframes_t vx_pcm_capture_pointer(struct snd_pcm_substream *subs) |
1139 | { | 1158 | { |
1140 | snd_pcm_runtime_t *runtime = subs->runtime; | 1159 | struct snd_pcm_runtime *runtime = subs->runtime; |
1141 | vx_pipe_t *pipe = runtime->private_data; | 1160 | struct vx_pipe *pipe = runtime->private_data; |
1142 | return bytes_to_frames(runtime, pipe->hw_ptr); | 1161 | return bytes_to_frames(runtime, pipe->hw_ptr); |
1143 | } | 1162 | } |
1144 | 1163 | ||
1145 | /* | 1164 | /* |
1146 | * operators for PCM capture | 1165 | * operators for PCM capture |
1147 | */ | 1166 | */ |
1148 | static snd_pcm_ops_t vx_pcm_capture_ops = { | 1167 | static struct snd_pcm_ops vx_pcm_capture_ops = { |
1149 | .open = vx_pcm_capture_open, | 1168 | .open = vx_pcm_capture_open, |
1150 | .close = vx_pcm_capture_close, | 1169 | .close = vx_pcm_capture_close, |
1151 | .ioctl = snd_pcm_lib_ioctl, | 1170 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1161,10 +1180,10 @@ static snd_pcm_ops_t vx_pcm_capture_ops = { | |||
1161 | /* | 1180 | /* |
1162 | * interrupt handler for pcm streams | 1181 | * interrupt handler for pcm streams |
1163 | */ | 1182 | */ |
1164 | void vx_pcm_update_intr(vx_core_t *chip, unsigned int events) | 1183 | void vx_pcm_update_intr(struct vx_core *chip, unsigned int events) |
1165 | { | 1184 | { |
1166 | unsigned int i; | 1185 | unsigned int i; |
1167 | vx_pipe_t *pipe; | 1186 | struct vx_pipe *pipe; |
1168 | 1187 | ||
1169 | #define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING) | 1188 | #define EVENT_MASK (END_OF_BUFFER_EVENTS_PENDING|ASYNC_EVENTS_PENDING) |
1170 | 1189 | ||
@@ -1218,7 +1237,7 @@ void vx_pcm_update_intr(vx_core_t *chip, unsigned int events) | |||
1218 | /* | 1237 | /* |
1219 | * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays | 1238 | * vx_init_audio_io - check the availabe audio i/o and allocate pipe arrays |
1220 | */ | 1239 | */ |
1221 | static int vx_init_audio_io(vx_core_t *chip) | 1240 | static int vx_init_audio_io(struct vx_core *chip) |
1222 | { | 1241 | { |
1223 | struct vx_rmh rmh; | 1242 | struct vx_rmh rmh; |
1224 | int preferred; | 1243 | int preferred; |
@@ -1234,19 +1253,20 @@ static int vx_init_audio_io(vx_core_t *chip) | |||
1234 | chip->audio_info = rmh.Stat[1]; | 1253 | chip->audio_info = rmh.Stat[1]; |
1235 | 1254 | ||
1236 | /* allocate pipes */ | 1255 | /* allocate pipes */ |
1237 | chip->playback_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_outs, GFP_KERNEL); | 1256 | chip->playback_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_outs, GFP_KERNEL); |
1238 | chip->capture_pipes = kmalloc(sizeof(vx_pipe_t *) * chip->audio_ins, GFP_KERNEL); | 1257 | chip->capture_pipes = kmalloc(sizeof(struct vx_pipe *) * chip->audio_ins, GFP_KERNEL); |
1239 | if (! chip->playback_pipes || ! chip->capture_pipes) | 1258 | if (! chip->playback_pipes || ! chip->capture_pipes) |
1240 | return -ENOMEM; | 1259 | return -ENOMEM; |
1241 | 1260 | ||
1242 | memset(chip->playback_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_outs); | 1261 | memset(chip->playback_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_outs); |
1243 | memset(chip->capture_pipes, 0, sizeof(vx_pipe_t *) * chip->audio_ins); | 1262 | memset(chip->capture_pipes, 0, sizeof(struct vx_pipe *) * chip->audio_ins); |
1244 | 1263 | ||
1245 | preferred = chip->ibl.size; | 1264 | preferred = chip->ibl.size; |
1246 | chip->ibl.size = 0; | 1265 | chip->ibl.size = 0; |
1247 | vx_set_ibl(chip, &chip->ibl); /* query the info */ | 1266 | vx_set_ibl(chip, &chip->ibl); /* query the info */ |
1248 | if (preferred > 0) { | 1267 | if (preferred > 0) { |
1249 | chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / chip->ibl.granularity) * chip->ibl.granularity; | 1268 | chip->ibl.size = ((preferred + chip->ibl.granularity - 1) / |
1269 | chip->ibl.granularity) * chip->ibl.granularity; | ||
1250 | if (chip->ibl.size > chip->ibl.max_size) | 1270 | if (chip->ibl.size > chip->ibl.max_size) |
1251 | chip->ibl.size = chip->ibl.max_size; | 1271 | chip->ibl.size = chip->ibl.max_size; |
1252 | } else | 1272 | } else |
@@ -1260,9 +1280,9 @@ static int vx_init_audio_io(vx_core_t *chip) | |||
1260 | /* | 1280 | /* |
1261 | * free callback for pcm | 1281 | * free callback for pcm |
1262 | */ | 1282 | */ |
1263 | static void snd_vx_pcm_free(snd_pcm_t *pcm) | 1283 | static void snd_vx_pcm_free(struct snd_pcm *pcm) |
1264 | { | 1284 | { |
1265 | vx_core_t *chip = pcm->private_data; | 1285 | struct vx_core *chip = pcm->private_data; |
1266 | chip->pcm[pcm->device] = NULL; | 1286 | chip->pcm[pcm->device] = NULL; |
1267 | kfree(chip->playback_pipes); | 1287 | kfree(chip->playback_pipes); |
1268 | chip->playback_pipes = NULL; | 1288 | chip->playback_pipes = NULL; |
@@ -1273,9 +1293,9 @@ static void snd_vx_pcm_free(snd_pcm_t *pcm) | |||
1273 | /* | 1293 | /* |
1274 | * snd_vx_pcm_new - create and initialize a pcm | 1294 | * snd_vx_pcm_new - create and initialize a pcm |
1275 | */ | 1295 | */ |
1276 | int snd_vx_pcm_new(vx_core_t *chip) | 1296 | int snd_vx_pcm_new(struct vx_core *chip) |
1277 | { | 1297 | { |
1278 | snd_pcm_t *pcm; | 1298 | struct snd_pcm *pcm; |
1279 | unsigned int i; | 1299 | unsigned int i; |
1280 | int err; | 1300 | int err; |
1281 | 1301 | ||
diff --git a/sound/drivers/vx/vx_uer.c b/sound/drivers/vx/vx_uer.c index 4fc38bde34f4..7400306b7f28 100644 --- a/sound/drivers/vx/vx_uer.c +++ b/sound/drivers/vx/vx_uer.c | |||
@@ -31,7 +31,7 @@ | |||
31 | * vx_modify_board_clock - tell the board that its clock has been modified | 31 | * vx_modify_board_clock - tell the board that its clock has been modified |
32 | * @sync: DSP needs to resynchronize its FIFO | 32 | * @sync: DSP needs to resynchronize its FIFO |
33 | */ | 33 | */ |
34 | static int vx_modify_board_clock(vx_core_t *chip, int sync) | 34 | static int vx_modify_board_clock(struct vx_core *chip, int sync) |
35 | { | 35 | { |
36 | struct vx_rmh rmh; | 36 | struct vx_rmh rmh; |
37 | 37 | ||
@@ -45,7 +45,7 @@ static int vx_modify_board_clock(vx_core_t *chip, int sync) | |||
45 | /* | 45 | /* |
46 | * vx_modify_board_inputs - resync audio inputs | 46 | * vx_modify_board_inputs - resync audio inputs |
47 | */ | 47 | */ |
48 | static int vx_modify_board_inputs(vx_core_t *chip) | 48 | static int vx_modify_board_inputs(struct vx_core *chip) |
49 | { | 49 | { |
50 | struct vx_rmh rmh; | 50 | struct vx_rmh rmh; |
51 | 51 | ||
@@ -59,7 +59,7 @@ static int vx_modify_board_inputs(vx_core_t *chip) | |||
59 | * @index: the bit index | 59 | * @index: the bit index |
60 | * returns 0 or 1. | 60 | * returns 0 or 1. |
61 | */ | 61 | */ |
62 | static int vx_read_one_cbit(vx_core_t *chip, int index) | 62 | static int vx_read_one_cbit(struct vx_core *chip, int index) |
63 | { | 63 | { |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | int val; | 65 | int val; |
@@ -82,7 +82,7 @@ static int vx_read_one_cbit(vx_core_t *chip, int index) | |||
82 | * @index: the bit index | 82 | * @index: the bit index |
83 | * @val: bit value, 0 or 1 | 83 | * @val: bit value, 0 or 1 |
84 | */ | 84 | */ |
85 | static void vx_write_one_cbit(vx_core_t *chip, int index, int val) | 85 | static void vx_write_one_cbit(struct vx_core *chip, int index, int val) |
86 | { | 86 | { |
87 | unsigned long flags; | 87 | unsigned long flags; |
88 | val = !!val; /* 0 or 1 */ | 88 | val = !!val; /* 0 or 1 */ |
@@ -104,7 +104,7 @@ static void vx_write_one_cbit(vx_core_t *chip, int index, int val) | |||
104 | * returns the frequency of UER, or 0 if not sync, | 104 | * returns the frequency of UER, or 0 if not sync, |
105 | * or a negative error code. | 105 | * or a negative error code. |
106 | */ | 106 | */ |
107 | static int vx_read_uer_status(vx_core_t *chip, int *mode) | 107 | static int vx_read_uer_status(struct vx_core *chip, int *mode) |
108 | { | 108 | { |
109 | int val, freq; | 109 | int val, freq; |
110 | 110 | ||
@@ -160,7 +160,7 @@ static int vx_read_uer_status(vx_core_t *chip, int *mode) | |||
160 | * default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF | 160 | * default : HexFreq = (dword) ((double) 28224000 / (double) (Frequency*4)) - 0x000001FF |
161 | */ | 161 | */ |
162 | 162 | ||
163 | static int vx_calc_clock_from_freq(vx_core_t *chip, int freq) | 163 | static int vx_calc_clock_from_freq(struct vx_core *chip, int freq) |
164 | { | 164 | { |
165 | int hexfreq; | 165 | int hexfreq; |
166 | 166 | ||
@@ -187,7 +187,7 @@ static int vx_calc_clock_from_freq(vx_core_t *chip, int freq) | |||
187 | * vx_change_clock_source - change the clock source | 187 | * vx_change_clock_source - change the clock source |
188 | * @source: the new source | 188 | * @source: the new source |
189 | */ | 189 | */ |
190 | static void vx_change_clock_source(vx_core_t *chip, int source) | 190 | static void vx_change_clock_source(struct vx_core *chip, int source) |
191 | { | 191 | { |
192 | unsigned long flags; | 192 | unsigned long flags; |
193 | 193 | ||
@@ -205,7 +205,7 @@ static void vx_change_clock_source(vx_core_t *chip, int source) | |||
205 | /* | 205 | /* |
206 | * set the internal clock | 206 | * set the internal clock |
207 | */ | 207 | */ |
208 | void vx_set_internal_clock(vx_core_t *chip, unsigned int freq) | 208 | void vx_set_internal_clock(struct vx_core *chip, unsigned int freq) |
209 | { | 209 | { |
210 | int clock; | 210 | int clock; |
211 | unsigned long flags; | 211 | unsigned long flags; |
@@ -228,7 +228,7 @@ void vx_set_internal_clock(vx_core_t *chip, unsigned int freq) | |||
228 | * set the iec958 status bits | 228 | * set the iec958 status bits |
229 | * @bits: 32-bit status bits | 229 | * @bits: 32-bit status bits |
230 | */ | 230 | */ |
231 | void vx_set_iec958_status(vx_core_t *chip, unsigned int bits) | 231 | void vx_set_iec958_status(struct vx_core *chip, unsigned int bits) |
232 | { | 232 | { |
233 | int i; | 233 | int i; |
234 | 234 | ||
@@ -243,7 +243,7 @@ void vx_set_iec958_status(vx_core_t *chip, unsigned int bits) | |||
243 | /* | 243 | /* |
244 | * vx_set_clock - change the clock and audio source if necessary | 244 | * vx_set_clock - change the clock and audio source if necessary |
245 | */ | 245 | */ |
246 | int vx_set_clock(vx_core_t *chip, unsigned int freq) | 246 | int vx_set_clock(struct vx_core *chip, unsigned int freq) |
247 | { | 247 | { |
248 | int src_changed = 0; | 248 | int src_changed = 0; |
249 | 249 | ||
@@ -285,7 +285,7 @@ int vx_set_clock(vx_core_t *chip, unsigned int freq) | |||
285 | /* | 285 | /* |
286 | * vx_change_frequency - called from interrupt handler | 286 | * vx_change_frequency - called from interrupt handler |
287 | */ | 287 | */ |
288 | int vx_change_frequency(vx_core_t *chip) | 288 | int vx_change_frequency(struct vx_core *chip) |
289 | { | 289 | { |
290 | int freq; | 290 | int freq; |
291 | 291 | ||
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index dca6bd2c7580..4ebbabedb3c3 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -108,7 +108,7 @@ static struct snd_vx_hardware vx222_mic_hw = { | |||
108 | 108 | ||
109 | /* | 109 | /* |
110 | */ | 110 | */ |
111 | static int snd_vx222_free(vx_core_t *chip) | 111 | static int snd_vx222_free(struct vx_core *chip) |
112 | { | 112 | { |
113 | struct snd_vx222 *vx = (struct snd_vx222 *)chip; | 113 | struct snd_vx222 *vx = (struct snd_vx222 *)chip; |
114 | 114 | ||
@@ -121,21 +121,21 @@ static int snd_vx222_free(vx_core_t *chip) | |||
121 | return 0; | 121 | return 0; |
122 | } | 122 | } |
123 | 123 | ||
124 | static int snd_vx222_dev_free(snd_device_t *device) | 124 | static int snd_vx222_dev_free(struct snd_device *device) |
125 | { | 125 | { |
126 | vx_core_t *chip = device->device_data; | 126 | struct vx_core *chip = device->device_data; |
127 | return snd_vx222_free(chip); | 127 | return snd_vx222_free(chip); |
128 | } | 128 | } |
129 | 129 | ||
130 | 130 | ||
131 | static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci, | 131 | static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci, |
132 | struct snd_vx_hardware *hw, | 132 | struct snd_vx_hardware *hw, |
133 | struct snd_vx222 **rchip) | 133 | struct snd_vx222 **rchip) |
134 | { | 134 | { |
135 | vx_core_t *chip; | 135 | struct vx_core *chip; |
136 | struct snd_vx222 *vx; | 136 | struct snd_vx222 *vx; |
137 | int i, err; | 137 | int i, err; |
138 | static snd_device_ops_t ops = { | 138 | static struct snd_device_ops ops = { |
139 | .dev_free = snd_vx222_dev_free, | 139 | .dev_free = snd_vx222_dev_free, |
140 | }; | 140 | }; |
141 | struct snd_vx_ops *vx_ops; | 141 | struct snd_vx_ops *vx_ops; |
@@ -147,7 +147,7 @@ static int __devinit snd_vx222_create(snd_card_t *card, struct pci_dev *pci, | |||
147 | 147 | ||
148 | vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops; | 148 | vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops; |
149 | chip = snd_vx_create(card, hw, vx_ops, | 149 | chip = snd_vx_create(card, hw, vx_ops, |
150 | sizeof(struct snd_vx222) - sizeof(vx_core_t)); | 150 | sizeof(struct snd_vx222) - sizeof(struct vx_core)); |
151 | if (! chip) { | 151 | if (! chip) { |
152 | pci_disable_device(pci); | 152 | pci_disable_device(pci); |
153 | return -ENOMEM; | 153 | return -ENOMEM; |
@@ -186,7 +186,7 @@ static int __devinit snd_vx222_probe(struct pci_dev *pci, | |||
186 | const struct pci_device_id *pci_id) | 186 | const struct pci_device_id *pci_id) |
187 | { | 187 | { |
188 | static int dev; | 188 | static int dev; |
189 | snd_card_t *card; | 189 | struct snd_card *card; |
190 | struct snd_vx_hardware *hw; | 190 | struct snd_vx_hardware *hw; |
191 | struct snd_vx222 *vx; | 191 | struct snd_vx222 *vx; |
192 | int err; | 192 | int err; |
diff --git a/sound/pci/vx222/vx222.h b/sound/pci/vx222/vx222.h index 18478ae124a9..2f0d78f609a6 100644 --- a/sound/pci/vx222/vx222.h +++ b/sound/pci/vx222/vx222.h | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | struct snd_vx222 { | 26 | struct snd_vx222 { |
27 | 27 | ||
28 | vx_core_t core; | 28 | struct vx_core core; |
29 | 29 | ||
30 | /* h/w config; for PLX and for DSP */ | 30 | /* h/w config; for PLX and for DSP */ |
31 | struct pci_dev *pci; | 31 | struct pci_dev *pci; |
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index 2d4d0c29b4c4..c705af409b0f 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c | |||
@@ -82,7 +82,7 @@ static int vx2_reg_index[VX_REG_MAX] = { | |||
82 | [VX_GPIOC] = 0, /* on the PLX */ | 82 | [VX_GPIOC] = 0, /* on the PLX */ |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg) | 85 | static inline unsigned long vx2_reg_addr(struct vx_core *_chip, int reg) |
86 | { | 86 | { |
87 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 87 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
88 | return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg]; | 88 | return chip->port[vx2_reg_index[reg]] + vx2_reg_offset[reg]; |
@@ -92,7 +92,7 @@ static inline unsigned long vx2_reg_addr(vx_core_t *_chip, int reg) | |||
92 | * snd_vx_inb - read a byte from the register | 92 | * snd_vx_inb - read a byte from the register |
93 | * @offset: register enum | 93 | * @offset: register enum |
94 | */ | 94 | */ |
95 | static unsigned char vx2_inb(vx_core_t *chip, int offset) | 95 | static unsigned char vx2_inb(struct vx_core *chip, int offset) |
96 | { | 96 | { |
97 | return inb(vx2_reg_addr(chip, offset)); | 97 | return inb(vx2_reg_addr(chip, offset)); |
98 | } | 98 | } |
@@ -102,7 +102,7 @@ static unsigned char vx2_inb(vx_core_t *chip, int offset) | |||
102 | * @offset: the register offset | 102 | * @offset: the register offset |
103 | * @val: the value to write | 103 | * @val: the value to write |
104 | */ | 104 | */ |
105 | static void vx2_outb(vx_core_t *chip, int offset, unsigned char val) | 105 | static void vx2_outb(struct vx_core *chip, int offset, unsigned char val) |
106 | { | 106 | { |
107 | outb(val, vx2_reg_addr(chip, offset)); | 107 | outb(val, vx2_reg_addr(chip, offset)); |
108 | //printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); | 108 | //printk("outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); |
@@ -112,7 +112,7 @@ static void vx2_outb(vx_core_t *chip, int offset, unsigned char val) | |||
112 | * snd_vx_inl - read a 32bit word from the register | 112 | * snd_vx_inl - read a 32bit word from the register |
113 | * @offset: register enum | 113 | * @offset: register enum |
114 | */ | 114 | */ |
115 | static unsigned int vx2_inl(vx_core_t *chip, int offset) | 115 | static unsigned int vx2_inl(struct vx_core *chip, int offset) |
116 | { | 116 | { |
117 | return inl(vx2_reg_addr(chip, offset)); | 117 | return inl(vx2_reg_addr(chip, offset)); |
118 | } | 118 | } |
@@ -122,7 +122,7 @@ static unsigned int vx2_inl(vx_core_t *chip, int offset) | |||
122 | * @offset: the register enum | 122 | * @offset: the register enum |
123 | * @val: the value to write | 123 | * @val: the value to write |
124 | */ | 124 | */ |
125 | static void vx2_outl(vx_core_t *chip, int offset, unsigned int val) | 125 | static void vx2_outl(struct vx_core *chip, int offset, unsigned int val) |
126 | { | 126 | { |
127 | // printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); | 127 | // printk("outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); |
128 | outl(val, vx2_reg_addr(chip, offset)); | 128 | outl(val, vx2_reg_addr(chip, offset)); |
@@ -132,13 +132,13 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val) | |||
132 | * redefine macros to call directly | 132 | * redefine macros to call directly |
133 | */ | 133 | */ |
134 | #undef vx_inb | 134 | #undef vx_inb |
135 | #define vx_inb(chip,reg) vx2_inb((vx_core_t*)(chip), VX_##reg) | 135 | #define vx_inb(chip,reg) vx2_inb((struct vx_core*)(chip), VX_##reg) |
136 | #undef vx_outb | 136 | #undef vx_outb |
137 | #define vx_outb(chip,reg,val) vx2_outb((vx_core_t*)(chip), VX_##reg, val) | 137 | #define vx_outb(chip,reg,val) vx2_outb((struct vx_core*)(chip), VX_##reg, val) |
138 | #undef vx_inl | 138 | #undef vx_inl |
139 | #define vx_inl(chip,reg) vx2_inl((vx_core_t*)(chip), VX_##reg) | 139 | #define vx_inl(chip,reg) vx2_inl((struct vx_core*)(chip), VX_##reg) |
140 | #undef vx_outl | 140 | #undef vx_outl |
141 | #define vx_outl(chip,reg,val) vx2_outl((vx_core_t*)(chip), VX_##reg, val) | 141 | #define vx_outl(chip,reg,val) vx2_outl((struct vx_core*)(chip), VX_##reg, val) |
142 | 142 | ||
143 | 143 | ||
144 | /* | 144 | /* |
@@ -147,7 +147,7 @@ static void vx2_outl(vx_core_t *chip, int offset, unsigned int val) | |||
147 | 147 | ||
148 | #define XX_DSP_RESET_WAIT_TIME 2 /* ms */ | 148 | #define XX_DSP_RESET_WAIT_TIME 2 /* ms */ |
149 | 149 | ||
150 | static void vx2_reset_dsp(vx_core_t *_chip) | 150 | static void vx2_reset_dsp(struct vx_core *_chip) |
151 | { | 151 | { |
152 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 152 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
153 | 153 | ||
@@ -162,7 +162,7 @@ static void vx2_reset_dsp(vx_core_t *_chip) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | 164 | ||
165 | static int vx2_test_xilinx(vx_core_t *_chip) | 165 | static int vx2_test_xilinx(struct vx_core *_chip) |
166 | { | 166 | { |
167 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 167 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
168 | unsigned int data; | 168 | unsigned int data; |
@@ -219,7 +219,7 @@ static int vx2_test_xilinx(vx_core_t *_chip) | |||
219 | * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. | 219 | * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. |
220 | * @do_write: 0 = read, 1 = set up for DMA write | 220 | * @do_write: 0 = read, 1 = set up for DMA write |
221 | */ | 221 | */ |
222 | static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write) | 222 | static void vx2_setup_pseudo_dma(struct vx_core *chip, int do_write) |
223 | { | 223 | { |
224 | /* Interrupt mode and HREQ pin enabled for host transmit data transfers | 224 | /* Interrupt mode and HREQ pin enabled for host transmit data transfers |
225 | * (in case of the use of the pseudo-dma facility). | 225 | * (in case of the use of the pseudo-dma facility). |
@@ -235,7 +235,7 @@ static void vx2_setup_pseudo_dma(vx_core_t *chip, int do_write) | |||
235 | /* | 235 | /* |
236 | * vx_release_pseudo_dma - disable the pseudo-DMA mode | 236 | * vx_release_pseudo_dma - disable the pseudo-DMA mode |
237 | */ | 237 | */ |
238 | static inline void vx2_release_pseudo_dma(vx_core_t *chip) | 238 | static inline void vx2_release_pseudo_dma(struct vx_core *chip) |
239 | { | 239 | { |
240 | /* HREQ pin disabled. */ | 240 | /* HREQ pin disabled. */ |
241 | vx_outl(chip, ICR, 0); | 241 | vx_outl(chip, ICR, 0); |
@@ -244,8 +244,8 @@ static inline void vx2_release_pseudo_dma(vx_core_t *chip) | |||
244 | 244 | ||
245 | 245 | ||
246 | /* pseudo-dma write */ | 246 | /* pseudo-dma write */ |
247 | static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, | 247 | static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
248 | vx_pipe_t *pipe, int count) | 248 | struct vx_pipe *pipe, int count) |
249 | { | 249 | { |
250 | unsigned long port = vx2_reg_addr(chip, VX_DMA); | 250 | unsigned long port = vx2_reg_addr(chip, VX_DMA); |
251 | int offset = pipe->hw_ptr; | 251 | int offset = pipe->hw_ptr; |
@@ -282,8 +282,8 @@ static void vx2_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, | |||
282 | 282 | ||
283 | 283 | ||
284 | /* pseudo dma read */ | 284 | /* pseudo dma read */ |
285 | static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, | 285 | static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
286 | vx_pipe_t *pipe, int count) | 286 | struct vx_pipe *pipe, int count) |
287 | { | 287 | { |
288 | int offset = pipe->hw_ptr; | 288 | int offset = pipe->hw_ptr; |
289 | u32 *addr = (u32 *)(runtime->dma_area + offset); | 289 | u32 *addr = (u32 *)(runtime->dma_area + offset); |
@@ -321,7 +321,7 @@ static void vx2_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, | |||
321 | /* | 321 | /* |
322 | * transfer counts bits to PLX | 322 | * transfer counts bits to PLX |
323 | */ | 323 | */ |
324 | static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int counts, unsigned char data) | 324 | static int put_xilinx_data(struct vx_core *chip, unsigned int port, unsigned int counts, unsigned char data) |
325 | { | 325 | { |
326 | unsigned int i; | 326 | unsigned int i; |
327 | 327 | ||
@@ -353,7 +353,7 @@ static int put_xilinx_data(vx_core_t *chip, unsigned int port, unsigned int coun | |||
353 | /* | 353 | /* |
354 | * load the xilinx image | 354 | * load the xilinx image |
355 | */ | 355 | */ |
356 | static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx) | 356 | static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *xilinx) |
357 | { | 357 | { |
358 | unsigned int i; | 358 | unsigned int i; |
359 | unsigned int port; | 359 | unsigned int port; |
@@ -400,7 +400,7 @@ static int vx2_load_xilinx_binary(vx_core_t *chip, const struct firmware *xilinx | |||
400 | /* | 400 | /* |
401 | * load the boot/dsp images | 401 | * load the boot/dsp images |
402 | */ | 402 | */ |
403 | static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp) | 403 | static int vx2_load_dsp(struct vx_core *vx, int index, const struct firmware *dsp) |
404 | { | 404 | { |
405 | int err; | 405 | int err; |
406 | 406 | ||
@@ -432,7 +432,7 @@ static int vx2_load_dsp(vx_core_t *vx, int index, const struct firmware *dsp) | |||
432 | * | 432 | * |
433 | * spinlock held! | 433 | * spinlock held! |
434 | */ | 434 | */ |
435 | static int vx2_test_and_ack(vx_core_t *chip) | 435 | static int vx2_test_and_ack(struct vx_core *chip) |
436 | { | 436 | { |
437 | /* not booted yet? */ | 437 | /* not booted yet? */ |
438 | if (! (chip->chip_status & VX_STAT_XILINX_LOADED)) | 438 | if (! (chip->chip_status & VX_STAT_XILINX_LOADED)) |
@@ -463,7 +463,7 @@ static int vx2_test_and_ack(vx_core_t *chip) | |||
463 | /* | 463 | /* |
464 | * vx_validate_irq - enable/disable IRQ | 464 | * vx_validate_irq - enable/disable IRQ |
465 | */ | 465 | */ |
466 | static void vx2_validate_irq(vx_core_t *_chip, int enable) | 466 | static void vx2_validate_irq(struct vx_core *_chip, int enable) |
467 | { | 467 | { |
468 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 468 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
469 | 469 | ||
@@ -484,7 +484,7 @@ static void vx2_validate_irq(vx_core_t *_chip, int enable) | |||
484 | /* | 484 | /* |
485 | * write an AKM codec data (24bit) | 485 | * write an AKM codec data (24bit) |
486 | */ | 486 | */ |
487 | static void vx2_write_codec_reg(vx_core_t *chip, unsigned int data) | 487 | static void vx2_write_codec_reg(struct vx_core *chip, unsigned int data) |
488 | { | 488 | { |
489 | unsigned int i; | 489 | unsigned int i; |
490 | 490 | ||
@@ -660,7 +660,7 @@ static const u8 vx2_akm_gains_lut[VX2_AKM_LEVEL_MAX+1] = { | |||
660 | /* | 660 | /* |
661 | * pseudo-codec write entry | 661 | * pseudo-codec write entry |
662 | */ | 662 | */ |
663 | static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data) | 663 | static void vx2_write_akm(struct vx_core *chip, int reg, unsigned int data) |
664 | { | 664 | { |
665 | unsigned int val; | 665 | unsigned int val; |
666 | 666 | ||
@@ -695,7 +695,7 @@ static void vx2_write_akm(vx_core_t *chip, int reg, unsigned int data) | |||
695 | /* | 695 | /* |
696 | * write codec bit for old VX222 board | 696 | * write codec bit for old VX222 board |
697 | */ | 697 | */ |
698 | static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int data) | 698 | static void vx2_old_write_codec_bit(struct vx_core *chip, int codec, unsigned int data) |
699 | { | 699 | { |
700 | int i; | 700 | int i; |
701 | 701 | ||
@@ -713,7 +713,7 @@ static void vx2_old_write_codec_bit(vx_core_t *chip, int codec, unsigned int dat | |||
713 | /* | 713 | /* |
714 | * reset codec bit | 714 | * reset codec bit |
715 | */ | 715 | */ |
716 | static void vx2_reset_codec(vx_core_t *_chip) | 716 | static void vx2_reset_codec(struct vx_core *_chip) |
717 | { | 717 | { |
718 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 718 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
719 | 719 | ||
@@ -755,7 +755,7 @@ static void vx2_reset_codec(vx_core_t *_chip) | |||
755 | /* | 755 | /* |
756 | * change the audio source | 756 | * change the audio source |
757 | */ | 757 | */ |
758 | static void vx2_change_audio_source(vx_core_t *_chip, int src) | 758 | static void vx2_change_audio_source(struct vx_core *_chip, int src) |
759 | { | 759 | { |
760 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 760 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
761 | 761 | ||
@@ -774,7 +774,7 @@ static void vx2_change_audio_source(vx_core_t *_chip, int src) | |||
774 | /* | 774 | /* |
775 | * set the clock source | 775 | * set the clock source |
776 | */ | 776 | */ |
777 | static void vx2_set_clock_source(vx_core_t *_chip, int source) | 777 | static void vx2_set_clock_source(struct vx_core *_chip, int source) |
778 | { | 778 | { |
779 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 779 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
780 | 780 | ||
@@ -788,7 +788,7 @@ static void vx2_set_clock_source(vx_core_t *_chip, int source) | |||
788 | /* | 788 | /* |
789 | * reset the board | 789 | * reset the board |
790 | */ | 790 | */ |
791 | static void vx2_reset_board(vx_core_t *_chip, int cold_reset) | 791 | static void vx2_reset_board(struct vx_core *_chip, int cold_reset) |
792 | { | 792 | { |
793 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 793 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
794 | 794 | ||
@@ -848,7 +848,7 @@ static void vx2_set_input_level(struct snd_vx222 *chip) | |||
848 | */ | 848 | */ |
849 | 849 | ||
850 | /* input levels */ | 850 | /* input levels */ |
851 | static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 851 | static int vx_input_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
852 | { | 852 | { |
853 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 853 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
854 | uinfo->count = 2; | 854 | uinfo->count = 2; |
@@ -857,9 +857,9 @@ static int vx_input_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui | |||
857 | return 0; | 857 | return 0; |
858 | } | 858 | } |
859 | 859 | ||
860 | static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 860 | static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
861 | { | 861 | { |
862 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 862 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
863 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 863 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
864 | down(&_chip->mixer_mutex); | 864 | down(&_chip->mixer_mutex); |
865 | ucontrol->value.integer.value[0] = chip->input_level[0]; | 865 | ucontrol->value.integer.value[0] = chip->input_level[0]; |
@@ -868,9 +868,9 @@ static int vx_input_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc | |||
868 | return 0; | 868 | return 0; |
869 | } | 869 | } |
870 | 870 | ||
871 | static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 871 | static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
872 | { | 872 | { |
873 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 873 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
874 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 874 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
875 | down(&_chip->mixer_mutex); | 875 | down(&_chip->mixer_mutex); |
876 | if (chip->input_level[0] != ucontrol->value.integer.value[0] || | 876 | if (chip->input_level[0] != ucontrol->value.integer.value[0] || |
@@ -886,7 +886,7 @@ static int vx_input_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc | |||
886 | } | 886 | } |
887 | 887 | ||
888 | /* mic level */ | 888 | /* mic level */ |
889 | static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 889 | static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
890 | { | 890 | { |
891 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 891 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
892 | uinfo->count = 1; | 892 | uinfo->count = 1; |
@@ -895,17 +895,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
895 | return 0; | 895 | return 0; |
896 | } | 896 | } |
897 | 897 | ||
898 | static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 898 | static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
899 | { | 899 | { |
900 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 900 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
901 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 901 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
902 | ucontrol->value.integer.value[0] = chip->mic_level; | 902 | ucontrol->value.integer.value[0] = chip->mic_level; |
903 | return 0; | 903 | return 0; |
904 | } | 904 | } |
905 | 905 | ||
906 | static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 906 | static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
907 | { | 907 | { |
908 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 908 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
909 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 909 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
910 | down(&_chip->mixer_mutex); | 910 | down(&_chip->mixer_mutex); |
911 | if (chip->mic_level != ucontrol->value.integer.value[0]) { | 911 | if (chip->mic_level != ucontrol->value.integer.value[0]) { |
@@ -918,7 +918,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon | |||
918 | return 0; | 918 | return 0; |
919 | } | 919 | } |
920 | 920 | ||
921 | static snd_kcontrol_new_t vx_control_input_level = { | 921 | static struct snd_kcontrol_new vx_control_input_level = { |
922 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 922 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
923 | .name = "Capture Volume", | 923 | .name = "Capture Volume", |
924 | .info = vx_input_level_info, | 924 | .info = vx_input_level_info, |
@@ -926,7 +926,7 @@ static snd_kcontrol_new_t vx_control_input_level = { | |||
926 | .put = vx_input_level_put, | 926 | .put = vx_input_level_put, |
927 | }; | 927 | }; |
928 | 928 | ||
929 | static snd_kcontrol_new_t vx_control_mic_level = { | 929 | static struct snd_kcontrol_new vx_control_mic_level = { |
930 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 930 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
931 | .name = "Mic Capture Volume", | 931 | .name = "Mic Capture Volume", |
932 | .info = vx_mic_level_info, | 932 | .info = vx_mic_level_info, |
@@ -938,7 +938,7 @@ static snd_kcontrol_new_t vx_control_mic_level = { | |||
938 | * FIXME: compressor/limiter implementation is missing yet... | 938 | * FIXME: compressor/limiter implementation is missing yet... |
939 | */ | 939 | */ |
940 | 940 | ||
941 | static int vx2_add_mic_controls(vx_core_t *_chip) | 941 | static int vx2_add_mic_controls(struct vx_core *_chip) |
942 | { | 942 | { |
943 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 943 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
944 | int err; | 944 | int err; |
diff --git a/sound/pcmcia/vx/vxp_mixer.c b/sound/pcmcia/vx/vxp_mixer.c index aeaef3d81801..9450149b931c 100644 --- a/sound/pcmcia/vx/vxp_mixer.c +++ b/sound/pcmcia/vx/vxp_mixer.c | |||
@@ -31,7 +31,7 @@ | |||
31 | /* | 31 | /* |
32 | * mic level control (for VXPocket) | 32 | * mic level control (for VXPocket) |
33 | */ | 33 | */ |
34 | static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 34 | static int vx_mic_level_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
35 | { | 35 | { |
36 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | 36 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; |
37 | uinfo->count = 1; | 37 | uinfo->count = 1; |
@@ -40,17 +40,17 @@ static int vx_mic_level_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | 42 | ||
43 | static int vx_mic_level_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 43 | static int vx_mic_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
44 | { | 44 | { |
45 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 45 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
46 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 46 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
47 | ucontrol->value.integer.value[0] = chip->mic_level; | 47 | ucontrol->value.integer.value[0] = chip->mic_level; |
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 51 | static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
52 | { | 52 | { |
53 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 53 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
54 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 54 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
55 | down(&_chip->mixer_mutex); | 55 | down(&_chip->mixer_mutex); |
56 | if (chip->mic_level != ucontrol->value.integer.value[0]) { | 56 | if (chip->mic_level != ucontrol->value.integer.value[0]) { |
@@ -63,7 +63,7 @@ static int vx_mic_level_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon | |||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | 65 | ||
66 | static snd_kcontrol_new_t vx_control_mic_level = { | 66 | static struct snd_kcontrol_new vx_control_mic_level = { |
67 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 67 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
68 | .name = "Mic Capture Volume", | 68 | .name = "Mic Capture Volume", |
69 | .info = vx_mic_level_info, | 69 | .info = vx_mic_level_info, |
@@ -74,7 +74,7 @@ static snd_kcontrol_new_t vx_control_mic_level = { | |||
74 | /* | 74 | /* |
75 | * mic boost level control (for VXP440) | 75 | * mic boost level control (for VXP440) |
76 | */ | 76 | */ |
77 | static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 77 | static int vx_mic_boost_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
78 | { | 78 | { |
79 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 79 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
80 | uinfo->count = 1; | 80 | uinfo->count = 1; |
@@ -83,17 +83,17 @@ static int vx_mic_boost_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinf | |||
83 | return 0; | 83 | return 0; |
84 | } | 84 | } |
85 | 85 | ||
86 | static int vx_mic_boost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 86 | static int vx_mic_boost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
87 | { | 87 | { |
88 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 88 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
89 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 89 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
90 | ucontrol->value.integer.value[0] = chip->mic_level; | 90 | ucontrol->value.integer.value[0] = chip->mic_level; |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | 93 | ||
94 | static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) | 94 | static int vx_mic_boost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
95 | { | 95 | { |
96 | vx_core_t *_chip = snd_kcontrol_chip(kcontrol); | 96 | struct vx_core *_chip = snd_kcontrol_chip(kcontrol); |
97 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 97 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
98 | down(&_chip->mixer_mutex); | 98 | down(&_chip->mixer_mutex); |
99 | if (chip->mic_level != ucontrol->value.integer.value[0]) { | 99 | if (chip->mic_level != ucontrol->value.integer.value[0]) { |
@@ -106,7 +106,7 @@ static int vx_mic_boost_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon | |||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | static snd_kcontrol_new_t vx_control_mic_boost = { | 109 | static struct snd_kcontrol_new vx_control_mic_boost = { |
110 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 110 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
111 | .name = "Mic Boost", | 111 | .name = "Mic Boost", |
112 | .info = vx_mic_boost_info, | 112 | .info = vx_mic_boost_info, |
@@ -115,7 +115,7 @@ static snd_kcontrol_new_t vx_control_mic_boost = { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | 117 | ||
118 | int vxp_add_mic_controls(vx_core_t *_chip) | 118 | int vxp_add_mic_controls(struct vx_core *_chip) |
119 | { | 119 | { |
120 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 120 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
121 | int err; | 121 | int err; |
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c index 2754d657a4d6..7f82f619f9f4 100644 --- a/sound/pcmcia/vx/vxp_ops.c +++ b/sound/pcmcia/vx/vxp_ops.c | |||
@@ -49,7 +49,7 @@ static int vxp_reg_offset[VX_REG_MAX] = { | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | 51 | ||
52 | static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg) | 52 | static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg) |
53 | { | 53 | { |
54 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 54 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
55 | return chip->port + vxp_reg_offset[reg]; | 55 | return chip->port + vxp_reg_offset[reg]; |
@@ -59,7 +59,7 @@ static inline unsigned long vxp_reg_addr(vx_core_t *_chip, int reg) | |||
59 | * snd_vx_inb - read a byte from the register | 59 | * snd_vx_inb - read a byte from the register |
60 | * @offset: register offset | 60 | * @offset: register offset |
61 | */ | 61 | */ |
62 | static unsigned char vxp_inb(vx_core_t *chip, int offset) | 62 | static unsigned char vxp_inb(struct vx_core *chip, int offset) |
63 | { | 63 | { |
64 | return inb(vxp_reg_addr(chip, offset)); | 64 | return inb(vxp_reg_addr(chip, offset)); |
65 | } | 65 | } |
@@ -69,7 +69,7 @@ static unsigned char vxp_inb(vx_core_t *chip, int offset) | |||
69 | * @offset: the register offset | 69 | * @offset: the register offset |
70 | * @val: the value to write | 70 | * @val: the value to write |
71 | */ | 71 | */ |
72 | static void vxp_outb(vx_core_t *chip, int offset, unsigned char val) | 72 | static void vxp_outb(struct vx_core *chip, int offset, unsigned char val) |
73 | { | 73 | { |
74 | outb(val, vxp_reg_addr(chip, offset)); | 74 | outb(val, vxp_reg_addr(chip, offset)); |
75 | } | 75 | } |
@@ -78,9 +78,9 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val) | |||
78 | * redefine macros to call directly | 78 | * redefine macros to call directly |
79 | */ | 79 | */ |
80 | #undef vx_inb | 80 | #undef vx_inb |
81 | #define vx_inb(chip,reg) vxp_inb((vx_core_t*)(chip), VX_##reg) | 81 | #define vx_inb(chip,reg) vxp_inb((struct vx_core *)(chip), VX_##reg) |
82 | #undef vx_outb | 82 | #undef vx_outb |
83 | #define vx_outb(chip,reg,val) vxp_outb((vx_core_t*)(chip), VX_##reg,val) | 83 | #define vx_outb(chip,reg,val) vxp_outb((struct vx_core *)(chip), VX_##reg,val) |
84 | 84 | ||
85 | 85 | ||
86 | /* | 86 | /* |
@@ -88,7 +88,7 @@ static void vxp_outb(vx_core_t *chip, int offset, unsigned char val) | |||
88 | * | 88 | * |
89 | * returns zero if a magic word is detected, or a negative error code. | 89 | * returns zero if a magic word is detected, or a negative error code. |
90 | */ | 90 | */ |
91 | static int vx_check_magic(vx_core_t *chip) | 91 | static int vx_check_magic(struct vx_core *chip) |
92 | { | 92 | { |
93 | unsigned long end_time = jiffies + HZ / 5; | 93 | unsigned long end_time = jiffies + HZ / 5; |
94 | int c; | 94 | int c; |
@@ -109,7 +109,7 @@ static int vx_check_magic(vx_core_t *chip) | |||
109 | 109 | ||
110 | #define XX_DSP_RESET_WAIT_TIME 2 /* ms */ | 110 | #define XX_DSP_RESET_WAIT_TIME 2 /* ms */ |
111 | 111 | ||
112 | static void vxp_reset_dsp(vx_core_t *_chip) | 112 | static void vxp_reset_dsp(struct vx_core *_chip) |
113 | { | 113 | { |
114 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 114 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
115 | 115 | ||
@@ -127,7 +127,7 @@ static void vxp_reset_dsp(vx_core_t *_chip) | |||
127 | /* | 127 | /* |
128 | * reset codec bit | 128 | * reset codec bit |
129 | */ | 129 | */ |
130 | static void vxp_reset_codec(vx_core_t *_chip) | 130 | static void vxp_reset_codec(struct vx_core *_chip) |
131 | { | 131 | { |
132 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 132 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
133 | 133 | ||
@@ -146,7 +146,7 @@ static void vxp_reset_codec(vx_core_t *_chip) | |||
146 | * vx_load_xilinx_binary - load the xilinx binary image | 146 | * vx_load_xilinx_binary - load the xilinx binary image |
147 | * the binary image is the binary array converted from the bitstream file. | 147 | * the binary image is the binary array converted from the bitstream file. |
148 | */ | 148 | */ |
149 | static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw) | 149 | static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw) |
150 | { | 150 | { |
151 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 151 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
152 | unsigned int i; | 152 | unsigned int i; |
@@ -244,7 +244,7 @@ static int vxp_load_xilinx_binary(vx_core_t *_chip, const struct firmware *fw) | |||
244 | /* | 244 | /* |
245 | * vxp_load_dsp - load_dsp callback | 245 | * vxp_load_dsp - load_dsp callback |
246 | */ | 246 | */ |
247 | static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw) | 247 | static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw) |
248 | { | 248 | { |
249 | int err; | 249 | int err; |
250 | 250 | ||
@@ -279,7 +279,7 @@ static int vxp_load_dsp(vx_core_t *vx, int index, const struct firmware *fw) | |||
279 | * | 279 | * |
280 | * spinlock held! | 280 | * spinlock held! |
281 | */ | 281 | */ |
282 | static int vxp_test_and_ack(vx_core_t *_chip) | 282 | static int vxp_test_and_ack(struct vx_core *_chip) |
283 | { | 283 | { |
284 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 284 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
285 | 285 | ||
@@ -306,7 +306,7 @@ static int vxp_test_and_ack(vx_core_t *_chip) | |||
306 | /* | 306 | /* |
307 | * vx_validate_irq - enable/disable IRQ | 307 | * vx_validate_irq - enable/disable IRQ |
308 | */ | 308 | */ |
309 | static void vxp_validate_irq(vx_core_t *_chip, int enable) | 309 | static void vxp_validate_irq(struct vx_core *_chip, int enable) |
310 | { | 310 | { |
311 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 311 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
312 | 312 | ||
@@ -322,7 +322,7 @@ static void vxp_validate_irq(vx_core_t *_chip, int enable) | |||
322 | * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. | 322 | * vx_setup_pseudo_dma - set up the pseudo dma read/write mode. |
323 | * @do_write: 0 = read, 1 = set up for DMA write | 323 | * @do_write: 0 = read, 1 = set up for DMA write |
324 | */ | 324 | */ |
325 | static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write) | 325 | static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write) |
326 | { | 326 | { |
327 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 327 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
328 | 328 | ||
@@ -342,7 +342,7 @@ static void vx_setup_pseudo_dma(vx_core_t *_chip, int do_write) | |||
342 | /* | 342 | /* |
343 | * vx_release_pseudo_dma - disable the pseudo-DMA mode | 343 | * vx_release_pseudo_dma - disable the pseudo-DMA mode |
344 | */ | 344 | */ |
345 | static void vx_release_pseudo_dma(vx_core_t *_chip) | 345 | static void vx_release_pseudo_dma(struct vx_core *_chip) |
346 | { | 346 | { |
347 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 347 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
348 | 348 | ||
@@ -362,8 +362,8 @@ static void vx_release_pseudo_dma(vx_core_t *_chip) | |||
362 | * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP. | 362 | * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP. |
363 | * NB: call with a certain lock! | 363 | * NB: call with a certain lock! |
364 | */ | 364 | */ |
365 | static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, | 365 | static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
366 | vx_pipe_t *pipe, int count) | 366 | struct vx_pipe *pipe, int count) |
367 | { | 367 | { |
368 | long port = vxp_reg_addr(chip, VX_DMA); | 368 | long port = vxp_reg_addr(chip, VX_DMA); |
369 | int offset = pipe->hw_ptr; | 369 | int offset = pipe->hw_ptr; |
@@ -401,8 +401,8 @@ static void vxp_dma_write(vx_core_t *chip, snd_pcm_runtime_t *runtime, | |||
401 | * the read length must be aligned to 6 bytes, as well as write. | 401 | * the read length must be aligned to 6 bytes, as well as write. |
402 | * NB: call with a certain lock! | 402 | * NB: call with a certain lock! |
403 | */ | 403 | */ |
404 | static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, | 404 | static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
405 | vx_pipe_t *pipe, int count) | 405 | struct vx_pipe *pipe, int count) |
406 | { | 406 | { |
407 | struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; | 407 | struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; |
408 | long port = vxp_reg_addr(chip, VX_DMA); | 408 | long port = vxp_reg_addr(chip, VX_DMA); |
@@ -442,7 +442,7 @@ static void vxp_dma_read(vx_core_t *chip, snd_pcm_runtime_t *runtime, | |||
442 | /* | 442 | /* |
443 | * write a codec data (24bit) | 443 | * write a codec data (24bit) |
444 | */ | 444 | */ |
445 | static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) | 445 | static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data) |
446 | { | 446 | { |
447 | int i; | 447 | int i; |
448 | 448 | ||
@@ -465,7 +465,7 @@ static void vxp_write_codec_reg(vx_core_t *chip, int codec, unsigned int data) | |||
465 | * vx_set_mic_boost - set mic boost level (on vxp440 only) | 465 | * vx_set_mic_boost - set mic boost level (on vxp440 only) |
466 | * @boost: 0 = 20dB, 1 = +38dB | 466 | * @boost: 0 = 20dB, 1 = +38dB |
467 | */ | 467 | */ |
468 | void vx_set_mic_boost(vx_core_t *chip, int boost) | 468 | void vx_set_mic_boost(struct vx_core *chip, int boost) |
469 | { | 469 | { |
470 | struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; | 470 | struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; |
471 | unsigned long flags; | 471 | unsigned long flags; |
@@ -508,7 +508,7 @@ static int vx_compute_mic_level(int level) | |||
508 | * vx_set_mic_level - set mic level (on vxpocket only) | 508 | * vx_set_mic_level - set mic level (on vxpocket only) |
509 | * @level: the mic level = 0 - 8 (max) | 509 | * @level: the mic level = 0 - 8 (max) |
510 | */ | 510 | */ |
511 | void vx_set_mic_level(vx_core_t *chip, int level) | 511 | void vx_set_mic_level(struct vx_core *chip, int level) |
512 | { | 512 | { |
513 | struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; | 513 | struct snd_vxpocket *pchip = (struct snd_vxpocket *)chip; |
514 | unsigned long flags; | 514 | unsigned long flags; |
@@ -528,7 +528,7 @@ void vx_set_mic_level(vx_core_t *chip, int level) | |||
528 | /* | 528 | /* |
529 | * change the input audio source | 529 | * change the input audio source |
530 | */ | 530 | */ |
531 | static void vxp_change_audio_source(vx_core_t *_chip, int src) | 531 | static void vxp_change_audio_source(struct vx_core *_chip, int src) |
532 | { | 532 | { |
533 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 533 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
534 | 534 | ||
@@ -568,7 +568,7 @@ static void vxp_change_audio_source(vx_core_t *_chip, int src) | |||
568 | * change the clock source | 568 | * change the clock source |
569 | * source = INTERNAL_QUARTZ or UER_SYNC | 569 | * source = INTERNAL_QUARTZ or UER_SYNC |
570 | */ | 570 | */ |
571 | static void vxp_set_clock_source(vx_core_t *_chip, int source) | 571 | static void vxp_set_clock_source(struct vx_core *_chip, int source) |
572 | { | 572 | { |
573 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 573 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
574 | 574 | ||
@@ -583,7 +583,7 @@ static void vxp_set_clock_source(vx_core_t *_chip, int source) | |||
583 | /* | 583 | /* |
584 | * reset the board | 584 | * reset the board |
585 | */ | 585 | */ |
586 | static void vxp_reset_board(vx_core_t *_chip, int cold_reset) | 586 | static void vxp_reset_board(struct vx_core *_chip, int cold_reset) |
587 | { | 587 | { |
588 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; | 588 | struct snd_vxpocket *chip = (struct snd_vxpocket *)_chip; |
589 | 589 | ||
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 1e8f16b4c073..009629714140 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c | |||
@@ -83,9 +83,9 @@ static void vxpocket_release(dev_link_t *link) | |||
83 | /* | 83 | /* |
84 | * destructor, called from snd_card_free_in_thread() | 84 | * destructor, called from snd_card_free_in_thread() |
85 | */ | 85 | */ |
86 | static int snd_vxpocket_dev_free(snd_device_t *device) | 86 | static int snd_vxpocket_dev_free(struct snd_device *device) |
87 | { | 87 | { |
88 | vx_core_t *chip = device->device_data; | 88 | struct vx_core *chip = device->device_data; |
89 | 89 | ||
90 | snd_vx_free_firmware(chip); | 90 | snd_vx_free_firmware(chip); |
91 | kfree(chip); | 91 | kfree(chip); |
@@ -142,19 +142,19 @@ static struct snd_vx_hardware vxp440_hw = { | |||
142 | /* | 142 | /* |
143 | * create vxpocket instance | 143 | * create vxpocket instance |
144 | */ | 144 | */ |
145 | static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl) | 145 | static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl) |
146 | { | 146 | { |
147 | client_reg_t client_reg; /* Register with cardmgr */ | 147 | client_reg_t client_reg; /* Register with cardmgr */ |
148 | dev_link_t *link; /* Info for cardmgr */ | 148 | dev_link_t *link; /* Info for cardmgr */ |
149 | vx_core_t *chip; | 149 | struct vx_core *chip; |
150 | struct snd_vxpocket *vxp; | 150 | struct snd_vxpocket *vxp; |
151 | int ret; | 151 | int ret; |
152 | static snd_device_ops_t ops = { | 152 | static struct snd_device_ops ops = { |
153 | .dev_free = snd_vxpocket_dev_free, | 153 | .dev_free = snd_vxpocket_dev_free, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops, | 156 | chip = snd_vx_create(card, &vxpocket_hw, &snd_vxpocket_ops, |
157 | sizeof(struct snd_vxpocket) - sizeof(vx_core_t)); | 157 | sizeof(struct snd_vxpocket) - sizeof(struct vx_core)); |
158 | if (! chip) | 158 | if (! chip) |
159 | return NULL; | 159 | return NULL; |
160 | 160 | ||
@@ -218,10 +218,10 @@ static struct snd_vxpocket *snd_vxpocket_new(snd_card_t *card, int ibl) | |||
218 | * | 218 | * |
219 | * returns 0 if successful, or a negative error code. | 219 | * returns 0 if successful, or a negative error code. |
220 | */ | 220 | */ |
221 | static int snd_vxpocket_assign_resources(vx_core_t *chip, int port, int irq) | 221 | static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq) |
222 | { | 222 | { |
223 | int err; | 223 | int err; |
224 | snd_card_t *card = chip->card; | 224 | struct snd_card *card = chip->card; |
225 | struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; | 225 | struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; |
226 | 226 | ||
227 | snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq); | 227 | snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq); |
@@ -250,7 +250,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
250 | static void vxpocket_config(dev_link_t *link) | 250 | static void vxpocket_config(dev_link_t *link) |
251 | { | 251 | { |
252 | client_handle_t handle = link->handle; | 252 | client_handle_t handle = link->handle; |
253 | vx_core_t *chip = link->priv; | 253 | struct vx_core *chip = link->priv; |
254 | struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; | 254 | struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; |
255 | tuple_t tuple; | 255 | tuple_t tuple; |
256 | cisparse_t *parse; | 256 | cisparse_t *parse; |
@@ -324,7 +324,7 @@ failed: | |||
324 | static int vxpocket_event(event_t event, int priority, event_callback_args_t *args) | 324 | static int vxpocket_event(event_t event, int priority, event_callback_args_t *args) |
325 | { | 325 | { |
326 | dev_link_t *link = args->client_data; | 326 | dev_link_t *link = args->client_data; |
327 | vx_core_t *chip = link->priv; | 327 | struct vx_core *chip = link->priv; |
328 | 328 | ||
329 | switch (event) { | 329 | switch (event) { |
330 | case CS_EVENT_CARD_REMOVAL: | 330 | case CS_EVENT_CARD_REMOVAL: |
@@ -379,7 +379,7 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar | |||
379 | */ | 379 | */ |
380 | static dev_link_t *vxpocket_attach(void) | 380 | static dev_link_t *vxpocket_attach(void) |
381 | { | 381 | { |
382 | snd_card_t *card; | 382 | struct snd_card *card; |
383 | struct snd_vxpocket *vxp; | 383 | struct snd_vxpocket *vxp; |
384 | int i; | 384 | int i; |
385 | 385 | ||
@@ -421,14 +421,14 @@ static dev_link_t *vxpocket_attach(void) | |||
421 | static void vxpocket_detach(dev_link_t *link) | 421 | static void vxpocket_detach(dev_link_t *link) |
422 | { | 422 | { |
423 | struct snd_vxpocket *vxp; | 423 | struct snd_vxpocket *vxp; |
424 | vx_core_t *chip; | 424 | struct vx_core *chip; |
425 | dev_link_t **linkp; | 425 | dev_link_t **linkp; |
426 | 426 | ||
427 | if (! link) | 427 | if (! link) |
428 | return; | 428 | return; |
429 | 429 | ||
430 | vxp = link->priv; | 430 | vxp = link->priv; |
431 | chip = (vx_core_t *)vxp; | 431 | chip = (struct vx_core *)vxp; |
432 | card_alloc &= ~(1 << vxp->index); | 432 | card_alloc &= ~(1 << vxp->index); |
433 | 433 | ||
434 | /* Remove the interface data from the linked list */ | 434 | /* Remove the interface data from the linked list */ |
diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h index 70754aa3dd11..67efae3f6c8d 100644 --- a/sound/pcmcia/vx/vxpocket.h +++ b/sound/pcmcia/vx/vxpocket.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | struct snd_vxpocket { | 31 | struct snd_vxpocket { |
32 | 32 | ||
33 | vx_core_t core; | 33 | struct vx_core core; |
34 | 34 | ||
35 | unsigned long port; | 35 | unsigned long port; |
36 | 36 | ||
@@ -48,10 +48,10 @@ struct snd_vxpocket { | |||
48 | 48 | ||
49 | extern struct snd_vx_ops snd_vxpocket_ops; | 49 | extern struct snd_vx_ops snd_vxpocket_ops; |
50 | 50 | ||
51 | void vx_set_mic_boost(vx_core_t *chip, int boost); | 51 | void vx_set_mic_boost(struct vx_core *chip, int boost); |
52 | void vx_set_mic_level(vx_core_t *chip, int level); | 52 | void vx_set_mic_level(struct vx_core *chip, int level); |
53 | 53 | ||
54 | int vxp_add_mic_controls(vx_core_t *chip); | 54 | int vxp_add_mic_controls(struct vx_core *chip); |
55 | 55 | ||
56 | /* Constants used to access the CDSP register (0x08). */ | 56 | /* Constants used to access the CDSP register (0x08). */ |
57 | #define CDSP_MAGIC 0xA7 /* magic value (for read) */ | 57 | #define CDSP_MAGIC 0xA7 /* magic value (for read) */ |