aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:30:42 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:21 -0500
commitba2375a45c528fd902676ea01014ea0f8931464b (patch)
treee38833035449d0d65afb3cfc1104b243ce88454c /sound/isa
parentc8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7 (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')
-rw-r--r--sound/isa/cs423x/cs4231.c8
-rw-r--r--sound/isa/cs423x/cs4231_lib.c230
-rw-r--r--sound/isa/cs423x/cs4236.c14
-rw-r--r--sound/isa/cs423x/cs4236_lib.c106
4 files changed, 179 insertions, 179 deletions
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index 9be5416bcb92..a8da87903d94 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -64,15 +64,15 @@ MODULE_PARM_DESC(dma1, "DMA1 # for CS4231 driver.");
64module_param_array(dma2, int, NULL, 0444); 64module_param_array(dma2, int, NULL, 0444);
65MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver."); 65MODULE_PARM_DESC(dma2, "DMA2 # for CS4231 driver.");
66 66
67static snd_card_t *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 67static struct snd_card *snd_cs4231_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
68 68
69 69
70static int __init snd_card_cs4231_probe(int dev) 70static int __init snd_card_cs4231_probe(int dev)
71{ 71{
72 snd_card_t *card; 72 struct snd_card *card;
73 struct snd_card_cs4231 *acard; 73 struct snd_card_cs4231 *acard;
74 snd_pcm_t *pcm = NULL; 74 struct snd_pcm *pcm = NULL;
75 cs4231_t *chip; 75 struct snd_cs4231 *chip;
76 int err; 76 int err;
77 77
78 if (port[dev] == SNDRV_AUTO_PORT) { 78 if (port[dev] == SNDRV_AUTO_PORT) {
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
76static snd_pcm_hw_constraint_list_t hw_constraints_rates = { 76static 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
82static int snd_cs4231_xrate(snd_pcm_runtime_t *runtime) 82static 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
127static inline void cs4231_outb(cs4231_t *chip, u8 offset, u8 val) 127static 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
132static inline u8 cs4231_inb(cs4231_t *chip, u8 offset) 132static 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
137static void snd_cs4231_outm(cs4231_t *chip, unsigned char reg, 137static 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
164static void snd_cs4231_dout(cs4231_t *chip, unsigned char reg, unsigned char value) 164static 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
177void snd_cs4231_out(cs4231_t *chip, unsigned char reg, unsigned char value) 177void 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
198unsigned char snd_cs4231_in(cs4231_t *chip, unsigned char reg) 198unsigned 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
215void snd_cs4236_ext_out(cs4231_t *chip, unsigned char reg, unsigned char val) 215void 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
226unsigned char snd_cs4236_ext_in(cs4231_t *chip, unsigned char reg) 226unsigned 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
244static void snd_cs4231_debug(cs4231_t *chip) 244static 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
288static void snd_cs4231_busy_wait(cs4231_t *chip) 288static 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
302void snd_cs4231_mce_up(cs4231_t *chip) 302void 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
323void snd_cs4231_mce_down(cs4231_t *chip) 323void 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
402static int snd_cs4231_trigger(snd_pcm_substream_t *substream, 402static 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
471static unsigned char snd_cs4231_get_format(cs4231_t *chip, 471static 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
493static void snd_cs4231_calibrate_mute(cs4231_t *chip, int mute) 493static 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
527static void snd_cs4231_playback_format(cs4231_t *chip, 527static 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
566static void snd_cs4231_capture_format(cs4231_t *chip, 566static 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
613static unsigned long snd_cs4231_timer_resolution(snd_timer_t * timer) 613static 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
622static int snd_cs4231_timer_start(snd_timer_t * timer) 622static 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
640static int snd_cs4231_timer_stop(snd_timer_t * timer) 640static 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
650static void snd_cs4231_init(cs4231_t *chip) 650static 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
708static int snd_cs4231_open(cs4231_t *chip, unsigned int mode) 708static 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
744static void snd_cs4231_close(cs4231_t *chip, unsigned int mode) 744static 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
795static int snd_cs4231_timer_open(snd_timer_t * timer) 795static 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
802static int snd_cs4231_timer_close(snd_timer_t * timer) 802static 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
809static struct _snd_timer_hardware snd_cs4231_timer_table = 809static 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
825static int snd_cs4231_playback_hw_params(snd_pcm_substream_t * substream, 825static 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
840static int snd_cs4231_playback_hw_free(snd_pcm_substream_t * substream) 840static 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
845static int snd_cs4231_playback_prepare(snd_pcm_substream_t * substream) 845static 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
867static int snd_cs4231_capture_hw_params(snd_pcm_substream_t * substream, 867static 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
882static int snd_cs4231_capture_hw_free(snd_pcm_substream_t * substream) 882static 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
887static int snd_cs4231_capture_prepare(snd_pcm_substream_t * substream) 887static 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
911static void snd_cs4231_overrange(cs4231_t *chip) 911static 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
923irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id, struct pt_regs *regs) 923irqreturn_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
965static snd_pcm_uframes_t snd_cs4231_playback_pointer(snd_pcm_substream_t * substream) 965static 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
976static snd_pcm_uframes_t snd_cs4231_capture_pointer(snd_pcm_substream_t * substream) 976static 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
991static int snd_cs4231_probe(cs4231_t *chip) 991static 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
1155static snd_pcm_hardware_t snd_cs4231_playback = 1155static 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
1176static snd_pcm_hardware_t snd_cs4231_capture = 1176static 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
1201static int snd_cs4231_playback_open(snd_pcm_substream_t * substream) 1201static 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
1238static int snd_cs4231_capture_open(snd_pcm_substream_t * substream) 1238static 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
1271static int snd_cs4231_playback_close(snd_pcm_substream_t * substream) 1271static 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
1280static int snd_cs4231_capture_close(snd_pcm_substream_t * substream) 1280static 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 */
1292static void snd_cs4231_suspend(cs4231_t *chip) 1292static 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 */
1306static void snd_cs4231_resume(cs4231_t *chip) 1306static 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
1347static int snd_cs4231_pm_suspend(snd_card_t *card, pm_message_t state) 1347static 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
1355static int snd_cs4231_pm_resume(snd_card_t *card) 1355static 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
1364static int snd_cs4231_free(cs4231_t *chip) 1364static 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
1387static int snd_cs4231_dev_free(snd_device_t *device) 1387static 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
1393const char *snd_cs4231_chip_id(cs4231_t *chip) 1393const 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
1413static int snd_cs4231_new(snd_card_t * card, 1413static 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
1440int snd_cs4231_create(snd_card_t * card, 1440int 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
1526static snd_pcm_ops_t snd_cs4231_playback_ops = { 1526static 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
1537static snd_pcm_ops_t snd_cs4231_capture_ops = { 1537static 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
1548int snd_cs4231_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm) 1548int 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
1582static void snd_cs4231_timer_free(snd_timer_t *timer) 1582static 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
1588int snd_cs4231_timer(cs4231_t *chip, int device, snd_timer_t **rtimer) 1588int 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
1616static int snd_cs4231_info_mux(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1616static 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
1646static int snd_cs4231_get_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1646static 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
1658static int snd_cs4231_put_mux(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1658static 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
1681int snd_cs4231_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1681int 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
1692int snd_cs4231_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1692int 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
1709int snd_cs4231_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1709int 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
1732int snd_cs4231_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1732int 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
1743int snd_cs4231_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1743int 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
1765int snd_cs4231_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1765int 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
1796static snd_kcontrol_new_t snd_cs4231_controls[] = { 1796static struct snd_kcontrol_new snd_cs4231_controls[] = {
1797CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1), 1797CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1),
1798CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1), 1798CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1),
1799CS4231_DOUBLE("Line Playback Switch", 0, CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1), 1799CS4231_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),
1819CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1) 1819CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1)
1820}; 1820};
1821 1821
1822int snd_cs4231_mixer(cs4231_t *chip) 1822int 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
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index d60a55e6a0b1..a28f24c4f027 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -131,7 +131,7 @@ struct snd_card_cs4236 {
131#endif 131#endif
132}; 132};
133 133
134static snd_card_t *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 134static struct snd_card *snd_cs4236_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
135 135
136#ifdef CONFIG_PNP 136#ifdef CONFIG_PNP
137 137
@@ -375,7 +375,7 @@ static int __devinit snd_card_cs4236_pnp(int dev, struct snd_card_cs4236 *acard,
375} 375}
376#endif /* CONFIG_PNP */ 376#endif /* CONFIG_PNP */
377 377
378static void snd_card_cs4236_free(snd_card_t *card) 378static void snd_card_cs4236_free(struct snd_card *card)
379{ 379{
380 struct snd_card_cs4236 *acard = (struct snd_card_cs4236 *)card->private_data; 380 struct snd_card_cs4236 *acard = (struct snd_card_cs4236 *)card->private_data;
381 381
@@ -392,11 +392,11 @@ static void snd_card_cs4236_free(snd_card_t *card)
392static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard, 392static int __devinit snd_card_cs423x_probe(int dev, struct pnp_card_link *pcard,
393 const struct pnp_card_device_id *pid) 393 const struct pnp_card_device_id *pid)
394{ 394{
395 snd_card_t *card; 395 struct snd_card *card;
396 struct snd_card_cs4236 *acard; 396 struct snd_card_cs4236 *acard;
397 snd_pcm_t *pcm = NULL; 397 struct snd_pcm *pcm = NULL;
398 cs4231_t *chip; 398 struct snd_cs4231 *chip;
399 opl3_t *opl3; 399 struct snd_opl3 *opl3;
400 int err; 400 int err;
401 401
402 if (! is_isapnp_selected(dev)) { 402 if (! is_isapnp_selected(dev)) {
@@ -538,7 +538,7 @@ static int __devinit snd_cs423x_pnp_detect(struct pnp_card_link *card,
538 538
539static void __devexit snd_cs423x_pnp_remove(struct pnp_card_link * pcard) 539static void __devexit snd_cs423x_pnp_remove(struct pnp_card_link * pcard)
540{ 540{
541 snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); 541 struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
542 542
543 snd_card_disconnect(card); 543 snd_card_disconnect(card);
544 snd_card_free_in_thread(card); 544 snd_card_free_in_thread(card);
diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c
index 1adb88d5f8f4..e36981d64ec5 100644
--- a/sound/isa/cs423x/cs4236_lib.c
+++ b/sound/isa/cs423x/cs4236_lib.c
@@ -122,13 +122,13 @@ static unsigned char snd_cs4236_ext_map[18] = {
122 * 122 *
123 */ 123 */
124 124
125static void snd_cs4236_ctrl_out(cs4231_t *chip, unsigned char reg, unsigned char val) 125static void snd_cs4236_ctrl_out(struct snd_cs4231 *chip, unsigned char reg, unsigned char val)
126{ 126{
127 outb(reg, chip->cport + 3); 127 outb(reg, chip->cport + 3);
128 outb(chip->cimage[reg] = val, chip->cport + 4); 128 outb(chip->cimage[reg] = val, chip->cport + 4);
129} 129}
130 130
131static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg) 131static unsigned char snd_cs4236_ctrl_in(struct snd_cs4231 *chip, unsigned char reg)
132{ 132{
133 outb(reg, chip->cport + 3); 133 outb(reg, chip->cport + 3);
134 return inb(chip->cport + 4); 134 return inb(chip->cport + 4);
@@ -140,7 +140,7 @@ static unsigned char snd_cs4236_ctrl_in(cs4231_t *chip, unsigned char reg)
140 140
141#define CLOCKS 8 141#define CLOCKS 8
142 142
143static ratnum_t clocks[CLOCKS] = { 143static struct snd_ratnum clocks[CLOCKS] = {
144 { .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 }, 144 { .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 },
145 { .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 }, 145 { .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 },
146 { .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 }, 146 { .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 },
@@ -151,12 +151,12 @@ static ratnum_t clocks[CLOCKS] = {
151 { .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 } 151 { .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 }
152}; 152};
153 153
154static snd_pcm_hw_constraint_ratnums_t hw_constraints_clocks = { 154static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = {
155 .nrats = CLOCKS, 155 .nrats = CLOCKS,
156 .rats = clocks, 156 .rats = clocks,
157}; 157};
158 158
159static int snd_cs4236_xrate(snd_pcm_runtime_t *runtime) 159static int snd_cs4236_xrate(struct snd_pcm_runtime *runtime)
160{ 160{
161 return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 161 return snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
162 &hw_constraints_clocks); 162 &hw_constraints_clocks);
@@ -181,7 +181,7 @@ static unsigned char divisor_to_rate_register(unsigned int divisor)
181 } 181 }
182} 182}
183 183
184static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char pdfr) 184static void snd_cs4236_playback_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char pdfr)
185{ 185{
186 unsigned long flags; 186 unsigned long flags;
187 unsigned char rate = divisor_to_rate_register(params->rate_den); 187 unsigned char rate = divisor_to_rate_register(params->rate_den);
@@ -195,7 +195,7 @@ static void snd_cs4236_playback_format(cs4231_t *chip, snd_pcm_hw_params_t *para
195 spin_unlock_irqrestore(&chip->reg_lock, flags); 195 spin_unlock_irqrestore(&chip->reg_lock, flags);
196} 196}
197 197
198static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *params, unsigned char cdfr) 198static void snd_cs4236_capture_format(struct snd_cs4231 *chip, struct snd_pcm_hw_params *params, unsigned char cdfr)
199{ 199{
200 unsigned long flags; 200 unsigned long flags;
201 unsigned char rate = divisor_to_rate_register(params->rate_den); 201 unsigned char rate = divisor_to_rate_register(params->rate_den);
@@ -211,7 +211,7 @@ static void snd_cs4236_capture_format(cs4231_t *chip, snd_pcm_hw_params_t *param
211 211
212#ifdef CONFIG_PM 212#ifdef CONFIG_PM
213 213
214static void snd_cs4236_suspend(cs4231_t *chip) 214static void snd_cs4236_suspend(struct snd_cs4231 *chip)
215{ 215{
216 int reg; 216 int reg;
217 unsigned long flags; 217 unsigned long flags;
@@ -226,7 +226,7 @@ static void snd_cs4236_suspend(cs4231_t *chip)
226 spin_unlock_irqrestore(&chip->reg_lock, flags); 226 spin_unlock_irqrestore(&chip->reg_lock, flags);
227} 227}
228 228
229static void snd_cs4236_resume(cs4231_t *chip) 229static void snd_cs4236_resume(struct snd_cs4231 *chip)
230{ 230{
231 int reg; 231 int reg;
232 unsigned long flags; 232 unsigned long flags;
@@ -261,15 +261,15 @@ static void snd_cs4236_resume(cs4231_t *chip)
261 261
262#endif /* CONFIG_PM */ 262#endif /* CONFIG_PM */
263 263
264int snd_cs4236_create(snd_card_t * card, 264int snd_cs4236_create(struct snd_card *card,
265 unsigned long port, 265 unsigned long port,
266 unsigned long cport, 266 unsigned long cport,
267 int irq, int dma1, int dma2, 267 int irq, int dma1, int dma2,
268 unsigned short hardware, 268 unsigned short hardware,
269 unsigned short hwshare, 269 unsigned short hwshare,
270 cs4231_t ** rchip) 270 struct snd_cs4231 ** rchip)
271{ 271{
272 cs4231_t *chip; 272 struct snd_cs4231 *chip;
273 unsigned char ver1, ver2; 273 unsigned char ver1, ver2;
274 unsigned int reg; 274 unsigned int reg;
275 int err; 275 int err;
@@ -352,9 +352,9 @@ int snd_cs4236_create(snd_card_t * card,
352 return 0; 352 return 0;
353} 353}
354 354
355int snd_cs4236_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm) 355int snd_cs4236_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm)
356{ 356{
357 snd_pcm_t *pcm; 357 struct snd_pcm *pcm;
358 int err; 358 int err;
359 359
360 if ((err = snd_cs4231_pcm(chip, device, &pcm)) < 0) 360 if ((err = snd_cs4231_pcm(chip, device, &pcm)) < 0)
@@ -375,7 +375,7 @@ int snd_cs4236_pcm(cs4231_t *chip, int device, snd_pcm_t **rpcm)
375 .get = snd_cs4236_get_single, .put = snd_cs4236_put_single, \ 375 .get = snd_cs4236_get_single, .put = snd_cs4236_put_single, \
376 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 376 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
377 377
378static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 378static int snd_cs4236_info_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
379{ 379{
380 int mask = (kcontrol->private_value >> 16) & 0xff; 380 int mask = (kcontrol->private_value >> 16) & 0xff;
381 381
@@ -386,9 +386,9 @@ static int snd_cs4236_info_single(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
386 return 0; 386 return 0;
387} 387}
388 388
389static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 389static int snd_cs4236_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
390{ 390{
391 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 391 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
392 unsigned long flags; 392 unsigned long flags;
393 int reg = kcontrol->private_value & 0xff; 393 int reg = kcontrol->private_value & 0xff;
394 int shift = (kcontrol->private_value >> 8) & 0xff; 394 int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -403,9 +403,9 @@ static int snd_cs4236_get_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
403 return 0; 403 return 0;
404} 404}
405 405
406static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 406static int snd_cs4236_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
407{ 407{
408 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 408 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
409 unsigned long flags; 409 unsigned long flags;
410 int reg = kcontrol->private_value & 0xff; 410 int reg = kcontrol->private_value & 0xff;
411 int shift = (kcontrol->private_value >> 8) & 0xff; 411 int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -432,9 +432,9 @@ static int snd_cs4236_put_single(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
432 .get = snd_cs4236_get_singlec, .put = snd_cs4236_put_singlec, \ 432 .get = snd_cs4236_get_singlec, .put = snd_cs4236_put_singlec, \
433 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) } 433 .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24) }
434 434
435static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 435static int snd_cs4236_get_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
436{ 436{
437 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 437 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
438 unsigned long flags; 438 unsigned long flags;
439 int reg = kcontrol->private_value & 0xff; 439 int reg = kcontrol->private_value & 0xff;
440 int shift = (kcontrol->private_value >> 8) & 0xff; 440 int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -449,9 +449,9 @@ static int snd_cs4236_get_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
449 return 0; 449 return 0;
450} 450}
451 451
452static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 452static int snd_cs4236_put_singlec(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
453{ 453{
454 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 454 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
455 unsigned long flags; 455 unsigned long flags;
456 int reg = kcontrol->private_value & 0xff; 456 int reg = kcontrol->private_value & 0xff;
457 int shift = (kcontrol->private_value >> 8) & 0xff; 457 int shift = (kcontrol->private_value >> 8) & 0xff;
@@ -478,7 +478,7 @@ static int snd_cs4236_put_singlec(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
478 .get = snd_cs4236_get_double, .put = snd_cs4236_put_double, \ 478 .get = snd_cs4236_get_double, .put = snd_cs4236_put_double, \
479 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 479 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
480 480
481static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 481static int snd_cs4236_info_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
482{ 482{
483 int mask = (kcontrol->private_value >> 24) & 0xff; 483 int mask = (kcontrol->private_value >> 24) & 0xff;
484 484
@@ -489,9 +489,9 @@ static int snd_cs4236_info_double(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
489 return 0; 489 return 0;
490} 490}
491 491
492static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 492static int snd_cs4236_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
493{ 493{
494 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 494 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
495 unsigned long flags; 495 unsigned long flags;
496 int left_reg = kcontrol->private_value & 0xff; 496 int left_reg = kcontrol->private_value & 0xff;
497 int right_reg = (kcontrol->private_value >> 8) & 0xff; 497 int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -511,9 +511,9 @@ static int snd_cs4236_get_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
511 return 0; 511 return 0;
512} 512}
513 513
514static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 514static int snd_cs4236_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
515{ 515{
516 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 516 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
517 unsigned long flags; 517 unsigned long flags;
518 int left_reg = kcontrol->private_value & 0xff; 518 int left_reg = kcontrol->private_value & 0xff;
519 int right_reg = (kcontrol->private_value >> 8) & 0xff; 519 int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -554,9 +554,9 @@ static int snd_cs4236_put_double(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
554 .get = snd_cs4236_get_double1, .put = snd_cs4236_put_double1, \ 554 .get = snd_cs4236_get_double1, .put = snd_cs4236_put_double1, \
555 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) } 555 .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | (shift_right << 19) | (mask << 24) | (invert << 22) }
556 556
557static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 557static int snd_cs4236_get_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
558{ 558{
559 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 559 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
560 unsigned long flags; 560 unsigned long flags;
561 int left_reg = kcontrol->private_value & 0xff; 561 int left_reg = kcontrol->private_value & 0xff;
562 int right_reg = (kcontrol->private_value >> 8) & 0xff; 562 int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -576,9 +576,9 @@ static int snd_cs4236_get_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
576 return 0; 576 return 0;
577} 577}
578 578
579static int snd_cs4236_put_double1(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 579static int snd_cs4236_put_double1(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
580{ 580{
581 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 581 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
582 unsigned long flags; 582 unsigned long flags;
583 int left_reg = kcontrol->private_value & 0xff; 583 int left_reg = kcontrol->private_value & 0xff;
584 int right_reg = (kcontrol->private_value >> 8) & 0xff; 584 int right_reg = (kcontrol->private_value >> 8) & 0xff;
@@ -618,9 +618,9 @@ static inline int snd_cs4236_mixer_master_digital_invert_volume(int vol)
618 return (vol < 64) ? 63 - vol : 64 + (71 - vol); 618 return (vol < 64) ? 63 - vol : 64 + (71 - vol);
619} 619}
620 620
621static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 621static int snd_cs4236_get_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
622{ 622{
623 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 623 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
624 unsigned long flags; 624 unsigned long flags;
625 625
626 spin_lock_irqsave(&chip->reg_lock, flags); 626 spin_lock_irqsave(&chip->reg_lock, flags);
@@ -630,9 +630,9 @@ static int snd_cs4236_get_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem
630 return 0; 630 return 0;
631} 631}
632 632
633static int snd_cs4236_put_master_digital(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 633static int snd_cs4236_put_master_digital(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
634{ 634{
635 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 635 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
636 unsigned long flags; 636 unsigned long flags;
637 int change; 637 int change;
638 unsigned short val1, val2; 638 unsigned short val1, val2;
@@ -677,9 +677,9 @@ static inline int snd_cs4235_mixer_output_accu_set_volume(int vol)
677 return 1 << 5; 677 return 1 << 5;
678} 678}
679 679
680static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 680static int snd_cs4235_get_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
681{ 681{
682 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 682 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
683 unsigned long flags; 683 unsigned long flags;
684 684
685 spin_lock_irqsave(&chip->reg_lock, flags); 685 spin_lock_irqsave(&chip->reg_lock, flags);
@@ -689,9 +689,9 @@ static int snd_cs4235_get_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
689 return 0; 689 return 0;
690} 690}
691 691
692static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 692static int snd_cs4235_put_output_accu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
693{ 693{
694 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 694 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
695 unsigned long flags; 695 unsigned long flags;
696 int change; 696 int change;
697 unsigned short val1, val2; 697 unsigned short val1, val2;
@@ -708,7 +708,7 @@ static int snd_cs4235_put_output_accu(snd_kcontrol_t * kcontrol, snd_ctl_elem_va
708 return change; 708 return change;
709} 709}
710 710
711static snd_kcontrol_new_t snd_cs4236_controls[] = { 711static struct snd_kcontrol_new snd_cs4236_controls[] = {
712 712
713CS4236_DOUBLE("Master Digital Playback Switch", 0, CS4236_LEFT_MASTER, CS4236_RIGHT_MASTER, 7, 7, 1, 1), 713CS4236_DOUBLE("Master Digital Playback Switch", 0, CS4236_LEFT_MASTER, CS4236_RIGHT_MASTER, 7, 7, 1, 1),
714CS4236_DOUBLE("Master Digital Capture Switch", 0, CS4236_DAC_MUTE, CS4236_DAC_MUTE, 7, 6, 1, 1), 714CS4236_DOUBLE("Master Digital Capture Switch", 0, CS4236_DAC_MUTE, CS4236_DAC_MUTE, 7, 6, 1, 1),
@@ -759,7 +759,7 @@ CS4231_SINGLE("Digital Loopback Playback Switch", 0, CS4231_LOOPBACK, 0, 1, 0),
759CS4236_DOUBLE1("Digital Loopback Playback Volume", 0, CS4231_LOOPBACK, CS4236_RIGHT_LOOPBACK, 2, 0, 63, 1) 759CS4236_DOUBLE1("Digital Loopback Playback Volume", 0, CS4231_LOOPBACK, CS4236_RIGHT_LOOPBACK, 2, 0, 63, 1)
760}; 760};
761 761
762static snd_kcontrol_new_t snd_cs4235_controls[] = { 762static struct snd_kcontrol_new snd_cs4235_controls[] = {
763 763
764CS4231_DOUBLE("Master Switch", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 7, 7, 1, 1), 764CS4231_DOUBLE("Master Switch", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 7, 7, 1, 1),
765CS4231_DOUBLE("Master Volume", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 0, 0, 31, 1), 765CS4231_DOUBLE("Master Volume", 0, CS4235_LEFT_MASTER, CS4235_RIGHT_MASTER, 0, 0, 31, 1),
@@ -812,9 +812,9 @@ CS4231_DOUBLE("Analog Loopback Switch", 0, CS4231_LEFT_INPUT, CS4231_RIGHT_INPUT
812 .get = snd_cs4236_get_iec958_switch, .put = snd_cs4236_put_iec958_switch, \ 812 .get = snd_cs4236_get_iec958_switch, .put = snd_cs4236_put_iec958_switch, \
813 .private_value = 1 << 16 } 813 .private_value = 1 << 16 }
814 814
815static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 815static int snd_cs4236_get_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
816{ 816{
817 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 817 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
818 unsigned long flags; 818 unsigned long flags;
819 819
820 spin_lock_irqsave(&chip->reg_lock, flags); 820 spin_lock_irqsave(&chip->reg_lock, flags);
@@ -832,9 +832,9 @@ static int snd_cs4236_get_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_
832 return 0; 832 return 0;
833} 833}
834 834
835static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 835static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
836{ 836{
837 cs4231_t *chip = snd_kcontrol_chip(kcontrol); 837 struct snd_cs4231 *chip = snd_kcontrol_chip(kcontrol);
838 unsigned long flags; 838 unsigned long flags;
839 int change; 839 int change;
840 unsigned short enable, val; 840 unsigned short enable, val;
@@ -868,7 +868,7 @@ static int snd_cs4236_put_iec958_switch(snd_kcontrol_t * kcontrol, snd_ctl_elem_
868 return change; 868 return change;
869} 869}
870 870
871static snd_kcontrol_new_t snd_cs4236_iec958_controls[] = { 871static struct snd_kcontrol_new snd_cs4236_iec958_controls[] = {
872CS4236_IEC958_ENABLE("IEC958 Output Enable", 0), 872CS4236_IEC958_ENABLE("IEC958 Output Enable", 0),
873CS4236_SINGLEC("IEC958 Output Validity", 0, 4, 4, 1, 0), 873CS4236_SINGLEC("IEC958 Output Validity", 0, 4, 4, 1, 0),
874CS4236_SINGLEC("IEC958 Output User", 0, 4, 5, 1, 0), 874CS4236_SINGLEC("IEC958 Output User", 0, 4, 5, 1, 0),
@@ -877,12 +877,12 @@ CS4236_SINGLEC("IEC958 Output Channel Status Low", 0, 5, 1, 127, 0),
877CS4236_SINGLEC("IEC958 Output Channel Status High", 0, 6, 0, 255, 0) 877CS4236_SINGLEC("IEC958 Output Channel Status High", 0, 6, 0, 255, 0)
878}; 878};
879 879
880static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4235[] = { 880static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4235[] = {
881CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0), 881CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0),
882CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1) 882CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1)
883}; 883};
884 884
885static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4237[] = { 885static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4237[] = {
886CS4236_SINGLEC("3D Control - Switch", 0, 3, 7, 1, 0), 886CS4236_SINGLEC("3D Control - Switch", 0, 3, 7, 1, 0),
887CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1), 887CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1),
888CS4236_SINGLEC("3D Control - Center", 0, 2, 0, 15, 1), 888CS4236_SINGLEC("3D Control - Center", 0, 2, 0, 15, 1),
@@ -890,19 +890,19 @@ CS4236_SINGLEC("3D Control - Mono", 0, 3, 6, 1, 0),
890CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0) 890CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0)
891}; 891};
892 892
893static snd_kcontrol_new_t snd_cs4236_3d_controls_cs4238[] = { 893static struct snd_kcontrol_new snd_cs4236_3d_controls_cs4238[] = {
894CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0), 894CS4236_SINGLEC("3D Control - Switch", 0, 3, 4, 1, 0),
895CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1), 895CS4236_SINGLEC("3D Control - Space", 0, 2, 4, 15, 1),
896CS4236_SINGLEC("3D Control - Volume", 0, 2, 0, 15, 1), 896CS4236_SINGLEC("3D Control - Volume", 0, 2, 0, 15, 1),
897CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0) 897CS4236_SINGLEC("3D Control - IEC958", 0, 3, 5, 1, 0)
898}; 898};
899 899
900int snd_cs4236_mixer(cs4231_t *chip) 900int snd_cs4236_mixer(struct snd_cs4231 *chip)
901{ 901{
902 snd_card_t *card; 902 struct snd_card *card;
903 unsigned int idx, count; 903 unsigned int idx, count;
904 int err; 904 int err;
905 snd_kcontrol_new_t *kcontrol; 905 struct snd_kcontrol_new *kcontrol;
906 906
907 snd_assert(chip != NULL && chip->card != NULL, return -EINVAL); 907 snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
908 card = chip->card; 908 card = chip->card;