aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/ice1712.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:59:52 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:19:11 -0500
commit6ca308d4edd51c4f34ffff94ae0bbf193087d89f (patch)
tree6bc0cb2ccacc6a4fd08cc35ecda4819e01f87af5 /sound/pci/ice1712/ice1712.c
parenta98f90fd826913519c3f704ea24fb9bea1e0e494 (diff)
[ALSA] Remove xxx_t typedefs: PCI ICE1712
Modules: ICE1712 driver Remove xxx_t typedefs from the PCI ICE1712 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/ice1712.c')
-rw-r--r--sound/pci/ice1712/ice1712.c554
1 files changed, 299 insertions, 255 deletions
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index b16c9c1c92c6..ef6f18558c95 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -108,8 +108,8 @@ static struct pci_device_id snd_ice1712_ids[] = {
108 108
109MODULE_DEVICE_TABLE(pci, snd_ice1712_ids); 109MODULE_DEVICE_TABLE(pci, snd_ice1712_ids);
110 110
111static int snd_ice1712_build_pro_mixer(ice1712_t *ice); 111static int snd_ice1712_build_pro_mixer(struct snd_ice1712 *ice);
112static int snd_ice1712_build_controls(ice1712_t *ice); 112static int snd_ice1712_build_controls(struct snd_ice1712 *ice);
113 113
114static int PRO_RATE_LOCKED; 114static int PRO_RATE_LOCKED;
115static int PRO_RATE_RESET = 1; 115static int PRO_RATE_RESET = 1;
@@ -120,33 +120,33 @@ static unsigned int PRO_RATE_DEFAULT = 44100;
120 */ 120 */
121 121
122/* check whether the clock mode is spdif-in */ 122/* check whether the clock mode is spdif-in */
123static inline int is_spdif_master(ice1712_t *ice) 123static inline int is_spdif_master(struct snd_ice1712 *ice)
124{ 124{
125 return (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER) ? 1 : 0; 125 return (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER) ? 1 : 0;
126} 126}
127 127
128static inline int is_pro_rate_locked(ice1712_t *ice) 128static inline int is_pro_rate_locked(struct snd_ice1712 *ice)
129{ 129{
130 return is_spdif_master(ice) || PRO_RATE_LOCKED; 130 return is_spdif_master(ice) || PRO_RATE_LOCKED;
131} 131}
132 132
133static inline void snd_ice1712_ds_write(ice1712_t * ice, u8 channel, u8 addr, u32 data) 133static inline void snd_ice1712_ds_write(struct snd_ice1712 * ice, u8 channel, u8 addr, u32 data)
134{ 134{
135 outb((channel << 4) | addr, ICEDS(ice, INDEX)); 135 outb((channel << 4) | addr, ICEDS(ice, INDEX));
136 outl(data, ICEDS(ice, DATA)); 136 outl(data, ICEDS(ice, DATA));
137} 137}
138 138
139static inline u32 snd_ice1712_ds_read(ice1712_t * ice, u8 channel, u8 addr) 139static inline u32 snd_ice1712_ds_read(struct snd_ice1712 * ice, u8 channel, u8 addr)
140{ 140{
141 outb((channel << 4) | addr, ICEDS(ice, INDEX)); 141 outb((channel << 4) | addr, ICEDS(ice, INDEX));
142 return inl(ICEDS(ice, DATA)); 142 return inl(ICEDS(ice, DATA));
143} 143}
144 144
145static void snd_ice1712_ac97_write(ac97_t *ac97, 145static void snd_ice1712_ac97_write(struct snd_ac97 *ac97,
146 unsigned short reg, 146 unsigned short reg,
147 unsigned short val) 147 unsigned short val)
148{ 148{
149 ice1712_t *ice = (ice1712_t *)ac97->private_data; 149 struct snd_ice1712 *ice = ac97->private_data;
150 int tm; 150 int tm;
151 unsigned char old_cmd = 0; 151 unsigned char old_cmd = 0;
152 152
@@ -167,10 +167,10 @@ static void snd_ice1712_ac97_write(ac97_t *ac97,
167 break; 167 break;
168} 168}
169 169
170static unsigned short snd_ice1712_ac97_read(ac97_t *ac97, 170static unsigned short snd_ice1712_ac97_read(struct snd_ac97 *ac97,
171 unsigned short reg) 171 unsigned short reg)
172{ 172{
173 ice1712_t *ice = (ice1712_t *)ac97->private_data; 173 struct snd_ice1712 *ice = ac97->private_data;
174 int tm; 174 int tm;
175 unsigned char old_cmd = 0; 175 unsigned char old_cmd = 0;
176 176
@@ -196,11 +196,11 @@ static unsigned short snd_ice1712_ac97_read(ac97_t *ac97,
196 * pro ac97 section 196 * pro ac97 section
197 */ 197 */
198 198
199static void snd_ice1712_pro_ac97_write(ac97_t *ac97, 199static void snd_ice1712_pro_ac97_write(struct snd_ac97 *ac97,
200 unsigned short reg, 200 unsigned short reg,
201 unsigned short val) 201 unsigned short val)
202{ 202{
203 ice1712_t *ice = (ice1712_t *)ac97->private_data; 203 struct snd_ice1712 *ice = ac97->private_data;
204 int tm; 204 int tm;
205 unsigned char old_cmd = 0; 205 unsigned char old_cmd = 0;
206 206
@@ -222,10 +222,10 @@ static void snd_ice1712_pro_ac97_write(ac97_t *ac97,
222} 222}
223 223
224 224
225static unsigned short snd_ice1712_pro_ac97_read(ac97_t *ac97, 225static unsigned short snd_ice1712_pro_ac97_read(struct snd_ac97 *ac97,
226 unsigned short reg) 226 unsigned short reg)
227{ 227{
228 ice1712_t *ice = (ice1712_t *)ac97->private_data; 228 struct snd_ice1712 *ice = ac97->private_data;
229 int tm; 229 int tm;
230 unsigned char old_cmd = 0; 230 unsigned char old_cmd = 0;
231 231
@@ -250,7 +250,7 @@ static unsigned short snd_ice1712_pro_ac97_read(ac97_t *ac97,
250/* 250/*
251 * consumer ac97 digital mix 251 * consumer ac97 digital mix
252 */ 252 */
253static int snd_ice1712_digmix_route_ac97_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 253static int snd_ice1712_digmix_route_ac97_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
254{ 254{
255 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 255 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
256 uinfo->count = 1; 256 uinfo->count = 1;
@@ -259,17 +259,17 @@ static int snd_ice1712_digmix_route_ac97_info(snd_kcontrol_t *kcontrol, snd_ctl_
259 return 0; 259 return 0;
260} 260}
261 261
262static int snd_ice1712_digmix_route_ac97_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 262static int snd_ice1712_digmix_route_ac97_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
263{ 263{
264 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 264 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
265 265
266 ucontrol->value.integer.value[0] = inb(ICEMT(ice, MONITOR_ROUTECTRL)) & ICE1712_ROUTE_AC97 ? 1 : 0; 266 ucontrol->value.integer.value[0] = inb(ICEMT(ice, MONITOR_ROUTECTRL)) & ICE1712_ROUTE_AC97 ? 1 : 0;
267 return 0; 267 return 0;
268} 268}
269 269
270static int snd_ice1712_digmix_route_ac97_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 270static int snd_ice1712_digmix_route_ac97_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
271{ 271{
272 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 272 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
273 unsigned char val, nval; 273 unsigned char val, nval;
274 274
275 spin_lock_irq(&ice->reg_lock); 275 spin_lock_irq(&ice->reg_lock);
@@ -281,7 +281,7 @@ static int snd_ice1712_digmix_route_ac97_put(snd_kcontrol_t *kcontrol, snd_ctl_e
281 return val != nval; 281 return val != nval;
282} 282}
283 283
284static snd_kcontrol_new_t snd_ice1712_mixer_digmix_route_ac97 __devinitdata = { 284static struct snd_kcontrol_new snd_ice1712_mixer_digmix_route_ac97 __devinitdata = {
285 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 285 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
286 .name = "Digital Mixer To AC97", 286 .name = "Digital Mixer To AC97",
287 .info = snd_ice1712_digmix_route_ac97_info, 287 .info = snd_ice1712_digmix_route_ac97_info,
@@ -293,24 +293,24 @@ static snd_kcontrol_new_t snd_ice1712_mixer_digmix_route_ac97 __devinitdata = {
293/* 293/*
294 * gpio operations 294 * gpio operations
295 */ 295 */
296static void snd_ice1712_set_gpio_dir(ice1712_t *ice, unsigned int data) 296static void snd_ice1712_set_gpio_dir(struct snd_ice1712 *ice, unsigned int data)
297{ 297{
298 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, data); 298 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, data);
299 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */ 299 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
300} 300}
301 301
302static void snd_ice1712_set_gpio_mask(ice1712_t *ice, unsigned int data) 302static void snd_ice1712_set_gpio_mask(struct snd_ice1712 *ice, unsigned int data)
303{ 303{
304 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, data); 304 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, data);
305 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */ 305 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
306} 306}
307 307
308static unsigned int snd_ice1712_get_gpio_data(ice1712_t *ice) 308static unsigned int snd_ice1712_get_gpio_data(struct snd_ice1712 *ice)
309{ 309{
310 return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA); 310 return snd_ice1712_read(ice, ICE1712_IREG_GPIO_DATA);
311} 311}
312 312
313static void snd_ice1712_set_gpio_data(ice1712_t *ice, unsigned int val) 313static void snd_ice1712_set_gpio_data(struct snd_ice1712 *ice, unsigned int val)
314{ 314{
315 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, val); 315 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, val);
316 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */ 316 inb(ICEREG(ice, DATA)); /* dummy read for pci-posting */
@@ -327,7 +327,7 @@ static void snd_ice1712_set_gpio_data(ice1712_t *ice, unsigned int val)
327 * change the input clock selection 327 * change the input clock selection
328 * spdif_clock = 1 - IEC958 input, 0 - Envy24 328 * spdif_clock = 1 - IEC958 input, 0 - Envy24
329 */ 329 */
330static int snd_ice1712_cs8427_set_input_clock(ice1712_t *ice, int spdif_clock) 330static int snd_ice1712_cs8427_set_input_clock(struct snd_ice1712 *ice, int spdif_clock)
331{ 331{
332 unsigned char reg[2] = { 0x80 | 4, 0 }; /* CS8427 auto increment | register number 4 + data */ 332 unsigned char reg[2] = { 0x80 | 4, 0 }; /* CS8427 auto increment | register number 4 + data */
333 unsigned char val, nval; 333 unsigned char val, nval;
@@ -362,17 +362,17 @@ static int snd_ice1712_cs8427_set_input_clock(ice1712_t *ice, int spdif_clock)
362/* 362/*
363 * spdif callbacks 363 * spdif callbacks
364 */ 364 */
365static void open_cs8427(ice1712_t *ice, snd_pcm_substream_t * substream) 365static void open_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
366{ 366{
367 snd_cs8427_iec958_active(ice->cs8427, 1); 367 snd_cs8427_iec958_active(ice->cs8427, 1);
368} 368}
369 369
370static void close_cs8427(ice1712_t *ice, snd_pcm_substream_t * substream) 370static void close_cs8427(struct snd_ice1712 *ice, struct snd_pcm_substream *substream)
371{ 371{
372 snd_cs8427_iec958_active(ice->cs8427, 0); 372 snd_cs8427_iec958_active(ice->cs8427, 0);
373} 373}
374 374
375static void setup_cs8427(ice1712_t *ice, int rate) 375static void setup_cs8427(struct snd_ice1712 *ice, int rate)
376{ 376{
377 snd_cs8427_iec958_pcm(ice->cs8427, rate); 377 snd_cs8427_iec958_pcm(ice->cs8427, rate);
378} 378}
@@ -380,7 +380,7 @@ static void setup_cs8427(ice1712_t *ice, int rate)
380/* 380/*
381 * create and initialize callbacks for cs8427 interface 381 * create and initialize callbacks for cs8427 interface
382 */ 382 */
383int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr) 383int __devinit snd_ice1712_init_cs8427(struct snd_ice1712 *ice, int addr)
384{ 384{
385 int err; 385 int err;
386 386
@@ -403,7 +403,7 @@ int __devinit snd_ice1712_init_cs8427(ice1712_t *ice, int addr)
403 403
404static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *regs) 404static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *regs)
405{ 405{
406 ice1712_t *ice = dev_id; 406 struct snd_ice1712 *ice = dev_id;
407 unsigned char status; 407 unsigned char status;
408 int handled = 0; 408 int handled = 0;
409 409
@@ -444,7 +444,7 @@ static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *
444 if (status & ICE1712_IRQ_PBKDS) { 444 if (status & ICE1712_IRQ_PBKDS) {
445 u32 idx; 445 u32 idx;
446 u16 pbkstatus; 446 u16 pbkstatus;
447 snd_pcm_substream_t *substream; 447 struct snd_pcm_substream *substream;
448 pbkstatus = inw(ICEDS(ice, INTSTAT)); 448 pbkstatus = inw(ICEDS(ice, INTSTAT));
449 //printk("pbkstatus = 0x%x\n", pbkstatus); 449 //printk("pbkstatus = 0x%x\n", pbkstatus);
450 for (idx = 0; idx < 6; idx++) { 450 for (idx = 0; idx < 6; idx++) {
@@ -475,13 +475,13 @@ static irqreturn_t snd_ice1712_interrupt(int irq, void *dev_id, struct pt_regs *
475 * PCM part - misc 475 * PCM part - misc
476 */ 476 */
477 477
478static int snd_ice1712_hw_params(snd_pcm_substream_t * substream, 478static int snd_ice1712_hw_params(struct snd_pcm_substream *substream,
479 snd_pcm_hw_params_t * hw_params) 479 struct snd_pcm_hw_params *hw_params)
480{ 480{
481 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 481 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
482} 482}
483 483
484static int snd_ice1712_hw_free(snd_pcm_substream_t * substream) 484static int snd_ice1712_hw_free(struct snd_pcm_substream *substream)
485{ 485{
486 return snd_pcm_lib_free_pages(substream); 486 return snd_pcm_lib_free_pages(substream);
487} 487}
@@ -490,10 +490,10 @@ static int snd_ice1712_hw_free(snd_pcm_substream_t * substream)
490 * PCM part - consumer I/O 490 * PCM part - consumer I/O
491 */ 491 */
492 492
493static int snd_ice1712_playback_trigger(snd_pcm_substream_t * substream, 493static int snd_ice1712_playback_trigger(struct snd_pcm_substream *substream,
494 int cmd) 494 int cmd)
495{ 495{
496 ice1712_t *ice = snd_pcm_substream_chip(substream); 496 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
497 int result = 0; 497 int result = 0;
498 u32 tmp; 498 u32 tmp;
499 499
@@ -515,10 +515,10 @@ static int snd_ice1712_playback_trigger(snd_pcm_substream_t * substream,
515 return result; 515 return result;
516} 516}
517 517
518static int snd_ice1712_playback_ds_trigger(snd_pcm_substream_t * substream, 518static int snd_ice1712_playback_ds_trigger(struct snd_pcm_substream *substream,
519 int cmd) 519 int cmd)
520{ 520{
521 ice1712_t *ice = snd_pcm_substream_chip(substream); 521 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
522 int result = 0; 522 int result = 0;
523 u32 tmp; 523 u32 tmp;
524 524
@@ -540,10 +540,10 @@ static int snd_ice1712_playback_ds_trigger(snd_pcm_substream_t * substream,
540 return result; 540 return result;
541} 541}
542 542
543static int snd_ice1712_capture_trigger(snd_pcm_substream_t * substream, 543static int snd_ice1712_capture_trigger(struct snd_pcm_substream *substream,
544 int cmd) 544 int cmd)
545{ 545{
546 ice1712_t *ice = snd_pcm_substream_chip(substream); 546 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
547 int result = 0; 547 int result = 0;
548 u8 tmp; 548 u8 tmp;
549 549
@@ -561,10 +561,10 @@ static int snd_ice1712_capture_trigger(snd_pcm_substream_t * substream,
561 return result; 561 return result;
562} 562}
563 563
564static int snd_ice1712_playback_prepare(snd_pcm_substream_t * substream) 564static int snd_ice1712_playback_prepare(struct snd_pcm_substream *substream)
565{ 565{
566 ice1712_t *ice = snd_pcm_substream_chip(substream); 566 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
567 snd_pcm_runtime_t *runtime = substream->runtime; 567 struct snd_pcm_runtime *runtime = substream->runtime;
568 u32 period_size, buf_size, rate, tmp; 568 u32 period_size, buf_size, rate, tmp;
569 569
570 period_size = (snd_pcm_lib_period_bytes(substream) >> 2) - 1; 570 period_size = (snd_pcm_lib_period_bytes(substream) >> 2) - 1;
@@ -594,10 +594,10 @@ static int snd_ice1712_playback_prepare(snd_pcm_substream_t * substream)
594 return 0; 594 return 0;
595} 595}
596 596
597static int snd_ice1712_playback_ds_prepare(snd_pcm_substream_t * substream) 597static int snd_ice1712_playback_ds_prepare(struct snd_pcm_substream *substream)
598{ 598{
599 ice1712_t *ice = snd_pcm_substream_chip(substream); 599 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
600 snd_pcm_runtime_t *runtime = substream->runtime; 600 struct snd_pcm_runtime *runtime = substream->runtime;
601 u32 period_size, buf_size, rate, tmp, chn; 601 u32 period_size, buf_size, rate, tmp, chn;
602 602
603 period_size = snd_pcm_lib_period_bytes(substream) - 1; 603 period_size = snd_pcm_lib_period_bytes(substream) - 1;
@@ -629,10 +629,10 @@ static int snd_ice1712_playback_ds_prepare(snd_pcm_substream_t * substream)
629 return 0; 629 return 0;
630} 630}
631 631
632static int snd_ice1712_capture_prepare(snd_pcm_substream_t * substream) 632static int snd_ice1712_capture_prepare(struct snd_pcm_substream *substream)
633{ 633{
634 ice1712_t *ice = snd_pcm_substream_chip(substream); 634 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
635 snd_pcm_runtime_t *runtime = substream->runtime; 635 struct snd_pcm_runtime *runtime = substream->runtime;
636 u32 period_size, buf_size; 636 u32 period_size, buf_size;
637 u8 tmp; 637 u8 tmp;
638 638
@@ -654,10 +654,10 @@ static int snd_ice1712_capture_prepare(snd_pcm_substream_t * substream)
654 return 0; 654 return 0;
655} 655}
656 656
657static snd_pcm_uframes_t snd_ice1712_playback_pointer(snd_pcm_substream_t * substream) 657static snd_pcm_uframes_t snd_ice1712_playback_pointer(struct snd_pcm_substream *substream)
658{ 658{
659 ice1712_t *ice = snd_pcm_substream_chip(substream); 659 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
660 snd_pcm_runtime_t *runtime = substream->runtime; 660 struct snd_pcm_runtime *runtime = substream->runtime;
661 size_t ptr; 661 size_t ptr;
662 662
663 if (!(snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL) & 1)) 663 if (!(snd_ice1712_read(ice, ICE1712_IREG_PBK_CTRL) & 1))
@@ -668,9 +668,9 @@ static snd_pcm_uframes_t snd_ice1712_playback_pointer(snd_pcm_substream_t * subs
668 return bytes_to_frames(substream->runtime, ptr); 668 return bytes_to_frames(substream->runtime, ptr);
669} 669}
670 670
671static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(snd_pcm_substream_t * substream) 671static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substream *substream)
672{ 672{
673 ice1712_t *ice = snd_pcm_substream_chip(substream); 673 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
674 u8 addr; 674 u8 addr;
675 size_t ptr; 675 size_t ptr;
676 676
@@ -687,9 +687,9 @@ static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(snd_pcm_substream_t * s
687 return bytes_to_frames(substream->runtime, ptr); 687 return bytes_to_frames(substream->runtime, ptr);
688} 688}
689 689
690static snd_pcm_uframes_t snd_ice1712_capture_pointer(snd_pcm_substream_t * substream) 690static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *substream)
691{ 691{
692 ice1712_t *ice = snd_pcm_substream_chip(substream); 692 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
693 size_t ptr; 693 size_t ptr;
694 694
695 if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1)) 695 if (!(snd_ice1712_read(ice, ICE1712_IREG_CAP_CTRL) & 1))
@@ -700,7 +700,7 @@ static snd_pcm_uframes_t snd_ice1712_capture_pointer(snd_pcm_substream_t * subst
700 return bytes_to_frames(substream->runtime, ptr); 700 return bytes_to_frames(substream->runtime, ptr);
701} 701}
702 702
703static snd_pcm_hardware_t snd_ice1712_playback = 703static struct snd_pcm_hardware snd_ice1712_playback =
704{ 704{
705 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 705 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
706 SNDRV_PCM_INFO_BLOCK_TRANSFER | 706 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -720,7 +720,7 @@ static snd_pcm_hardware_t snd_ice1712_playback =
720 .fifo_size = 0, 720 .fifo_size = 0,
721}; 721};
722 722
723static snd_pcm_hardware_t snd_ice1712_playback_ds = 723static struct snd_pcm_hardware snd_ice1712_playback_ds =
724{ 724{
725 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 725 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
726 SNDRV_PCM_INFO_BLOCK_TRANSFER | 726 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -740,7 +740,7 @@ static snd_pcm_hardware_t snd_ice1712_playback_ds =
740 .fifo_size = 0, 740 .fifo_size = 0,
741}; 741};
742 742
743static snd_pcm_hardware_t snd_ice1712_capture = 743static struct snd_pcm_hardware snd_ice1712_capture =
744{ 744{
745 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 745 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
746 SNDRV_PCM_INFO_BLOCK_TRANSFER | 746 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -759,20 +759,20 @@ static snd_pcm_hardware_t snd_ice1712_capture =
759 .fifo_size = 0, 759 .fifo_size = 0,
760}; 760};
761 761
762static int snd_ice1712_playback_open(snd_pcm_substream_t * substream) 762static int snd_ice1712_playback_open(struct snd_pcm_substream *substream)
763{ 763{
764 snd_pcm_runtime_t *runtime = substream->runtime; 764 struct snd_pcm_runtime *runtime = substream->runtime;
765 ice1712_t *ice = snd_pcm_substream_chip(substream); 765 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
766 766
767 ice->playback_con_substream = substream; 767 ice->playback_con_substream = substream;
768 runtime->hw = snd_ice1712_playback; 768 runtime->hw = snd_ice1712_playback;
769 return 0; 769 return 0;
770} 770}
771 771
772static int snd_ice1712_playback_ds_open(snd_pcm_substream_t * substream) 772static int snd_ice1712_playback_ds_open(struct snd_pcm_substream *substream)
773{ 773{
774 snd_pcm_runtime_t *runtime = substream->runtime; 774 struct snd_pcm_runtime *runtime = substream->runtime;
775 ice1712_t *ice = snd_pcm_substream_chip(substream); 775 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
776 u32 tmp; 776 u32 tmp;
777 777
778 ice->playback_con_substream_ds[substream->number] = substream; 778 ice->playback_con_substream_ds[substream->number] = substream;
@@ -784,10 +784,10 @@ static int snd_ice1712_playback_ds_open(snd_pcm_substream_t * substream)
784 return 0; 784 return 0;
785} 785}
786 786
787static int snd_ice1712_capture_open(snd_pcm_substream_t * substream) 787static int snd_ice1712_capture_open(struct snd_pcm_substream *substream)
788{ 788{
789 snd_pcm_runtime_t *runtime = substream->runtime; 789 struct snd_pcm_runtime *runtime = substream->runtime;
790 ice1712_t *ice = snd_pcm_substream_chip(substream); 790 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
791 791
792 ice->capture_con_substream = substream; 792 ice->capture_con_substream = substream;
793 runtime->hw = snd_ice1712_capture; 793 runtime->hw = snd_ice1712_capture;
@@ -797,17 +797,17 @@ static int snd_ice1712_capture_open(snd_pcm_substream_t * substream)
797 return 0; 797 return 0;
798} 798}
799 799
800static int snd_ice1712_playback_close(snd_pcm_substream_t * substream) 800static int snd_ice1712_playback_close(struct snd_pcm_substream *substream)
801{ 801{
802 ice1712_t *ice = snd_pcm_substream_chip(substream); 802 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
803 803
804 ice->playback_con_substream = NULL; 804 ice->playback_con_substream = NULL;
805 return 0; 805 return 0;
806} 806}
807 807
808static int snd_ice1712_playback_ds_close(snd_pcm_substream_t * substream) 808static int snd_ice1712_playback_ds_close(struct snd_pcm_substream *substream)
809{ 809{
810 ice1712_t *ice = snd_pcm_substream_chip(substream); 810 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
811 u32 tmp; 811 u32 tmp;
812 812
813 spin_lock_irq(&ice->reg_lock); 813 spin_lock_irq(&ice->reg_lock);
@@ -818,15 +818,15 @@ static int snd_ice1712_playback_ds_close(snd_pcm_substream_t * substream)
818 return 0; 818 return 0;
819} 819}
820 820
821static int snd_ice1712_capture_close(snd_pcm_substream_t * substream) 821static int snd_ice1712_capture_close(struct snd_pcm_substream *substream)
822{ 822{
823 ice1712_t *ice = snd_pcm_substream_chip(substream); 823 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
824 824
825 ice->capture_con_substream = NULL; 825 ice->capture_con_substream = NULL;
826 return 0; 826 return 0;
827} 827}
828 828
829static snd_pcm_ops_t snd_ice1712_playback_ops = { 829static struct snd_pcm_ops snd_ice1712_playback_ops = {
830 .open = snd_ice1712_playback_open, 830 .open = snd_ice1712_playback_open,
831 .close = snd_ice1712_playback_close, 831 .close = snd_ice1712_playback_close,
832 .ioctl = snd_pcm_lib_ioctl, 832 .ioctl = snd_pcm_lib_ioctl,
@@ -837,7 +837,7 @@ static snd_pcm_ops_t snd_ice1712_playback_ops = {
837 .pointer = snd_ice1712_playback_pointer, 837 .pointer = snd_ice1712_playback_pointer,
838}; 838};
839 839
840static snd_pcm_ops_t snd_ice1712_playback_ds_ops = { 840static struct snd_pcm_ops snd_ice1712_playback_ds_ops = {
841 .open = snd_ice1712_playback_ds_open, 841 .open = snd_ice1712_playback_ds_open,
842 .close = snd_ice1712_playback_ds_close, 842 .close = snd_ice1712_playback_ds_close,
843 .ioctl = snd_pcm_lib_ioctl, 843 .ioctl = snd_pcm_lib_ioctl,
@@ -848,7 +848,7 @@ static snd_pcm_ops_t snd_ice1712_playback_ds_ops = {
848 .pointer = snd_ice1712_playback_ds_pointer, 848 .pointer = snd_ice1712_playback_ds_pointer,
849}; 849};
850 850
851static snd_pcm_ops_t snd_ice1712_capture_ops = { 851static struct snd_pcm_ops snd_ice1712_capture_ops = {
852 .open = snd_ice1712_capture_open, 852 .open = snd_ice1712_capture_open,
853 .close = snd_ice1712_capture_close, 853 .close = snd_ice1712_capture_close,
854 .ioctl = snd_pcm_lib_ioctl, 854 .ioctl = snd_pcm_lib_ioctl,
@@ -859,9 +859,9 @@ static snd_pcm_ops_t snd_ice1712_capture_ops = {
859 .pointer = snd_ice1712_capture_pointer, 859 .pointer = snd_ice1712_capture_pointer,
860}; 860};
861 861
862static int __devinit snd_ice1712_pcm(ice1712_t * ice, int device, snd_pcm_t ** rpcm) 862static int __devinit snd_ice1712_pcm(struct snd_ice1712 * ice, int device, struct snd_pcm ** rpcm)
863{ 863{
864 snd_pcm_t *pcm; 864 struct snd_pcm *pcm;
865 int err; 865 int err;
866 866
867 if (rpcm) 867 if (rpcm)
@@ -889,9 +889,9 @@ static int __devinit snd_ice1712_pcm(ice1712_t * ice, int device, snd_pcm_t ** r
889 return 0; 889 return 0;
890} 890}
891 891
892static int __devinit snd_ice1712_pcm_ds(ice1712_t * ice, int device, snd_pcm_t ** rpcm) 892static int __devinit snd_ice1712_pcm_ds(struct snd_ice1712 * ice, int device, struct snd_pcm ** rpcm)
893{ 893{
894 snd_pcm_t *pcm; 894 struct snd_pcm *pcm;
895 int err; 895 int err;
896 896
897 if (rpcm) 897 if (rpcm)
@@ -923,16 +923,16 @@ static int __devinit snd_ice1712_pcm_ds(ice1712_t * ice, int device, snd_pcm_t *
923static unsigned int rates[] = { 8000, 9600, 11025, 12000, 16000, 22050, 24000, 923static unsigned int rates[] = { 8000, 9600, 11025, 12000, 16000, 22050, 24000,
924 32000, 44100, 48000, 64000, 88200, 96000 }; 924 32000, 44100, 48000, 64000, 88200, 96000 };
925 925
926static snd_pcm_hw_constraint_list_t hw_constraints_rates = { 926static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
927 .count = ARRAY_SIZE(rates), 927 .count = ARRAY_SIZE(rates),
928 .list = rates, 928 .list = rates,
929 .mask = 0, 929 .mask = 0,
930}; 930};
931 931
932static int snd_ice1712_pro_trigger(snd_pcm_substream_t *substream, 932static int snd_ice1712_pro_trigger(struct snd_pcm_substream *substream,
933 int cmd) 933 int cmd)
934{ 934{
935 ice1712_t *ice = snd_pcm_substream_chip(substream); 935 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
936 switch (cmd) { 936 switch (cmd) {
937 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 937 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
938 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 938 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -959,7 +959,7 @@ static int snd_ice1712_pro_trigger(snd_pcm_substream_t *substream,
959 unsigned int what = 0; 959 unsigned int what = 0;
960 unsigned int old; 960 unsigned int old;
961 struct list_head *pos; 961 struct list_head *pos;
962 snd_pcm_substream_t *s; 962 struct snd_pcm_substream *s;
963 963
964 snd_pcm_group_for_each(pos, substream) { 964 snd_pcm_group_for_each(pos, substream) {
965 s = snd_pcm_group_substream_entry(pos); 965 s = snd_pcm_group_substream_entry(pos);
@@ -989,7 +989,7 @@ static int snd_ice1712_pro_trigger(snd_pcm_substream_t *substream,
989 989
990/* 990/*
991 */ 991 */
992static void snd_ice1712_set_pro_rate(ice1712_t *ice, unsigned int rate, int force) 992static void snd_ice1712_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate, int force)
993{ 993{
994 unsigned long flags; 994 unsigned long flags;
995 unsigned char val, old; 995 unsigned char val, old;
@@ -1043,9 +1043,9 @@ static void snd_ice1712_set_pro_rate(ice1712_t *ice, unsigned int rate, int forc
1043 ice->spdif.ops.setup_rate(ice, rate); 1043 ice->spdif.ops.setup_rate(ice, rate);
1044} 1044}
1045 1045
1046static int snd_ice1712_playback_pro_prepare(snd_pcm_substream_t * substream) 1046static int snd_ice1712_playback_pro_prepare(struct snd_pcm_substream *substream)
1047{ 1047{
1048 ice1712_t *ice = snd_pcm_substream_chip(substream); 1048 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1049 1049
1050 ice->playback_pro_size = snd_pcm_lib_buffer_bytes(substream); 1050 ice->playback_pro_size = snd_pcm_lib_buffer_bytes(substream);
1051 spin_lock_irq(&ice->reg_lock); 1051 spin_lock_irq(&ice->reg_lock);
@@ -1057,18 +1057,18 @@ static int snd_ice1712_playback_pro_prepare(snd_pcm_substream_t * substream)
1057 return 0; 1057 return 0;
1058} 1058}
1059 1059
1060static int snd_ice1712_playback_pro_hw_params(snd_pcm_substream_t * substream, 1060static int snd_ice1712_playback_pro_hw_params(struct snd_pcm_substream *substream,
1061 snd_pcm_hw_params_t * hw_params) 1061 struct snd_pcm_hw_params *hw_params)
1062{ 1062{
1063 ice1712_t *ice = snd_pcm_substream_chip(substream); 1063 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1064 1064
1065 snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0); 1065 snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0);
1066 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 1066 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
1067} 1067}
1068 1068
1069static int snd_ice1712_capture_pro_prepare(snd_pcm_substream_t * substream) 1069static int snd_ice1712_capture_pro_prepare(struct snd_pcm_substream *substream)
1070{ 1070{
1071 ice1712_t *ice = snd_pcm_substream_chip(substream); 1071 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1072 1072
1073 ice->capture_pro_size = snd_pcm_lib_buffer_bytes(substream); 1073 ice->capture_pro_size = snd_pcm_lib_buffer_bytes(substream);
1074 spin_lock_irq(&ice->reg_lock); 1074 spin_lock_irq(&ice->reg_lock);
@@ -1079,18 +1079,18 @@ static int snd_ice1712_capture_pro_prepare(snd_pcm_substream_t * substream)
1079 return 0; 1079 return 0;
1080} 1080}
1081 1081
1082static int snd_ice1712_capture_pro_hw_params(snd_pcm_substream_t * substream, 1082static int snd_ice1712_capture_pro_hw_params(struct snd_pcm_substream *substream,
1083 snd_pcm_hw_params_t * hw_params) 1083 struct snd_pcm_hw_params *hw_params)
1084{ 1084{
1085 ice1712_t *ice = snd_pcm_substream_chip(substream); 1085 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1086 1086
1087 snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0); 1087 snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0);
1088 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 1088 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
1089} 1089}
1090 1090
1091static snd_pcm_uframes_t snd_ice1712_playback_pro_pointer(snd_pcm_substream_t * substream) 1091static snd_pcm_uframes_t snd_ice1712_playback_pro_pointer(struct snd_pcm_substream *substream)
1092{ 1092{
1093 ice1712_t *ice = snd_pcm_substream_chip(substream); 1093 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1094 size_t ptr; 1094 size_t ptr;
1095 1095
1096 if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_PLAYBACK_START)) 1096 if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_PLAYBACK_START))
@@ -1101,9 +1101,9 @@ static snd_pcm_uframes_t snd_ice1712_playback_pro_pointer(snd_pcm_substream_t *
1101 return bytes_to_frames(substream->runtime, ptr); 1101 return bytes_to_frames(substream->runtime, ptr);
1102} 1102}
1103 1103
1104static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(snd_pcm_substream_t * substream) 1104static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substream *substream)
1105{ 1105{
1106 ice1712_t *ice = snd_pcm_substream_chip(substream); 1106 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1107 size_t ptr; 1107 size_t ptr;
1108 1108
1109 if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_CAPTURE_START_SHADOW)) 1109 if (!(inl(ICEMT(ice, PLAYBACK_CONTROL)) & ICE1712_CAPTURE_START_SHADOW))
@@ -1114,7 +1114,7 @@ static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(snd_pcm_substream_t * s
1114 return bytes_to_frames(substream->runtime, ptr); 1114 return bytes_to_frames(substream->runtime, ptr);
1115} 1115}
1116 1116
1117static snd_pcm_hardware_t snd_ice1712_playback_pro = 1117static struct snd_pcm_hardware snd_ice1712_playback_pro =
1118{ 1118{
1119 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1119 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
1120 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1120 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1134,7 +1134,7 @@ static snd_pcm_hardware_t snd_ice1712_playback_pro =
1134 .fifo_size = 0, 1134 .fifo_size = 0,
1135}; 1135};
1136 1136
1137static snd_pcm_hardware_t snd_ice1712_capture_pro = 1137static struct snd_pcm_hardware snd_ice1712_capture_pro =
1138{ 1138{
1139 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 1139 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
1140 SNDRV_PCM_INFO_BLOCK_TRANSFER | 1140 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -1154,10 +1154,10 @@ static snd_pcm_hardware_t snd_ice1712_capture_pro =
1154 .fifo_size = 0, 1154 .fifo_size = 0,
1155}; 1155};
1156 1156
1157static int snd_ice1712_playback_pro_open(snd_pcm_substream_t * substream) 1157static int snd_ice1712_playback_pro_open(struct snd_pcm_substream *substream)
1158{ 1158{
1159 snd_pcm_runtime_t *runtime = substream->runtime; 1159 struct snd_pcm_runtime *runtime = substream->runtime;
1160 ice1712_t *ice = snd_pcm_substream_chip(substream); 1160 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1161 1161
1162 ice->playback_pro_substream = substream; 1162 ice->playback_pro_substream = substream;
1163 runtime->hw = snd_ice1712_playback_pro; 1163 runtime->hw = snd_ice1712_playback_pro;
@@ -1171,10 +1171,10 @@ static int snd_ice1712_playback_pro_open(snd_pcm_substream_t * substream)
1171 return 0; 1171 return 0;
1172} 1172}
1173 1173
1174static int snd_ice1712_capture_pro_open(snd_pcm_substream_t * substream) 1174static int snd_ice1712_capture_pro_open(struct snd_pcm_substream *substream)
1175{ 1175{
1176 ice1712_t *ice = snd_pcm_substream_chip(substream); 1176 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1177 snd_pcm_runtime_t *runtime = substream->runtime; 1177 struct snd_pcm_runtime *runtime = substream->runtime;
1178 1178
1179 ice->capture_pro_substream = substream; 1179 ice->capture_pro_substream = substream;
1180 runtime->hw = snd_ice1712_capture_pro; 1180 runtime->hw = snd_ice1712_capture_pro;
@@ -1184,9 +1184,9 @@ static int snd_ice1712_capture_pro_open(snd_pcm_substream_t * substream)
1184 return 0; 1184 return 0;
1185} 1185}
1186 1186
1187static int snd_ice1712_playback_pro_close(snd_pcm_substream_t * substream) 1187static int snd_ice1712_playback_pro_close(struct snd_pcm_substream *substream)
1188{ 1188{
1189 ice1712_t *ice = snd_pcm_substream_chip(substream); 1189 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1190 1190
1191 if (PRO_RATE_RESET) 1191 if (PRO_RATE_RESET)
1192 snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 1192 snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -1197,9 +1197,9 @@ static int snd_ice1712_playback_pro_close(snd_pcm_substream_t * substream)
1197 return 0; 1197 return 0;
1198} 1198}
1199 1199
1200static int snd_ice1712_capture_pro_close(snd_pcm_substream_t * substream) 1200static int snd_ice1712_capture_pro_close(struct snd_pcm_substream *substream)
1201{ 1201{
1202 ice1712_t *ice = snd_pcm_substream_chip(substream); 1202 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1203 1203
1204 if (PRO_RATE_RESET) 1204 if (PRO_RATE_RESET)
1205 snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 1205 snd_ice1712_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -1207,7 +1207,7 @@ static int snd_ice1712_capture_pro_close(snd_pcm_substream_t * substream)
1207 return 0; 1207 return 0;
1208} 1208}
1209 1209
1210static snd_pcm_ops_t snd_ice1712_playback_pro_ops = { 1210static struct snd_pcm_ops snd_ice1712_playback_pro_ops = {
1211 .open = snd_ice1712_playback_pro_open, 1211 .open = snd_ice1712_playback_pro_open,
1212 .close = snd_ice1712_playback_pro_close, 1212 .close = snd_ice1712_playback_pro_close,
1213 .ioctl = snd_pcm_lib_ioctl, 1213 .ioctl = snd_pcm_lib_ioctl,
@@ -1218,7 +1218,7 @@ static snd_pcm_ops_t snd_ice1712_playback_pro_ops = {
1218 .pointer = snd_ice1712_playback_pro_pointer, 1218 .pointer = snd_ice1712_playback_pro_pointer,
1219}; 1219};
1220 1220
1221static snd_pcm_ops_t snd_ice1712_capture_pro_ops = { 1221static struct snd_pcm_ops snd_ice1712_capture_pro_ops = {
1222 .open = snd_ice1712_capture_pro_open, 1222 .open = snd_ice1712_capture_pro_open,
1223 .close = snd_ice1712_capture_pro_close, 1223 .close = snd_ice1712_capture_pro_close,
1224 .ioctl = snd_pcm_lib_ioctl, 1224 .ioctl = snd_pcm_lib_ioctl,
@@ -1229,9 +1229,9 @@ static snd_pcm_ops_t snd_ice1712_capture_pro_ops = {
1229 .pointer = snd_ice1712_capture_pro_pointer, 1229 .pointer = snd_ice1712_capture_pro_pointer,
1230}; 1230};
1231 1231
1232static int __devinit snd_ice1712_pcm_profi(ice1712_t * ice, int device, snd_pcm_t ** rpcm) 1232static int __devinit snd_ice1712_pcm_profi(struct snd_ice1712 * ice, int device, struct snd_pcm ** rpcm)
1233{ 1233{
1234 snd_pcm_t *pcm; 1234 struct snd_pcm *pcm;
1235 int err; 1235 int err;
1236 1236
1237 if (rpcm) 1237 if (rpcm)
@@ -1272,7 +1272,7 @@ static int __devinit snd_ice1712_pcm_profi(ice1712_t * ice, int device, snd_pcm_
1272 * Mixer section 1272 * Mixer section
1273 */ 1273 */
1274 1274
1275static void snd_ice1712_update_volume(ice1712_t *ice, int index) 1275static void snd_ice1712_update_volume(struct snd_ice1712 *ice, int index)
1276{ 1276{
1277 unsigned int vol = ice->pro_volumes[index]; 1277 unsigned int vol = ice->pro_volumes[index];
1278 unsigned short val = 0; 1278 unsigned short val = 0;
@@ -1283,7 +1283,7 @@ static void snd_ice1712_update_volume(ice1712_t *ice, int index)
1283 outw(val, ICEMT(ice, MONITOR_VOLUME)); 1283 outw(val, ICEMT(ice, MONITOR_VOLUME));
1284} 1284}
1285 1285
1286static int snd_ice1712_pro_mixer_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1286static int snd_ice1712_pro_mixer_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1287{ 1287{
1288 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1288 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1289 uinfo->count = 2; 1289 uinfo->count = 2;
@@ -1292,9 +1292,9 @@ static int snd_ice1712_pro_mixer_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_e
1292 return 0; 1292 return 0;
1293} 1293}
1294 1294
1295static int snd_ice1712_pro_mixer_switch_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1295static int snd_ice1712_pro_mixer_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1296{ 1296{
1297 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1297 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1298 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value; 1298 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value;
1299 1299
1300 spin_lock_irq(&ice->reg_lock); 1300 spin_lock_irq(&ice->reg_lock);
@@ -1304,9 +1304,9 @@ static int snd_ice1712_pro_mixer_switch_get(snd_kcontrol_t * kcontrol, snd_ctl_e
1304 return 0; 1304 return 0;
1305} 1305}
1306 1306
1307static int snd_ice1712_pro_mixer_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1307static int snd_ice1712_pro_mixer_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1308{ 1308{
1309 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1309 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1310 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value; 1310 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value;
1311 unsigned int nval, change; 1311 unsigned int nval, change;
1312 1312
@@ -1321,7 +1321,7 @@ static int snd_ice1712_pro_mixer_switch_put(snd_kcontrol_t * kcontrol, snd_ctl_e
1321 return change; 1321 return change;
1322} 1322}
1323 1323
1324static int snd_ice1712_pro_mixer_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1324static int snd_ice1712_pro_mixer_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1325{ 1325{
1326 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1326 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1327 uinfo->count = 2; 1327 uinfo->count = 2;
@@ -1330,9 +1330,9 @@ static int snd_ice1712_pro_mixer_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_e
1330 return 0; 1330 return 0;
1331} 1331}
1332 1332
1333static int snd_ice1712_pro_mixer_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1333static int snd_ice1712_pro_mixer_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1334{ 1334{
1335 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1335 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1336 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value; 1336 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value;
1337 1337
1338 spin_lock_irq(&ice->reg_lock); 1338 spin_lock_irq(&ice->reg_lock);
@@ -1342,9 +1342,9 @@ static int snd_ice1712_pro_mixer_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_e
1342 return 0; 1342 return 0;
1343} 1343}
1344 1344
1345static int snd_ice1712_pro_mixer_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1345static int snd_ice1712_pro_mixer_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1346{ 1346{
1347 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1347 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1348 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value; 1348 int index = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id) + kcontrol->private_value;
1349 unsigned int nval, change; 1349 unsigned int nval, change;
1350 1350
@@ -1360,7 +1360,7 @@ static int snd_ice1712_pro_mixer_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_e
1360} 1360}
1361 1361
1362 1362
1363static snd_kcontrol_new_t snd_ice1712_multi_playback_ctrls[] __devinitdata = { 1363static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] __devinitdata = {
1364 { 1364 {
1365 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1365 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1366 .name = "Multi Playback Switch", 1366 .name = "Multi Playback Switch",
@@ -1381,7 +1381,7 @@ static snd_kcontrol_new_t snd_ice1712_multi_playback_ctrls[] __devinitdata = {
1381 }, 1381 },
1382}; 1382};
1383 1383
1384static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_switch __devinitdata = { 1384static struct snd_kcontrol_new snd_ice1712_multi_capture_analog_switch __devinitdata = {
1385 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1385 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1386 .name = "H/W Multi Capture Switch", 1386 .name = "H/W Multi Capture Switch",
1387 .info = snd_ice1712_pro_mixer_switch_info, 1387 .info = snd_ice1712_pro_mixer_switch_info,
@@ -1390,7 +1390,7 @@ static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_switch __devinitdata
1390 .private_value = 10, 1390 .private_value = 10,
1391}; 1391};
1392 1392
1393static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_switch __devinitdata = { 1393static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_switch __devinitdata = {
1394 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1394 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1395 .name = SNDRV_CTL_NAME_IEC958("Multi ",CAPTURE,SWITCH), 1395 .name = SNDRV_CTL_NAME_IEC958("Multi ",CAPTURE,SWITCH),
1396 .info = snd_ice1712_pro_mixer_switch_info, 1396 .info = snd_ice1712_pro_mixer_switch_info,
@@ -1400,7 +1400,7 @@ static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_switch __devinitdata =
1400 .count = 2, 1400 .count = 2,
1401}; 1401};
1402 1402
1403static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_volume __devinitdata = { 1403static struct snd_kcontrol_new snd_ice1712_multi_capture_analog_volume __devinitdata = {
1404 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1404 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1405 .name = "H/W Multi Capture Volume", 1405 .name = "H/W Multi Capture Volume",
1406 .info = snd_ice1712_pro_mixer_volume_info, 1406 .info = snd_ice1712_pro_mixer_volume_info,
@@ -1409,7 +1409,7 @@ static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_volume __devinitdata
1409 .private_value = 10, 1409 .private_value = 10,
1410}; 1410};
1411 1411
1412static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_volume __devinitdata = { 1412static struct snd_kcontrol_new snd_ice1712_multi_capture_spdif_volume __devinitdata = {
1413 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1413 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1414 .name = SNDRV_CTL_NAME_IEC958("Multi ",CAPTURE,VOLUME), 1414 .name = SNDRV_CTL_NAME_IEC958("Multi ",CAPTURE,VOLUME),
1415 .info = snd_ice1712_pro_mixer_volume_info, 1415 .info = snd_ice1712_pro_mixer_volume_info,
@@ -1419,9 +1419,9 @@ static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_volume __devinitdata =
1419 .count = 2, 1419 .count = 2,
1420}; 1420};
1421 1421
1422static int __devinit snd_ice1712_build_pro_mixer(ice1712_t *ice) 1422static int __devinit snd_ice1712_build_pro_mixer(struct snd_ice1712 *ice)
1423{ 1423{
1424 snd_card_t * card = ice->card; 1424 struct snd_card *card = ice->card;
1425 unsigned int idx; 1425 unsigned int idx;
1426 int err; 1426 int err;
1427 1427
@@ -1433,7 +1433,7 @@ static int __devinit snd_ice1712_build_pro_mixer(ice1712_t *ice)
1433 } 1433 }
1434 1434
1435 if (ice->num_total_adcs > 0) { 1435 if (ice->num_total_adcs > 0) {
1436 snd_kcontrol_new_t tmp = snd_ice1712_multi_capture_analog_switch; 1436 struct snd_kcontrol_new tmp = snd_ice1712_multi_capture_analog_switch;
1437 tmp.count = ice->num_total_adcs; 1437 tmp.count = ice->num_total_adcs;
1438 err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice)); 1438 err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice));
1439 if (err < 0) 1439 if (err < 0)
@@ -1445,7 +1445,7 @@ static int __devinit snd_ice1712_build_pro_mixer(ice1712_t *ice)
1445 return err; 1445 return err;
1446 1446
1447 if (ice->num_total_adcs > 0) { 1447 if (ice->num_total_adcs > 0) {
1448 snd_kcontrol_new_t tmp = snd_ice1712_multi_capture_analog_volume; 1448 struct snd_kcontrol_new tmp = snd_ice1712_multi_capture_analog_volume;
1449 tmp.count = ice->num_total_adcs; 1449 tmp.count = ice->num_total_adcs;
1450 err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice)); 1450 err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice));
1451 if (err < 0) 1451 if (err < 0)
@@ -1472,22 +1472,22 @@ static int __devinit snd_ice1712_build_pro_mixer(ice1712_t *ice)
1472 return 0; 1472 return 0;
1473} 1473}
1474 1474
1475static void snd_ice1712_mixer_free_ac97(ac97_t *ac97) 1475static void snd_ice1712_mixer_free_ac97(struct snd_ac97 *ac97)
1476{ 1476{
1477 ice1712_t *ice = ac97->private_data; 1477 struct snd_ice1712 *ice = ac97->private_data;
1478 ice->ac97 = NULL; 1478 ice->ac97 = NULL;
1479} 1479}
1480 1480
1481static int __devinit snd_ice1712_ac97_mixer(ice1712_t * ice) 1481static int __devinit snd_ice1712_ac97_mixer(struct snd_ice1712 * ice)
1482{ 1482{
1483 int err, bus_num = 0; 1483 int err, bus_num = 0;
1484 ac97_template_t ac97; 1484 struct snd_ac97_template ac97;
1485 ac97_bus_t *pbus; 1485 struct snd_ac97_bus *pbus;
1486 static ac97_bus_ops_t con_ops = { 1486 static struct snd_ac97_bus_ops con_ops = {
1487 .write = snd_ice1712_ac97_write, 1487 .write = snd_ice1712_ac97_write,
1488 .read = snd_ice1712_ac97_read, 1488 .read = snd_ice1712_ac97_read,
1489 }; 1489 };
1490 static ac97_bus_ops_t pro_ops = { 1490 static struct snd_ac97_bus_ops pro_ops = {
1491 .write = snd_ice1712_pro_ac97_write, 1491 .write = snd_ice1712_pro_ac97_write,
1492 .read = snd_ice1712_pro_ac97_read, 1492 .read = snd_ice1712_pro_ac97_read,
1493 }; 1493 };
@@ -1527,15 +1527,15 @@ static int __devinit snd_ice1712_ac97_mixer(ice1712_t * ice)
1527 * 1527 *
1528 */ 1528 */
1529 1529
1530static inline unsigned int eeprom_double(ice1712_t *ice, int idx) 1530static inline unsigned int eeprom_double(struct snd_ice1712 *ice, int idx)
1531{ 1531{
1532 return (unsigned int)ice->eeprom.data[idx] | ((unsigned int)ice->eeprom.data[idx + 1] << 8); 1532 return (unsigned int)ice->eeprom.data[idx] | ((unsigned int)ice->eeprom.data[idx + 1] << 8);
1533} 1533}
1534 1534
1535static void snd_ice1712_proc_read(snd_info_entry_t *entry, 1535static void snd_ice1712_proc_read(struct snd_info_entry *entry,
1536 snd_info_buffer_t * buffer) 1536 struct snd_info_buffer *buffer)
1537{ 1537{
1538 ice1712_t *ice = entry->private_data; 1538 struct snd_ice1712 *ice = entry->private_data;
1539 unsigned int idx; 1539 unsigned int idx;
1540 1540
1541 snd_iprintf(buffer, "%s\n\n", ice->card->longname); 1541 snd_iprintf(buffer, "%s\n\n", ice->card->longname);
@@ -1569,9 +1569,9 @@ static void snd_ice1712_proc_read(snd_info_entry_t *entry,
1569 snd_iprintf(buffer, " RATE : 0x%02x\n", (unsigned)inb(ICEMT(ice, RATE))); 1569 snd_iprintf(buffer, " RATE : 0x%02x\n", (unsigned)inb(ICEMT(ice, RATE)));
1570} 1570}
1571 1571
1572static void __devinit snd_ice1712_proc_init(ice1712_t * ice) 1572static void __devinit snd_ice1712_proc_init(struct snd_ice1712 * ice)
1573{ 1573{
1574 snd_info_entry_t *entry; 1574 struct snd_info_entry *entry;
1575 1575
1576 if (! snd_card_proc_new(ice->card, "ice1712", &entry)) 1576 if (! snd_card_proc_new(ice->card, "ice1712", &entry))
1577 snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read); 1577 snd_info_set_text_ops(entry, ice, 1024, snd_ice1712_proc_read);
@@ -1581,22 +1581,24 @@ static void __devinit snd_ice1712_proc_init(ice1712_t * ice)
1581 * 1581 *
1582 */ 1582 */
1583 1583
1584static int snd_ice1712_eeprom_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1584static int snd_ice1712_eeprom_info(struct snd_kcontrol *kcontrol,
1585 struct snd_ctl_elem_info *uinfo)
1585{ 1586{
1586 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; 1587 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
1587 uinfo->count = sizeof(ice1712_eeprom_t); 1588 uinfo->count = sizeof(struct snd_ice1712_eeprom);
1588 return 0; 1589 return 0;
1589} 1590}
1590 1591
1591static int snd_ice1712_eeprom_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1592static int snd_ice1712_eeprom_get(struct snd_kcontrol *kcontrol,
1593 struct snd_ctl_elem_value *ucontrol)
1592{ 1594{
1593 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1595 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1594 1596
1595 memcpy(ucontrol->value.bytes.data, &ice->eeprom, sizeof(ice->eeprom)); 1597 memcpy(ucontrol->value.bytes.data, &ice->eeprom, sizeof(ice->eeprom));
1596 return 0; 1598 return 0;
1597} 1599}
1598 1600
1599static snd_kcontrol_new_t snd_ice1712_eeprom __devinitdata = { 1601static struct snd_kcontrol_new snd_ice1712_eeprom __devinitdata = {
1600 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 1602 .iface = SNDRV_CTL_ELEM_IFACE_CARD,
1601 .name = "ICE1712 EEPROM", 1603 .name = "ICE1712 EEPROM",
1602 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1604 .access = SNDRV_CTL_ELEM_ACCESS_READ,
@@ -1606,32 +1608,33 @@ static snd_kcontrol_new_t snd_ice1712_eeprom __devinitdata = {
1606 1608
1607/* 1609/*
1608 */ 1610 */
1609static int snd_ice1712_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1611static int snd_ice1712_spdif_info(struct snd_kcontrol *kcontrol,
1612 struct snd_ctl_elem_info *uinfo)
1610{ 1613{
1611 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 1614 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
1612 uinfo->count = 1; 1615 uinfo->count = 1;
1613 return 0; 1616 return 0;
1614} 1617}
1615 1618
1616static int snd_ice1712_spdif_default_get(snd_kcontrol_t * kcontrol, 1619static int snd_ice1712_spdif_default_get(struct snd_kcontrol *kcontrol,
1617 snd_ctl_elem_value_t * ucontrol) 1620 struct snd_ctl_elem_value *ucontrol)
1618{ 1621{
1619 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1622 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1620 if (ice->spdif.ops.default_get) 1623 if (ice->spdif.ops.default_get)
1621 ice->spdif.ops.default_get(ice, ucontrol); 1624 ice->spdif.ops.default_get(ice, ucontrol);
1622 return 0; 1625 return 0;
1623} 1626}
1624 1627
1625static int snd_ice1712_spdif_default_put(snd_kcontrol_t * kcontrol, 1628static int snd_ice1712_spdif_default_put(struct snd_kcontrol *kcontrol,
1626 snd_ctl_elem_value_t * ucontrol) 1629 struct snd_ctl_elem_value *ucontrol)
1627{ 1630{
1628 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1631 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1629 if (ice->spdif.ops.default_put) 1632 if (ice->spdif.ops.default_put)
1630 return ice->spdif.ops.default_put(ice, ucontrol); 1633 return ice->spdif.ops.default_put(ice, ucontrol);
1631 return 0; 1634 return 0;
1632} 1635}
1633 1636
1634static snd_kcontrol_new_t snd_ice1712_spdif_default __devinitdata = 1637static struct snd_kcontrol_new snd_ice1712_spdif_default __devinitdata =
1635{ 1638{
1636 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1639 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1637 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1640 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -1640,10 +1643,10 @@ static snd_kcontrol_new_t snd_ice1712_spdif_default __devinitdata =
1640 .put = snd_ice1712_spdif_default_put 1643 .put = snd_ice1712_spdif_default_put
1641}; 1644};
1642 1645
1643static int snd_ice1712_spdif_maskc_get(snd_kcontrol_t * kcontrol, 1646static int snd_ice1712_spdif_maskc_get(struct snd_kcontrol *kcontrol,
1644 snd_ctl_elem_value_t * ucontrol) 1647 struct snd_ctl_elem_value *ucontrol)
1645{ 1648{
1646 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1649 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1647 if (ice->spdif.ops.default_get) { 1650 if (ice->spdif.ops.default_get) {
1648 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO | 1651 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO |
1649 IEC958_AES0_PROFESSIONAL | 1652 IEC958_AES0_PROFESSIONAL |
@@ -1662,10 +1665,10 @@ static int snd_ice1712_spdif_maskc_get(snd_kcontrol_t * kcontrol,
1662 return 0; 1665 return 0;
1663} 1666}
1664 1667
1665static int snd_ice1712_spdif_maskp_get(snd_kcontrol_t * kcontrol, 1668static int snd_ice1712_spdif_maskp_get(struct snd_kcontrol *kcontrol,
1666 snd_ctl_elem_value_t * ucontrol) 1669 struct snd_ctl_elem_value *ucontrol)
1667{ 1670{
1668 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1671 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1669 if (ice->spdif.ops.default_get) { 1672 if (ice->spdif.ops.default_get) {
1670 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO | 1673 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO |
1671 IEC958_AES0_PROFESSIONAL | 1674 IEC958_AES0_PROFESSIONAL |
@@ -1682,7 +1685,7 @@ static int snd_ice1712_spdif_maskp_get(snd_kcontrol_t * kcontrol,
1682 return 0; 1685 return 0;
1683} 1686}
1684 1687
1685static snd_kcontrol_new_t snd_ice1712_spdif_maskc __devinitdata = 1688static struct snd_kcontrol_new snd_ice1712_spdif_maskc __devinitdata =
1686{ 1689{
1687 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1690 .access = SNDRV_CTL_ELEM_ACCESS_READ,
1688 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1691 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -1691,7 +1694,7 @@ static snd_kcontrol_new_t snd_ice1712_spdif_maskc __devinitdata =
1691 .get = snd_ice1712_spdif_maskc_get, 1694 .get = snd_ice1712_spdif_maskc_get,
1692}; 1695};
1693 1696
1694static snd_kcontrol_new_t snd_ice1712_spdif_maskp __devinitdata = 1697static struct snd_kcontrol_new snd_ice1712_spdif_maskp __devinitdata =
1695{ 1698{
1696 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1699 .access = SNDRV_CTL_ELEM_ACCESS_READ,
1697 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1700 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -1700,27 +1703,28 @@ static snd_kcontrol_new_t snd_ice1712_spdif_maskp __devinitdata =
1700 .get = snd_ice1712_spdif_maskp_get, 1703 .get = snd_ice1712_spdif_maskp_get,
1701}; 1704};
1702 1705
1703static int snd_ice1712_spdif_stream_get(snd_kcontrol_t * kcontrol, 1706static int snd_ice1712_spdif_stream_get(struct snd_kcontrol *kcontrol,
1704 snd_ctl_elem_value_t * ucontrol) 1707 struct snd_ctl_elem_value *ucontrol)
1705{ 1708{
1706 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1709 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1707 if (ice->spdif.ops.stream_get) 1710 if (ice->spdif.ops.stream_get)
1708 ice->spdif.ops.stream_get(ice, ucontrol); 1711 ice->spdif.ops.stream_get(ice, ucontrol);
1709 return 0; 1712 return 0;
1710} 1713}
1711 1714
1712static int snd_ice1712_spdif_stream_put(snd_kcontrol_t * kcontrol, 1715static int snd_ice1712_spdif_stream_put(struct snd_kcontrol *kcontrol,
1713 snd_ctl_elem_value_t * ucontrol) 1716 struct snd_ctl_elem_value *ucontrol)
1714{ 1717{
1715 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1718 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1716 if (ice->spdif.ops.stream_put) 1719 if (ice->spdif.ops.stream_put)
1717 return ice->spdif.ops.stream_put(ice, ucontrol); 1720 return ice->spdif.ops.stream_put(ice, ucontrol);
1718 return 0; 1721 return 0;
1719} 1722}
1720 1723
1721static snd_kcontrol_new_t snd_ice1712_spdif_stream __devinitdata = 1724static struct snd_kcontrol_new snd_ice1712_spdif_stream __devinitdata =
1722{ 1725{
1723 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_INACTIVE, 1726 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
1727 SNDRV_CTL_ELEM_ACCESS_INACTIVE),
1724 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1728 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1725 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), 1729 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM),
1726 .info = snd_ice1712_spdif_info, 1730 .info = snd_ice1712_spdif_info,
@@ -1728,7 +1732,8 @@ static snd_kcontrol_new_t snd_ice1712_spdif_stream __devinitdata =
1728 .put = snd_ice1712_spdif_stream_put 1732 .put = snd_ice1712_spdif_stream_put
1729}; 1733};
1730 1734
1731int snd_ice1712_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1735int snd_ice1712_gpio_info(struct snd_kcontrol *kcontrol,
1736 struct snd_ctl_elem_info *uinfo)
1732{ 1737{
1733 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1738 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1734 uinfo->count = 1; 1739 uinfo->count = 1;
@@ -1737,21 +1742,24 @@ int snd_ice1712_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
1737 return 0; 1742 return 0;
1738} 1743}
1739 1744
1740int snd_ice1712_gpio_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1745int snd_ice1712_gpio_get(struct snd_kcontrol *kcontrol,
1746 struct snd_ctl_elem_value *ucontrol)
1741{ 1747{
1742 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1748 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1743 unsigned char mask = kcontrol->private_value & 0xff; 1749 unsigned char mask = kcontrol->private_value & 0xff;
1744 int invert = (kcontrol->private_value & (1<<24)) ? 1 : 0; 1750 int invert = (kcontrol->private_value & (1<<24)) ? 1 : 0;
1745 1751
1746 snd_ice1712_save_gpio_status(ice); 1752 snd_ice1712_save_gpio_status(ice);
1747 ucontrol->value.integer.value[0] = (snd_ice1712_gpio_read(ice) & mask ? 1 : 0) ^ invert; 1753 ucontrol->value.integer.value[0] =
1754 (snd_ice1712_gpio_read(ice) & mask ? 1 : 0) ^ invert;
1748 snd_ice1712_restore_gpio_status(ice); 1755 snd_ice1712_restore_gpio_status(ice);
1749 return 0; 1756 return 0;
1750} 1757}
1751 1758
1752int snd_ice1712_gpio_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1759int snd_ice1712_gpio_put(struct snd_kcontrol *kcontrol,
1760 struct snd_ctl_elem_value *ucontrol)
1753{ 1761{
1754 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1762 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1755 unsigned char mask = kcontrol->private_value & 0xff; 1763 unsigned char mask = kcontrol->private_value & 0xff;
1756 int invert = (kcontrol->private_value & (1<<24)) ? mask : 0; 1764 int invert = (kcontrol->private_value & (1<<24)) ? mask : 0;
1757 unsigned int val, nval; 1765 unsigned int val, nval;
@@ -1771,7 +1779,8 @@ int snd_ice1712_gpio_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucont
1771/* 1779/*
1772 * rate 1780 * rate
1773 */ 1781 */
1774static int snd_ice1712_pro_internal_clock_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1782static int snd_ice1712_pro_internal_clock_info(struct snd_kcontrol *kcontrol,
1783 struct snd_ctl_elem_info *uinfo)
1775{ 1784{
1776 static char *texts[] = { 1785 static char *texts[] = {
1777 "8000", /* 0: 6 */ 1786 "8000", /* 0: 6 */
@@ -1798,9 +1807,10 @@ static int snd_ice1712_pro_internal_clock_info(snd_kcontrol_t *kcontrol, snd_ctl
1798 return 0; 1807 return 0;
1799} 1808}
1800 1809
1801static int snd_ice1712_pro_internal_clock_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1810static int snd_ice1712_pro_internal_clock_get(struct snd_kcontrol *kcontrol,
1811 struct snd_ctl_elem_value *ucontrol)
1802{ 1812{
1803 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1813 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1804 static unsigned char xlate[16] = { 1814 static unsigned char xlate[16] = {
1805 9, 6, 3, 1, 7, 4, 0, 12, 8, 5, 2, 11, 255, 255, 255, 10 1815 9, 6, 3, 1, 7, 4, 0, 12, 8, 5, 2, 11, 255, 255, 255, 10
1806 }; 1816 };
@@ -1821,9 +1831,10 @@ static int snd_ice1712_pro_internal_clock_get(snd_kcontrol_t * kcontrol, snd_ctl
1821 return 0; 1831 return 0;
1822} 1832}
1823 1833
1824static int snd_ice1712_pro_internal_clock_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1834static int snd_ice1712_pro_internal_clock_put(struct snd_kcontrol *kcontrol,
1835 struct snd_ctl_elem_value *ucontrol)
1825{ 1836{
1826 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1837 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1827 static unsigned int xrate[13] = { 1838 static unsigned int xrate[13] = {
1828 8000, 9600, 11025, 12000, 1600, 22050, 24000, 1839 8000, 9600, 11025, 12000, 1600, 22050, 24000,
1829 32000, 44100, 48000, 64000, 88200, 96000 1840 32000, 44100, 48000, 64000, 88200, 96000
@@ -1844,7 +1855,8 @@ static int snd_ice1712_pro_internal_clock_put(snd_kcontrol_t * kcontrol, snd_ctl
1844 change = inb(ICEMT(ice, RATE)) != oval; 1855 change = inb(ICEMT(ice, RATE)) != oval;
1845 spin_unlock_irq(&ice->reg_lock); 1856 spin_unlock_irq(&ice->reg_lock);
1846 1857
1847 if ((oval & ICE1712_SPDIF_MASTER) != (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER)) { 1858 if ((oval & ICE1712_SPDIF_MASTER) !=
1859 (inb(ICEMT(ice, RATE)) & ICE1712_SPDIF_MASTER)) {
1848 /* change CS8427 clock source too */ 1860 /* change CS8427 clock source too */
1849 if (ice->cs8427) { 1861 if (ice->cs8427) {
1850 snd_ice1712_cs8427_set_input_clock(ice, is_spdif_master(ice)); 1862 snd_ice1712_cs8427_set_input_clock(ice, is_spdif_master(ice));
@@ -1862,7 +1874,7 @@ static int snd_ice1712_pro_internal_clock_put(snd_kcontrol_t * kcontrol, snd_ctl
1862 return change; 1874 return change;
1863} 1875}
1864 1876
1865static snd_kcontrol_new_t snd_ice1712_pro_internal_clock __devinitdata = { 1877static struct snd_kcontrol_new snd_ice1712_pro_internal_clock __devinitdata = {
1866 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1878 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1867 .name = "Multi Track Internal Clock", 1879 .name = "Multi Track Internal Clock",
1868 .info = snd_ice1712_pro_internal_clock_info, 1880 .info = snd_ice1712_pro_internal_clock_info,
@@ -1870,7 +1882,8 @@ static snd_kcontrol_new_t snd_ice1712_pro_internal_clock __devinitdata = {
1870 .put = snd_ice1712_pro_internal_clock_put 1882 .put = snd_ice1712_pro_internal_clock_put
1871}; 1883};
1872 1884
1873static int snd_ice1712_pro_internal_clock_default_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1885static int snd_ice1712_pro_internal_clock_default_info(struct snd_kcontrol *kcontrol,
1886 struct snd_ctl_elem_info *uinfo)
1874{ 1887{
1875 static char *texts[] = { 1888 static char *texts[] = {
1876 "8000", /* 0: 6 */ 1889 "8000", /* 0: 6 */
@@ -1897,7 +1910,8 @@ static int snd_ice1712_pro_internal_clock_default_info(snd_kcontrol_t *kcontrol,
1897 return 0; 1910 return 0;
1898} 1911}
1899 1912
1900static int snd_ice1712_pro_internal_clock_default_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1913static int snd_ice1712_pro_internal_clock_default_get(struct snd_kcontrol *kcontrol,
1914 struct snd_ctl_elem_value *ucontrol)
1901{ 1915{
1902 int val; 1916 int val;
1903 static unsigned int xrate[13] = { 1917 static unsigned int xrate[13] = {
@@ -1914,7 +1928,8 @@ static int snd_ice1712_pro_internal_clock_default_get(snd_kcontrol_t * kcontrol,
1914 return 0; 1928 return 0;
1915} 1929}
1916 1930
1917static int snd_ice1712_pro_internal_clock_default_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1931static int snd_ice1712_pro_internal_clock_default_put(struct snd_kcontrol *kcontrol,
1932 struct snd_ctl_elem_value *ucontrol)
1918{ 1933{
1919 static unsigned int xrate[13] = { 1934 static unsigned int xrate[13] = {
1920 8000, 9600, 11025, 12000, 1600, 22050, 24000, 1935 8000, 9600, 11025, 12000, 1600, 22050, 24000,
@@ -1930,7 +1945,7 @@ static int snd_ice1712_pro_internal_clock_default_put(snd_kcontrol_t * kcontrol,
1930 return change; 1945 return change;
1931} 1946}
1932 1947
1933static snd_kcontrol_new_t snd_ice1712_pro_internal_clock_default __devinitdata = { 1948static struct snd_kcontrol_new snd_ice1712_pro_internal_clock_default __devinitdata = {
1934 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1949 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1935 .name = "Multi Track Internal Clock Default", 1950 .name = "Multi Track Internal Clock Default",
1936 .info = snd_ice1712_pro_internal_clock_default_info, 1951 .info = snd_ice1712_pro_internal_clock_default_info,
@@ -1938,7 +1953,8 @@ static snd_kcontrol_new_t snd_ice1712_pro_internal_clock_default __devinitdata =
1938 .put = snd_ice1712_pro_internal_clock_default_put 1953 .put = snd_ice1712_pro_internal_clock_default_put
1939}; 1954};
1940 1955
1941static int snd_ice1712_pro_rate_locking_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1956static int snd_ice1712_pro_rate_locking_info(struct snd_kcontrol *kcontrol,
1957 struct snd_ctl_elem_info *uinfo)
1942{ 1958{
1943 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1959 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1944 uinfo->count = 1; 1960 uinfo->count = 1;
@@ -1947,15 +1963,17 @@ static int snd_ice1712_pro_rate_locking_info(snd_kcontrol_t *kcontrol, snd_ctl_e
1947 return 0; 1963 return 0;
1948} 1964}
1949 1965
1950static int snd_ice1712_pro_rate_locking_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1966static int snd_ice1712_pro_rate_locking_get(struct snd_kcontrol *kcontrol,
1967 struct snd_ctl_elem_value *ucontrol)
1951{ 1968{
1952 ucontrol->value.integer.value[0] = PRO_RATE_LOCKED; 1969 ucontrol->value.integer.value[0] = PRO_RATE_LOCKED;
1953 return 0; 1970 return 0;
1954} 1971}
1955 1972
1956static int snd_ice1712_pro_rate_locking_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1973static int snd_ice1712_pro_rate_locking_put(struct snd_kcontrol *kcontrol,
1974 struct snd_ctl_elem_value *ucontrol)
1957{ 1975{
1958 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1976 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1959 int change = 0, nval; 1977 int change = 0, nval;
1960 1978
1961 nval = ucontrol->value.integer.value[0] ? 1 : 0; 1979 nval = ucontrol->value.integer.value[0] ? 1 : 0;
@@ -1966,7 +1984,7 @@ static int snd_ice1712_pro_rate_locking_put(snd_kcontrol_t * kcontrol, snd_ctl_e
1966 return change; 1984 return change;
1967} 1985}
1968 1986
1969static snd_kcontrol_new_t snd_ice1712_pro_rate_locking __devinitdata = { 1987static struct snd_kcontrol_new snd_ice1712_pro_rate_locking __devinitdata = {
1970 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1988 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1971 .name = "Multi Track Rate Locking", 1989 .name = "Multi Track Rate Locking",
1972 .info = snd_ice1712_pro_rate_locking_info, 1990 .info = snd_ice1712_pro_rate_locking_info,
@@ -1974,7 +1992,8 @@ static snd_kcontrol_new_t snd_ice1712_pro_rate_locking __devinitdata = {
1974 .put = snd_ice1712_pro_rate_locking_put 1992 .put = snd_ice1712_pro_rate_locking_put
1975}; 1993};
1976 1994
1977static int snd_ice1712_pro_rate_reset_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1995static int snd_ice1712_pro_rate_reset_info(struct snd_kcontrol *kcontrol,
1996 struct snd_ctl_elem_info *uinfo)
1978{ 1997{
1979 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1998 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1980 uinfo->count = 1; 1999 uinfo->count = 1;
@@ -1983,15 +2002,17 @@ static int snd_ice1712_pro_rate_reset_info(snd_kcontrol_t *kcontrol, snd_ctl_ele
1983 return 0; 2002 return 0;
1984} 2003}
1985 2004
1986static int snd_ice1712_pro_rate_reset_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2005static int snd_ice1712_pro_rate_reset_get(struct snd_kcontrol *kcontrol,
2006 struct snd_ctl_elem_value *ucontrol)
1987{ 2007{
1988 ucontrol->value.integer.value[0] = PRO_RATE_RESET; 2008 ucontrol->value.integer.value[0] = PRO_RATE_RESET;
1989 return 0; 2009 return 0;
1990} 2010}
1991 2011
1992static int snd_ice1712_pro_rate_reset_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2012static int snd_ice1712_pro_rate_reset_put(struct snd_kcontrol *kcontrol,
2013 struct snd_ctl_elem_value *ucontrol)
1993{ 2014{
1994 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2015 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1995 int change = 0, nval; 2016 int change = 0, nval;
1996 2017
1997 nval = ucontrol->value.integer.value[0] ? 1 : 0; 2018 nval = ucontrol->value.integer.value[0] ? 1 : 0;
@@ -2002,7 +2023,7 @@ static int snd_ice1712_pro_rate_reset_put(snd_kcontrol_t * kcontrol, snd_ctl_ele
2002 return change; 2023 return change;
2003} 2024}
2004 2025
2005static snd_kcontrol_new_t snd_ice1712_pro_rate_reset __devinitdata = { 2026static struct snd_kcontrol_new snd_ice1712_pro_rate_reset __devinitdata = {
2006 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2027 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2007 .name = "Multi Track Rate Reset", 2028 .name = "Multi Track Rate Reset",
2008 .info = snd_ice1712_pro_rate_reset_info, 2029 .info = snd_ice1712_pro_rate_reset_info,
@@ -2013,7 +2034,8 @@ static snd_kcontrol_new_t snd_ice1712_pro_rate_reset __devinitdata = {
2013/* 2034/*
2014 * routing 2035 * routing
2015 */ 2036 */
2016static int snd_ice1712_pro_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 2037static int snd_ice1712_pro_route_info(struct snd_kcontrol *kcontrol,
2038 struct snd_ctl_elem_info *uinfo)
2017{ 2039{
2018 static char *texts[] = { 2040 static char *texts[] = {
2019 "PCM Out", /* 0 */ 2041 "PCM Out", /* 0 */
@@ -2025,16 +2047,18 @@ static int snd_ice1712_pro_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_inf
2025 2047
2026 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 2048 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
2027 uinfo->count = 1; 2049 uinfo->count = 1;
2028 uinfo->value.enumerated.items = snd_ctl_get_ioffidx(kcontrol, &uinfo->id) < 2 ? 12 : 11; 2050 uinfo->value.enumerated.items =
2051 snd_ctl_get_ioffidx(kcontrol, &uinfo->id) < 2 ? 12 : 11;
2029 if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items) 2052 if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
2030 uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1; 2053 uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
2031 strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); 2054 strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
2032 return 0; 2055 return 0;
2033} 2056}
2034 2057
2035static int snd_ice1712_pro_route_analog_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 2058static int snd_ice1712_pro_route_analog_get(struct snd_kcontrol *kcontrol,
2059 struct snd_ctl_elem_value *ucontrol)
2036{ 2060{
2037 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2061 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2038 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2062 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
2039 unsigned int val, cval; 2063 unsigned int val, cval;
2040 2064
@@ -2057,9 +2081,10 @@ static int snd_ice1712_pro_route_analog_get(snd_kcontrol_t * kcontrol, snd_ctl_e
2057 return 0; 2081 return 0;
2058} 2082}
2059 2083
2060static int snd_ice1712_pro_route_analog_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 2084static int snd_ice1712_pro_route_analog_put(struct snd_kcontrol *kcontrol,
2085 struct snd_ctl_elem_value *ucontrol)
2061{ 2086{
2062 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2087 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2063 int change, shift; 2088 int change, shift;
2064 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2089 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
2065 unsigned int val, old_val, nval; 2090 unsigned int val, old_val, nval;
@@ -2106,9 +2131,10 @@ static int snd_ice1712_pro_route_analog_put(snd_kcontrol_t * kcontrol, snd_ctl_e
2106 return change; 2131 return change;
2107} 2132}
2108 2133
2109static int snd_ice1712_pro_route_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 2134static int snd_ice1712_pro_route_spdif_get(struct snd_kcontrol *kcontrol,
2135 struct snd_ctl_elem_value *ucontrol)
2110{ 2136{
2111 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2137 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2112 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2138 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
2113 unsigned int val, cval; 2139 unsigned int val, cval;
2114 val = inw(ICEMT(ice, ROUTE_SPDOUT)); 2140 val = inw(ICEMT(ice, ROUTE_SPDOUT));
@@ -2125,9 +2151,10 @@ static int snd_ice1712_pro_route_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_el
2125 return 0; 2151 return 0;
2126} 2152}
2127 2153
2128static int snd_ice1712_pro_route_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 2154static int snd_ice1712_pro_route_spdif_put(struct snd_kcontrol *kcontrol,
2155 struct snd_ctl_elem_value *ucontrol)
2129{ 2156{
2130 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2157 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2131 int change, shift; 2158 int change, shift;
2132 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2159 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
2133 unsigned int val, old_val, nval; 2160 unsigned int val, old_val, nval;
@@ -2163,7 +2190,7 @@ static int snd_ice1712_pro_route_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_el
2163 return change; 2190 return change;
2164} 2191}
2165 2192
2166static snd_kcontrol_new_t snd_ice1712_mixer_pro_analog_route __devinitdata = { 2193static struct snd_kcontrol_new snd_ice1712_mixer_pro_analog_route __devinitdata = {
2167 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2194 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2168 .name = "H/W Playback Route", 2195 .name = "H/W Playback Route",
2169 .info = snd_ice1712_pro_route_info, 2196 .info = snd_ice1712_pro_route_info,
@@ -2171,7 +2198,7 @@ static snd_kcontrol_new_t snd_ice1712_mixer_pro_analog_route __devinitdata = {
2171 .put = snd_ice1712_pro_route_analog_put, 2198 .put = snd_ice1712_pro_route_analog_put,
2172}; 2199};
2173 2200
2174static snd_kcontrol_new_t snd_ice1712_mixer_pro_spdif_route __devinitdata = { 2201static struct snd_kcontrol_new snd_ice1712_mixer_pro_spdif_route __devinitdata = {
2175 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2202 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2176 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route", 2203 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
2177 .info = snd_ice1712_pro_route_info, 2204 .info = snd_ice1712_pro_route_info,
@@ -2181,7 +2208,8 @@ static snd_kcontrol_new_t snd_ice1712_mixer_pro_spdif_route __devinitdata = {
2181}; 2208};
2182 2209
2183 2210
2184static int snd_ice1712_pro_volume_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 2211static int snd_ice1712_pro_volume_rate_info(struct snd_kcontrol *kcontrol,
2212 struct snd_ctl_elem_info *uinfo)
2185{ 2213{
2186 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 2214 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
2187 uinfo->count = 1; 2215 uinfo->count = 1;
@@ -2190,17 +2218,19 @@ static int snd_ice1712_pro_volume_rate_info(snd_kcontrol_t *kcontrol, snd_ctl_el
2190 return 0; 2218 return 0;
2191} 2219}
2192 2220
2193static int snd_ice1712_pro_volume_rate_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2221static int snd_ice1712_pro_volume_rate_get(struct snd_kcontrol *kcontrol,
2222 struct snd_ctl_elem_value *ucontrol)
2194{ 2223{
2195 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2224 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2196 2225
2197 ucontrol->value.integer.value[0] = inb(ICEMT(ice, MONITOR_RATE)); 2226 ucontrol->value.integer.value[0] = inb(ICEMT(ice, MONITOR_RATE));
2198 return 0; 2227 return 0;
2199} 2228}
2200 2229
2201static int snd_ice1712_pro_volume_rate_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2230static int snd_ice1712_pro_volume_rate_put(struct snd_kcontrol *kcontrol,
2231 struct snd_ctl_elem_value *ucontrol)
2202{ 2232{
2203 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2233 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2204 int change; 2234 int change;
2205 2235
2206 spin_lock_irq(&ice->reg_lock); 2236 spin_lock_irq(&ice->reg_lock);
@@ -2210,7 +2240,7 @@ static int snd_ice1712_pro_volume_rate_put(snd_kcontrol_t * kcontrol, snd_ctl_el
2210 return change; 2240 return change;
2211} 2241}
2212 2242
2213static snd_kcontrol_new_t snd_ice1712_mixer_pro_volume_rate __devinitdata = { 2243static struct snd_kcontrol_new snd_ice1712_mixer_pro_volume_rate __devinitdata = {
2214 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2244 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2215 .name = "Multi Track Volume Rate", 2245 .name = "Multi Track Volume Rate",
2216 .info = snd_ice1712_pro_volume_rate_info, 2246 .info = snd_ice1712_pro_volume_rate_info,
@@ -2218,7 +2248,8 @@ static snd_kcontrol_new_t snd_ice1712_mixer_pro_volume_rate __devinitdata = {
2218 .put = snd_ice1712_pro_volume_rate_put 2248 .put = snd_ice1712_pro_volume_rate_put
2219}; 2249};
2220 2250
2221static int snd_ice1712_pro_peak_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 2251static int snd_ice1712_pro_peak_info(struct snd_kcontrol *kcontrol,
2252 struct snd_ctl_elem_info *uinfo)
2222{ 2253{
2223 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 2254 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
2224 uinfo->count = 22; 2255 uinfo->count = 22;
@@ -2227,9 +2258,10 @@ static int snd_ice1712_pro_peak_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info
2227 return 0; 2258 return 0;
2228} 2259}
2229 2260
2230static int snd_ice1712_pro_peak_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 2261static int snd_ice1712_pro_peak_get(struct snd_kcontrol *kcontrol,
2262 struct snd_ctl_elem_value *ucontrol)
2231{ 2263{
2232 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 2264 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
2233 int idx; 2265 int idx;
2234 2266
2235 spin_lock_irq(&ice->reg_lock); 2267 spin_lock_irq(&ice->reg_lock);
@@ -2241,7 +2273,7 @@ static int snd_ice1712_pro_peak_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
2241 return 0; 2273 return 0;
2242} 2274}
2243 2275
2244static snd_kcontrol_new_t snd_ice1712_mixer_pro_peak __devinitdata = { 2276static struct snd_kcontrol_new snd_ice1712_mixer_pro_peak __devinitdata = {
2245 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2277 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
2246 .name = "Multi Track Peak", 2278 .name = "Multi Track Peak",
2247 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 2279 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
@@ -2263,7 +2295,7 @@ static struct snd_ice1712_card_info *card_tables[] __devinitdata = {
2263 NULL, 2295 NULL,
2264}; 2296};
2265 2297
2266static unsigned char __devinit snd_ice1712_read_i2c(ice1712_t *ice, 2298static unsigned char __devinit snd_ice1712_read_i2c(struct snd_ice1712 *ice,
2267 unsigned char dev, 2299 unsigned char dev,
2268 unsigned char addr) 2300 unsigned char addr)
2269{ 2301{
@@ -2275,7 +2307,8 @@ static unsigned char __devinit snd_ice1712_read_i2c(ice1712_t *ice,
2275 return inb(ICEREG(ice, I2C_DATA)); 2307 return inb(ICEREG(ice, I2C_DATA));
2276} 2308}
2277 2309
2278static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelname) 2310static int __devinit snd_ice1712_read_eeprom(struct snd_ice1712 *ice,
2311 const char *modelname)
2279{ 2312{
2280 int dev = 0xa0; /* EEPROM device address */ 2313 int dev = 0xa0; /* EEPROM device address */
2281 unsigned int i, size; 2314 unsigned int i, size;
@@ -2288,7 +2321,8 @@ static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelna
2288 (snd_ice1712_read_i2c(ice, dev, 0x01) << 8) | 2321 (snd_ice1712_read_i2c(ice, dev, 0x01) << 8) |
2289 (snd_ice1712_read_i2c(ice, dev, 0x02) << 16) | 2322 (snd_ice1712_read_i2c(ice, dev, 0x02) << 16) |
2290 (snd_ice1712_read_i2c(ice, dev, 0x03) << 24); 2323 (snd_ice1712_read_i2c(ice, dev, 0x03) << 24);
2291 if (ice->eeprom.subvendor == 0 || ice->eeprom.subvendor == (unsigned int)-1) { 2324 if (ice->eeprom.subvendor == 0 ||
2325 ice->eeprom.subvendor == (unsigned int)-1) {
2292 /* invalid subvendor from EEPROM, try the PCI subststem ID instead */ 2326 /* invalid subvendor from EEPROM, try the PCI subststem ID instead */
2293 u16 vendor, device; 2327 u16 vendor, device;
2294 pci_read_config_word(ice->pci, PCI_SUBSYSTEM_VENDOR_ID, &vendor); 2328 pci_read_config_word(ice->pci, PCI_SUBSYSTEM_VENDOR_ID, &vendor);
@@ -2317,7 +2351,8 @@ static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelna
2317 goto read_skipped; 2351 goto read_skipped;
2318 } 2352 }
2319 } 2353 }
2320 printk(KERN_WARNING "ice1712: No matching model found for ID 0x%x\n", ice->eeprom.subvendor); 2354 printk(KERN_WARNING "ice1712: No matching model found for ID 0x%x\n",
2355 ice->eeprom.subvendor);
2321 2356
2322 found: 2357 found:
2323 ice->eeprom.size = snd_ice1712_read_i2c(ice, dev, 0x04); 2358 ice->eeprom.size = snd_ice1712_read_i2c(ice, dev, 0x04);
@@ -2329,7 +2364,8 @@ static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelna
2329 } 2364 }
2330 ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05); 2365 ice->eeprom.version = snd_ice1712_read_i2c(ice, dev, 0x05);
2331 if (ice->eeprom.version != 1) { 2366 if (ice->eeprom.version != 1) {
2332 snd_printk(KERN_ERR "invalid EEPROM version %i\n", ice->eeprom.version); 2367 snd_printk(KERN_ERR "invalid EEPROM version %i\n",
2368 ice->eeprom.version);
2333 /* return -EIO; */ 2369 /* return -EIO; */
2334 } 2370 }
2335 size = ice->eeprom.size - 6; 2371 size = ice->eeprom.size - 6;
@@ -2346,7 +2382,7 @@ static int __devinit snd_ice1712_read_eeprom(ice1712_t *ice, const char *modelna
2346 2382
2347 2383
2348 2384
2349static int __devinit snd_ice1712_chip_init(ice1712_t *ice) 2385static int __devinit snd_ice1712_chip_init(struct snd_ice1712 *ice)
2350{ 2386{
2351 outb(ICE1712_RESET | ICE1712_NATIVE, ICEREG(ice, CONTROL)); 2387 outb(ICE1712_RESET | ICE1712_NATIVE, ICEREG(ice, CONTROL));
2352 udelay(200); 2388 udelay(200);
@@ -2359,15 +2395,19 @@ static int __devinit snd_ice1712_chip_init(ice1712_t *ice)
2359 if (ice->eeprom.subvendor != ICE1712_SUBDEVICE_STDSP24) { 2395 if (ice->eeprom.subvendor != ICE1712_SUBDEVICE_STDSP24) {
2360 ice->gpio.write_mask = ice->eeprom.gpiomask; 2396 ice->gpio.write_mask = ice->eeprom.gpiomask;
2361 ice->gpio.direction = ice->eeprom.gpiodir; 2397 ice->gpio.direction = ice->eeprom.gpiodir;
2362 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, ice->eeprom.gpiomask); 2398 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK,
2363 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, ice->eeprom.gpiodir); 2399 ice->eeprom.gpiomask);
2364 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ice->eeprom.gpiostate); 2400 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION,
2401 ice->eeprom.gpiodir);
2402 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA,
2403 ice->eeprom.gpiostate);
2365 } else { 2404 } else {
2366 ice->gpio.write_mask = 0xc0; 2405 ice->gpio.write_mask = 0xc0;
2367 ice->gpio.direction = 0xff; 2406 ice->gpio.direction = 0xff;
2368 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, 0xc0); 2407 snd_ice1712_write(ice, ICE1712_IREG_GPIO_WRITE_MASK, 0xc0);
2369 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, 0xff); 2408 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DIRECTION, 0xff);
2370 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA, ICE1712_STDSP24_CLOCK_BIT); 2409 snd_ice1712_write(ice, ICE1712_IREG_GPIO_DATA,
2410 ICE1712_STDSP24_CLOCK_BIT);
2371 } 2411 }
2372 snd_ice1712_write(ice, ICE1712_IREG_PRO_POWERDOWN, 0); 2412 snd_ice1712_write(ice, ICE1712_IREG_PRO_POWERDOWN, 0);
2373 if (!(ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97)) { 2413 if (!(ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97)) {
@@ -2382,10 +2422,10 @@ static int __devinit snd_ice1712_chip_init(ice1712_t *ice)
2382 return 0; 2422 return 0;
2383} 2423}
2384 2424
2385int __devinit snd_ice1712_spdif_build_controls(ice1712_t *ice) 2425int __devinit snd_ice1712_spdif_build_controls(struct snd_ice1712 *ice)
2386{ 2426{
2387 int err; 2427 int err;
2388 snd_kcontrol_t *kctl; 2428 struct snd_kcontrol *kctl;
2389 2429
2390 snd_assert(ice->pcm_pro != NULL, return -EIO); 2430 snd_assert(ice->pcm_pro != NULL, return -EIO);
2391 err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_default, ice)); 2431 err = snd_ctl_add(ice->card, kctl = snd_ctl_new1(&snd_ice1712_spdif_default, ice));
@@ -2409,7 +2449,7 @@ int __devinit snd_ice1712_spdif_build_controls(ice1712_t *ice)
2409} 2449}
2410 2450
2411 2451
2412static int __devinit snd_ice1712_build_controls(ice1712_t *ice) 2452static int __devinit snd_ice1712_build_controls(struct snd_ice1712 *ice)
2413{ 2453{
2414 int err; 2454 int err;
2415 2455
@@ -2431,7 +2471,7 @@ static int __devinit snd_ice1712_build_controls(ice1712_t *ice)
2431 return err; 2471 return err;
2432 2472
2433 if (ice->num_total_dacs > 0) { 2473 if (ice->num_total_dacs > 0) {
2434 snd_kcontrol_new_t tmp = snd_ice1712_mixer_pro_analog_route; 2474 struct snd_kcontrol_new tmp = snd_ice1712_mixer_pro_analog_route;
2435 tmp.count = ice->num_total_dacs; 2475 tmp.count = ice->num_total_dacs;
2436 err = snd_ctl_add(ice->card, snd_ctl_new1(&tmp, ice)); 2476 err = snd_ctl_add(ice->card, snd_ctl_new1(&tmp, ice));
2437 if (err < 0) 2477 if (err < 0)
@@ -2452,7 +2492,7 @@ static int __devinit snd_ice1712_build_controls(ice1712_t *ice)
2452 return 0; 2492 return 0;
2453} 2493}
2454 2494
2455static int snd_ice1712_free(ice1712_t *ice) 2495static int snd_ice1712_free(struct snd_ice1712 *ice)
2456{ 2496{
2457 if (! ice->port) 2497 if (! ice->port)
2458 goto __hw_end; 2498 goto __hw_end;
@@ -2463,7 +2503,7 @@ static int snd_ice1712_free(ice1712_t *ice)
2463 __hw_end: 2503 __hw_end:
2464 if (ice->irq >= 0) { 2504 if (ice->irq >= 0) {
2465 synchronize_irq(ice->irq); 2505 synchronize_irq(ice->irq);
2466 free_irq(ice->irq, (void *) ice); 2506 free_irq(ice->irq, ice);
2467 } 2507 }
2468 if (ice->port) 2508 if (ice->port)
2469 pci_release_regions(ice->pci); 2509 pci_release_regions(ice->pci);
@@ -2473,22 +2513,22 @@ static int snd_ice1712_free(ice1712_t *ice)
2473 return 0; 2513 return 0;
2474} 2514}
2475 2515
2476static int snd_ice1712_dev_free(snd_device_t *device) 2516static int snd_ice1712_dev_free(struct snd_device *device)
2477{ 2517{
2478 ice1712_t *ice = device->device_data; 2518 struct snd_ice1712 *ice = device->device_data;
2479 return snd_ice1712_free(ice); 2519 return snd_ice1712_free(ice);
2480} 2520}
2481 2521
2482static int __devinit snd_ice1712_create(snd_card_t * card, 2522static int __devinit snd_ice1712_create(struct snd_card *card,
2483 struct pci_dev *pci, 2523 struct pci_dev *pci,
2484 const char *modelname, 2524 const char *modelname,
2485 int omni, 2525 int omni,
2486 int cs8427_timeout, 2526 int cs8427_timeout,
2487 ice1712_t ** r_ice1712) 2527 struct snd_ice1712 ** r_ice1712)
2488{ 2528{
2489 ice1712_t *ice; 2529 struct snd_ice1712 *ice;
2490 int err; 2530 int err;
2491 static snd_device_ops_t ops = { 2531 static struct snd_device_ops ops = {
2492 .dev_free = snd_ice1712_dev_free, 2532 .dev_free = snd_ice1712_dev_free,
2493 }; 2533 };
2494 2534
@@ -2548,7 +2588,8 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
2548 ice->dmapath_port = pci_resource_start(pci, 2); 2588 ice->dmapath_port = pci_resource_start(pci, 2);
2549 ice->profi_port = pci_resource_start(pci, 3); 2589 ice->profi_port = pci_resource_start(pci, 3);
2550 2590
2551 if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) { 2591 if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ,
2592 "ICE1712", ice)) {
2552 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2593 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2553 snd_ice1712_free(ice); 2594 snd_ice1712_free(ice);
2554 return -EIO; 2595 return -EIO;
@@ -2566,8 +2607,10 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
2566 } 2607 }
2567 2608
2568 /* unmask used interrupts */ 2609 /* unmask used interrupts */
2569 outb((ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) == 0 ? ICE1712_IRQ_MPU2 : 0 | 2610 outb(((ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_2xMPU401) == 0 ?
2570 (ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97) ? ICE1712_IRQ_PBKDS | ICE1712_IRQ_CONCAP | ICE1712_IRQ_CONPBK : 0, 2611 ICE1712_IRQ_MPU2 : 0) |
2612 ((ice->eeprom.data[ICE_EEP1_CODEC] & ICE1712_CFG_NO_CON_AC97) ?
2613 ICE1712_IRQ_PBKDS | ICE1712_IRQ_CONCAP | ICE1712_IRQ_CONPBK : 0),
2571 ICEREG(ice, IRQMASK)); 2614 ICEREG(ice, IRQMASK));
2572 outb(0x00, ICEMT(ice, IRQ)); 2615 outb(0x00, ICEMT(ice, IRQ));
2573 2616
@@ -2595,8 +2638,8 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2595 const struct pci_device_id *pci_id) 2638 const struct pci_device_id *pci_id)
2596{ 2639{
2597 static int dev; 2640 static int dev;
2598 snd_card_t *card; 2641 struct snd_card *card;
2599 ice1712_t *ice; 2642 struct snd_ice1712 *ice;
2600 int pcm_dev = 0, err; 2643 int pcm_dev = 0, err;
2601 struct snd_ice1712_card_info **tbl, *c; 2644 struct snd_ice1712_card_info **tbl, *c;
2602 2645
@@ -2614,7 +2657,8 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
2614 strcpy(card->driver, "ICE1712"); 2657 strcpy(card->driver, "ICE1712");
2615 strcpy(card->shortname, "ICEnsemble ICE1712"); 2658 strcpy(card->shortname, "ICEnsemble ICE1712");
2616 2659
2617 if ((err = snd_ice1712_create(card, pci, model[dev], omni[dev], cs8427_timeout[dev], &ice)) < 0) { 2660 if ((err = snd_ice1712_create(card, pci, model[dev], omni[dev],
2661 cs8427_timeout[dev], &ice)) < 0) {
2618 snd_card_free(card); 2662 snd_card_free(card);
2619 return err; 2663 return err;
2620 } 2664 }