diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:30:42 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:18:21 -0500 |
commit | ba2375a45c528fd902676ea01014ea0f8931464b (patch) | |
tree | e38833035449d0d65afb3cfc1104b243ce88454c /sound/isa/cs423x/cs4231_lib.c | |
parent | c8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7 (diff) |
[ALSA] Remove xxx_t typedefs: ISA CS423x
Modules: CS4231 driver,CS4236+ driver
Remove xxx_t typedefs from the ISA CS423x drivers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/cs423x/cs4231_lib.c')
-rw-r--r-- | sound/isa/cs423x/cs4231_lib.c | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index 94e07a7c8b33..ab9075f51237 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c | |||
@@ -73,13 +73,13 @@ static unsigned int rates[14] = { | |||
73 | 27042, 32000, 33075, 37800, 44100, 48000 | 73 | 27042, 32000, 33075, 37800, 44100, 48000 |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static snd_pcm_hw_constraint_list_t hw_constraints_rates = { | 76 | static struct snd_pcm_hw_constraint_list hw_constraints_rates = { |
77 | .count = 14, | 77 | .count = 14, |
78 | .list = rates, | 78 | .list = rates, |
79 | .mask = 0, | 79 | .mask = 0, |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static int snd_cs4231_xrate(snd_pcm_runtime_t *runtime) | 82 | static int snd_cs4231_xrate(struct snd_pcm_runtime *runtime) |
83 | { | 83 | { |
84 | return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); | 84 | return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); |
85 | } | 85 | } |
@@ -124,17 +124,17 @@ static unsigned char snd_cs4231_original_image[32] = | |||
124 | * Basic I/O functions | 124 | * Basic I/O functions |
125 | */ | 125 | */ |
126 | 126 | ||
127 | static inline void cs4231_outb(cs4231_t *chip, u8 offset, u8 val) | 127 | static inline void cs4231_outb(struct snd_cs4231 *chip, u8 offset, u8 val) |
128 | { | 128 | { |
129 | outb(val, chip->port + offset); | 129 | outb(val, chip->port + offset); |
130 | } | 130 | } |
131 | 131 | ||
132 | static inline u8 cs4231_inb(cs4231_t *chip, u8 offset) | 132 | static inline u8 cs4231_inb(struct snd_cs4231 *chip, u8 offset) |
133 | { | 133 | { |
134 | return inb(chip->port + offset); | 134 | return inb(chip->port + offset); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg, | 137 | static void snd_cs4231_outm(struct snd_cs4231 *chip, unsigned char reg, |
138 | unsigned char mask, unsigned char value) | 138 | unsigned char mask, unsigned char value) |
139 | { | 139 | { |
140 | int timeout; | 140 | int timeout; |
@@ -161,7 +161,7 @@ static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg, | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | static void snd_cs4231_dout(cs4231_t *chip, unsigned char reg, unsigned char value) | 164 | static void snd_cs4231_dout(struct snd_cs4231 *chip, unsigned char reg, unsigned char value) |
165 | { | 165 | { |
166 | int timeout; | 166 | int timeout; |
167 | 167 | ||
@@ -174,7 +174,7 @@ static void snd_cs4231_dout(cs4231_t *chip, unsigned char reg, unsigned char val | |||
174 | mb(); | 174 | mb(); |
175 | } | 175 | } |
176 | 176 | ||
177 | void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char value) | 177 | void snd_cs4231_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char value) |
178 | { | 178 | { |
179 | int timeout; | 179 | int timeout; |
180 | 180 | ||
@@ -195,7 +195,7 @@ void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char value) | |||
195 | #endif | 195 | #endif |
196 | } | 196 | } |
197 | 197 | ||
198 | unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg) | 198 | unsigned char snd_cs4231_in(struct snd_cs4231 *chip, unsigned char reg) |
199 | { | 199 | { |
200 | int timeout; | 200 | int timeout; |
201 | 201 | ||
@@ -212,7 +212,7 @@ unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg) | |||
212 | return cs4231_inb(chip, CS4231P(REG)); | 212 | return cs4231_inb(chip, CS4231P(REG)); |
213 | } | 213 | } |
214 | 214 | ||
215 | void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val) | 215 | void snd_cs4236_ext_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val) |
216 | { | 216 | { |
217 | cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17); | 217 | cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17); |
218 | cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01)); | 218 | cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01)); |
@@ -223,7 +223,7 @@ void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val) | |||
223 | #endif | 223 | #endif |
224 | } | 224 | } |
225 | 225 | ||
226 | unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg) | 226 | unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg) |
227 | { | 227 | { |
228 | cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17); | 228 | cs4231_outb(chip, CS4231P(REGSEL), chip->mce_bit | 0x17); |
229 | cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01)); | 229 | cs4231_outb(chip, CS4231P(REG), reg | (chip->image[CS4236_EXT_REG] & 0x01)); |
@@ -241,7 +241,7 @@ unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg) | |||
241 | 241 | ||
242 | #if 0 | 242 | #if 0 |
243 | 243 | ||
244 | static void snd_cs4231_debug(cs4231_t *chip) | 244 | static void snd_cs4231_debug(struct snd_cs4231 *chip) |
245 | { | 245 | { |
246 | printk("CS4231 REGS: INDEX = 0x%02x ", cs4231_inb(chip, CS4231P(REGSEL))); | 246 | printk("CS4231 REGS: INDEX = 0x%02x ", cs4231_inb(chip, CS4231P(REGSEL))); |
247 | printk(" STATUS = 0x%02x\n", cs4231_inb(chip, CS4231P(STATUS))); | 247 | printk(" STATUS = 0x%02x\n", cs4231_inb(chip, CS4231P(STATUS))); |
@@ -285,7 +285,7 @@ static void snd_cs4231_debug(cs4231_t *chip) | |||
285 | * CS4231 detection / MCE routines | 285 | * CS4231 detection / MCE routines |
286 | */ | 286 | */ |
287 | 287 | ||
288 | static void snd_cs4231_busy_wait(cs4231_t *chip) | 288 | static void snd_cs4231_busy_wait(struct snd_cs4231 *chip) |
289 | { | 289 | { |
290 | int timeout; | 290 | int timeout; |
291 | 291 | ||
@@ -299,7 +299,7 @@ static void snd_cs4231_busy_wait(cs4231_t *chip) | |||
299 | udelay(10); | 299 | udelay(10); |
300 | } | 300 | } |
301 | 301 | ||
302 | void snd_cs4231_mce_up(cs4231_t *chip) | 302 | void snd_cs4231_mce_up(struct snd_cs4231 *chip) |
303 | { | 303 | { |
304 | unsigned long flags; | 304 | unsigned long flags; |
305 | int timeout; | 305 | int timeout; |
@@ -320,7 +320,7 @@ void snd_cs4231_mce_up(cs4231_t *chip) | |||
320 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 320 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
321 | } | 321 | } |
322 | 322 | ||
323 | void snd_cs4231_mce_down(cs4231_t *chip) | 323 | void snd_cs4231_mce_down(struct snd_cs4231 *chip) |
324 | { | 324 | { |
325 | unsigned long flags; | 325 | unsigned long flags; |
326 | int timeout; | 326 | int timeout; |
@@ -399,14 +399,14 @@ static unsigned int snd_cs4231_get_count(unsigned char format, unsigned int size | |||
399 | return size; | 399 | return size; |
400 | } | 400 | } |
401 | 401 | ||
402 | static int snd_cs4231_trigger(snd_pcm_substream_t *substream, | 402 | static int snd_cs4231_trigger(struct snd_pcm_substream *substream, |
403 | int cmd) | 403 | int cmd) |
404 | { | 404 | { |
405 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 405 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
406 | int result = 0; | 406 | int result = 0; |
407 | unsigned int what; | 407 | unsigned int what; |
408 | struct list_head *pos; | 408 | struct list_head *pos; |
409 | snd_pcm_substream_t *s; | 409 | struct snd_pcm_substream *s; |
410 | int do_start; | 410 | int do_start; |
411 | 411 | ||
412 | #if 0 | 412 | #if 0 |
@@ -468,7 +468,7 @@ static unsigned char snd_cs4231_get_rate(unsigned int rate) | |||
468 | return freq_bits[13]; | 468 | return freq_bits[13]; |
469 | } | 469 | } |
470 | 470 | ||
471 | static unsigned char snd_cs4231_get_format(cs4231_t *chip, | 471 | static unsigned char snd_cs4231_get_format(struct snd_cs4231 *chip, |
472 | int format, | 472 | int format, |
473 | int channels) | 473 | int channels) |
474 | { | 474 | { |
@@ -490,7 +490,7 @@ static unsigned char snd_cs4231_get_format(cs4231_t *chip, | |||
490 | return rformat; | 490 | return rformat; |
491 | } | 491 | } |
492 | 492 | ||
493 | static void snd_cs4231_calibrate_mute(cs4231_t *chip, int mute) | 493 | static void snd_cs4231_calibrate_mute(struct snd_cs4231 *chip, int mute) |
494 | { | 494 | { |
495 | unsigned long flags; | 495 | unsigned long flags; |
496 | 496 | ||
@@ -524,8 +524,8 @@ static void snd_cs4231_calibrate_mute(cs4231_t *chip, int mute) | |||
524 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 524 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
525 | } | 525 | } |
526 | 526 | ||
527 | static void snd_cs4231_playback_format(cs4231_t *chip, | 527 | static void snd_cs4231_playback_format(struct snd_cs4231 *chip, |
528 | snd_pcm_hw_params_t *params, | 528 | struct snd_pcm_hw_params *params, |
529 | unsigned char pdfr) | 529 | unsigned char pdfr) |
530 | { | 530 | { |
531 | unsigned long flags; | 531 | unsigned long flags; |
@@ -563,8 +563,8 @@ static void snd_cs4231_playback_format(cs4231_t *chip, | |||
563 | up(&chip->mce_mutex); | 563 | up(&chip->mce_mutex); |
564 | } | 564 | } |
565 | 565 | ||
566 | static void snd_cs4231_capture_format(cs4231_t *chip, | 566 | static void snd_cs4231_capture_format(struct snd_cs4231 *chip, |
567 | snd_pcm_hw_params_t *params, | 567 | struct snd_pcm_hw_params *params, |
568 | unsigned char cdfr) | 568 | unsigned char cdfr) |
569 | { | 569 | { |
570 | unsigned long flags; | 570 | unsigned long flags; |
@@ -610,20 +610,20 @@ static void snd_cs4231_capture_format(cs4231_t *chip, | |||
610 | * Timer interface | 610 | * Timer interface |
611 | */ | 611 | */ |
612 | 612 | ||
613 | static unsigned long snd_cs4231_timer_resolution(snd_timer_t * timer) | 613 | static unsigned long snd_cs4231_timer_resolution(struct snd_timer * timer) |
614 | { | 614 | { |
615 | cs4231_t *chip = snd_timer_chip(timer); | 615 | struct snd_cs4231 *chip = snd_timer_chip(timer); |
616 | if (chip->hardware & CS4231_HW_CS4236B_MASK) | 616 | if (chip->hardware & CS4231_HW_CS4236B_MASK) |
617 | return 14467; | 617 | return 14467; |
618 | else | 618 | else |
619 | return chip->image[CS4231_PLAYBK_FORMAT] & 1 ? 9969 : 9920; | 619 | return chip->image[CS4231_PLAYBK_FORMAT] & 1 ? 9969 : 9920; |
620 | } | 620 | } |
621 | 621 | ||
622 | static int snd_cs4231_timer_start(snd_timer_t * timer) | 622 | static int snd_cs4231_timer_start(struct snd_timer * timer) |
623 | { | 623 | { |
624 | unsigned long flags; | 624 | unsigned long flags; |
625 | unsigned int ticks; | 625 | unsigned int ticks; |
626 | cs4231_t *chip = snd_timer_chip(timer); | 626 | struct snd_cs4231 *chip = snd_timer_chip(timer); |
627 | spin_lock_irqsave(&chip->reg_lock, flags); | 627 | spin_lock_irqsave(&chip->reg_lock, flags); |
628 | ticks = timer->sticks; | 628 | ticks = timer->sticks; |
629 | if ((chip->image[CS4231_ALT_FEATURE_1] & CS4231_TIMER_ENABLE) == 0 || | 629 | if ((chip->image[CS4231_ALT_FEATURE_1] & CS4231_TIMER_ENABLE) == 0 || |
@@ -637,17 +637,17 @@ static int snd_cs4231_timer_start(snd_timer_t * timer) | |||
637 | return 0; | 637 | return 0; |
638 | } | 638 | } |
639 | 639 | ||
640 | static int snd_cs4231_timer_stop(snd_timer_t * timer) | 640 | static int snd_cs4231_timer_stop(struct snd_timer * timer) |
641 | { | 641 | { |
642 | unsigned long flags; | 642 | unsigned long flags; |
643 | cs4231_t *chip = snd_timer_chip(timer); | 643 | struct snd_cs4231 *chip = snd_timer_chip(timer); |
644 | spin_lock_irqsave(&chip->reg_lock, flags); | 644 | spin_lock_irqsave(&chip->reg_lock, flags); |
645 | snd_cs4231_out(chip, CS4231_ALT_FEATURE_1, chip->image[CS4231_ALT_FEATURE_1] &= ~CS4231_TIMER_ENABLE); | 645 | snd_cs4231_out(chip, CS4231_ALT_FEATURE_1, chip->image[CS4231_ALT_FEATURE_1] &= ~CS4231_TIMER_ENABLE); |
646 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 646 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
647 | return 0; | 647 | return 0; |
648 | } | 648 | } |
649 | 649 | ||
650 | static void snd_cs4231_init(cs4231_t *chip) | 650 | static void snd_cs4231_init(struct snd_cs4231 *chip) |
651 | { | 651 | { |
652 | unsigned long flags; | 652 | unsigned long flags; |
653 | 653 | ||
@@ -705,7 +705,7 @@ static void snd_cs4231_init(cs4231_t *chip) | |||
705 | #endif | 705 | #endif |
706 | } | 706 | } |
707 | 707 | ||
708 | static int snd_cs4231_open(cs4231_t *chip, unsigned int mode) | 708 | static int snd_cs4231_open(struct snd_cs4231 *chip, unsigned int mode) |
709 | { | 709 | { |
710 | unsigned long flags; | 710 | unsigned long flags; |
711 | 711 | ||
@@ -741,7 +741,7 @@ static int snd_cs4231_open(cs4231_t *chip, unsigned int mode) | |||
741 | return 0; | 741 | return 0; |
742 | } | 742 | } |
743 | 743 | ||
744 | static void snd_cs4231_close(cs4231_t *chip, unsigned int mode) | 744 | static void snd_cs4231_close(struct snd_cs4231 *chip, unsigned int mode) |
745 | { | 745 | { |
746 | unsigned long flags; | 746 | unsigned long flags; |
747 | 747 | ||
@@ -792,21 +792,21 @@ static void snd_cs4231_close(cs4231_t *chip, unsigned int mode) | |||
792 | * timer open/close | 792 | * timer open/close |
793 | */ | 793 | */ |
794 | 794 | ||
795 | static int snd_cs4231_timer_open(snd_timer_t * timer) | 795 | static int snd_cs4231_timer_open(struct snd_timer * timer) |
796 | { | 796 | { |
797 | cs4231_t *chip = snd_timer_chip(timer); | 797 | struct snd_cs4231 *chip = snd_timer_chip(timer); |
798 | snd_cs4231_open(chip, CS4231_MODE_TIMER); | 798 | snd_cs4231_open(chip, CS4231_MODE_TIMER); |
799 | return 0; | 799 | return 0; |
800 | } | 800 | } |
801 | 801 | ||
802 | static int snd_cs4231_timer_close(snd_timer_t * timer) | 802 | static int snd_cs4231_timer_close(struct snd_timer * timer) |
803 | { | 803 | { |
804 | cs4231_t *chip = snd_timer_chip(timer); | 804 | struct snd_cs4231 *chip = snd_timer_chip(timer); |
805 | snd_cs4231_close(chip, CS4231_MODE_TIMER); | 805 | snd_cs4231_close(chip, CS4231_MODE_TIMER); |
806 | return 0; | 806 | return 0; |
807 | } | 807 | } |
808 | 808 | ||
809 | static struct _snd_timer_hardware snd_cs4231_timer_table = | 809 | static struct snd_timer_hardware snd_cs4231_timer_table = |
810 | { | 810 | { |
811 | .flags = SNDRV_TIMER_HW_AUTO, | 811 | .flags = SNDRV_TIMER_HW_AUTO, |
812 | .resolution = 9945, | 812 | .resolution = 9945, |
@@ -822,10 +822,10 @@ static struct _snd_timer_hardware snd_cs4231_timer_table = | |||
822 | * ok.. exported functions.. | 822 | * ok.. exported functions.. |
823 | */ | 823 | */ |
824 | 824 | ||
825 | static int snd_cs4231_playback_hw_params(snd_pcm_substream_t * substream, | 825 | static int snd_cs4231_playback_hw_params(struct snd_pcm_substream *substream, |
826 | snd_pcm_hw_params_t * hw_params) | 826 | struct snd_pcm_hw_params *hw_params) |
827 | { | 827 | { |
828 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 828 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
829 | unsigned char new_pdfr; | 829 | unsigned char new_pdfr; |
830 | int err; | 830 | int err; |
831 | 831 | ||
@@ -837,15 +837,15 @@ static int snd_cs4231_playback_hw_params(snd_pcm_substream_t * substream, | |||
837 | return 0; | 837 | return 0; |
838 | } | 838 | } |
839 | 839 | ||
840 | static int snd_cs4231_playback_hw_free(snd_pcm_substream_t * substream) | 840 | static int snd_cs4231_playback_hw_free(struct snd_pcm_substream *substream) |
841 | { | 841 | { |
842 | return snd_pcm_lib_free_pages(substream); | 842 | return snd_pcm_lib_free_pages(substream); |
843 | } | 843 | } |
844 | 844 | ||
845 | static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream) | 845 | static int snd_cs4231_playback_prepare(struct snd_pcm_substream *substream) |
846 | { | 846 | { |
847 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 847 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
848 | snd_pcm_runtime_t *runtime = substream->runtime; | 848 | struct snd_pcm_runtime *runtime = substream->runtime; |
849 | unsigned long flags; | 849 | unsigned long flags; |
850 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); | 850 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); |
851 | unsigned int count = snd_pcm_lib_period_bytes(substream); | 851 | unsigned int count = snd_pcm_lib_period_bytes(substream); |
@@ -864,10 +864,10 @@ static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream) | |||
864 | return 0; | 864 | return 0; |
865 | } | 865 | } |
866 | 866 | ||
867 | static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream, | 867 | static int snd_cs4231_capture_hw_params(struct snd_pcm_substream *substream, |
868 | snd_pcm_hw_params_t * hw_params) | 868 | struct snd_pcm_hw_params *hw_params) |
869 | { | 869 | { |
870 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 870 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
871 | unsigned char new_cdfr; | 871 | unsigned char new_cdfr; |
872 | int err; | 872 | int err; |
873 | 873 | ||
@@ -879,15 +879,15 @@ static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream, | |||
879 | return 0; | 879 | return 0; |
880 | } | 880 | } |
881 | 881 | ||
882 | static int snd_cs4231_capture_hw_free(snd_pcm_substream_t * substream) | 882 | static int snd_cs4231_capture_hw_free(struct snd_pcm_substream *substream) |
883 | { | 883 | { |
884 | return snd_pcm_lib_free_pages(substream); | 884 | return snd_pcm_lib_free_pages(substream); |
885 | } | 885 | } |
886 | 886 | ||
887 | static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream) | 887 | static int snd_cs4231_capture_prepare(struct snd_pcm_substream *substream) |
888 | { | 888 | { |
889 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 889 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
890 | snd_pcm_runtime_t *runtime = substream->runtime; | 890 | struct snd_pcm_runtime *runtime = substream->runtime; |
891 | unsigned long flags; | 891 | unsigned long flags; |
892 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); | 892 | unsigned int size = snd_pcm_lib_buffer_bytes(substream); |
893 | unsigned int count = snd_pcm_lib_period_bytes(substream); | 893 | unsigned int count = snd_pcm_lib_period_bytes(substream); |
@@ -908,7 +908,7 @@ static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream) | |||
908 | return 0; | 908 | return 0; |
909 | } | 909 | } |
910 | 910 | ||
911 | static void snd_cs4231_overrange(cs4231_t *chip) | 911 | static void snd_cs4231_overrange(struct snd_cs4231 *chip) |
912 | { | 912 | { |
913 | unsigned long flags; | 913 | unsigned long flags; |
914 | unsigned char res; | 914 | unsigned char res; |
@@ -922,7 +922,7 @@ static void snd_cs4231_overrange(cs4231_t *chip) | |||
922 | 922 | ||
923 | irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 923 | irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
924 | { | 924 | { |
925 | cs4231_t *chip = dev_id; | 925 | struct snd_cs4231 *chip = dev_id; |
926 | unsigned char status; | 926 | unsigned char status; |
927 | 927 | ||
928 | status = snd_cs4231_in(chip, CS4231_IRQ_STATUS); | 928 | status = snd_cs4231_in(chip, CS4231_IRQ_STATUS); |
@@ -962,9 +962,9 @@ irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
962 | return IRQ_HANDLED; | 962 | return IRQ_HANDLED; |
963 | } | 963 | } |
964 | 964 | ||
965 | static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * substream) | 965 | static snd_pcm_uframes_t snd_cs4231_playback_pointer(struct snd_pcm_substream *substream) |
966 | { | 966 | { |
967 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 967 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
968 | size_t ptr; | 968 | size_t ptr; |
969 | 969 | ||
970 | if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_PLAYBACK_ENABLE)) | 970 | if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_PLAYBACK_ENABLE)) |
@@ -973,9 +973,9 @@ static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * subst | |||
973 | return bytes_to_frames(substream->runtime, ptr); | 973 | return bytes_to_frames(substream->runtime, ptr); |
974 | } | 974 | } |
975 | 975 | ||
976 | static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substream) | 976 | static snd_pcm_uframes_t snd_cs4231_capture_pointer(struct snd_pcm_substream *substream) |
977 | { | 977 | { |
978 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 978 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
979 | size_t ptr; | 979 | size_t ptr; |
980 | 980 | ||
981 | if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE)) | 981 | if (!(chip->image[CS4231_IFACE_CTRL] & CS4231_RECORD_ENABLE)) |
@@ -988,7 +988,7 @@ static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substr | |||
988 | 988 | ||
989 | */ | 989 | */ |
990 | 990 | ||
991 | static int snd_cs4231_probe(cs4231_t *chip) | 991 | static int snd_cs4231_probe(struct snd_cs4231 *chip) |
992 | { | 992 | { |
993 | unsigned long flags; | 993 | unsigned long flags; |
994 | int i, id, rev; | 994 | int i, id, rev; |
@@ -1152,7 +1152,7 @@ static int snd_cs4231_probe(cs4231_t *chip) | |||
1152 | 1152 | ||
1153 | */ | 1153 | */ |
1154 | 1154 | ||
1155 | static snd_pcm_hardware_t snd_cs4231_playback = | 1155 | static struct snd_pcm_hardware snd_cs4231_playback = |
1156 | { | 1156 | { |
1157 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 1157 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
1158 | SNDRV_PCM_INFO_MMAP_VALID | | 1158 | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -1173,7 +1173,7 @@ static snd_pcm_hardware_t snd_cs4231_playback = | |||
1173 | .fifo_size = 0, | 1173 | .fifo_size = 0, |
1174 | }; | 1174 | }; |
1175 | 1175 | ||
1176 | static snd_pcm_hardware_t snd_cs4231_capture = | 1176 | static struct snd_pcm_hardware snd_cs4231_capture = |
1177 | { | 1177 | { |
1178 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 1178 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
1179 | SNDRV_PCM_INFO_MMAP_VALID | | 1179 | SNDRV_PCM_INFO_MMAP_VALID | |
@@ -1198,10 +1198,10 @@ static snd_pcm_hardware_t snd_cs4231_capture = | |||
1198 | 1198 | ||
1199 | */ | 1199 | */ |
1200 | 1200 | ||
1201 | static int snd_cs4231_playback_open(snd_pcm_substream_t * substream) | 1201 | static int snd_cs4231_playback_open(struct snd_pcm_substream *substream) |
1202 | { | 1202 | { |
1203 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 1203 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
1204 | snd_pcm_runtime_t *runtime = substream->runtime; | 1204 | struct snd_pcm_runtime *runtime = substream->runtime; |
1205 | int err; | 1205 | int err; |
1206 | 1206 | ||
1207 | runtime->hw = snd_cs4231_playback; | 1207 | runtime->hw = snd_cs4231_playback; |
@@ -1235,10 +1235,10 @@ static int snd_cs4231_playback_open(snd_pcm_substream_t * substream) | |||
1235 | return 0; | 1235 | return 0; |
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | static int snd_cs4231_capture_open(snd_pcm_substream_t * substream) | 1238 | static int snd_cs4231_capture_open(struct snd_pcm_substream *substream) |
1239 | { | 1239 | { |
1240 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 1240 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
1241 | snd_pcm_runtime_t *runtime = substream->runtime; | 1241 | struct snd_pcm_runtime *runtime = substream->runtime; |
1242 | int err; | 1242 | int err; |
1243 | 1243 | ||
1244 | runtime->hw = snd_cs4231_capture; | 1244 | runtime->hw = snd_cs4231_capture; |
@@ -1268,18 +1268,18 @@ static int snd_cs4231_capture_open(snd_pcm_substream_t * substream) | |||
1268 | return 0; | 1268 | return 0; |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | static int snd_cs4231_playback_close(snd_pcm_substream_t * substream) | 1271 | static int snd_cs4231_playback_close(struct snd_pcm_substream *substream) |
1272 | { | 1272 | { |
1273 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 1273 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
1274 | 1274 | ||
1275 | chip->playback_substream = NULL; | 1275 | chip->playback_substream = NULL; |
1276 | snd_cs4231_close(chip, CS4231_MODE_PLAY); | 1276 | snd_cs4231_close(chip, CS4231_MODE_PLAY); |
1277 | return 0; | 1277 | return 0; |
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | static int snd_cs4231_capture_close(snd_pcm_substream_t * substream) | 1280 | static int snd_cs4231_capture_close(struct snd_pcm_substream *substream) |
1281 | { | 1281 | { |
1282 | cs4231_t *chip = snd_pcm_substream_chip(substream); | 1282 | struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); |
1283 | 1283 | ||
1284 | chip->capture_substream = NULL; | 1284 | chip->capture_substream = NULL; |
1285 | snd_cs4231_close(chip, CS4231_MODE_RECORD); | 1285 | snd_cs4231_close(chip, CS4231_MODE_RECORD); |
@@ -1289,7 +1289,7 @@ static int snd_cs4231_capture_close(snd_pcm_substream_t * substream) | |||
1289 | #ifdef CONFIG_PM | 1289 | #ifdef CONFIG_PM |
1290 | 1290 | ||
1291 | /* lowlevel suspend callback for CS4231 */ | 1291 | /* lowlevel suspend callback for CS4231 */ |
1292 | static void snd_cs4231_suspend(cs4231_t *chip) | 1292 | static void snd_cs4231_suspend(struct snd_cs4231 *chip) |
1293 | { | 1293 | { |
1294 | int reg; | 1294 | int reg; |
1295 | unsigned long flags; | 1295 | unsigned long flags; |
@@ -1303,7 +1303,7 @@ static void snd_cs4231_suspend(cs4231_t *chip) | |||
1303 | } | 1303 | } |
1304 | 1304 | ||
1305 | /* lowlevel resume callback for CS4231 */ | 1305 | /* lowlevel resume callback for CS4231 */ |
1306 | static void snd_cs4231_resume(cs4231_t *chip) | 1306 | static void snd_cs4231_resume(struct snd_cs4231 *chip) |
1307 | { | 1307 | { |
1308 | int reg; | 1308 | int reg; |
1309 | unsigned long flags; | 1309 | unsigned long flags; |
@@ -1344,24 +1344,24 @@ static void snd_cs4231_resume(cs4231_t *chip) | |||
1344 | #endif | 1344 | #endif |
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | static int snd_cs4231_pm_suspend(snd_card_t *card, pm_message_t state) | 1347 | static int snd_cs4231_pm_suspend(struct snd_card *card, pm_message_t state) |
1348 | { | 1348 | { |
1349 | cs4231_t *chip = card->pm_private_data; | 1349 | struct snd_cs4231 *chip = card->pm_private_data; |
1350 | if (chip->suspend) | 1350 | if (chip->suspend) |
1351 | chip->suspend(chip); | 1351 | chip->suspend(chip); |
1352 | return 0; | 1352 | return 0; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | static int snd_cs4231_pm_resume(snd_card_t *card) | 1355 | static int snd_cs4231_pm_resume(struct snd_card *card) |
1356 | { | 1356 | { |
1357 | cs4231_t *chip = card->pm_private_data; | 1357 | struct snd_cs4231 *chip = card->pm_private_data; |
1358 | if (chip->resume) | 1358 | if (chip->resume) |
1359 | chip->resume(chip); | 1359 | chip->resume(chip); |
1360 | return 0; | 1360 | return 0; |
1361 | } | 1361 | } |
1362 | #endif /* CONFIG_PM */ | 1362 | #endif /* CONFIG_PM */ |
1363 | 1363 | ||
1364 | static int snd_cs4231_free(cs4231_t *chip) | 1364 | static int snd_cs4231_free(struct snd_cs4231 *chip) |
1365 | { | 1365 | { |
1366 | release_and_free_resource(chip->res_port); | 1366 | release_and_free_resource(chip->res_port); |
1367 | release_and_free_resource(chip->res_cport); | 1367 | release_and_free_resource(chip->res_cport); |
@@ -1384,13 +1384,13 @@ static int snd_cs4231_free(cs4231_t *chip) | |||
1384 | return 0; | 1384 | return 0; |
1385 | } | 1385 | } |
1386 | 1386 | ||
1387 | static int snd_cs4231_dev_free(snd_device_t *device) | 1387 | static int snd_cs4231_dev_free(struct snd_device *device) |
1388 | { | 1388 | { |
1389 | cs4231_t *chip = device->device_data; | 1389 | struct snd_cs4231 *chip = device->device_data; |
1390 | return snd_cs4231_free(chip); | 1390 | return snd_cs4231_free(chip); |
1391 | } | 1391 | } |
1392 | 1392 | ||
1393 | const char *snd_cs4231_chip_id(cs4231_t *chip) | 1393 | const char *snd_cs4231_chip_id(struct snd_cs4231 *chip) |
1394 | { | 1394 | { |
1395 | switch (chip->hardware) { | 1395 | switch (chip->hardware) { |
1396 | case CS4231_HW_CS4231: return "CS4231"; | 1396 | case CS4231_HW_CS4231: return "CS4231"; |
@@ -1410,12 +1410,12 @@ const char *snd_cs4231_chip_id(cs4231_t *chip) | |||
1410 | } | 1410 | } |
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | static int snd_cs4231_new(snd_card_t * card, | 1413 | static int snd_cs4231_new(struct snd_card *card, |
1414 | unsigned short hardware, | 1414 | unsigned short hardware, |
1415 | unsigned short hwshare, | 1415 | unsigned short hwshare, |
1416 | cs4231_t ** rchip) | 1416 | struct snd_cs4231 ** rchip) |
1417 | { | 1417 | { |
1418 | cs4231_t *chip; | 1418 | struct snd_cs4231 *chip; |
1419 | 1419 | ||
1420 | *rchip = NULL; | 1420 | *rchip = NULL; |
1421 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 1421 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
@@ -1437,18 +1437,18 @@ static int snd_cs4231_new(snd_card_t * card, | |||
1437 | return 0; | 1437 | return 0; |
1438 | } | 1438 | } |
1439 | 1439 | ||
1440 | int snd_cs4231_create(snd_card_t * card, | 1440 | int snd_cs4231_create(struct snd_card *card, |
1441 | unsigned long port, | 1441 | unsigned long port, |
1442 | unsigned long cport, | 1442 | unsigned long cport, |
1443 | int irq, int dma1, int dma2, | 1443 | int irq, int dma1, int dma2, |
1444 | unsigned short hardware, | 1444 | unsigned short hardware, |
1445 | unsigned short hwshare, | 1445 | unsigned short hwshare, |
1446 | cs4231_t ** rchip) | 1446 | struct snd_cs4231 ** rchip) |
1447 | { | 1447 | { |
1448 | static snd_device_ops_t ops = { | 1448 | static struct snd_device_ops ops = { |
1449 | .dev_free = snd_cs4231_dev_free, | 1449 | .dev_free = snd_cs4231_dev_free, |
1450 | }; | 1450 | }; |
1451 | cs4231_t *chip; | 1451 | struct snd_cs4231 *chip; |
1452 | int err; | 1452 | int err; |
1453 | 1453 | ||
1454 | err = snd_cs4231_new(card, hardware, hwshare, &chip); | 1454 | err = snd_cs4231_new(card, hardware, hwshare, &chip); |
@@ -1523,7 +1523,7 @@ int snd_cs4231_create(snd_card_t * card, | |||
1523 | return 0; | 1523 | return 0; |
1524 | } | 1524 | } |
1525 | 1525 | ||
1526 | static snd_pcm_ops_t snd_cs4231_playback_ops = { | 1526 | static struct snd_pcm_ops snd_cs4231_playback_ops = { |
1527 | .open = snd_cs4231_playback_open, | 1527 | .open = snd_cs4231_playback_open, |
1528 | .close = snd_cs4231_playback_close, | 1528 | .close = snd_cs4231_playback_close, |
1529 | .ioctl = snd_pcm_lib_ioctl, | 1529 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1534,7 +1534,7 @@ static snd_pcm_ops_t snd_cs4231_playback_ops = { | |||
1534 | .pointer = snd_cs4231_playback_pointer, | 1534 | .pointer = snd_cs4231_playback_pointer, |
1535 | }; | 1535 | }; |
1536 | 1536 | ||
1537 | static snd_pcm_ops_t snd_cs4231_capture_ops = { | 1537 | static struct snd_pcm_ops snd_cs4231_capture_ops = { |
1538 | .open = snd_cs4231_capture_open, | 1538 | .open = snd_cs4231_capture_open, |
1539 | .close = snd_cs4231_capture_close, | 1539 | .close = snd_cs4231_capture_close, |
1540 | .ioctl = snd_pcm_lib_ioctl, | 1540 | .ioctl = snd_pcm_lib_ioctl, |
@@ -1545,9 +1545,9 @@ static snd_pcm_ops_t snd_cs4231_capture_ops = { | |||
1545 | .pointer = snd_cs4231_capture_pointer, | 1545 | .pointer = snd_cs4231_capture_pointer, |
1546 | }; | 1546 | }; |
1547 | 1547 | ||
1548 | int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm) | 1548 | int snd_cs4231_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm) |
1549 | { | 1549 | { |
1550 | snd_pcm_t *pcm; | 1550 | struct snd_pcm *pcm; |
1551 | int err; | 1551 | int err; |
1552 | 1552 | ||
1553 | if ((err = snd_pcm_new(chip->card, "CS4231", device, 1, 1, &pcm)) < 0) | 1553 | if ((err = snd_pcm_new(chip->card, "CS4231", device, 1, 1, &pcm)) < 0) |
@@ -1579,16 +1579,16 @@ int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm) | |||
1579 | return 0; | 1579 | return 0; |
1580 | } | 1580 | } |
1581 | 1581 | ||
1582 | static void snd_cs4231_timer_free(snd_timer_t *timer) | 1582 | static void snd_cs4231_timer_free(struct snd_timer *timer) |
1583 | { | 1583 | { |
1584 | cs4231_t *chip = timer->private_data; | 1584 | struct snd_cs4231 *chip = timer->private_data; |
1585 | chip->timer = NULL; | 1585 | chip->timer = NULL; |
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | int snd_cs4231_timer(cs4231_t *chip, int device, snd_timer_t **rtimer) | 1588 | int snd_cs4231_timer(struct snd_cs4231 *chip, int device, struct snd_timer **rtimer) |
1589 | { | 1589 | { |
1590 | snd_timer_t *timer; | 1590 | struct snd_timer *timer; |
1591 | snd_timer_id_t tid; | 1591 | struct snd_timer_id tid; |
1592 | int err; | 1592 | int err; |
1593 | 1593 | ||
1594 | /* Timer initialization */ | 1594 | /* Timer initialization */ |
@@ -1613,7 +1613,7 @@ int snd_cs4231_timer(cs4231_t *chip, int device, snd_timer_t **rtimer) | |||
1613 | * MIXER part | 1613 | * MIXER part |
1614 | */ | 1614 | */ |
1615 | 1615 | ||
1616 | static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 1616 | static int snd_cs4231_info_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1617 | { | 1617 | { |
1618 | static char *texts[4] = { | 1618 | static char *texts[4] = { |
1619 | "Line", "Aux", "Mic", "Mix" | 1619 | "Line", "Aux", "Mic", "Mix" |
@@ -1625,7 +1625,7 @@ static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u | |||
1625 | "Line", "Synth", "Mic", "Mix" | 1625 | "Line", "Synth", "Mic", "Mix" |
1626 | }; | 1626 | }; |
1627 | char **ptexts = texts; | 1627 | char **ptexts = texts; |
1628 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1628 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1629 | 1629 | ||
1630 | snd_assert(chip->card != NULL, return -EINVAL); | 1630 | snd_assert(chip->card != NULL, return -EINVAL); |
1631 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 1631 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; |
@@ -1643,9 +1643,9 @@ static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * u | |||
1643 | return 0; | 1643 | return 0; |
1644 | } | 1644 | } |
1645 | 1645 | ||
1646 | static int snd_cs4231_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1646 | static int snd_cs4231_get_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1647 | { | 1647 | { |
1648 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1648 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1649 | unsigned long flags; | 1649 | unsigned long flags; |
1650 | 1650 | ||
1651 | spin_lock_irqsave(&chip->reg_lock, flags); | 1651 | spin_lock_irqsave(&chip->reg_lock, flags); |
@@ -1655,9 +1655,9 @@ static int snd_cs4231_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
1655 | return 0; | 1655 | return 0; |
1656 | } | 1656 | } |
1657 | 1657 | ||
1658 | static int snd_cs4231_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1658 | static int snd_cs4231_put_mux(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1659 | { | 1659 | { |
1660 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1660 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1661 | unsigned long flags; | 1661 | unsigned long flags; |
1662 | unsigned short left, right; | 1662 | unsigned short left, right; |
1663 | int change; | 1663 | int change; |
@@ -1678,7 +1678,7 @@ static int snd_cs4231_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * | |||
1678 | return change; | 1678 | return change; |
1679 | } | 1679 | } |
1680 | 1680 | ||
1681 | int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 1681 | int snd_cs4231_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1682 | { | 1682 | { |
1683 | int mask = (kcontrol->private_value >> 16) & 0xff; | 1683 | int mask = (kcontrol->private_value >> 16) & 0xff; |
1684 | 1684 | ||
@@ -1689,9 +1689,9 @@ int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo | |||
1689 | return 0; | 1689 | return 0; |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1692 | int snd_cs4231_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1693 | { | 1693 | { |
1694 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1694 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1695 | unsigned long flags; | 1695 | unsigned long flags; |
1696 | int reg = kcontrol->private_value & 0xff; | 1696 | int reg = kcontrol->private_value & 0xff; |
1697 | int shift = (kcontrol->private_value >> 8) & 0xff; | 1697 | int shift = (kcontrol->private_value >> 8) & 0xff; |
@@ -1706,9 +1706,9 @@ int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon | |||
1706 | return 0; | 1706 | return 0; |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1709 | int snd_cs4231_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1710 | { | 1710 | { |
1711 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1711 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1712 | unsigned long flags; | 1712 | unsigned long flags; |
1713 | int reg = kcontrol->private_value & 0xff; | 1713 | int reg = kcontrol->private_value & 0xff; |
1714 | int shift = (kcontrol->private_value >> 8) & 0xff; | 1714 | int shift = (kcontrol->private_value >> 8) & 0xff; |
@@ -1729,7 +1729,7 @@ int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon | |||
1729 | return change; | 1729 | return change; |
1730 | } | 1730 | } |
1731 | 1731 | ||
1732 | int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) | 1732 | int snd_cs4231_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1733 | { | 1733 | { |
1734 | int mask = (kcontrol->private_value >> 24) & 0xff; | 1734 | int mask = (kcontrol->private_value >> 24) & 0xff; |
1735 | 1735 | ||
@@ -1740,9 +1740,9 @@ int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo | |||
1740 | return 0; | 1740 | return 0; |
1741 | } | 1741 | } |
1742 | 1742 | ||
1743 | int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1743 | int snd_cs4231_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1744 | { | 1744 | { |
1745 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1745 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1746 | unsigned long flags; | 1746 | unsigned long flags; |
1747 | int left_reg = kcontrol->private_value & 0xff; | 1747 | int left_reg = kcontrol->private_value & 0xff; |
1748 | int right_reg = (kcontrol->private_value >> 8) & 0xff; | 1748 | int right_reg = (kcontrol->private_value >> 8) & 0xff; |
@@ -1762,9 +1762,9 @@ int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon | |||
1762 | return 0; | 1762 | return 0; |
1763 | } | 1763 | } |
1764 | 1764 | ||
1765 | int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) | 1765 | int snd_cs4231_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
1766 | { | 1766 | { |
1767 | cs4231_t *chip = snd_kcontrol_chip(kcontrol); | 1767 | struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol); |
1768 | unsigned long flags; | 1768 | unsigned long flags; |
1769 | int left_reg = kcontrol->private_value & 0xff; | 1769 | int left_reg = kcontrol->private_value & 0xff; |
1770 | int right_reg = (kcontrol->private_value >> 8) & 0xff; | 1770 | int right_reg = (kcontrol->private_value >> 8) & 0xff; |
@@ -1793,7 +1793,7 @@ int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucon | |||
1793 | return change; | 1793 | return change; |
1794 | } | 1794 | } |
1795 | 1795 | ||
1796 | static snd_kcontrol_new_t snd_cs4231_controls[] = { | 1796 | static struct snd_kcontrol_new snd_cs4231_controls[] = { |
1797 | CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1), | 1797 | CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1), |
1798 | CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1), | 1798 | CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1), |
1799 | CS4231_DOUBLE("Line Playback Switch", 0, CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1), | 1799 | CS4231_DOUBLE("Line Playback Switch", 0, CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1), |
@@ -1819,9 +1819,9 @@ CS4231_SINGLE("Loopback Capture Switch", 0, CS4231_LOOPBACK, 0, 1, 0), | |||
1819 | CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1) | 1819 | CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1) |
1820 | }; | 1820 | }; |
1821 | 1821 | ||
1822 | int snd_cs4231_mixer(cs4231_t *chip) | 1822 | int snd_cs4231_mixer(struct snd_cs4231 *chip) |
1823 | { | 1823 | { |
1824 | snd_card_t *card; | 1824 | struct snd_card *card; |
1825 | unsigned int idx; | 1825 | unsigned int idx; |
1826 | int err; | 1826 | int err; |
1827 | 1827 | ||