aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:00:18 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:19:13 -0500
commitab0c7d72c32d703d1a2833ce2a1920cd3b46b131 (patch)
tree6d5ed4991fd9b463fa929899af0ddf0cde158def
parent6ca308d4edd51c4f34ffff94ae0bbf193087d89f (diff)
[ALSA] Remove xxx_t typedefs: PCI ICE1724
Modules: ICE1724 driver,ICE1712 driver Remove xxx_t typedefs from the PCI ICE1724 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ice1712/amp.c6
-rw-r--r--sound/pci/ice1712/aureon.c242
-rw-r--r--sound/pci/ice1712/envy24ht.h4
-rw-r--r--sound/pci/ice1712/ice1724.c532
-rw-r--r--sound/pci/ice1712/juli.c24
-rw-r--r--sound/pci/ice1712/phase.c110
-rw-r--r--sound/pci/ice1712/pontis.c130
-rw-r--r--sound/pci/ice1712/prodigy192.c82
-rw-r--r--sound/pci/ice1712/revo.c16
-rw-r--r--sound/pci/ice1712/vt1720_mobo.c4
10 files changed, 617 insertions, 533 deletions
diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c
index 289b0b5711e4..59c4078ad331 100644
--- a/sound/pci/ice1712/amp.c
+++ b/sound/pci/ice1712/amp.c
@@ -33,14 +33,14 @@
33#include "envy24ht.h" 33#include "envy24ht.h"
34#include "amp.h" 34#include "amp.h"
35 35
36static void wm_put(ice1712_t *ice, int reg, unsigned short val) 36static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
37{ 37{
38 unsigned short cval; 38 unsigned short cval;
39 cval = (reg << 9) | val; 39 cval = (reg << 9) | val;
40 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); 40 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff);
41} 41}
42 42
43static int __devinit snd_vt1724_amp_init(ice1712_t *ice) 43static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice)
44{ 44{
45 static unsigned short wm_inits[] = { 45 static unsigned short wm_inits[] = {
46 WM_ATTEN_L, 0x0000, /* 0 db */ 46 WM_ATTEN_L, 0x0000, /* 0 db */
@@ -66,7 +66,7 @@ static int __devinit snd_vt1724_amp_init(ice1712_t *ice)
66 return 0; 66 return 0;
67} 67}
68 68
69static int __devinit snd_vt1724_amp_add_controls(ice1712_t *ice) 69static int __devinit snd_vt1724_amp_add_controls(struct snd_ice1712 *ice)
70{ 70{
71 /* we use pins 39 and 41 of the VT1616 for left and right read outputs */ 71 /* we use pins 39 and 41 of the VT1616 for left and right read outputs */
72 snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000); 72 snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index db12b038286b..8809812a1c22 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -22,7 +22,7 @@
22 * 22 *
23 * NOTES: 23 * NOTES:
24 * 24 *
25 * - we reuse the akm4xxx_t record for storing the wm8770 codec data. 25 * - we reuse the struct snd_akm4xxx record for storing the wm8770 codec data.
26 * both wm and akm codecs are pretty similar, so we can integrate 26 * both wm and akm codecs are pretty similar, so we can integrate
27 * both controls in the future, once if wm codecs are reused in 27 * both controls in the future, once if wm codecs are reused in
28 * many boards. 28 * many boards.
@@ -85,7 +85,7 @@
85#define CS8415_C_BUFFER 0x20 85#define CS8415_C_BUFFER 0x20
86#define CS8415_ID 0x7F 86#define CS8415_ID 0x7F
87 87
88static void aureon_ac97_write(ice1712_t *ice, unsigned short reg, unsigned short val) { 88static void aureon_ac97_write(struct snd_ice1712 *ice, unsigned short reg, unsigned short val) {
89 unsigned int tmp; 89 unsigned int tmp;
90 90
91 /* Send address to XILINX chip */ 91 /* Send address to XILINX chip */
@@ -136,7 +136,7 @@ static void aureon_ac97_write(ice1712_t *ice, unsigned short reg, unsigned short
136 ice->spec.aureon.stac9744[(reg & 0x7F) >> 1] = val; 136 ice->spec.aureon.stac9744[(reg & 0x7F) >> 1] = val;
137} 137}
138 138
139static unsigned short aureon_ac97_read(ice1712_t *ice, unsigned short reg) 139static unsigned short aureon_ac97_read(struct snd_ice1712 *ice, unsigned short reg)
140{ 140{
141 return ice->spec.aureon.stac9744[(reg & 0x7F) >> 1]; 141 return ice->spec.aureon.stac9744[(reg & 0x7F) >> 1];
142} 142}
@@ -144,7 +144,7 @@ static unsigned short aureon_ac97_read(ice1712_t *ice, unsigned short reg)
144/* 144/*
145 * Initialize STAC9744 chip 145 * Initialize STAC9744 chip
146 */ 146 */
147static int aureon_ac97_init (ice1712_t *ice) { 147static int aureon_ac97_init (struct snd_ice1712 *ice) {
148 int i; 148 int i;
149 static unsigned short ac97_defaults[] = { 149 static unsigned short ac97_defaults[] = {
150 0x00, 0x9640, 150 0x00, 0x9640,
@@ -196,7 +196,7 @@ static int aureon_ac97_init (ice1712_t *ice) {
196/* 196/*
197 * AC'97 volume controls 197 * AC'97 volume controls
198 */ 198 */
199static int aureon_ac97_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 199static int aureon_ac97_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
200{ 200{
201 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 201 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
202 uinfo->count = kcontrol->private_value & AUREON_AC97_STEREO ? 2 : 1; 202 uinfo->count = kcontrol->private_value & AUREON_AC97_STEREO ? 2 : 1;
@@ -205,9 +205,9 @@ static int aureon_ac97_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u
205 return 0; 205 return 0;
206} 206}
207 207
208static int aureon_ac97_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 208static int aureon_ac97_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
209{ 209{
210 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 210 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
211 unsigned short vol; 211 unsigned short vol;
212 212
213 down(&ice->gpio_mutex); 213 down(&ice->gpio_mutex);
@@ -221,9 +221,9 @@ static int aureon_ac97_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
221 return 0; 221 return 0;
222} 222}
223 223
224static int aureon_ac97_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 224static int aureon_ac97_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
225{ 225{
226 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 226 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
227 unsigned short ovol, nvol; 227 unsigned short ovol, nvol;
228 int change; 228 int change;
229 229
@@ -248,9 +248,9 @@ static int aureon_ac97_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
248 */ 248 */
249#define aureon_ac97_mute_info aureon_mono_bool_info 249#define aureon_ac97_mute_info aureon_mono_bool_info
250 250
251static int aureon_ac97_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 251static int aureon_ac97_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
252{ 252{
253 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 253 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
254 254
255 down(&ice->gpio_mutex); 255 down(&ice->gpio_mutex);
256 256
@@ -260,9 +260,9 @@ static int aureon_ac97_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
260 return 0; 260 return 0;
261} 261}
262 262
263static int aureon_ac97_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 263static int aureon_ac97_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
264{ 264{
265 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 265 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
266 unsigned short ovol, nvol; 266 unsigned short ovol, nvol;
267 int change; 267 int change;
268 268
@@ -284,9 +284,9 @@ static int aureon_ac97_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
284 */ 284 */
285#define aureon_ac97_micboost_info aureon_mono_bool_info 285#define aureon_ac97_micboost_info aureon_mono_bool_info
286 286
287static int aureon_ac97_micboost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 287static int aureon_ac97_micboost_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
288{ 288{
289 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 289 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
290 290
291 down(&ice->gpio_mutex); 291 down(&ice->gpio_mutex);
292 292
@@ -296,9 +296,9 @@ static int aureon_ac97_micboost_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value
296 return 0; 296 return 0;
297} 297}
298 298
299static int aureon_ac97_micboost_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 299static int aureon_ac97_micboost_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
300{ 300{
301 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 301 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
302 unsigned short ovol, nvol; 302 unsigned short ovol, nvol;
303 int change; 303 int change;
304 304
@@ -318,7 +318,7 @@ static int aureon_ac97_micboost_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu
318/* 318/*
319 * write data in the SPI mode 319 * write data in the SPI mode
320 */ 320 */
321static void aureon_spi_write(ice1712_t *ice, unsigned int cs, unsigned int data, int bits) 321static void aureon_spi_write(struct snd_ice1712 *ice, unsigned int cs, unsigned int data, int bits)
322{ 322{
323 unsigned int tmp; 323 unsigned int tmp;
324 int i; 324 int i;
@@ -359,7 +359,7 @@ static void aureon_spi_write(ice1712_t *ice, unsigned int cs, unsigned int data,
359/* 359/*
360 * Read data in SPI mode 360 * Read data in SPI mode
361 */ 361 */
362static void aureon_spi_read(ice1712_t *ice, unsigned int cs, unsigned int data, int bits, unsigned char *buffer, int size) { 362static void aureon_spi_read(struct snd_ice1712 *ice, unsigned int cs, unsigned int data, int bits, unsigned char *buffer, int size) {
363 int i, j; 363 int i, j;
364 unsigned int tmp; 364 unsigned int tmp;
365 365
@@ -409,26 +409,26 @@ static void aureon_spi_read(ice1712_t *ice, unsigned int cs, unsigned int data,
409 snd_ice1712_gpio_write(ice, tmp); 409 snd_ice1712_gpio_write(ice, tmp);
410} 410}
411 411
412static unsigned char aureon_cs8415_get(ice1712_t *ice, int reg) { 412static unsigned char aureon_cs8415_get(struct snd_ice1712 *ice, int reg) {
413 unsigned char val; 413 unsigned char val;
414 aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16); 414 aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16);
415 aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, &val, 1); 415 aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, &val, 1);
416 return val; 416 return val;
417} 417}
418 418
419static void aureon_cs8415_read(ice1712_t *ice, int reg, unsigned char *buffer, int size) { 419static void aureon_cs8415_read(struct snd_ice1712 *ice, int reg, unsigned char *buffer, int size) {
420 aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16); 420 aureon_spi_write(ice, AUREON_CS8415_CS, 0x2000 | reg, 16);
421 aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, buffer, size); 421 aureon_spi_read(ice, AUREON_CS8415_CS, 0x21, 8, buffer, size);
422} 422}
423 423
424static void aureon_cs8415_put(ice1712_t *ice, int reg, unsigned char val) { 424static void aureon_cs8415_put(struct snd_ice1712 *ice, int reg, unsigned char val) {
425 aureon_spi_write(ice, AUREON_CS8415_CS, 0x200000 | (reg << 8) | val, 24); 425 aureon_spi_write(ice, AUREON_CS8415_CS, 0x200000 | (reg << 8) | val, 24);
426} 426}
427 427
428/* 428/*
429 * get the current register value of WM codec 429 * get the current register value of WM codec
430 */ 430 */
431static unsigned short wm_get(ice1712_t *ice, int reg) 431static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
432{ 432{
433 reg <<= 1; 433 reg <<= 1;
434 return ((unsigned short)ice->akm[0].images[reg] << 8) | 434 return ((unsigned short)ice->akm[0].images[reg] << 8) |
@@ -438,7 +438,7 @@ static unsigned short wm_get(ice1712_t *ice, int reg)
438/* 438/*
439 * set the register value of WM codec 439 * set the register value of WM codec
440 */ 440 */
441static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val) 441static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
442{ 442{
443 aureon_spi_write(ice, AUREON_WM_CS, (reg << 9) | (val & 0x1ff), 16); 443 aureon_spi_write(ice, AUREON_WM_CS, (reg << 9) | (val & 0x1ff), 16);
444} 444}
@@ -446,7 +446,7 @@ static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val)
446/* 446/*
447 * set the register value of WM codec and remember it 447 * set the register value of WM codec and remember it
448 */ 448 */
449static void wm_put(ice1712_t *ice, int reg, unsigned short val) 449static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
450{ 450{
451 wm_put_nocache(ice, reg, val); 451 wm_put_nocache(ice, reg, val);
452 reg <<= 1; 452 reg <<= 1;
@@ -456,7 +456,7 @@ static void wm_put(ice1712_t *ice, int reg, unsigned short val)
456 456
457/* 457/*
458 */ 458 */
459static int aureon_mono_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) 459static int aureon_mono_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo)
460{ 460{
461 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 461 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
462 uinfo->count = 1; 462 uinfo->count = 1;
@@ -470,9 +470,9 @@ static int aureon_mono_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo)
470 */ 470 */
471#define aureon_ac97_mmute_info aureon_mono_bool_info 471#define aureon_ac97_mmute_info aureon_mono_bool_info
472 472
473static int aureon_ac97_mmute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 473static int aureon_ac97_mmute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
474{ 474{
475 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 475 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
476 476
477 down(&ice->gpio_mutex); 477 down(&ice->gpio_mutex);
478 478
@@ -482,8 +482,8 @@ static int aureon_ac97_mmute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
482 return 0; 482 return 0;
483} 483}
484 484
485static int aureon_ac97_mmute_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { 485static int aureon_ac97_mmute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
486 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 486 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
487 unsigned short ovol, nvol; 487 unsigned short ovol, nvol;
488 int change; 488 int change;
489 489
@@ -521,7 +521,7 @@ static unsigned char wm_vol[256] = {
521#define WM_VOL_MAX (sizeof(wm_vol) - 1) 521#define WM_VOL_MAX (sizeof(wm_vol) - 1)
522#define WM_VOL_MUTE 0x8000 522#define WM_VOL_MUTE 0x8000
523 523
524static void wm_set_vol(ice1712_t *ice, unsigned int index, unsigned short vol, unsigned short master) 524static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned short master)
525{ 525{
526 unsigned char nvol; 526 unsigned char nvol;
527 527
@@ -539,9 +539,9 @@ static void wm_set_vol(ice1712_t *ice, unsigned int index, unsigned short vol, u
539 */ 539 */
540#define wm_pcm_mute_info aureon_mono_bool_info 540#define wm_pcm_mute_info aureon_mono_bool_info
541 541
542static int wm_pcm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 542static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
543{ 543{
544 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 544 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
545 545
546 down(&ice->gpio_mutex); 546 down(&ice->gpio_mutex);
547 ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1; 547 ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1;
@@ -549,9 +549,9 @@ static int wm_pcm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
549 return 0; 549 return 0;
550} 550}
551 551
552static int wm_pcm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 552static int wm_pcm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
553{ 553{
554 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 554 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
555 unsigned short nval, oval; 555 unsigned short nval, oval;
556 int change; 556 int change;
557 557
@@ -568,7 +568,7 @@ static int wm_pcm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * uco
568/* 568/*
569 * Master volume attenuation mixer control 569 * Master volume attenuation mixer control
570 */ 570 */
571static int wm_master_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 571static int wm_master_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
572{ 572{
573 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 573 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
574 uinfo->count = 2; 574 uinfo->count = 2;
@@ -577,18 +577,18 @@ static int wm_master_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
577 return 0; 577 return 0;
578} 578}
579 579
580static int wm_master_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 580static int wm_master_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
581{ 581{
582 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 582 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
583 int i; 583 int i;
584 for (i=0; i<2; i++) 584 for (i=0; i<2; i++)
585 ucontrol->value.integer.value[i] = ice->spec.aureon.master[i] & ~WM_VOL_MUTE; 585 ucontrol->value.integer.value[i] = ice->spec.aureon.master[i] & ~WM_VOL_MUTE;
586 return 0; 586 return 0;
587} 587}
588 588
589static int wm_master_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 589static int wm_master_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
590{ 590{
591 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 591 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
592 int ch, change = 0; 592 int ch, change = 0;
593 593
594 snd_ice1712_save_gpio_status(ice); 594 snd_ice1712_save_gpio_status(ice);
@@ -611,7 +611,7 @@ static int wm_master_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
611/* 611/*
612 * DAC volume attenuation mixer control 612 * DAC volume attenuation mixer control
613 */ 613 */
614static int wm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 614static int wm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
615{ 615{
616 int voices = kcontrol->private_value >> 8; 616 int voices = kcontrol->private_value >> 8;
617 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 617 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
@@ -621,9 +621,9 @@ static int wm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
621 return 0; 621 return 0;
622} 622}
623 623
624static int wm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 624static int wm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
625{ 625{
626 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 626 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
627 int i, ofs, voices; 627 int i, ofs, voices;
628 628
629 voices = kcontrol->private_value >> 8; 629 voices = kcontrol->private_value >> 8;
@@ -633,9 +633,9 @@ static int wm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
633 return 0; 633 return 0;
634} 634}
635 635
636static int wm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 636static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
637{ 637{
638 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 638 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
639 int i, idx, ofs, voices; 639 int i, idx, ofs, voices;
640 int change = 0; 640 int change = 0;
641 641
@@ -659,7 +659,7 @@ static int wm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
659/* 659/*
660 * WM8770 mute control 660 * WM8770 mute control
661 */ 661 */
662static int wm_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { 662static int wm_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {
663 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 663 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
664 uinfo->count = kcontrol->private_value >> 8; 664 uinfo->count = kcontrol->private_value >> 8;
665 uinfo->value.integer.min = 0; 665 uinfo->value.integer.min = 0;
@@ -667,9 +667,9 @@ static int wm_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) {
667 return 0; 667 return 0;
668} 668}
669 669
670static int wm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 670static int wm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
671{ 671{
672 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 672 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
673 int voices, ofs, i; 673 int voices, ofs, i;
674 674
675 voices = kcontrol->private_value >> 8; 675 voices = kcontrol->private_value >> 8;
@@ -680,9 +680,9 @@ static int wm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
680 return 0; 680 return 0;
681} 681}
682 682
683static int wm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 683static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
684{ 684{
685 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 685 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
686 int change = 0, voices, ofs, i; 686 int change = 0, voices, ofs, i;
687 687
688 voices = kcontrol->private_value >> 8; 688 voices = kcontrol->private_value >> 8;
@@ -708,7 +708,7 @@ static int wm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontro
708/* 708/*
709 * WM8770 master mute control 709 * WM8770 master mute control
710 */ 710 */
711static int wm_master_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { 711static int wm_master_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {
712 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 712 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
713 uinfo->count = 2; 713 uinfo->count = 2;
714 uinfo->value.integer.min = 0; 714 uinfo->value.integer.min = 0;
@@ -716,18 +716,18 @@ static int wm_master_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
716 return 0; 716 return 0;
717} 717}
718 718
719static int wm_master_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 719static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
720{ 720{
721 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 721 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
722 722
723 ucontrol->value.integer.value[0] = (ice->spec.aureon.master[0] & WM_VOL_MUTE) ? 0 : 1; 723 ucontrol->value.integer.value[0] = (ice->spec.aureon.master[0] & WM_VOL_MUTE) ? 0 : 1;
724 ucontrol->value.integer.value[1] = (ice->spec.aureon.master[1] & WM_VOL_MUTE) ? 0 : 1; 724 ucontrol->value.integer.value[1] = (ice->spec.aureon.master[1] & WM_VOL_MUTE) ? 0 : 1;
725 return 0; 725 return 0;
726} 726}
727 727
728static int wm_master_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 728static int wm_master_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
729{ 729{
730 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 730 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
731 int change = 0, i; 731 int change = 0, i;
732 732
733 snd_ice1712_save_gpio_status(ice); 733 snd_ice1712_save_gpio_status(ice);
@@ -754,7 +754,7 @@ static int wm_master_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
754#define PCM_0dB 0xff 754#define PCM_0dB 0xff
755#define PCM_RES 128 /* -64dB */ 755#define PCM_RES 128 /* -64dB */
756#define PCM_MIN (PCM_0dB - PCM_RES) 756#define PCM_MIN (PCM_0dB - PCM_RES)
757static int wm_pcm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 757static int wm_pcm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
758{ 758{
759 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 759 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
760 uinfo->count = 1; 760 uinfo->count = 1;
@@ -763,9 +763,9 @@ static int wm_pcm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
763 return 0; 763 return 0;
764} 764}
765 765
766static int wm_pcm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 766static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
767{ 767{
768 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 768 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
769 unsigned short val; 769 unsigned short val;
770 770
771 down(&ice->gpio_mutex); 771 down(&ice->gpio_mutex);
@@ -776,9 +776,9 @@ static int wm_pcm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
776 return 0; 776 return 0;
777} 777}
778 778
779static int wm_pcm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 779static int wm_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
780{ 780{
781 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 781 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
782 unsigned short ovol, nvol; 782 unsigned short ovol, nvol;
783 int change = 0; 783 int change = 0;
784 784
@@ -798,7 +798,7 @@ static int wm_pcm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
798/* 798/*
799 * ADC mute control 799 * ADC mute control
800 */ 800 */
801static int wm_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 801static int wm_adc_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
802{ 802{
803 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 803 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
804 uinfo->count = 2; 804 uinfo->count = 2;
@@ -807,9 +807,9 @@ static int wm_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo
807 return 0; 807 return 0;
808} 808}
809 809
810static int wm_adc_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 810static int wm_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
811{ 811{
812 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 812 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
813 unsigned short val; 813 unsigned short val;
814 int i; 814 int i;
815 815
@@ -822,9 +822,9 @@ static int wm_adc_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
822 return 0; 822 return 0;
823} 823}
824 824
825static int wm_adc_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 825static int wm_adc_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
826{ 826{
827 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 827 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
828 unsigned short new, old; 828 unsigned short new, old;
829 int i, change = 0; 829 int i, change = 0;
830 830
@@ -845,7 +845,7 @@ static int wm_adc_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * uco
845/* 845/*
846 * ADC gain mixer control 846 * ADC gain mixer control
847 */ 847 */
848static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 848static int wm_adc_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
849{ 849{
850 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 850 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
851 uinfo->count = 2; 851 uinfo->count = 2;
@@ -854,9 +854,9 @@ static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
854 return 0; 854 return 0;
855} 855}
856 856
857static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 857static int wm_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
858{ 858{
859 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 859 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
860 int i, idx; 860 int i, idx;
861 unsigned short vol; 861 unsigned short vol;
862 862
@@ -870,9 +870,9 @@ static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
870 return 0; 870 return 0;
871} 871}
872 872
873static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 873static int wm_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
874{ 874{
875 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 875 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
876 int i, idx; 876 int i, idx;
877 unsigned short ovol, nvol; 877 unsigned short ovol, nvol;
878 int change = 0; 878 int change = 0;
@@ -894,7 +894,7 @@ static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
894/* 894/*
895 * ADC input mux mixer control 895 * ADC input mux mixer control
896 */ 896 */
897static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 897static int wm_adc_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
898{ 898{
899 static char *texts[] = { 899 static char *texts[] = {
900 "CD", //AIN1 900 "CD", //AIN1
@@ -913,7 +913,7 @@ static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
913 "Aux3", //AIN7 913 "Aux3", //AIN7
914 "AC97" //AIN8 914 "AC97" //AIN8
915 }; 915 };
916 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 916 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
917 917
918 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 918 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
919 uinfo->count = 2; 919 uinfo->count = 2;
@@ -932,9 +932,9 @@ static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
932 return 0; 932 return 0;
933} 933}
934 934
935static int wm_adc_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 935static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
936{ 936{
937 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 937 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
938 unsigned short val; 938 unsigned short val;
939 939
940 down(&ice->gpio_mutex); 940 down(&ice->gpio_mutex);
@@ -945,9 +945,9 @@ static int wm_adc_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucont
945 return 0; 945 return 0;
946} 946}
947 947
948static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 948static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
949{ 949{
950 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 950 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
951 unsigned short oval, nval; 951 unsigned short oval, nval;
952 int change; 952 int change;
953 953
@@ -966,9 +966,9 @@ static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucont
966/* 966/*
967 * CS8415 Input mux 967 * CS8415 Input mux
968 */ 968 */
969static int aureon_cs8415_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 969static int aureon_cs8415_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
970{ 970{
971 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 971 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
972 static char *aureon_texts[] = { 972 static char *aureon_texts[] = {
973 "CD", //RXP0 973 "CD", //RXP0
974 "Optical" //RXP1 974 "Optical" //RXP1
@@ -989,9 +989,9 @@ static int aureon_cs8415_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
989 return 0; 989 return 0;
990} 990}
991 991
992static int aureon_cs8415_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 992static int aureon_cs8415_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
993{ 993{
994 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 994 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
995 995
996 //snd_ice1712_save_gpio_status(ice); 996 //snd_ice1712_save_gpio_status(ice);
997 //val = aureon_cs8415_get(ice, CS8415_CTRL2); 997 //val = aureon_cs8415_get(ice, CS8415_CTRL2);
@@ -1000,9 +1000,9 @@ static int aureon_cs8415_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
1000 return 0; 1000 return 0;
1001} 1001}
1002 1002
1003static int aureon_cs8415_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 1003static int aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1004{ 1004{
1005 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1005 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1006 unsigned short oval, nval; 1006 unsigned short oval, nval;
1007 int change; 1007 int change;
1008 1008
@@ -1018,7 +1018,7 @@ static int aureon_cs8415_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
1018 return change; 1018 return change;
1019} 1019}
1020 1020
1021static int aureon_cs8415_rate_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1021static int aureon_cs8415_rate_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1022{ 1022{
1023 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1023 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1024 uinfo->count = 1; 1024 uinfo->count = 1;
@@ -1027,9 +1027,9 @@ static int aureon_cs8415_rate_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
1027 return 0; 1027 return 0;
1028} 1028}
1029 1029
1030static int aureon_cs8415_rate_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1030static int aureon_cs8415_rate_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1031{ 1031{
1032 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1032 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1033 unsigned char ratio; 1033 unsigned char ratio;
1034 ratio = aureon_cs8415_get(ice, CS8415_RATIO); 1034 ratio = aureon_cs8415_get(ice, CS8415_RATIO);
1035 ucontrol->value.integer.value[0] = (int)((unsigned int)ratio * 750); 1035 ucontrol->value.integer.value[0] = (int)((unsigned int)ratio * 750);
@@ -1039,25 +1039,25 @@ static int aureon_cs8415_rate_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
1039/* 1039/*
1040 * CS8415A Mute 1040 * CS8415A Mute
1041 */ 1041 */
1042static int aureon_cs8415_mute_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1042static int aureon_cs8415_mute_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1043{ 1043{
1044 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1044 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1045 uinfo->count = 1; 1045 uinfo->count = 1;
1046 return 0; 1046 return 0;
1047} 1047}
1048 1048
1049static int aureon_cs8415_mute_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1049static int aureon_cs8415_mute_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1050{ 1050{
1051 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1051 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1052 snd_ice1712_save_gpio_status(ice); 1052 snd_ice1712_save_gpio_status(ice);
1053 ucontrol->value.integer.value[0] = (aureon_cs8415_get(ice, CS8415_CTRL1) & 0x20) ? 0 : 1; 1053 ucontrol->value.integer.value[0] = (aureon_cs8415_get(ice, CS8415_CTRL1) & 0x20) ? 0 : 1;
1054 snd_ice1712_restore_gpio_status(ice); 1054 snd_ice1712_restore_gpio_status(ice);
1055 return 0; 1055 return 0;
1056} 1056}
1057 1057
1058static int aureon_cs8415_mute_put (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1058static int aureon_cs8415_mute_put (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1059{ 1059{
1060 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1060 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1061 unsigned char oval, nval; 1061 unsigned char oval, nval;
1062 int change; 1062 int change;
1063 snd_ice1712_save_gpio_status(ice); 1063 snd_ice1712_save_gpio_status(ice);
@@ -1075,14 +1075,14 @@ static int aureon_cs8415_mute_put (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
1075/* 1075/*
1076 * CS8415A Q-Sub info 1076 * CS8415A Q-Sub info
1077 */ 1077 */
1078static int aureon_cs8415_qsub_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { 1078static int aureon_cs8415_qsub_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {
1079 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; 1079 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
1080 uinfo->count = 10; 1080 uinfo->count = 10;
1081 return 0; 1081 return 0;
1082} 1082}
1083 1083
1084static int aureon_cs8415_qsub_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { 1084static int aureon_cs8415_qsub_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
1085 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1085 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1086 1086
1087 snd_ice1712_save_gpio_status(ice); 1087 snd_ice1712_save_gpio_status(ice);
1088 aureon_cs8415_read(ice, CS8415_QSUB, ucontrol->value.bytes.data, 10); 1088 aureon_cs8415_read(ice, CS8415_QSUB, ucontrol->value.bytes.data, 10);
@@ -1091,19 +1091,19 @@ static int aureon_cs8415_qsub_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
1091 return 0; 1091 return 0;
1092} 1092}
1093 1093
1094static int aureon_cs8415_spdif_info (snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { 1094static int aureon_cs8415_spdif_info (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {
1095 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 1095 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
1096 uinfo->count = 1; 1096 uinfo->count = 1;
1097 return 0; 1097 return 0;
1098} 1098}
1099 1099
1100static int aureon_cs8415_mask_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { 1100static int aureon_cs8415_mask_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
1101 memset(ucontrol->value.iec958.status, 0xFF, 24); 1101 memset(ucontrol->value.iec958.status, 0xFF, 24);
1102 return 0; 1102 return 0;
1103} 1103}
1104 1104
1105static int aureon_cs8415_spdif_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) { 1105static int aureon_cs8415_spdif_get (struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {
1106 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1106 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1107 1107
1108 snd_ice1712_save_gpio_status(ice); 1108 snd_ice1712_save_gpio_status(ice);
1109 aureon_cs8415_read(ice, CS8415_C_BUFFER, ucontrol->value.iec958.status, 24); 1109 aureon_cs8415_read(ice, CS8415_C_BUFFER, ucontrol->value.iec958.status, 24);
@@ -1114,7 +1114,7 @@ static int aureon_cs8415_spdif_get (snd_kcontrol_t *kcontrol, snd_ctl_elem_value
1114/* 1114/*
1115 * Headphone Amplifier 1115 * Headphone Amplifier
1116 */ 1116 */
1117static int aureon_set_headphone_amp(ice1712_t *ice, int enable) 1117static int aureon_set_headphone_amp(struct snd_ice1712 *ice, int enable)
1118{ 1118{
1119 unsigned int tmp, tmp2; 1119 unsigned int tmp, tmp2;
1120 1120
@@ -1130,7 +1130,7 @@ static int aureon_set_headphone_amp(ice1712_t *ice, int enable)
1130 return 0; 1130 return 0;
1131} 1131}
1132 1132
1133static int aureon_get_headphone_amp(ice1712_t *ice) 1133static int aureon_get_headphone_amp(struct snd_ice1712 *ice)
1134{ 1134{
1135 unsigned int tmp = snd_ice1712_gpio_read(ice); 1135 unsigned int tmp = snd_ice1712_gpio_read(ice);
1136 1136
@@ -1139,18 +1139,18 @@ static int aureon_get_headphone_amp(ice1712_t *ice)
1139 1139
1140#define aureon_hpamp_info aureon_mono_bool_info 1140#define aureon_hpamp_info aureon_mono_bool_info
1141 1141
1142static int aureon_hpamp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1142static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1143{ 1143{
1144 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1144 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1145 1145
1146 ucontrol->value.integer.value[0] = aureon_get_headphone_amp(ice); 1146 ucontrol->value.integer.value[0] = aureon_get_headphone_amp(ice);
1147 return 0; 1147 return 0;
1148} 1148}
1149 1149
1150 1150
1151static int aureon_hpamp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1151static int aureon_hpamp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1152{ 1152{
1153 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1153 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1154 1154
1155 return aureon_set_headphone_amp(ice,ucontrol->value.integer.value[0]); 1155 return aureon_set_headphone_amp(ice,ucontrol->value.integer.value[0]);
1156} 1156}
@@ -1161,16 +1161,16 @@ static int aureon_hpamp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
1161 1161
1162#define aureon_deemp_info aureon_mono_bool_info 1162#define aureon_deemp_info aureon_mono_bool_info
1163 1163
1164static int aureon_deemp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1164static int aureon_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1165{ 1165{
1166 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1166 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1167 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf; 1167 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf;
1168 return 0; 1168 return 0;
1169} 1169}
1170 1170
1171static int aureon_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1171static int aureon_deemp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1172{ 1172{
1173 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1173 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1174 int temp, temp2; 1174 int temp, temp2;
1175 temp2 = temp = wm_get(ice, WM_DAC_CTRL2); 1175 temp2 = temp = wm_get(ice, WM_DAC_CTRL2);
1176 if (ucontrol->value.integer.value[0]) 1176 if (ucontrol->value.integer.value[0])
@@ -1187,7 +1187,7 @@ static int aureon_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
1187/* 1187/*
1188 * ADC Oversampling 1188 * ADC Oversampling
1189 */ 1189 */
1190static int aureon_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) 1190static int aureon_oversampling_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo)
1191{ 1191{
1192 static char *texts[2] = { "128x", "64x" }; 1192 static char *texts[2] = { "128x", "64x" };
1193 1193
@@ -1202,17 +1202,17 @@ static int aureon_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinf
1202 return 0; 1202 return 0;
1203} 1203}
1204 1204
1205static int aureon_oversampling_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1205static int aureon_oversampling_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1206{ 1206{
1207 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1207 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1208 ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8; 1208 ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8;
1209 return 0; 1209 return 0;
1210} 1210}
1211 1211
1212static int aureon_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1212static int aureon_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1213{ 1213{
1214 int temp, temp2; 1214 int temp, temp2;
1215 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1215 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1216 1216
1217 temp2 = temp = wm_get(ice, WM_MASTER); 1217 temp2 = temp = wm_get(ice, WM_MASTER);
1218 1218
@@ -1232,7 +1232,7 @@ static int aureon_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
1232 * mixers 1232 * mixers
1233 */ 1233 */
1234 1234
1235static snd_kcontrol_new_t aureon_dac_controls[] __devinitdata = { 1235static struct snd_kcontrol_new aureon_dac_controls[] __devinitdata = {
1236 { 1236 {
1237 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1237 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1238 .name = "Master Playback Switch", 1238 .name = "Master Playback Switch",
@@ -1329,7 +1329,7 @@ static snd_kcontrol_new_t aureon_dac_controls[] __devinitdata = {
1329 } 1329 }
1330}; 1330};
1331 1331
1332static snd_kcontrol_new_t wm_controls[] __devinitdata = { 1332static struct snd_kcontrol_new wm_controls[] __devinitdata = {
1333 { 1333 {
1334 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1334 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1335 .name = "PCM Playback Switch", 1335 .name = "PCM Playback Switch",
@@ -1389,7 +1389,7 @@ static snd_kcontrol_new_t wm_controls[] __devinitdata = {
1389 } 1389 }
1390}; 1390};
1391 1391
1392static snd_kcontrol_new_t ac97_controls[] __devinitdata = { 1392static struct snd_kcontrol_new ac97_controls[] __devinitdata = {
1393 { 1393 {
1394 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1394 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1395 .name = "AC97 Playback Switch", 1395 .name = "AC97 Playback Switch",
@@ -1479,7 +1479,7 @@ static snd_kcontrol_new_t ac97_controls[] __devinitdata = {
1479 } 1479 }
1480}; 1480};
1481 1481
1482static snd_kcontrol_new_t universe_ac97_controls[] __devinitdata = { 1482static struct snd_kcontrol_new universe_ac97_controls[] __devinitdata = {
1483 { 1483 {
1484 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1484 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1485 .name = "AC97 Playback Switch", 1485 .name = "AC97 Playback Switch",
@@ -1586,7 +1586,7 @@ static snd_kcontrol_new_t universe_ac97_controls[] __devinitdata = {
1586}; 1586};
1587 1587
1588 1588
1589static snd_kcontrol_new_t cs8415_controls[] __devinitdata = { 1589static struct snd_kcontrol_new cs8415_controls[] __devinitdata = {
1590 { 1590 {
1591 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1591 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1592 .name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 1592 .name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH),
@@ -1632,7 +1632,7 @@ static snd_kcontrol_new_t cs8415_controls[] __devinitdata = {
1632}; 1632};
1633 1633
1634 1634
1635static int __devinit aureon_add_controls(ice1712_t *ice) 1635static int __devinit aureon_add_controls(struct snd_ice1712 *ice)
1636{ 1636{
1637 unsigned int i, counts; 1637 unsigned int i, counts;
1638 int err; 1638 int err;
@@ -1677,7 +1677,7 @@ static int __devinit aureon_add_controls(ice1712_t *ice)
1677 snd_printk(KERN_INFO "Detected unsupported CS8415 rev. (%c)\n", (char)((id & 0x0F) + 'A' - 1)); 1677 snd_printk(KERN_INFO "Detected unsupported CS8415 rev. (%c)\n", (char)((id & 0x0F) + 'A' - 1));
1678 else { 1678 else {
1679 for (i = 0; i< ARRAY_SIZE(cs8415_controls); i++) { 1679 for (i = 0; i< ARRAY_SIZE(cs8415_controls); i++) {
1680 snd_kcontrol_t *kctl; 1680 struct snd_kcontrol *kctl;
1681 err = snd_ctl_add(ice->card, (kctl = snd_ctl_new1(&cs8415_controls[i], ice))); 1681 err = snd_ctl_add(ice->card, (kctl = snd_ctl_new1(&cs8415_controls[i], ice)));
1682 if (err < 0) 1682 if (err < 0)
1683 return err; 1683 return err;
@@ -1695,7 +1695,7 @@ static int __devinit aureon_add_controls(ice1712_t *ice)
1695/* 1695/*
1696 * initialize the chip 1696 * initialize the chip
1697 */ 1697 */
1698static int __devinit aureon_init(ice1712_t *ice) 1698static int __devinit aureon_init(struct snd_ice1712 *ice)
1699{ 1699{
1700 static unsigned short wm_inits_aureon[] = { 1700 static unsigned short wm_inits_aureon[] = {
1701 /* These come first to reduce init pop noise */ 1701 /* These come first to reduce init pop noise */
@@ -1796,7 +1796,7 @@ static int __devinit aureon_init(ice1712_t *ice)
1796 } 1796 }
1797 1797
1798 /* to remeber the register values of CS8415 */ 1798 /* to remeber the register values of CS8415 */
1799 ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL); 1799 ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
1800 if (! ice->akm) 1800 if (! ice->akm)
1801 return -ENOMEM; 1801 return -ENOMEM;
1802 ice->akm_codecs = 1; 1802 ice->akm_codecs = 1;
diff --git a/sound/pci/ice1712/envy24ht.h b/sound/pci/ice1712/envy24ht.h
index f7878020eaa3..b58afcda9ed6 100644
--- a/sound/pci/ice1712/envy24ht.h
+++ b/sound/pci/ice1712/envy24ht.h
@@ -209,7 +209,7 @@ enum {
209#define VT1724_MT_PDMA1_COUNT 0x76 /* word */ 209#define VT1724_MT_PDMA1_COUNT 0x76 /* word */
210 210
211 211
212unsigned char snd_vt1724_read_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr); 212unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr);
213void snd_vt1724_write_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr, unsigned char data); 213void snd_vt1724_write_i2c(struct snd_ice1712 *ice, unsigned char dev, unsigned char addr, unsigned char data);
214 214
215#endif /* __SOUND_VT1724_H */ 215#endif /* __SOUND_VT1724_H */
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 0b5389ee26d5..71f08c036019 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -102,12 +102,12 @@ static unsigned int PRO_RATE_DEFAULT = 44100;
102 */ 102 */
103 103
104/* check whether the clock mode is spdif-in */ 104/* check whether the clock mode is spdif-in */
105static inline int is_spdif_master(ice1712_t *ice) 105static inline int is_spdif_master(struct snd_ice1712 *ice)
106{ 106{
107 return (inb(ICEMT1724(ice, RATE)) & VT1724_SPDIF_MASTER) ? 1 : 0; 107 return (inb(ICEMT1724(ice, RATE)) & VT1724_SPDIF_MASTER) ? 1 : 0;
108} 108}
109 109
110static inline int is_pro_rate_locked(ice1712_t *ice) 110static inline int is_pro_rate_locked(struct snd_ice1712 *ice)
111{ 111{
112 return is_spdif_master(ice) || PRO_RATE_LOCKED; 112 return is_spdif_master(ice) || PRO_RATE_LOCKED;
113} 113}
@@ -116,7 +116,7 @@ static inline int is_pro_rate_locked(ice1712_t *ice)
116 * ac97 section 116 * ac97 section
117 */ 117 */
118 118
119static unsigned char snd_vt1724_ac97_ready(ice1712_t *ice) 119static unsigned char snd_vt1724_ac97_ready(struct snd_ice1712 *ice)
120{ 120{
121 unsigned char old_cmd; 121 unsigned char old_cmd;
122 int tm; 122 int tm;
@@ -132,7 +132,7 @@ static unsigned char snd_vt1724_ac97_ready(ice1712_t *ice)
132 return old_cmd; 132 return old_cmd;
133} 133}
134 134
135static int snd_vt1724_ac97_wait_bit(ice1712_t *ice, unsigned char bit) 135static int snd_vt1724_ac97_wait_bit(struct snd_ice1712 *ice, unsigned char bit)
136{ 136{
137 int tm; 137 int tm;
138 for (tm = 0; tm < 0x10000; tm++) 138 for (tm = 0; tm < 0x10000; tm++)
@@ -142,11 +142,11 @@ static int snd_vt1724_ac97_wait_bit(ice1712_t *ice, unsigned char bit)
142 return -EIO; 142 return -EIO;
143} 143}
144 144
145static void snd_vt1724_ac97_write(ac97_t *ac97, 145static void snd_vt1724_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 unsigned char old_cmd; 150 unsigned char old_cmd;
151 151
152 old_cmd = snd_vt1724_ac97_ready(ice); 152 old_cmd = snd_vt1724_ac97_ready(ice);
@@ -158,9 +158,9 @@ static void snd_vt1724_ac97_write(ac97_t *ac97,
158 snd_vt1724_ac97_wait_bit(ice, VT1724_AC97_WRITE); 158 snd_vt1724_ac97_wait_bit(ice, VT1724_AC97_WRITE);
159} 159}
160 160
161static unsigned short snd_vt1724_ac97_read(ac97_t *ac97, unsigned short reg) 161static unsigned short snd_vt1724_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
162{ 162{
163 ice1712_t *ice = (ice1712_t *)ac97->private_data; 163 struct snd_ice1712 *ice = ac97->private_data;
164 unsigned char old_cmd; 164 unsigned char old_cmd;
165 165
166 old_cmd = snd_vt1724_ac97_ready(ice); 166 old_cmd = snd_vt1724_ac97_ready(ice);
@@ -179,14 +179,14 @@ static unsigned short snd_vt1724_ac97_read(ac97_t *ac97, unsigned short reg)
179 */ 179 */
180 180
181/* set gpio direction 0 = read, 1 = write */ 181/* set gpio direction 0 = read, 1 = write */
182static void snd_vt1724_set_gpio_dir(ice1712_t *ice, unsigned int data) 182static void snd_vt1724_set_gpio_dir(struct snd_ice1712 *ice, unsigned int data)
183{ 183{
184 outl(data, ICEREG1724(ice, GPIO_DIRECTION)); 184 outl(data, ICEREG1724(ice, GPIO_DIRECTION));
185 inw(ICEREG1724(ice, GPIO_DIRECTION)); /* dummy read for pci-posting */ 185 inw(ICEREG1724(ice, GPIO_DIRECTION)); /* dummy read for pci-posting */
186} 186}
187 187
188/* set the gpio mask (0 = writable) */ 188/* set the gpio mask (0 = writable) */
189static void snd_vt1724_set_gpio_mask(ice1712_t *ice, unsigned int data) 189static void snd_vt1724_set_gpio_mask(struct snd_ice1712 *ice, unsigned int data)
190{ 190{
191 outw(data, ICEREG1724(ice, GPIO_WRITE_MASK)); 191 outw(data, ICEREG1724(ice, GPIO_WRITE_MASK));
192 if (! ice->vt1720) /* VT1720 supports only 16 GPIO bits */ 192 if (! ice->vt1720) /* VT1720 supports only 16 GPIO bits */
@@ -194,7 +194,7 @@ static void snd_vt1724_set_gpio_mask(ice1712_t *ice, unsigned int data)
194 inw(ICEREG1724(ice, GPIO_WRITE_MASK)); /* dummy read for pci-posting */ 194 inw(ICEREG1724(ice, GPIO_WRITE_MASK)); /* dummy read for pci-posting */
195} 195}
196 196
197static void snd_vt1724_set_gpio_data(ice1712_t *ice, unsigned int data) 197static void snd_vt1724_set_gpio_data(struct snd_ice1712 *ice, unsigned int data)
198{ 198{
199 outw(data, ICEREG1724(ice, GPIO_DATA)); 199 outw(data, ICEREG1724(ice, GPIO_DATA));
200 if (! ice->vt1720) 200 if (! ice->vt1720)
@@ -202,7 +202,7 @@ static void snd_vt1724_set_gpio_data(ice1712_t *ice, unsigned int data)
202 inw(ICEREG1724(ice, GPIO_DATA)); /* dummy read for pci-posting */ 202 inw(ICEREG1724(ice, GPIO_DATA)); /* dummy read for pci-posting */
203} 203}
204 204
205static unsigned int snd_vt1724_get_gpio_data(ice1712_t *ice) 205static unsigned int snd_vt1724_get_gpio_data(struct snd_ice1712 *ice)
206{ 206{
207 unsigned int data; 207 unsigned int data;
208 if (! ice->vt1720) 208 if (! ice->vt1720)
@@ -219,7 +219,7 @@ static unsigned int snd_vt1724_get_gpio_data(ice1712_t *ice)
219 219
220static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id, struct pt_regs *regs) 220static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id, struct pt_regs *regs)
221{ 221{
222 ice1712_t *ice = dev_id; 222 struct snd_ice1712 *ice = dev_id;
223 unsigned char status; 223 unsigned char status;
224 int handled = 0; 224 int handled = 0;
225 225
@@ -229,8 +229,10 @@ static irqreturn_t snd_vt1724_interrupt(int irq, void *dev_id, struct pt_regs *r
229 break; 229 break;
230 230
231 handled = 1; 231 handled = 1;
232 /* these should probably be separated at some point, 232 /* these should probably be separated at some point,
233 but as we don't currently have MPU support on the board I will leave it */ 233 * but as we don't currently have MPU support on the board
234 * I will leave it
235 */
234 if ((status & VT1724_IRQ_MPU_RX)||(status & VT1724_IRQ_MPU_TX)) { 236 if ((status & VT1724_IRQ_MPU_RX)||(status & VT1724_IRQ_MPU_TX)) {
235 if (ice->rmidi[0]) 237 if (ice->rmidi[0])
236 snd_mpu401_uart_interrupt(irq, ice->rmidi[0]->private_data, regs); 238 snd_mpu401_uart_interrupt(irq, ice->rmidi[0]->private_data, regs);
@@ -303,19 +305,19 @@ static unsigned int rates[] = {
303 176400, 192000, 305 176400, 192000,
304}; 306};
305 307
306static snd_pcm_hw_constraint_list_t hw_constraints_rates_96 = { 308static struct snd_pcm_hw_constraint_list hw_constraints_rates_96 = {
307 .count = ARRAY_SIZE(rates) - 2, /* up to 96000 */ 309 .count = ARRAY_SIZE(rates) - 2, /* up to 96000 */
308 .list = rates, 310 .list = rates,
309 .mask = 0, 311 .mask = 0,
310}; 312};
311 313
312static snd_pcm_hw_constraint_list_t hw_constraints_rates_48 = { 314static struct snd_pcm_hw_constraint_list hw_constraints_rates_48 = {
313 .count = ARRAY_SIZE(rates) - 5, /* up to 48000 */ 315 .count = ARRAY_SIZE(rates) - 5, /* up to 48000 */
314 .list = rates, 316 .list = rates,
315 .mask = 0, 317 .mask = 0,
316}; 318};
317 319
318static snd_pcm_hw_constraint_list_t hw_constraints_rates_192 = { 320static struct snd_pcm_hw_constraint_list hw_constraints_rates_192 = {
319 .count = ARRAY_SIZE(rates), 321 .count = ARRAY_SIZE(rates),
320 .list = rates, 322 .list = rates,
321 .mask = 0, 323 .mask = 0,
@@ -328,13 +330,13 @@ struct vt1724_pcm_reg {
328 unsigned int start; /* start & pause bit */ 330 unsigned int start; /* start & pause bit */
329}; 331};
330 332
331static int snd_vt1724_pcm_trigger(snd_pcm_substream_t *substream, int cmd) 333static int snd_vt1724_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
332{ 334{
333 ice1712_t *ice = snd_pcm_substream_chip(substream); 335 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
334 unsigned char what; 336 unsigned char what;
335 unsigned char old; 337 unsigned char old;
336 struct list_head *pos; 338 struct list_head *pos;
337 snd_pcm_substream_t *s; 339 struct snd_pcm_substream *s;
338 340
339 what = 0; 341 what = 0;
340 snd_pcm_group_for_each(pos, substream) { 342 snd_pcm_group_for_each(pos, substream) {
@@ -384,7 +386,7 @@ static int snd_vt1724_pcm_trigger(snd_pcm_substream_t *substream, int cmd)
384#define DMA_PAUSES (VT1724_RDMA0_PAUSE|VT1724_PDMA0_PAUSE|VT1724_RDMA1_PAUSE|\ 386#define DMA_PAUSES (VT1724_RDMA0_PAUSE|VT1724_PDMA0_PAUSE|VT1724_RDMA1_PAUSE|\
385 VT1724_PDMA1_PAUSE|VT1724_PDMA2_PAUSE|VT1724_PDMA3_PAUSE|VT1724_PDMA4_PAUSE) 387 VT1724_PDMA1_PAUSE|VT1724_PDMA2_PAUSE|VT1724_PDMA3_PAUSE|VT1724_PDMA4_PAUSE)
386 388
387static int get_max_rate(ice1712_t *ice) 389static int get_max_rate(struct snd_ice1712 *ice)
388{ 390{
389 if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { 391 if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
390 if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720) 392 if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720)
@@ -395,7 +397,8 @@ static int get_max_rate(ice1712_t *ice)
395 return 48000; 397 return 48000;
396} 398}
397 399
398static void snd_vt1724_set_pro_rate(ice1712_t *ice, unsigned int rate, int force) 400static void snd_vt1724_set_pro_rate(struct snd_ice1712 *ice, unsigned int rate,
401 int force)
399{ 402{
400 unsigned long flags; 403 unsigned long flags;
401 unsigned char val, old; 404 unsigned char val, old;
@@ -477,10 +480,10 @@ static void snd_vt1724_set_pro_rate(ice1712_t *ice, unsigned int rate, int force
477 ice->spdif.ops.setup_rate(ice, rate); 480 ice->spdif.ops.setup_rate(ice, rate);
478} 481}
479 482
480static int snd_vt1724_pcm_hw_params(snd_pcm_substream_t * substream, 483static int snd_vt1724_pcm_hw_params(struct snd_pcm_substream *substream,
481 snd_pcm_hw_params_t * hw_params) 484 struct snd_pcm_hw_params *hw_params)
482{ 485{
483 ice1712_t *ice = snd_pcm_substream_chip(substream); 486 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
484 int i, chs; 487 int i, chs;
485 488
486 chs = params_channels(hw_params); 489 chs = params_channels(hw_params);
@@ -490,7 +493,8 @@ static int snd_vt1724_pcm_hw_params(snd_pcm_substream_t * substream,
490 /* PDMA0 can be multi-channel up to 8 */ 493 /* PDMA0 can be multi-channel up to 8 */
491 chs = chs / 2 - 1; 494 chs = chs / 2 - 1;
492 for (i = 0; i < chs; i++) { 495 for (i = 0; i < chs; i++) {
493 if (ice->pcm_reserved[i] && ice->pcm_reserved[i] != substream) { 496 if (ice->pcm_reserved[i] &&
497 ice->pcm_reserved[i] != substream) {
494 up(&ice->open_mutex); 498 up(&ice->open_mutex);
495 return -EBUSY; 499 return -EBUSY;
496 } 500 }
@@ -504,7 +508,8 @@ static int snd_vt1724_pcm_hw_params(snd_pcm_substream_t * substream,
504 for (i = 0; i < 3; i++) { 508 for (i = 0; i < 3; i++) {
505 /* check individual playback stream */ 509 /* check individual playback stream */
506 if (ice->playback_con_substream_ds[i] == substream) { 510 if (ice->playback_con_substream_ds[i] == substream) {
507 if (ice->pcm_reserved[i] && ice->pcm_reserved[i] != substream) { 511 if (ice->pcm_reserved[i] &&
512 ice->pcm_reserved[i] != substream) {
508 up(&ice->open_mutex); 513 up(&ice->open_mutex);
509 return -EBUSY; 514 return -EBUSY;
510 } 515 }
@@ -518,9 +523,9 @@ static int snd_vt1724_pcm_hw_params(snd_pcm_substream_t * substream,
518 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 523 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
519} 524}
520 525
521static int snd_vt1724_pcm_hw_free(snd_pcm_substream_t * substream) 526static int snd_vt1724_pcm_hw_free(struct snd_pcm_substream *substream)
522{ 527{
523 ice1712_t *ice = snd_pcm_substream_chip(substream); 528 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
524 int i; 529 int i;
525 530
526 down(&ice->open_mutex); 531 down(&ice->open_mutex);
@@ -532,9 +537,9 @@ static int snd_vt1724_pcm_hw_free(snd_pcm_substream_t * substream)
532 return snd_pcm_lib_free_pages(substream); 537 return snd_pcm_lib_free_pages(substream);
533} 538}
534 539
535static int snd_vt1724_playback_pro_prepare(snd_pcm_substream_t * substream) 540static int snd_vt1724_playback_pro_prepare(struct snd_pcm_substream *substream)
536{ 541{
537 ice1712_t *ice = snd_pcm_substream_chip(substream); 542 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
538 unsigned char val; 543 unsigned char val;
539 unsigned int size; 544 unsigned int size;
540 545
@@ -559,9 +564,9 @@ static int snd_vt1724_playback_pro_prepare(snd_pcm_substream_t * substream)
559 return 0; 564 return 0;
560} 565}
561 566
562static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(snd_pcm_substream_t * substream) 567static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(struct snd_pcm_substream *substream)
563{ 568{
564 ice1712_t *ice = snd_pcm_substream_chip(substream); 569 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
565 size_t ptr; 570 size_t ptr;
566 571
567 if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & VT1724_PDMA0_START)) 572 if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & VT1724_PDMA0_START))
@@ -575,7 +580,8 @@ static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(snd_pcm_substream_t * s
575 ptr -= substream->runtime->dma_addr; 580 ptr -= substream->runtime->dma_addr;
576 ptr = bytes_to_frames(substream->runtime, ptr); 581 ptr = bytes_to_frames(substream->runtime, ptr);
577 if (ptr >= substream->runtime->buffer_size) { 582 if (ptr >= substream->runtime->buffer_size) {
578 snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->period_size); 583 snd_printd("ice1724: invalid ptr %d (size=%d)\n",
584 (int)ptr, (int)substream->runtime->period_size);
579 return 0; 585 return 0;
580 } 586 }
581#else /* read PLAYBACK_SIZE */ 587#else /* read PLAYBACK_SIZE */
@@ -587,29 +593,32 @@ static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(snd_pcm_substream_t * s
587 else if (ptr <= substream->runtime->buffer_size) 593 else if (ptr <= substream->runtime->buffer_size)
588 ptr = substream->runtime->buffer_size - ptr; 594 ptr = substream->runtime->buffer_size - ptr;
589 else { 595 else {
590 snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size); 596 snd_printd("ice1724: invalid ptr %d (size=%d)\n",
597 (int)ptr, (int)substream->runtime->buffer_size);
591 ptr = 0; 598 ptr = 0;
592 } 599 }
593#endif 600#endif
594 return ptr; 601 return ptr;
595} 602}
596 603
597static int snd_vt1724_pcm_prepare(snd_pcm_substream_t *substream) 604static int snd_vt1724_pcm_prepare(struct snd_pcm_substream *substream)
598{ 605{
599 ice1712_t *ice = snd_pcm_substream_chip(substream); 606 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
600 struct vt1724_pcm_reg *reg = substream->runtime->private_data; 607 struct vt1724_pcm_reg *reg = substream->runtime->private_data;
601 608
602 spin_lock_irq(&ice->reg_lock); 609 spin_lock_irq(&ice->reg_lock);
603 outl(substream->runtime->dma_addr, ice->profi_port + reg->addr); 610 outl(substream->runtime->dma_addr, ice->profi_port + reg->addr);
604 outw((snd_pcm_lib_buffer_bytes(substream) >> 2) - 1, ice->profi_port + reg->size); 611 outw((snd_pcm_lib_buffer_bytes(substream) >> 2) - 1,
605 outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1, ice->profi_port + reg->count); 612 ice->profi_port + reg->size);
613 outw((snd_pcm_lib_period_bytes(substream) >> 2) - 1,
614 ice->profi_port + reg->count);
606 spin_unlock_irq(&ice->reg_lock); 615 spin_unlock_irq(&ice->reg_lock);
607 return 0; 616 return 0;
608} 617}
609 618
610static snd_pcm_uframes_t snd_vt1724_pcm_pointer(snd_pcm_substream_t *substream) 619static snd_pcm_uframes_t snd_vt1724_pcm_pointer(struct snd_pcm_substream *substream)
611{ 620{
612 ice1712_t *ice = snd_pcm_substream_chip(substream); 621 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
613 struct vt1724_pcm_reg *reg = substream->runtime->private_data; 622 struct vt1724_pcm_reg *reg = substream->runtime->private_data;
614 size_t ptr; 623 size_t ptr;
615 624
@@ -628,7 +637,8 @@ static snd_pcm_uframes_t snd_vt1724_pcm_pointer(snd_pcm_substream_t *substream)
628 else if (ptr <= substream->runtime->buffer_size) 637 else if (ptr <= substream->runtime->buffer_size)
629 ptr = substream->runtime->buffer_size - ptr; 638 ptr = substream->runtime->buffer_size - ptr;
630 else { 639 else {
631 snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size); 640 snd_printd("ice1724: invalid ptr %d (size=%d)\n",
641 (int)ptr, (int)substream->runtime->buffer_size);
632 ptr = 0; 642 ptr = 0;
633 } 643 }
634 return ptr; 644 return ptr;
@@ -649,7 +659,7 @@ static struct vt1724_pcm_reg vt1724_capture_pro_reg = {
649 .start = VT1724_RDMA0_START, 659 .start = VT1724_RDMA0_START,
650}; 660};
651 661
652static snd_pcm_hardware_t snd_vt1724_playback_pro = 662static struct snd_pcm_hardware snd_vt1724_playback_pro =
653{ 663{
654 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 664 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
655 SNDRV_PCM_INFO_BLOCK_TRANSFER | 665 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -668,7 +678,7 @@ static snd_pcm_hardware_t snd_vt1724_playback_pro =
668 .periods_max = 1024, 678 .periods_max = 1024,
669}; 679};
670 680
671static snd_pcm_hardware_t snd_vt1724_spdif = 681static struct snd_pcm_hardware snd_vt1724_spdif =
672{ 682{
673 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 683 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
674 SNDRV_PCM_INFO_BLOCK_TRANSFER | 684 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -690,7 +700,7 @@ static snd_pcm_hardware_t snd_vt1724_spdif =
690 .periods_max = 1024, 700 .periods_max = 1024,
691}; 701};
692 702
693static snd_pcm_hardware_t snd_vt1724_2ch_stereo = 703static struct snd_pcm_hardware snd_vt1724_2ch_stereo =
694{ 704{
695 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 705 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
696 SNDRV_PCM_INFO_BLOCK_TRANSFER | 706 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -712,31 +722,41 @@ static snd_pcm_hardware_t snd_vt1724_2ch_stereo =
712/* 722/*
713 * set rate constraints 723 * set rate constraints
714 */ 724 */
715static int set_rate_constraints(ice1712_t *ice, snd_pcm_substream_t *substream) 725static int set_rate_constraints(struct snd_ice1712 *ice,
726 struct snd_pcm_substream *substream)
716{ 727{
717 snd_pcm_runtime_t *runtime = substream->runtime; 728 struct snd_pcm_runtime *runtime = substream->runtime;
718 if (ice->hw_rates) { 729 if (ice->hw_rates) {
719 /* hardware specific */ 730 /* hardware specific */
720 runtime->hw.rate_min = ice->hw_rates->list[0]; 731 runtime->hw.rate_min = ice->hw_rates->list[0];
721 runtime->hw.rate_max = ice->hw_rates->list[ice->hw_rates->count - 1]; 732 runtime->hw.rate_max = ice->hw_rates->list[ice->hw_rates->count - 1];
722 runtime->hw.rates = SNDRV_PCM_RATE_KNOT; 733 runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
723 return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, ice->hw_rates); 734 return snd_pcm_hw_constraint_list(runtime, 0,
735 SNDRV_PCM_HW_PARAM_RATE,
736 ice->hw_rates);
724 } 737 }
725 if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) { 738 if (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S) {
726 /* I2S */ 739 /* I2S */
727 /* VT1720 doesn't support more than 96kHz */ 740 /* VT1720 doesn't support more than 96kHz */
728 if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720) 741 if ((ice->eeprom.data[ICE_EEP2_I2S] & 0x08) && !ice->vt1720)
729 return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_192); 742 return snd_pcm_hw_constraint_list(runtime, 0,
743 SNDRV_PCM_HW_PARAM_RATE,
744 &hw_constraints_rates_192);
730 else { 745 else {
731 runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000; 746 runtime->hw.rates = SNDRV_PCM_RATE_KNOT |
747 SNDRV_PCM_RATE_8000_96000;
732 runtime->hw.rate_max = 96000; 748 runtime->hw.rate_max = 96000;
733 return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_96); 749 return snd_pcm_hw_constraint_list(runtime, 0,
750 SNDRV_PCM_HW_PARAM_RATE,
751 &hw_constraints_rates_96);
734 } 752 }
735 } else if (ice->ac97) { 753 } else if (ice->ac97) {
736 /* ACLINK */ 754 /* ACLINK */
737 runtime->hw.rate_max = 48000; 755 runtime->hw.rate_max = 48000;
738 runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_48000; 756 runtime->hw.rates = SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_48000;
739 return snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_48); 757 return snd_pcm_hw_constraint_list(runtime, 0,
758 SNDRV_PCM_HW_PARAM_RATE,
759 &hw_constraints_rates_48);
740 } 760 }
741 return 0; 761 return 0;
742} 762}
@@ -746,10 +766,10 @@ static int set_rate_constraints(ice1712_t *ice, snd_pcm_substream_t *substream)
746 */ 766 */
747#define VT1724_BUFFER_ALIGN 0x20 767#define VT1724_BUFFER_ALIGN 0x20
748 768
749static int snd_vt1724_playback_pro_open(snd_pcm_substream_t * substream) 769static int snd_vt1724_playback_pro_open(struct snd_pcm_substream *substream)
750{ 770{
751 snd_pcm_runtime_t *runtime = substream->runtime; 771 struct snd_pcm_runtime *runtime = substream->runtime;
752 ice1712_t *ice = snd_pcm_substream_chip(substream); 772 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
753 int chs; 773 int chs;
754 774
755 runtime->private_data = &vt1724_playback_pro_reg; 775 runtime->private_data = &vt1724_playback_pro_reg;
@@ -776,10 +796,10 @@ static int snd_vt1724_playback_pro_open(snd_pcm_substream_t * substream)
776 return 0; 796 return 0;
777} 797}
778 798
779static int snd_vt1724_capture_pro_open(snd_pcm_substream_t * substream) 799static int snd_vt1724_capture_pro_open(struct snd_pcm_substream *substream)
780{ 800{
781 ice1712_t *ice = snd_pcm_substream_chip(substream); 801 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
782 snd_pcm_runtime_t *runtime = substream->runtime; 802 struct snd_pcm_runtime *runtime = substream->runtime;
783 803
784 runtime->private_data = &vt1724_capture_pro_reg; 804 runtime->private_data = &vt1724_capture_pro_reg;
785 ice->capture_pro_substream = substream; 805 ice->capture_pro_substream = substream;
@@ -794,9 +814,9 @@ static int snd_vt1724_capture_pro_open(snd_pcm_substream_t * substream)
794 return 0; 814 return 0;
795} 815}
796 816
797static int snd_vt1724_playback_pro_close(snd_pcm_substream_t * substream) 817static int snd_vt1724_playback_pro_close(struct snd_pcm_substream *substream)
798{ 818{
799 ice1712_t *ice = snd_pcm_substream_chip(substream); 819 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
800 820
801 if (PRO_RATE_RESET) 821 if (PRO_RATE_RESET)
802 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 822 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -805,9 +825,9 @@ static int snd_vt1724_playback_pro_close(snd_pcm_substream_t * substream)
805 return 0; 825 return 0;
806} 826}
807 827
808static int snd_vt1724_capture_pro_close(snd_pcm_substream_t * substream) 828static int snd_vt1724_capture_pro_close(struct snd_pcm_substream *substream)
809{ 829{
810 ice1712_t *ice = snd_pcm_substream_chip(substream); 830 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
811 831
812 if (PRO_RATE_RESET) 832 if (PRO_RATE_RESET)
813 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 833 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -815,7 +835,7 @@ static int snd_vt1724_capture_pro_close(snd_pcm_substream_t * substream)
815 return 0; 835 return 0;
816} 836}
817 837
818static snd_pcm_ops_t snd_vt1724_playback_pro_ops = { 838static struct snd_pcm_ops snd_vt1724_playback_pro_ops = {
819 .open = snd_vt1724_playback_pro_open, 839 .open = snd_vt1724_playback_pro_open,
820 .close = snd_vt1724_playback_pro_close, 840 .close = snd_vt1724_playback_pro_close,
821 .ioctl = snd_pcm_lib_ioctl, 841 .ioctl = snd_pcm_lib_ioctl,
@@ -826,7 +846,7 @@ static snd_pcm_ops_t snd_vt1724_playback_pro_ops = {
826 .pointer = snd_vt1724_playback_pro_pointer, 846 .pointer = snd_vt1724_playback_pro_pointer,
827}; 847};
828 848
829static snd_pcm_ops_t snd_vt1724_capture_pro_ops = { 849static struct snd_pcm_ops snd_vt1724_capture_pro_ops = {
830 .open = snd_vt1724_capture_pro_open, 850 .open = snd_vt1724_capture_pro_open,
831 .close = snd_vt1724_capture_pro_close, 851 .close = snd_vt1724_capture_pro_close,
832 .ioctl = snd_pcm_lib_ioctl, 852 .ioctl = snd_pcm_lib_ioctl,
@@ -837,9 +857,9 @@ static snd_pcm_ops_t snd_vt1724_capture_pro_ops = {
837 .pointer = snd_vt1724_pcm_pointer, 857 .pointer = snd_vt1724_pcm_pointer,
838}; 858};
839 859
840static int __devinit snd_vt1724_pcm_profi(ice1712_t * ice, int device) 860static int __devinit snd_vt1724_pcm_profi(struct snd_ice1712 * ice, int device)
841{ 861{
842 snd_pcm_t *pcm; 862 struct snd_pcm *pcm;
843 int err; 863 int err;
844 864
845 err = snd_pcm_new(ice->card, "ICE1724", device, 1, 1, &pcm); 865 err = snd_pcm_new(ice->card, "ICE1724", device, 1, 1, &pcm);
@@ -854,7 +874,8 @@ static int __devinit snd_vt1724_pcm_profi(ice1712_t * ice, int device)
854 strcpy(pcm->name, "ICE1724"); 874 strcpy(pcm->name, "ICE1724");
855 875
856 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 876 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
857 snd_dma_pci_data(ice->pci), 256*1024, 256*1024); 877 snd_dma_pci_data(ice->pci),
878 256*1024, 256*1024);
858 879
859 ice->pcm_pro = pcm; 880 ice->pcm_pro = pcm;
860 881
@@ -881,7 +902,7 @@ static struct vt1724_pcm_reg vt1724_capture_spdif_reg = {
881}; 902};
882 903
883/* update spdif control bits; call with reg_lock */ 904/* update spdif control bits; call with reg_lock */
884static void update_spdif_bits(ice1712_t *ice, unsigned int val) 905static void update_spdif_bits(struct snd_ice1712 *ice, unsigned int val)
885{ 906{
886 unsigned char cbit, disabled; 907 unsigned char cbit, disabled;
887 908
@@ -896,7 +917,7 @@ static void update_spdif_bits(ice1712_t *ice, unsigned int val)
896} 917}
897 918
898/* update SPDIF control bits according to the given rate */ 919/* update SPDIF control bits according to the given rate */
899static void update_spdif_rate(ice1712_t *ice, unsigned int rate) 920static void update_spdif_rate(struct snd_ice1712 *ice, unsigned int rate)
900{ 921{
901 unsigned int val, nval; 922 unsigned int val, nval;
902 unsigned long flags; 923 unsigned long flags;
@@ -918,18 +939,18 @@ static void update_spdif_rate(ice1712_t *ice, unsigned int rate)
918 spin_unlock_irqrestore(&ice->reg_lock, flags); 939 spin_unlock_irqrestore(&ice->reg_lock, flags);
919} 940}
920 941
921static int snd_vt1724_playback_spdif_prepare(snd_pcm_substream_t * substream) 942static int snd_vt1724_playback_spdif_prepare(struct snd_pcm_substream *substream)
922{ 943{
923 ice1712_t *ice = snd_pcm_substream_chip(substream); 944 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
924 if (! ice->force_pdma4) 945 if (! ice->force_pdma4)
925 update_spdif_rate(ice, substream->runtime->rate); 946 update_spdif_rate(ice, substream->runtime->rate);
926 return snd_vt1724_pcm_prepare(substream); 947 return snd_vt1724_pcm_prepare(substream);
927} 948}
928 949
929static int snd_vt1724_playback_spdif_open(snd_pcm_substream_t *substream) 950static int snd_vt1724_playback_spdif_open(struct snd_pcm_substream *substream)
930{ 951{
931 ice1712_t *ice = snd_pcm_substream_chip(substream); 952 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
932 snd_pcm_runtime_t *runtime = substream->runtime; 953 struct snd_pcm_runtime *runtime = substream->runtime;
933 954
934 runtime->private_data = &vt1724_playback_spdif_reg; 955 runtime->private_data = &vt1724_playback_spdif_reg;
935 ice->playback_con_substream = substream; 956 ice->playback_con_substream = substream;
@@ -947,9 +968,9 @@ static int snd_vt1724_playback_spdif_open(snd_pcm_substream_t *substream)
947 return 0; 968 return 0;
948} 969}
949 970
950static int snd_vt1724_playback_spdif_close(snd_pcm_substream_t * substream) 971static int snd_vt1724_playback_spdif_close(struct snd_pcm_substream *substream)
951{ 972{
952 ice1712_t *ice = snd_pcm_substream_chip(substream); 973 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
953 974
954 if (PRO_RATE_RESET) 975 if (PRO_RATE_RESET)
955 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 976 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -958,10 +979,10 @@ static int snd_vt1724_playback_spdif_close(snd_pcm_substream_t * substream)
958 return 0; 979 return 0;
959} 980}
960 981
961static int snd_vt1724_capture_spdif_open(snd_pcm_substream_t *substream) 982static int snd_vt1724_capture_spdif_open(struct snd_pcm_substream *substream)
962{ 983{
963 ice1712_t *ice = snd_pcm_substream_chip(substream); 984 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
964 snd_pcm_runtime_t *runtime = substream->runtime; 985 struct snd_pcm_runtime *runtime = substream->runtime;
965 986
966 runtime->private_data = &vt1724_capture_spdif_reg; 987 runtime->private_data = &vt1724_capture_spdif_reg;
967 ice->capture_con_substream = substream; 988 ice->capture_con_substream = substream;
@@ -979,9 +1000,9 @@ static int snd_vt1724_capture_spdif_open(snd_pcm_substream_t *substream)
979 return 0; 1000 return 0;
980} 1001}
981 1002
982static int snd_vt1724_capture_spdif_close(snd_pcm_substream_t * substream) 1003static int snd_vt1724_capture_spdif_close(struct snd_pcm_substream *substream)
983{ 1004{
984 ice1712_t *ice = snd_pcm_substream_chip(substream); 1005 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
985 1006
986 if (PRO_RATE_RESET) 1007 if (PRO_RATE_RESET)
987 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 1008 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -990,7 +1011,7 @@ static int snd_vt1724_capture_spdif_close(snd_pcm_substream_t * substream)
990 return 0; 1011 return 0;
991} 1012}
992 1013
993static snd_pcm_ops_t snd_vt1724_playback_spdif_ops = { 1014static struct snd_pcm_ops snd_vt1724_playback_spdif_ops = {
994 .open = snd_vt1724_playback_spdif_open, 1015 .open = snd_vt1724_playback_spdif_open,
995 .close = snd_vt1724_playback_spdif_close, 1016 .close = snd_vt1724_playback_spdif_close,
996 .ioctl = snd_pcm_lib_ioctl, 1017 .ioctl = snd_pcm_lib_ioctl,
@@ -1001,7 +1022,7 @@ static snd_pcm_ops_t snd_vt1724_playback_spdif_ops = {
1001 .pointer = snd_vt1724_pcm_pointer, 1022 .pointer = snd_vt1724_pcm_pointer,
1002}; 1023};
1003 1024
1004static snd_pcm_ops_t snd_vt1724_capture_spdif_ops = { 1025static struct snd_pcm_ops snd_vt1724_capture_spdif_ops = {
1005 .open = snd_vt1724_capture_spdif_open, 1026 .open = snd_vt1724_capture_spdif_open,
1006 .close = snd_vt1724_capture_spdif_close, 1027 .close = snd_vt1724_capture_spdif_close,
1007 .ioctl = snd_pcm_lib_ioctl, 1028 .ioctl = snd_pcm_lib_ioctl,
@@ -1013,10 +1034,10 @@ static snd_pcm_ops_t snd_vt1724_capture_spdif_ops = {
1013}; 1034};
1014 1035
1015 1036
1016static int __devinit snd_vt1724_pcm_spdif(ice1712_t * ice, int device) 1037static int __devinit snd_vt1724_pcm_spdif(struct snd_ice1712 * ice, int device)
1017{ 1038{
1018 char *name; 1039 char *name;
1019 snd_pcm_t *pcm; 1040 struct snd_pcm *pcm;
1020 int play, capt; 1041 int play, capt;
1021 int err; 1042 int err;
1022 1043
@@ -1055,7 +1076,8 @@ static int __devinit snd_vt1724_pcm_spdif(ice1712_t * ice, int device)
1055 strcpy(pcm->name, name); 1076 strcpy(pcm->name, name);
1056 1077
1057 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1078 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1058 snd_dma_pci_data(ice->pci), 64*1024, 64*1024); 1079 snd_dma_pci_data(ice->pci),
1080 64*1024, 64*1024);
1059 1081
1060 ice->pcm = pcm; 1082 ice->pcm = pcm;
1061 1083
@@ -1088,9 +1110,9 @@ static struct vt1724_pcm_reg vt1724_playback_dma_regs[3] = {
1088 }, 1110 },
1089}; 1111};
1090 1112
1091static int snd_vt1724_playback_indep_prepare(snd_pcm_substream_t * substream) 1113static int snd_vt1724_playback_indep_prepare(struct snd_pcm_substream *substream)
1092{ 1114{
1093 ice1712_t *ice = snd_pcm_substream_chip(substream); 1115 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1094 unsigned char val; 1116 unsigned char val;
1095 1117
1096 spin_lock_irq(&ice->reg_lock); 1118 spin_lock_irq(&ice->reg_lock);
@@ -1101,10 +1123,10 @@ static int snd_vt1724_playback_indep_prepare(snd_pcm_substream_t * substream)
1101 return snd_vt1724_pcm_prepare(substream); 1123 return snd_vt1724_pcm_prepare(substream);
1102} 1124}
1103 1125
1104static int snd_vt1724_playback_indep_open(snd_pcm_substream_t *substream) 1126static int snd_vt1724_playback_indep_open(struct snd_pcm_substream *substream)
1105{ 1127{
1106 ice1712_t *ice = snd_pcm_substream_chip(substream); 1128 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1107 snd_pcm_runtime_t *runtime = substream->runtime; 1129 struct snd_pcm_runtime *runtime = substream->runtime;
1108 1130
1109 down(&ice->open_mutex); 1131 down(&ice->open_mutex);
1110 /* already used by PDMA0? */ 1132 /* already used by PDMA0? */
@@ -1122,9 +1144,9 @@ static int snd_vt1724_playback_indep_open(snd_pcm_substream_t *substream)
1122 return 0; 1144 return 0;
1123} 1145}
1124 1146
1125static int snd_vt1724_playback_indep_close(snd_pcm_substream_t * substream) 1147static int snd_vt1724_playback_indep_close(struct snd_pcm_substream *substream)
1126{ 1148{
1127 ice1712_t *ice = snd_pcm_substream_chip(substream); 1149 struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
1128 1150
1129 if (PRO_RATE_RESET) 1151 if (PRO_RATE_RESET)
1130 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); 1152 snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0);
@@ -1134,7 +1156,7 @@ static int snd_vt1724_playback_indep_close(snd_pcm_substream_t * substream)
1134 return 0; 1156 return 0;
1135} 1157}
1136 1158
1137static snd_pcm_ops_t snd_vt1724_playback_indep_ops = { 1159static struct snd_pcm_ops snd_vt1724_playback_indep_ops = {
1138 .open = snd_vt1724_playback_indep_open, 1160 .open = snd_vt1724_playback_indep_open,
1139 .close = snd_vt1724_playback_indep_close, 1161 .close = snd_vt1724_playback_indep_close,
1140 .ioctl = snd_pcm_lib_ioctl, 1162 .ioctl = snd_pcm_lib_ioctl,
@@ -1146,9 +1168,9 @@ static snd_pcm_ops_t snd_vt1724_playback_indep_ops = {
1146}; 1168};
1147 1169
1148 1170
1149static int __devinit snd_vt1724_pcm_indep(ice1712_t * ice, int device) 1171static int __devinit snd_vt1724_pcm_indep(struct snd_ice1712 * ice, int device)
1150{ 1172{
1151 snd_pcm_t *pcm; 1173 struct snd_pcm *pcm;
1152 int play; 1174 int play;
1153 int err; 1175 int err;
1154 1176
@@ -1168,7 +1190,8 @@ static int __devinit snd_vt1724_pcm_indep(ice1712_t * ice, int device)
1168 strcpy(pcm->name, "ICE1724 Surround PCM"); 1190 strcpy(pcm->name, "ICE1724 Surround PCM");
1169 1191
1170 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1192 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1171 snd_dma_pci_data(ice->pci), 64*1024, 64*1024); 1193 snd_dma_pci_data(ice->pci),
1194 64*1024, 64*1024);
1172 1195
1173 ice->pcm_ds = pcm; 1196 ice->pcm_ds = pcm;
1174 1197
@@ -1180,14 +1203,14 @@ static int __devinit snd_vt1724_pcm_indep(ice1712_t * ice, int device)
1180 * Mixer section 1203 * Mixer section
1181 */ 1204 */
1182 1205
1183static int __devinit snd_vt1724_ac97_mixer(ice1712_t * ice) 1206static int __devinit snd_vt1724_ac97_mixer(struct snd_ice1712 * ice)
1184{ 1207{
1185 int err; 1208 int err;
1186 1209
1187 if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S)) { 1210 if (! (ice->eeprom.data[ICE_EEP2_ACLINK] & VT1724_CFG_PRO_I2S)) {
1188 ac97_bus_t *pbus; 1211 struct snd_ac97_bus *pbus;
1189 ac97_template_t ac97; 1212 struct snd_ac97_template ac97;
1190 static ac97_bus_ops_t ops = { 1213 static struct snd_ac97_bus_ops ops = {
1191 .write = snd_vt1724_ac97_write, 1214 .write = snd_vt1724_ac97_write,
1192 .read = snd_vt1724_ac97_read, 1215 .read = snd_vt1724_ac97_read,
1193 }; 1216 };
@@ -1215,17 +1238,17 @@ static int __devinit snd_vt1724_ac97_mixer(ice1712_t * ice)
1215 * 1238 *
1216 */ 1239 */
1217 1240
1218static inline unsigned int eeprom_triple(ice1712_t *ice, int idx) 1241static inline unsigned int eeprom_triple(struct snd_ice1712 *ice, int idx)
1219{ 1242{
1220 return (unsigned int)ice->eeprom.data[idx] | \ 1243 return (unsigned int)ice->eeprom.data[idx] | \
1221 ((unsigned int)ice->eeprom.data[idx + 1] << 8) | \ 1244 ((unsigned int)ice->eeprom.data[idx + 1] << 8) | \
1222 ((unsigned int)ice->eeprom.data[idx + 2] << 16); 1245 ((unsigned int)ice->eeprom.data[idx + 2] << 16);
1223} 1246}
1224 1247
1225static void snd_vt1724_proc_read(snd_info_entry_t *entry, 1248static void snd_vt1724_proc_read(struct snd_info_entry *entry,
1226 snd_info_buffer_t * buffer) 1249 struct snd_info_buffer *buffer)
1227{ 1250{
1228 ice1712_t *ice = entry->private_data; 1251 struct snd_ice1712 *ice = entry->private_data;
1229 unsigned int idx; 1252 unsigned int idx;
1230 1253
1231 snd_iprintf(buffer, "%s\n\n", ice->card->longname); 1254 snd_iprintf(buffer, "%s\n\n", ice->card->longname);
@@ -1234,28 +1257,39 @@ static void snd_vt1724_proc_read(snd_info_entry_t *entry,
1234 snd_iprintf(buffer, " Subvendor : 0x%x\n", ice->eeprom.subvendor); 1257 snd_iprintf(buffer, " Subvendor : 0x%x\n", ice->eeprom.subvendor);
1235 snd_iprintf(buffer, " Size : %i bytes\n", ice->eeprom.size); 1258 snd_iprintf(buffer, " Size : %i bytes\n", ice->eeprom.size);
1236 snd_iprintf(buffer, " Version : %i\n", ice->eeprom.version); 1259 snd_iprintf(buffer, " Version : %i\n", ice->eeprom.version);
1237 snd_iprintf(buffer, " System Config : 0x%x\n", ice->eeprom.data[ICE_EEP2_SYSCONF]); 1260 snd_iprintf(buffer, " System Config : 0x%x\n",
1238 snd_iprintf(buffer, " ACLink : 0x%x\n", ice->eeprom.data[ICE_EEP2_ACLINK]); 1261 ice->eeprom.data[ICE_EEP2_SYSCONF]);
1239 snd_iprintf(buffer, " I2S : 0x%x\n", ice->eeprom.data[ICE_EEP2_I2S]); 1262 snd_iprintf(buffer, " ACLink : 0x%x\n",
1240 snd_iprintf(buffer, " S/PDIF : 0x%x\n", ice->eeprom.data[ICE_EEP2_SPDIF]); 1263 ice->eeprom.data[ICE_EEP2_ACLINK]);
1241 snd_iprintf(buffer, " GPIO direction : 0x%x\n", ice->eeprom.gpiodir); 1264 snd_iprintf(buffer, " I2S : 0x%x\n",
1242 snd_iprintf(buffer, " GPIO mask : 0x%x\n", ice->eeprom.gpiomask); 1265 ice->eeprom.data[ICE_EEP2_I2S]);
1243 snd_iprintf(buffer, " GPIO state : 0x%x\n", ice->eeprom.gpiostate); 1266 snd_iprintf(buffer, " S/PDIF : 0x%x\n",
1267 ice->eeprom.data[ICE_EEP2_SPDIF]);
1268 snd_iprintf(buffer, " GPIO direction : 0x%x\n",
1269 ice->eeprom.gpiodir);
1270 snd_iprintf(buffer, " GPIO mask : 0x%x\n",
1271 ice->eeprom.gpiomask);
1272 snd_iprintf(buffer, " GPIO state : 0x%x\n",
1273 ice->eeprom.gpiostate);
1244 for (idx = 0x12; idx < ice->eeprom.size; idx++) 1274 for (idx = 0x12; idx < ice->eeprom.size; idx++)
1245 snd_iprintf(buffer, " Extra #%02i : 0x%x\n", idx, ice->eeprom.data[idx]); 1275 snd_iprintf(buffer, " Extra #%02i : 0x%x\n",
1276 idx, ice->eeprom.data[idx]);
1246 1277
1247 snd_iprintf(buffer, "\nRegisters:\n"); 1278 snd_iprintf(buffer, "\nRegisters:\n");
1248 1279
1249 snd_iprintf(buffer, " PSDOUT03 : 0x%08x\n", (unsigned)inl(ICEMT1724(ice, ROUTE_PLAYBACK))); 1280 snd_iprintf(buffer, " PSDOUT03 : 0x%08x\n",
1281 (unsigned)inl(ICEMT1724(ice, ROUTE_PLAYBACK)));
1250 for (idx = 0x0; idx < 0x20 ; idx++) 1282 for (idx = 0x0; idx < 0x20 ; idx++)
1251 snd_iprintf(buffer, " CCS%02x : 0x%02x\n", idx, inb(ice->port+idx)); 1283 snd_iprintf(buffer, " CCS%02x : 0x%02x\n",
1284 idx, inb(ice->port+idx));
1252 for (idx = 0x0; idx < 0x30 ; idx++) 1285 for (idx = 0x0; idx < 0x30 ; idx++)
1253 snd_iprintf(buffer, " MT%02x : 0x%02x\n", idx, inb(ice->profi_port+idx)); 1286 snd_iprintf(buffer, " MT%02x : 0x%02x\n",
1287 idx, inb(ice->profi_port+idx));
1254} 1288}
1255 1289
1256static void __devinit snd_vt1724_proc_init(ice1712_t * ice) 1290static void __devinit snd_vt1724_proc_init(struct snd_ice1712 * ice)
1257{ 1291{
1258 snd_info_entry_t *entry; 1292 struct snd_info_entry *entry;
1259 1293
1260 if (! snd_card_proc_new(ice->card, "ice1724", &entry)) 1294 if (! snd_card_proc_new(ice->card, "ice1724", &entry))
1261 snd_info_set_text_ops(entry, ice, 1024, snd_vt1724_proc_read); 1295 snd_info_set_text_ops(entry, ice, 1024, snd_vt1724_proc_read);
@@ -1265,22 +1299,24 @@ static void __devinit snd_vt1724_proc_init(ice1712_t * ice)
1265 * 1299 *
1266 */ 1300 */
1267 1301
1268static int snd_vt1724_eeprom_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1302static int snd_vt1724_eeprom_info(struct snd_kcontrol *kcontrol,
1303 struct snd_ctl_elem_info *uinfo)
1269{ 1304{
1270 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES; 1305 uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
1271 uinfo->count = sizeof(ice1712_eeprom_t); 1306 uinfo->count = sizeof(struct snd_ice1712_eeprom);
1272 return 0; 1307 return 0;
1273} 1308}
1274 1309
1275static int snd_vt1724_eeprom_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1310static int snd_vt1724_eeprom_get(struct snd_kcontrol *kcontrol,
1311 struct snd_ctl_elem_value *ucontrol)
1276{ 1312{
1277 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1313 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1278 1314
1279 memcpy(ucontrol->value.bytes.data, &ice->eeprom, sizeof(ice->eeprom)); 1315 memcpy(ucontrol->value.bytes.data, &ice->eeprom, sizeof(ice->eeprom));
1280 return 0; 1316 return 0;
1281} 1317}
1282 1318
1283static snd_kcontrol_new_t snd_vt1724_eeprom __devinitdata = { 1319static struct snd_kcontrol_new snd_vt1724_eeprom __devinitdata = {
1284 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 1320 .iface = SNDRV_CTL_ELEM_IFACE_CARD,
1285 .name = "ICE1724 EEPROM", 1321 .name = "ICE1724 EEPROM",
1286 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1322 .access = SNDRV_CTL_ELEM_ACCESS_READ,
@@ -1290,21 +1326,23 @@ static snd_kcontrol_new_t snd_vt1724_eeprom __devinitdata = {
1290 1326
1291/* 1327/*
1292 */ 1328 */
1293static int snd_vt1724_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1329static int snd_vt1724_spdif_info(struct snd_kcontrol *kcontrol,
1330 struct snd_ctl_elem_info *uinfo)
1294{ 1331{
1295 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 1332 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
1296 uinfo->count = 1; 1333 uinfo->count = 1;
1297 return 0; 1334 return 0;
1298} 1335}
1299 1336
1300static unsigned int encode_spdif_bits(snd_aes_iec958_t *diga) 1337static unsigned int encode_spdif_bits(struct snd_aes_iec958 *diga)
1301{ 1338{
1302 unsigned int val, rbits; 1339 unsigned int val, rbits;
1303 1340
1304 val = diga->status[0] & 0x03; /* professional, non-audio */ 1341 val = diga->status[0] & 0x03; /* professional, non-audio */
1305 if (val & 0x01) { 1342 if (val & 0x01) {
1306 /* professional */ 1343 /* professional */
1307 if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) == IEC958_AES0_PRO_EMPHASIS_5015) 1344 if ((diga->status[0] & IEC958_AES0_PRO_EMPHASIS) ==
1345 IEC958_AES0_PRO_EMPHASIS_5015)
1308 val |= 1U << 3; 1346 val |= 1U << 3;
1309 rbits = (diga->status[4] >> 3) & 0x0f; 1347 rbits = (diga->status[4] >> 3) & 0x0f;
1310 if (rbits) { 1348 if (rbits) {
@@ -1329,7 +1367,8 @@ static unsigned int encode_spdif_bits(snd_aes_iec958_t *diga)
1329 } else { 1367 } else {
1330 /* consumer */ 1368 /* consumer */
1331 val |= diga->status[1] & 0x04; /* copyright */ 1369 val |= diga->status[1] & 0x04; /* copyright */
1332 if ((diga->status[0] & IEC958_AES0_CON_EMPHASIS)== IEC958_AES0_CON_EMPHASIS_5015) 1370 if ((diga->status[0] & IEC958_AES0_CON_EMPHASIS) ==
1371 IEC958_AES0_CON_EMPHASIS_5015)
1333 val |= 1U << 3; 1372 val |= 1U << 3;
1334 val |= (unsigned int)(diga->status[1] & 0x3f) << 4; /* category */ 1373 val |= (unsigned int)(diga->status[1] & 0x3f) << 4; /* category */
1335 val |= (unsigned int)(diga->status[3] & IEC958_AES3_CON_FS) << 12; /* fs */ 1374 val |= (unsigned int)(diga->status[3] & IEC958_AES3_CON_FS) << 12; /* fs */
@@ -1337,7 +1376,7 @@ static unsigned int encode_spdif_bits(snd_aes_iec958_t *diga)
1337 return val; 1376 return val;
1338} 1377}
1339 1378
1340static void decode_spdif_bits(snd_aes_iec958_t *diga, unsigned int val) 1379static void decode_spdif_bits(struct snd_aes_iec958 *diga, unsigned int val)
1341{ 1380{
1342 memset(diga->status, 0, sizeof(diga->status)); 1381 memset(diga->status, 0, sizeof(diga->status));
1343 diga->status[0] = val & 0x03; /* professional, non-audio */ 1382 diga->status[0] = val & 0x03; /* professional, non-audio */
@@ -1365,20 +1404,20 @@ static void decode_spdif_bits(snd_aes_iec958_t *diga, unsigned int val)
1365 } 1404 }
1366} 1405}
1367 1406
1368static int snd_vt1724_spdif_default_get(snd_kcontrol_t * kcontrol, 1407static int snd_vt1724_spdif_default_get(struct snd_kcontrol *kcontrol,
1369 snd_ctl_elem_value_t * ucontrol) 1408 struct snd_ctl_elem_value *ucontrol)
1370{ 1409{
1371 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1410 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1372 unsigned int val; 1411 unsigned int val;
1373 val = inw(ICEMT1724(ice, SPDIF_CTRL)); 1412 val = inw(ICEMT1724(ice, SPDIF_CTRL));
1374 decode_spdif_bits(&ucontrol->value.iec958, val); 1413 decode_spdif_bits(&ucontrol->value.iec958, val);
1375 return 0; 1414 return 0;
1376} 1415}
1377 1416
1378static int snd_vt1724_spdif_default_put(snd_kcontrol_t * kcontrol, 1417static int snd_vt1724_spdif_default_put(struct snd_kcontrol *kcontrol,
1379 snd_ctl_elem_value_t * ucontrol) 1418 struct snd_ctl_elem_value *ucontrol)
1380{ 1419{
1381 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1420 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1382 unsigned int val, old; 1421 unsigned int val, old;
1383 1422
1384 val = encode_spdif_bits(&ucontrol->value.iec958); 1423 val = encode_spdif_bits(&ucontrol->value.iec958);
@@ -1390,7 +1429,7 @@ static int snd_vt1724_spdif_default_put(snd_kcontrol_t * kcontrol,
1390 return (val != old); 1429 return (val != old);
1391} 1430}
1392 1431
1393static snd_kcontrol_new_t snd_vt1724_spdif_default __devinitdata = 1432static struct snd_kcontrol_new snd_vt1724_spdif_default __devinitdata =
1394{ 1433{
1395 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1434 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
1396 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), 1435 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
@@ -1399,8 +1438,8 @@ static snd_kcontrol_new_t snd_vt1724_spdif_default __devinitdata =
1399 .put = snd_vt1724_spdif_default_put 1438 .put = snd_vt1724_spdif_default_put
1400}; 1439};
1401 1440
1402static int snd_vt1724_spdif_maskc_get(snd_kcontrol_t * kcontrol, 1441static int snd_vt1724_spdif_maskc_get(struct snd_kcontrol *kcontrol,
1403 snd_ctl_elem_value_t * ucontrol) 1442 struct snd_ctl_elem_value *ucontrol)
1404{ 1443{
1405 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO | 1444 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO |
1406 IEC958_AES0_PROFESSIONAL | 1445 IEC958_AES0_PROFESSIONAL |
@@ -1412,8 +1451,8 @@ static int snd_vt1724_spdif_maskc_get(snd_kcontrol_t * kcontrol,
1412 return 0; 1451 return 0;
1413} 1452}
1414 1453
1415static int snd_vt1724_spdif_maskp_get(snd_kcontrol_t * kcontrol, 1454static int snd_vt1724_spdif_maskp_get(struct snd_kcontrol *kcontrol,
1416 snd_ctl_elem_value_t * ucontrol) 1455 struct snd_ctl_elem_value *ucontrol)
1417{ 1456{
1418 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO | 1457 ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO |
1419 IEC958_AES0_PROFESSIONAL | 1458 IEC958_AES0_PROFESSIONAL |
@@ -1422,7 +1461,7 @@ static int snd_vt1724_spdif_maskp_get(snd_kcontrol_t * kcontrol,
1422 return 0; 1461 return 0;
1423} 1462}
1424 1463
1425static snd_kcontrol_new_t snd_vt1724_spdif_maskc __devinitdata = 1464static struct snd_kcontrol_new snd_vt1724_spdif_maskc __devinitdata =
1426{ 1465{
1427 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1466 .access = SNDRV_CTL_ELEM_ACCESS_READ,
1428 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1467 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -1431,7 +1470,7 @@ static snd_kcontrol_new_t snd_vt1724_spdif_maskc __devinitdata =
1431 .get = snd_vt1724_spdif_maskc_get, 1470 .get = snd_vt1724_spdif_maskc_get,
1432}; 1471};
1433 1472
1434static snd_kcontrol_new_t snd_vt1724_spdif_maskp __devinitdata = 1473static struct snd_kcontrol_new snd_vt1724_spdif_maskp __devinitdata =
1435{ 1474{
1436 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1475 .access = SNDRV_CTL_ELEM_ACCESS_READ,
1437 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1476 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
@@ -1440,7 +1479,8 @@ static snd_kcontrol_new_t snd_vt1724_spdif_maskp __devinitdata =
1440 .get = snd_vt1724_spdif_maskp_get, 1479 .get = snd_vt1724_spdif_maskp_get,
1441}; 1480};
1442 1481
1443static int snd_vt1724_spdif_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1482static int snd_vt1724_spdif_sw_info(struct snd_kcontrol *kcontrol,
1483 struct snd_ctl_elem_info *uinfo)
1444{ 1484{
1445 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1485 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1446 uinfo->count = 1; 1486 uinfo->count = 1;
@@ -1449,16 +1489,19 @@ static int snd_vt1724_spdif_sw_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
1449 return 0; 1489 return 0;
1450} 1490}
1451 1491
1452static int snd_vt1724_spdif_sw_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1492static int snd_vt1724_spdif_sw_get(struct snd_kcontrol *kcontrol,
1493 struct snd_ctl_elem_value *ucontrol)
1453{ 1494{
1454 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1495 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1455 ucontrol->value.integer.value[0] = inb(ICEREG1724(ice, SPDIF_CFG)) & VT1724_CFG_SPDIF_OUT_EN ? 1 : 0; 1496 ucontrol->value.integer.value[0] = inb(ICEREG1724(ice, SPDIF_CFG)) &
1497 VT1724_CFG_SPDIF_OUT_EN ? 1 : 0;
1456 return 0; 1498 return 0;
1457} 1499}
1458 1500
1459static int snd_vt1724_spdif_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1501static int snd_vt1724_spdif_sw_put(struct snd_kcontrol *kcontrol,
1502 struct snd_ctl_elem_value *ucontrol)
1460{ 1503{
1461 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1504 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1462 unsigned char old, val; 1505 unsigned char old, val;
1463 1506
1464 spin_lock_irq(&ice->reg_lock); 1507 spin_lock_irq(&ice->reg_lock);
@@ -1472,7 +1515,7 @@ static int snd_vt1724_spdif_sw_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value
1472 return old != val; 1515 return old != val;
1473} 1516}
1474 1517
1475static snd_kcontrol_new_t snd_vt1724_spdif_switch __devinitdata = 1518static struct snd_kcontrol_new snd_vt1724_spdif_switch __devinitdata =
1476{ 1519{
1477 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1520 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1478 /* FIXME: the following conflict with IEC958 Playback Route */ 1521 /* FIXME: the following conflict with IEC958 Playback Route */
@@ -1489,7 +1532,8 @@ static snd_kcontrol_new_t snd_vt1724_spdif_switch __devinitdata =
1489 * GPIO access from extern 1532 * GPIO access from extern
1490 */ 1533 */
1491 1534
1492int snd_vt1724_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1535int snd_vt1724_gpio_info(struct snd_kcontrol *kcontrol,
1536 struct snd_ctl_elem_info *uinfo)
1493{ 1537{
1494 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1538 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1495 uinfo->count = 1; 1539 uinfo->count = 1;
@@ -1498,21 +1542,24 @@ int snd_vt1724_gpio_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo)
1498 return 0; 1542 return 0;
1499} 1543}
1500 1544
1501int snd_vt1724_gpio_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1545int snd_vt1724_gpio_get(struct snd_kcontrol *kcontrol,
1546 struct snd_ctl_elem_value *ucontrol)
1502{ 1547{
1503 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1548 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1504 int shift = kcontrol->private_value & 0xff; 1549 int shift = kcontrol->private_value & 0xff;
1505 int invert = (kcontrol->private_value & (1<<24)) ? 1 : 0; 1550 int invert = (kcontrol->private_value & (1<<24)) ? 1 : 0;
1506 1551
1507 snd_ice1712_save_gpio_status(ice); 1552 snd_ice1712_save_gpio_status(ice);
1508 ucontrol->value.integer.value[0] = (snd_ice1712_gpio_read(ice) & (1 << shift) ? 1 : 0) ^ invert; 1553 ucontrol->value.integer.value[0] =
1554 (snd_ice1712_gpio_read(ice) & (1 << shift) ? 1 : 0) ^ invert;
1509 snd_ice1712_restore_gpio_status(ice); 1555 snd_ice1712_restore_gpio_status(ice);
1510 return 0; 1556 return 0;
1511} 1557}
1512 1558
1513int snd_ice1712_gpio_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1559int snd_ice1712_gpio_put(struct snd_kcontrol *kcontrol,
1560 struct snd_ctl_elem_value *ucontrol)
1514{ 1561{
1515 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1562 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1516 int shift = kcontrol->private_value & 0xff; 1563 int shift = kcontrol->private_value & 0xff;
1517 int invert = (kcontrol->private_value & (1<<24)) ? mask : 0; 1564 int invert = (kcontrol->private_value & (1<<24)) ? mask : 0;
1518 unsigned int val, nval; 1565 unsigned int val, nval;
@@ -1533,7 +1580,8 @@ int snd_ice1712_gpio_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucont
1533/* 1580/*
1534 * rate 1581 * rate
1535 */ 1582 */
1536static int snd_vt1724_pro_internal_clock_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1583static int snd_vt1724_pro_internal_clock_info(struct snd_kcontrol *kcontrol,
1584 struct snd_ctl_elem_info *uinfo)
1537{ 1585{
1538 static char *texts_1724[] = { 1586 static char *texts_1724[] = {
1539 "8000", /* 0: 6 */ 1587 "8000", /* 0: 6 */
@@ -1569,7 +1617,7 @@ static int snd_vt1724_pro_internal_clock_info(snd_kcontrol_t *kcontrol, snd_ctl_
1569 "96000", /* 12: 7 */ 1617 "96000", /* 12: 7 */
1570 "IEC958 Input", /* 13: -- */ 1618 "IEC958 Input", /* 13: -- */
1571 }; 1619 };
1572 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1620 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1573 1621
1574 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 1622 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
1575 uinfo->count = 1; 1623 uinfo->count = 1;
@@ -1582,9 +1630,10 @@ static int snd_vt1724_pro_internal_clock_info(snd_kcontrol_t *kcontrol, snd_ctl_
1582 return 0; 1630 return 0;
1583} 1631}
1584 1632
1585static int snd_vt1724_pro_internal_clock_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1633static int snd_vt1724_pro_internal_clock_get(struct snd_kcontrol *kcontrol,
1634 struct snd_ctl_elem_value *ucontrol)
1586{ 1635{
1587 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1636 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1588 static unsigned char xlate[16] = { 1637 static unsigned char xlate[16] = {
1589 9, 6, 3, 1, 7, 4, 0, 12, 8, 5, 2, 11, 13, 255, 14, 10 1638 9, 6, 3, 1, 7, 4, 0, 12, 8, 5, 2, 11, 13, 255, 14, 10
1590 }; 1639 };
@@ -1605,9 +1654,10 @@ static int snd_vt1724_pro_internal_clock_get(snd_kcontrol_t * kcontrol, snd_ctl_
1605 return 0; 1654 return 0;
1606} 1655}
1607 1656
1608static int snd_vt1724_pro_internal_clock_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1657static int snd_vt1724_pro_internal_clock_put(struct snd_kcontrol *kcontrol,
1658 struct snd_ctl_elem_value *ucontrol)
1609{ 1659{
1610 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1660 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1611 unsigned char oval; 1661 unsigned char oval;
1612 int rate; 1662 int rate;
1613 int change = 0; 1663 int change = 0;
@@ -1629,7 +1679,8 @@ static int snd_vt1724_pro_internal_clock_put(snd_kcontrol_t * kcontrol, snd_ctl_
1629 change = inb(ICEMT1724(ice, RATE)) != oval; 1679 change = inb(ICEMT1724(ice, RATE)) != oval;
1630 spin_unlock_irq(&ice->reg_lock); 1680 spin_unlock_irq(&ice->reg_lock);
1631 1681
1632 if ((oval & VT1724_SPDIF_MASTER) != (inb(ICEMT1724(ice, RATE)) & VT1724_SPDIF_MASTER)) { 1682 if ((oval & VT1724_SPDIF_MASTER) !=
1683 (inb(ICEMT1724(ice, RATE)) & VT1724_SPDIF_MASTER)) {
1633 /* notify akm chips as well */ 1684 /* notify akm chips as well */
1634 if (is_spdif_master(ice)) { 1685 if (is_spdif_master(ice)) {
1635 unsigned int i; 1686 unsigned int i;
@@ -1642,7 +1693,7 @@ static int snd_vt1724_pro_internal_clock_put(snd_kcontrol_t * kcontrol, snd_ctl_
1642 return change; 1693 return change;
1643} 1694}
1644 1695
1645static snd_kcontrol_new_t snd_vt1724_pro_internal_clock __devinitdata = { 1696static struct snd_kcontrol_new snd_vt1724_pro_internal_clock __devinitdata = {
1646 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1697 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1647 .name = "Multi Track Internal Clock", 1698 .name = "Multi Track Internal Clock",
1648 .info = snd_vt1724_pro_internal_clock_info, 1699 .info = snd_vt1724_pro_internal_clock_info,
@@ -1650,7 +1701,8 @@ static snd_kcontrol_new_t snd_vt1724_pro_internal_clock __devinitdata = {
1650 .put = snd_vt1724_pro_internal_clock_put 1701 .put = snd_vt1724_pro_internal_clock_put
1651}; 1702};
1652 1703
1653static int snd_vt1724_pro_rate_locking_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1704static int snd_vt1724_pro_rate_locking_info(struct snd_kcontrol *kcontrol,
1705 struct snd_ctl_elem_info *uinfo)
1654{ 1706{
1655 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1707 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1656 uinfo->count = 1; 1708 uinfo->count = 1;
@@ -1659,15 +1711,17 @@ static int snd_vt1724_pro_rate_locking_info(snd_kcontrol_t *kcontrol, snd_ctl_el
1659 return 0; 1711 return 0;
1660} 1712}
1661 1713
1662static int snd_vt1724_pro_rate_locking_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1714static int snd_vt1724_pro_rate_locking_get(struct snd_kcontrol *kcontrol,
1715 struct snd_ctl_elem_value *ucontrol)
1663{ 1716{
1664 ucontrol->value.integer.value[0] = PRO_RATE_LOCKED; 1717 ucontrol->value.integer.value[0] = PRO_RATE_LOCKED;
1665 return 0; 1718 return 0;
1666} 1719}
1667 1720
1668static int snd_vt1724_pro_rate_locking_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1721static int snd_vt1724_pro_rate_locking_put(struct snd_kcontrol *kcontrol,
1722 struct snd_ctl_elem_value *ucontrol)
1669{ 1723{
1670 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1724 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1671 int change = 0, nval; 1725 int change = 0, nval;
1672 1726
1673 nval = ucontrol->value.integer.value[0] ? 1 : 0; 1727 nval = ucontrol->value.integer.value[0] ? 1 : 0;
@@ -1678,7 +1732,7 @@ static int snd_vt1724_pro_rate_locking_put(snd_kcontrol_t * kcontrol, snd_ctl_el
1678 return change; 1732 return change;
1679} 1733}
1680 1734
1681static snd_kcontrol_new_t snd_vt1724_pro_rate_locking __devinitdata = { 1735static struct snd_kcontrol_new snd_vt1724_pro_rate_locking __devinitdata = {
1682 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1736 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1683 .name = "Multi Track Rate Locking", 1737 .name = "Multi Track Rate Locking",
1684 .info = snd_vt1724_pro_rate_locking_info, 1738 .info = snd_vt1724_pro_rate_locking_info,
@@ -1686,7 +1740,8 @@ static snd_kcontrol_new_t snd_vt1724_pro_rate_locking __devinitdata = {
1686 .put = snd_vt1724_pro_rate_locking_put 1740 .put = snd_vt1724_pro_rate_locking_put
1687}; 1741};
1688 1742
1689static int snd_vt1724_pro_rate_reset_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1743static int snd_vt1724_pro_rate_reset_info(struct snd_kcontrol *kcontrol,
1744 struct snd_ctl_elem_info *uinfo)
1690{ 1745{
1691 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1746 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1692 uinfo->count = 1; 1747 uinfo->count = 1;
@@ -1695,15 +1750,17 @@ static int snd_vt1724_pro_rate_reset_info(snd_kcontrol_t *kcontrol, snd_ctl_elem
1695 return 0; 1750 return 0;
1696} 1751}
1697 1752
1698static int snd_vt1724_pro_rate_reset_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1753static int snd_vt1724_pro_rate_reset_get(struct snd_kcontrol *kcontrol,
1754 struct snd_ctl_elem_value *ucontrol)
1699{ 1755{
1700 ucontrol->value.integer.value[0] = PRO_RATE_RESET ? 1 : 0; 1756 ucontrol->value.integer.value[0] = PRO_RATE_RESET ? 1 : 0;
1701 return 0; 1757 return 0;
1702} 1758}
1703 1759
1704static int snd_vt1724_pro_rate_reset_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1760static int snd_vt1724_pro_rate_reset_put(struct snd_kcontrol *kcontrol,
1761 struct snd_ctl_elem_value *ucontrol)
1705{ 1762{
1706 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1763 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1707 int change = 0, nval; 1764 int change = 0, nval;
1708 1765
1709 nval = ucontrol->value.integer.value[0] ? 1 : 0; 1766 nval = ucontrol->value.integer.value[0] ? 1 : 0;
@@ -1714,7 +1771,7 @@ static int snd_vt1724_pro_rate_reset_put(snd_kcontrol_t * kcontrol, snd_ctl_elem
1714 return change; 1771 return change;
1715} 1772}
1716 1773
1717static snd_kcontrol_new_t snd_vt1724_pro_rate_reset __devinitdata = { 1774static struct snd_kcontrol_new snd_vt1724_pro_rate_reset __devinitdata = {
1718 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1775 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1719 .name = "Multi Track Rate Reset", 1776 .name = "Multi Track Rate Reset",
1720 .info = snd_vt1724_pro_rate_reset_info, 1777 .info = snd_vt1724_pro_rate_reset_info,
@@ -1726,7 +1783,8 @@ static snd_kcontrol_new_t snd_vt1724_pro_rate_reset __devinitdata = {
1726/* 1783/*
1727 * routing 1784 * routing
1728 */ 1785 */
1729static int snd_vt1724_pro_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1786static int snd_vt1724_pro_route_info(struct snd_kcontrol *kcontrol,
1787 struct snd_ctl_elem_info *uinfo)
1730{ 1788{
1731 static char *texts[] = { 1789 static char *texts[] = {
1732 "PCM Out", /* 0 */ 1790 "PCM Out", /* 0 */
@@ -1753,7 +1811,7 @@ static inline int digital_route_shift(int idx)
1753 return idx * 3; 1811 return idx * 3;
1754} 1812}
1755 1813
1756static int get_route_val(ice1712_t *ice, int shift) 1814static int get_route_val(struct snd_ice1712 *ice, int shift)
1757{ 1815{
1758 unsigned long val; 1816 unsigned long val;
1759 unsigned char eitem; 1817 unsigned char eitem;
@@ -1772,7 +1830,7 @@ static int get_route_val(ice1712_t *ice, int shift)
1772 return eitem; 1830 return eitem;
1773} 1831}
1774 1832
1775static int put_route_val(ice1712_t *ice, unsigned int val, int shift) 1833static int put_route_val(struct snd_ice1712 *ice, unsigned int val, int shift)
1776{ 1834{
1777 unsigned int old_val, nval; 1835 unsigned int old_val, nval;
1778 int change; 1836 int change;
@@ -1794,39 +1852,45 @@ static int put_route_val(ice1712_t *ice, unsigned int val, int shift)
1794 return change; 1852 return change;
1795} 1853}
1796 1854
1797static int snd_vt1724_pro_route_analog_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 1855static int snd_vt1724_pro_route_analog_get(struct snd_kcontrol *kcontrol,
1856 struct snd_ctl_elem_value *ucontrol)
1798{ 1857{
1799 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1858 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1800 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1859 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1801 ucontrol->value.enumerated.item[0] = get_route_val(ice, analog_route_shift(idx)); 1860 ucontrol->value.enumerated.item[0] =
1861 get_route_val(ice, analog_route_shift(idx));
1802 return 0; 1862 return 0;
1803} 1863}
1804 1864
1805static int snd_vt1724_pro_route_analog_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 1865static int snd_vt1724_pro_route_analog_put(struct snd_kcontrol *kcontrol,
1866 struct snd_ctl_elem_value *ucontrol)
1806{ 1867{
1807 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1868 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1808 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1869 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1809 return put_route_val(ice, ucontrol->value.enumerated.item[0], 1870 return put_route_val(ice, ucontrol->value.enumerated.item[0],
1810 analog_route_shift(idx)); 1871 analog_route_shift(idx));
1811} 1872}
1812 1873
1813static int snd_vt1724_pro_route_spdif_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 1874static int snd_vt1724_pro_route_spdif_get(struct snd_kcontrol *kcontrol,
1875 struct snd_ctl_elem_value *ucontrol)
1814{ 1876{
1815 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1877 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1816 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1878 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1817 ucontrol->value.enumerated.item[0] = get_route_val(ice, digital_route_shift(idx)); 1879 ucontrol->value.enumerated.item[0] =
1880 get_route_val(ice, digital_route_shift(idx));
1818 return 0; 1881 return 0;
1819} 1882}
1820 1883
1821static int snd_vt1724_pro_route_spdif_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 1884static int snd_vt1724_pro_route_spdif_put(struct snd_kcontrol *kcontrol,
1885 struct snd_ctl_elem_value *ucontrol)
1822{ 1886{
1823 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1887 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1824 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1888 int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1825 return put_route_val(ice, ucontrol->value.enumerated.item[0], 1889 return put_route_val(ice, ucontrol->value.enumerated.item[0],
1826 digital_route_shift(idx)); 1890 digital_route_shift(idx));
1827} 1891}
1828 1892
1829static snd_kcontrol_new_t snd_vt1724_mixer_pro_analog_route __devinitdata = { 1893static struct snd_kcontrol_new snd_vt1724_mixer_pro_analog_route __devinitdata = {
1830 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1894 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1831 .name = "H/W Playback Route", 1895 .name = "H/W Playback Route",
1832 .info = snd_vt1724_pro_route_info, 1896 .info = snd_vt1724_pro_route_info,
@@ -1834,7 +1898,7 @@ static snd_kcontrol_new_t snd_vt1724_mixer_pro_analog_route __devinitdata = {
1834 .put = snd_vt1724_pro_route_analog_put, 1898 .put = snd_vt1724_pro_route_analog_put,
1835}; 1899};
1836 1900
1837static snd_kcontrol_new_t snd_vt1724_mixer_pro_spdif_route __devinitdata = { 1901static struct snd_kcontrol_new snd_vt1724_mixer_pro_spdif_route __devinitdata = {
1838 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1902 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1839 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route", 1903 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,NONE) "Route",
1840 .info = snd_vt1724_pro_route_info, 1904 .info = snd_vt1724_pro_route_info,
@@ -1844,7 +1908,8 @@ static snd_kcontrol_new_t snd_vt1724_mixer_pro_spdif_route __devinitdata = {
1844}; 1908};
1845 1909
1846 1910
1847static int snd_vt1724_pro_peak_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 1911static int snd_vt1724_pro_peak_info(struct snd_kcontrol *kcontrol,
1912 struct snd_ctl_elem_info *uinfo)
1848{ 1913{
1849 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 1914 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
1850 uinfo->count = 22; /* FIXME: for compatibility with ice1712... */ 1915 uinfo->count = 22; /* FIXME: for compatibility with ice1712... */
@@ -1853,21 +1918,23 @@ static int snd_vt1724_pro_peak_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_
1853 return 0; 1918 return 0;
1854} 1919}
1855 1920
1856static int snd_vt1724_pro_peak_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 1921static int snd_vt1724_pro_peak_get(struct snd_kcontrol *kcontrol,
1922 struct snd_ctl_elem_value *ucontrol)
1857{ 1923{
1858 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 1924 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1859 int idx; 1925 int idx;
1860 1926
1861 spin_lock_irq(&ice->reg_lock); 1927 spin_lock_irq(&ice->reg_lock);
1862 for (idx = 0; idx < 22; idx++) { 1928 for (idx = 0; idx < 22; idx++) {
1863 outb(idx, ICEMT1724(ice, MONITOR_PEAKINDEX)); 1929 outb(idx, ICEMT1724(ice, MONITOR_PEAKINDEX));
1864 ucontrol->value.integer.value[idx] = inb(ICEMT1724(ice, MONITOR_PEAKDATA)); 1930 ucontrol->value.integer.value[idx] =
1931 inb(ICEMT1724(ice, MONITOR_PEAKDATA));
1865 } 1932 }
1866 spin_unlock_irq(&ice->reg_lock); 1933 spin_unlock_irq(&ice->reg_lock);
1867 return 0; 1934 return 0;
1868} 1935}
1869 1936
1870static snd_kcontrol_new_t snd_vt1724_mixer_pro_peak __devinitdata = { 1937static struct snd_kcontrol_new snd_vt1724_mixer_pro_peak __devinitdata = {
1871 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1938 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1872 .name = "Multi Track Peak", 1939 .name = "Multi Track Peak",
1873 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, 1940 .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
@@ -1897,7 +1964,7 @@ static struct snd_ice1712_card_info *card_tables[] __devinitdata = {
1897/* 1964/*
1898 */ 1965 */
1899 1966
1900static void wait_i2c_busy(ice1712_t *ice) 1967static void wait_i2c_busy(struct snd_ice1712 *ice)
1901{ 1968{
1902 int t = 0x10000; 1969 int t = 0x10000;
1903 while ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY) && t--) 1970 while ((inb(ICEREG1724(ice, I2C_CTRL)) & VT1724_I2C_BUSY) && t--)
@@ -1906,7 +1973,8 @@ static void wait_i2c_busy(ice1712_t *ice)
1906 printk(KERN_ERR "ice1724: i2c busy timeout\n"); 1973 printk(KERN_ERR "ice1724: i2c busy timeout\n");
1907} 1974}
1908 1975
1909unsigned char snd_vt1724_read_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr) 1976unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice,
1977 unsigned char dev, unsigned char addr)
1910{ 1978{
1911 unsigned char val; 1979 unsigned char val;
1912 1980
@@ -1920,7 +1988,8 @@ unsigned char snd_vt1724_read_i2c(ice1712_t *ice, unsigned char dev, unsigned ch
1920 return val; 1988 return val;
1921} 1989}
1922 1990
1923void snd_vt1724_write_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr, unsigned char data) 1991void snd_vt1724_write_i2c(struct snd_ice1712 *ice,
1992 unsigned char dev, unsigned char addr, unsigned char data)
1924{ 1993{
1925 down(&ice->i2c_mutex); 1994 down(&ice->i2c_mutex);
1926 wait_i2c_busy(ice); 1995 wait_i2c_busy(ice);
@@ -1932,7 +2001,8 @@ void snd_vt1724_write_i2c(ice1712_t *ice, unsigned char dev, unsigned char addr,
1932 up(&ice->i2c_mutex); 2001 up(&ice->i2c_mutex);
1933} 2002}
1934 2003
1935static int __devinit snd_vt1724_read_eeprom(ice1712_t *ice, const char *modelname) 2004static int __devinit snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
2005 const char *modelname)
1936{ 2006{
1937 const int dev = 0xa0; /* EEPROM device address */ 2007 const int dev = 0xa0; /* EEPROM device address */
1938 unsigned int i, size; 2008 unsigned int i, size;
@@ -1946,13 +2016,19 @@ static int __devinit snd_vt1724_read_eeprom(ice1712_t *ice, const char *modelnam
1946 (snd_vt1724_read_i2c(ice, dev, 0x01) << 8) | 2016 (snd_vt1724_read_i2c(ice, dev, 0x01) << 8) |
1947 (snd_vt1724_read_i2c(ice, dev, 0x02) << 16) | 2017 (snd_vt1724_read_i2c(ice, dev, 0x02) << 16) |
1948 (snd_vt1724_read_i2c(ice, dev, 0x03) << 24); 2018 (snd_vt1724_read_i2c(ice, dev, 0x03) << 24);
1949 if (ice->eeprom.subvendor == 0 || ice->eeprom.subvendor == (unsigned int)-1) { 2019 if (ice->eeprom.subvendor == 0 ||
1950 /* invalid subvendor from EEPROM, try the PCI subststem ID instead */ 2020 ice->eeprom.subvendor == (unsigned int)-1) {
2021 /* invalid subvendor from EEPROM, try the PCI
2022 * subststem ID instead
2023 */
1951 u16 vendor, device; 2024 u16 vendor, device;
1952 pci_read_config_word(ice->pci, PCI_SUBSYSTEM_VENDOR_ID, &vendor); 2025 pci_read_config_word(ice->pci, PCI_SUBSYSTEM_VENDOR_ID,
2026 &vendor);
1953 pci_read_config_word(ice->pci, PCI_SUBSYSTEM_ID, &device); 2027 pci_read_config_word(ice->pci, PCI_SUBSYSTEM_ID, &device);
1954 ice->eeprom.subvendor = ((unsigned int)swab16(vendor) << 16) | swab16(device); 2028 ice->eeprom.subvendor =
1955 if (ice->eeprom.subvendor == 0 || ice->eeprom.subvendor == (unsigned int)-1) { 2029 ((unsigned int)swab16(vendor) << 16) | swab16(device);
2030 if (ice->eeprom.subvendor == 0 ||
2031 ice->eeprom.subvendor == (unsigned int)-1) {
1956 printk(KERN_ERR "ice1724: No valid ID is found\n"); 2032 printk(KERN_ERR "ice1724: No valid ID is found\n");
1957 return -ENXIO; 2033 return -ENXIO;
1958 } 2034 }
@@ -1960,8 +2036,10 @@ static int __devinit snd_vt1724_read_eeprom(ice1712_t *ice, const char *modelnam
1960 } 2036 }
1961 for (tbl = card_tables; *tbl; tbl++) { 2037 for (tbl = card_tables; *tbl; tbl++) {
1962 for (c = *tbl; c->subvendor; c++) { 2038 for (c = *tbl; c->subvendor; c++) {
1963 if (modelname && c->model && ! strcmp(modelname, c->model)) { 2039 if (modelname && c->model &&
1964 printk(KERN_INFO "ice1724: Using board model %s\n", c->name); 2040 ! strcmp(modelname, c->model)) {
2041 printk(KERN_INFO "ice1724: Using board model %s\n",
2042 c->name);
1965 ice->eeprom.subvendor = c->subvendor; 2043 ice->eeprom.subvendor = c->subvendor;
1966 } else if (c->subvendor != ice->eeprom.subvendor) 2044 } else if (c->subvendor != ice->eeprom.subvendor)
1967 continue; 2045 continue;
@@ -1975,19 +2053,22 @@ static int __devinit snd_vt1724_read_eeprom(ice1712_t *ice, const char *modelnam
1975 goto read_skipped; 2053 goto read_skipped;
1976 } 2054 }
1977 } 2055 }
1978 printk(KERN_WARNING "ice1724: No matching model found for ID 0x%x\n", ice->eeprom.subvendor); 2056 printk(KERN_WARNING "ice1724: No matching model found for ID 0x%x\n",
2057 ice->eeprom.subvendor);
1979 2058
1980 found: 2059 found:
1981 ice->eeprom.size = snd_vt1724_read_i2c(ice, dev, 0x04); 2060 ice->eeprom.size = snd_vt1724_read_i2c(ice, dev, 0x04);
1982 if (ice->eeprom.size < 6) 2061 if (ice->eeprom.size < 6)
1983 ice->eeprom.size = 32; 2062 ice->eeprom.size = 32;
1984 else if (ice->eeprom.size > 32) { 2063 else if (ice->eeprom.size > 32) {
1985 printk(KERN_ERR "ice1724: Invalid EEPROM (size = %i)\n", ice->eeprom.size); 2064 printk(KERN_ERR "ice1724: Invalid EEPROM (size = %i)\n",
2065 ice->eeprom.size);
1986 return -EIO; 2066 return -EIO;
1987 } 2067 }
1988 ice->eeprom.version = snd_vt1724_read_i2c(ice, dev, 0x05); 2068 ice->eeprom.version = snd_vt1724_read_i2c(ice, dev, 0x05);
1989 if (ice->eeprom.version != 2) 2069 if (ice->eeprom.version != 2)
1990 printk(KERN_WARNING "ice1724: Invalid EEPROM version %i\n", ice->eeprom.version); 2070 printk(KERN_WARNING "ice1724: Invalid EEPROM version %i\n",
2071 ice->eeprom.version);
1991 size = ice->eeprom.size - 6; 2072 size = ice->eeprom.size - 6;
1992 for (i = 0; i < size; i++) 2073 for (i = 0; i < size; i++)
1993 ice->eeprom.data[i] = snd_vt1724_read_i2c(ice, dev, i + 6); 2074 ice->eeprom.data[i] = snd_vt1724_read_i2c(ice, dev, i + 6);
@@ -2002,7 +2083,7 @@ static int __devinit snd_vt1724_read_eeprom(ice1712_t *ice, const char *modelnam
2002 2083
2003 2084
2004 2085
2005static int __devinit snd_vt1724_chip_init(ice1712_t *ice) 2086static int __devinit snd_vt1724_chip_init(struct snd_ice1712 *ice)
2006{ 2087{
2007 outb(VT1724_RESET , ICEREG1724(ice, CONTROL)); 2088 outb(VT1724_RESET , ICEREG1724(ice, CONTROL));
2008 udelay(200); 2089 udelay(200);
@@ -2024,10 +2105,10 @@ static int __devinit snd_vt1724_chip_init(ice1712_t *ice)
2024 return 0; 2105 return 0;
2025} 2106}
2026 2107
2027static int __devinit snd_vt1724_spdif_build_controls(ice1712_t *ice) 2108static int __devinit snd_vt1724_spdif_build_controls(struct snd_ice1712 *ice)
2028{ 2109{
2029 int err; 2110 int err;
2030 snd_kcontrol_t *kctl; 2111 struct snd_kcontrol *kctl;
2031 2112
2032 snd_assert(ice->pcm != NULL, return -EIO); 2113 snd_assert(ice->pcm != NULL, return -EIO);
2033 2114
@@ -2062,7 +2143,7 @@ static int __devinit snd_vt1724_spdif_build_controls(ice1712_t *ice)
2062} 2143}
2063 2144
2064 2145
2065static int __devinit snd_vt1724_build_controls(ice1712_t *ice) 2146static int __devinit snd_vt1724_build_controls(struct snd_ice1712 *ice)
2066{ 2147{
2067 int err; 2148 int err;
2068 2149
@@ -2081,7 +2162,7 @@ static int __devinit snd_vt1724_build_controls(ice1712_t *ice)
2081 return err; 2162 return err;
2082 2163
2083 if (ice->num_total_dacs > 0) { 2164 if (ice->num_total_dacs > 0) {
2084 snd_kcontrol_new_t tmp = snd_vt1724_mixer_pro_analog_route; 2165 struct snd_kcontrol_new tmp = snd_vt1724_mixer_pro_analog_route;
2085 tmp.count = ice->num_total_dacs; 2166 tmp.count = ice->num_total_dacs;
2086 if (ice->vt1720 && tmp.count > 2) 2167 if (ice->vt1720 && tmp.count > 2)
2087 tmp.count = 2; 2168 tmp.count = 2;
@@ -2097,7 +2178,7 @@ static int __devinit snd_vt1724_build_controls(ice1712_t *ice)
2097 return 0; 2178 return 0;
2098} 2179}
2099 2180
2100static int snd_vt1724_free(ice1712_t *ice) 2181static int snd_vt1724_free(struct snd_ice1712 *ice)
2101{ 2182{
2102 if (! ice->port) 2183 if (! ice->port)
2103 goto __hw_end; 2184 goto __hw_end;
@@ -2108,7 +2189,7 @@ static int snd_vt1724_free(ice1712_t *ice)
2108 __hw_end: 2189 __hw_end:
2109 if (ice->irq >= 0) { 2190 if (ice->irq >= 0) {
2110 synchronize_irq(ice->irq); 2191 synchronize_irq(ice->irq);
2111 free_irq(ice->irq, (void *) ice); 2192 free_irq(ice->irq, ice);
2112 } 2193 }
2113 pci_release_regions(ice->pci); 2194 pci_release_regions(ice->pci);
2114 snd_ice1712_akm4xxx_free(ice); 2195 snd_ice1712_akm4xxx_free(ice);
@@ -2117,21 +2198,21 @@ static int snd_vt1724_free(ice1712_t *ice)
2117 return 0; 2198 return 0;
2118} 2199}
2119 2200
2120static int snd_vt1724_dev_free(snd_device_t *device) 2201static int snd_vt1724_dev_free(struct snd_device *device)
2121{ 2202{
2122 ice1712_t *ice = device->device_data; 2203 struct snd_ice1712 *ice = device->device_data;
2123 return snd_vt1724_free(ice); 2204 return snd_vt1724_free(ice);
2124} 2205}
2125 2206
2126static int __devinit snd_vt1724_create(snd_card_t * card, 2207static int __devinit snd_vt1724_create(struct snd_card *card,
2127 struct pci_dev *pci, 2208 struct pci_dev *pci,
2128 const char *modelname, 2209 const char *modelname,
2129 ice1712_t ** r_ice1712) 2210 struct snd_ice1712 ** r_ice1712)
2130{ 2211{
2131 ice1712_t *ice; 2212 struct snd_ice1712 *ice;
2132 int err; 2213 int err;
2133 unsigned char mask; 2214 unsigned char mask;
2134 static snd_device_ops_t ops = { 2215 static struct snd_device_ops ops = {
2135 .dev_free = snd_vt1724_dev_free, 2216 .dev_free = snd_vt1724_dev_free,
2136 }; 2217 };
2137 2218
@@ -2170,7 +2251,8 @@ static int __devinit snd_vt1724_create(snd_card_t * card,
2170 ice->port = pci_resource_start(pci, 0); 2251 ice->port = pci_resource_start(pci, 0);
2171 ice->profi_port = pci_resource_start(pci, 1); 2252 ice->profi_port = pci_resource_start(pci, 1);
2172 2253
2173 if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) { 2254 if (request_irq(pci->irq, snd_vt1724_interrupt,
2255 SA_INTERRUPT|SA_SHIRQ, "ICE1724", ice)) {
2174 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2256 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2175 snd_vt1724_free(ice); 2257 snd_vt1724_free(ice);
2176 return -EIO; 2258 return -EIO;
@@ -2193,7 +2275,9 @@ static int __devinit snd_vt1724_create(snd_card_t * card,
2193 else 2275 else
2194 mask = 0; 2276 mask = 0;
2195 outb(mask, ICEREG1724(ice, IRQMASK)); 2277 outb(mask, ICEREG1724(ice, IRQMASK));
2196 /* don't handle FIFO overrun/underruns (just yet), since they cause machine lockups */ 2278 /* don't handle FIFO overrun/underruns (just yet),
2279 * since they cause machine lockups
2280 */
2197 outb(VT1724_MULTI_FIFO_ERR, ICEMT1724(ice, DMA_INT_MASK)); 2281 outb(VT1724_MULTI_FIFO_ERR, ICEMT1724(ice, DMA_INT_MASK));
2198 2282
2199 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ice, &ops)) < 0) { 2283 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ice, &ops)) < 0) {
@@ -2218,8 +2302,8 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci,
2218 const struct pci_device_id *pci_id) 2302 const struct pci_device_id *pci_id)
2219{ 2303{
2220 static int dev; 2304 static int dev;
2221 snd_card_t *card; 2305 struct snd_card *card;
2222 ice1712_t *ice; 2306 struct snd_ice1712 *ice;
2223 int pcm_dev = 0, err; 2307 int pcm_dev = 0, err;
2224 struct snd_ice1712_card_info **tbl, *c; 2308 struct snd_ice1712_card_info **tbl, *c;
2225 2309
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
index a5e04a3136b1..5176b41ea9d3 100644
--- a/sound/pci/ice1712/juli.c
+++ b/sound/pci/ice1712/juli.c
@@ -65,30 +65,30 @@
65 65
66static void juli_ak4114_write(void *private_data, unsigned char reg, unsigned char val) 66static void juli_ak4114_write(void *private_data, unsigned char reg, unsigned char val)
67{ 67{
68 snd_vt1724_write_i2c((ice1712_t *)private_data, AK4114_ADDR, reg, val); 68 snd_vt1724_write_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR, reg, val);
69} 69}
70 70
71static unsigned char juli_ak4114_read(void *private_data, unsigned char reg) 71static unsigned char juli_ak4114_read(void *private_data, unsigned char reg)
72{ 72{
73 return snd_vt1724_read_i2c((ice1712_t *)private_data, AK4114_ADDR, reg); 73 return snd_vt1724_read_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR, reg);
74} 74}
75 75
76/* 76/*
77 * AK4358 section 77 * AK4358 section
78 */ 78 */
79 79
80static void juli_akm_lock(akm4xxx_t *ak, int chip) 80static void juli_akm_lock(struct snd_akm4xxx *ak, int chip)
81{ 81{
82} 82}
83 83
84static void juli_akm_unlock(akm4xxx_t *ak, int chip) 84static void juli_akm_unlock(struct snd_akm4xxx *ak, int chip)
85{ 85{
86} 86}
87 87
88static void juli_akm_write(akm4xxx_t *ak, int chip, 88static void juli_akm_write(struct snd_akm4xxx *ak, int chip,
89 unsigned char addr, unsigned char data) 89 unsigned char addr, unsigned char data)
90{ 90{
91 ice1712_t *ice = ak->private_data[0]; 91 struct snd_ice1712 *ice = ak->private_data[0];
92 92
93 snd_assert(chip == 0, return); 93 snd_assert(chip == 0, return);
94 snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data); 94 snd_vt1724_write_i2c(ice, AK4358_ADDR, addr, data);
@@ -97,7 +97,7 @@ static void juli_akm_write(akm4xxx_t *ak, int chip,
97/* 97/*
98 * change the rate of envy24HT, AK4358 98 * change the rate of envy24HT, AK4358
99 */ 99 */
100static void juli_akm_set_rate_val(akm4xxx_t *ak, unsigned int rate) 100static void juli_akm_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
101{ 101{
102 unsigned char old, tmp, dfs; 102 unsigned char old, tmp, dfs;
103 103
@@ -125,7 +125,7 @@ static void juli_akm_set_rate_val(akm4xxx_t *ak, unsigned int rate)
125 snd_akm4xxx_reset(ak, 0); 125 snd_akm4xxx_reset(ak, 0);
126} 126}
127 127
128static akm4xxx_t akm_juli_dac __devinitdata = { 128static struct snd_akm4xxx akm_juli_dac __devinitdata = {
129 .type = SND_AK4358, 129 .type = SND_AK4358,
130 .num_dacs = 2, 130 .num_dacs = 2,
131 .ops = { 131 .ops = {
@@ -136,7 +136,7 @@ static akm4xxx_t akm_juli_dac __devinitdata = {
136 } 136 }
137}; 137};
138 138
139static int __devinit juli_add_controls(ice1712_t *ice) 139static int __devinit juli_add_controls(struct snd_ice1712 *ice)
140{ 140{
141 return snd_ice1712_akm4xxx_build_controls(ice); 141 return snd_ice1712_akm4xxx_build_controls(ice);
142} 142}
@@ -144,7 +144,7 @@ static int __devinit juli_add_controls(ice1712_t *ice)
144/* 144/*
145 * initialize the chip 145 * initialize the chip
146 */ 146 */
147static int __devinit juli_init(ice1712_t *ice) 147static int __devinit juli_init(struct snd_ice1712 *ice)
148{ 148{
149 static unsigned char ak4114_init_vals[] = { 149 static unsigned char ak4114_init_vals[] = {
150 /* AK4117_REG_PWRDN */ AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1, 150 /* AK4117_REG_PWRDN */ AK4114_RST | AK4114_PWN | AK4114_OCKS0 | AK4114_OCKS1,
@@ -158,7 +158,7 @@ static int __devinit juli_init(ice1712_t *ice)
158 0x41, 0x02, 0x2c, 0x00, 0x00 158 0x41, 0x02, 0x2c, 0x00, 0x00
159 }; 159 };
160 int err; 160 int err;
161 akm4xxx_t *ak; 161 struct snd_akm4xxx *ak;
162 162
163#if 0 163#if 0
164 for (err = 0; err < 0x20; err++) 164 for (err = 0; err < 0x20; err++)
@@ -189,7 +189,7 @@ static int __devinit juli_init(ice1712_t *ice)
189 ice->num_total_dacs = 2; 189 ice->num_total_dacs = 2;
190 ice->num_total_adcs = 2; 190 ice->num_total_adcs = 2;
191 191
192 ak = ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL); 192 ak = ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
193 if (! ak) 193 if (! ak)
194 return -ENOMEM; 194 return -ENOMEM;
195 ice->akm_codecs = 1; 195 ice->akm_codecs = 1;
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c
index dcf1e8ca3f66..ec3757834b93 100644
--- a/sound/pci/ice1712/phase.c
+++ b/sound/pci/ice1712/phase.c
@@ -86,7 +86,7 @@ static unsigned char wm_vol[256] = {
86#define WM_VOL_MAX (sizeof(wm_vol) - 1) 86#define WM_VOL_MAX (sizeof(wm_vol) - 1)
87#define WM_VOL_MUTE 0x8000 87#define WM_VOL_MUTE 0x8000
88 88
89static akm4xxx_t akm_phase22 __devinitdata = { 89static struct snd_akm4xxx akm_phase22 __devinitdata = {
90 .type = SND_AK4524, 90 .type = SND_AK4524,
91 .num_dacs = 2, 91 .num_dacs = 2,
92 .num_adcs = 2, 92 .num_adcs = 2,
@@ -104,9 +104,9 @@ static struct snd_ak4xxx_private akm_phase22_priv __devinitdata = {
104 .mask_flags = 0, 104 .mask_flags = 0,
105}; 105};
106 106
107static int __devinit phase22_init(ice1712_t *ice) 107static int __devinit phase22_init(struct snd_ice1712 *ice)
108{ 108{
109 akm4xxx_t *ak; 109 struct snd_akm4xxx *ak;
110 int err; 110 int err;
111 111
112 // Configure DAC/ADC description for generic part of ice1724 112 // Configure DAC/ADC description for generic part of ice1724
@@ -122,7 +122,7 @@ static int __devinit phase22_init(ice1712_t *ice)
122 } 122 }
123 123
124 // Initialize analog chips 124 // Initialize analog chips
125 ak = ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL); 125 ak = ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
126 if (! ak) 126 if (! ak)
127 return -ENOMEM; 127 return -ENOMEM;
128 ice->akm_codecs = 1; 128 ice->akm_codecs = 1;
@@ -136,7 +136,7 @@ static int __devinit phase22_init(ice1712_t *ice)
136 return 0; 136 return 0;
137} 137}
138 138
139static int __devinit phase22_add_controls(ice1712_t *ice) 139static int __devinit phase22_add_controls(struct snd_ice1712 *ice)
140{ 140{
141 int err = 0; 141 int err = 0;
142 142
@@ -184,7 +184,7 @@ static unsigned char phase28_eeprom[] __devinitdata = {
184/* 184/*
185 * write data in the SPI mode 185 * write data in the SPI mode
186 */ 186 */
187static void phase28_spi_write(ice1712_t *ice, unsigned int cs, unsigned int data, int bits) 187static void phase28_spi_write(struct snd_ice1712 *ice, unsigned int cs, unsigned int data, int bits)
188{ 188{
189 unsigned int tmp; 189 unsigned int tmp;
190 int i; 190 int i;
@@ -225,7 +225,7 @@ static void phase28_spi_write(ice1712_t *ice, unsigned int cs, unsigned int data
225/* 225/*
226 * get the current register value of WM codec 226 * get the current register value of WM codec
227 */ 227 */
228static unsigned short wm_get(ice1712_t *ice, int reg) 228static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
229{ 229{
230 reg <<= 1; 230 reg <<= 1;
231 return ((unsigned short)ice->akm[0].images[reg] << 8) | 231 return ((unsigned short)ice->akm[0].images[reg] << 8) |
@@ -235,7 +235,7 @@ static unsigned short wm_get(ice1712_t *ice, int reg)
235/* 235/*
236 * set the register value of WM codec 236 * set the register value of WM codec
237 */ 237 */
238static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val) 238static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
239{ 239{
240 phase28_spi_write(ice, PHASE28_WM_CS, (reg << 9) | (val & 0x1ff), 16); 240 phase28_spi_write(ice, PHASE28_WM_CS, (reg << 9) | (val & 0x1ff), 16);
241} 241}
@@ -243,7 +243,7 @@ static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val)
243/* 243/*
244 * set the register value of WM codec and remember it 244 * set the register value of WM codec and remember it
245 */ 245 */
246static void wm_put(ice1712_t *ice, int reg, unsigned short val) 246static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
247{ 247{
248 wm_put_nocache(ice, reg, val); 248 wm_put_nocache(ice, reg, val);
249 reg <<= 1; 249 reg <<= 1;
@@ -251,7 +251,7 @@ static void wm_put(ice1712_t *ice, int reg, unsigned short val)
251 ice->akm[0].images[reg + 1] = val; 251 ice->akm[0].images[reg + 1] = val;
252} 252}
253 253
254static void wm_set_vol(ice1712_t *ice, unsigned int index, unsigned short vol, unsigned short master) 254static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned short vol, unsigned short master)
255{ 255{
256 unsigned char nvol; 256 unsigned char nvol;
257 257
@@ -269,9 +269,9 @@ static void wm_set_vol(ice1712_t *ice, unsigned int index, unsigned short vol, u
269 */ 269 */
270#define wm_pcm_mute_info phase28_mono_bool_info 270#define wm_pcm_mute_info phase28_mono_bool_info
271 271
272static int wm_pcm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 272static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
273{ 273{
274 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 274 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
275 275
276 down(&ice->gpio_mutex); 276 down(&ice->gpio_mutex);
277 ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1; 277 ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1;
@@ -279,9 +279,9 @@ static int wm_pcm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
279 return 0; 279 return 0;
280} 280}
281 281
282static int wm_pcm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 282static int wm_pcm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
283{ 283{
284 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 284 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
285 unsigned short nval, oval; 285 unsigned short nval, oval;
286 int change; 286 int change;
287 287
@@ -298,7 +298,7 @@ static int wm_pcm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * uco
298/* 298/*
299 * Master volume attenuation mixer control 299 * Master volume attenuation mixer control
300 */ 300 */
301static int wm_master_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 301static int wm_master_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
302{ 302{
303 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 303 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
304 uinfo->count = 2; 304 uinfo->count = 2;
@@ -307,18 +307,18 @@ static int wm_master_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uin
307 return 0; 307 return 0;
308} 308}
309 309
310static int wm_master_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 310static int wm_master_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
311{ 311{
312 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 312 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
313 int i; 313 int i;
314 for (i=0; i<2; i++) 314 for (i=0; i<2; i++)
315 ucontrol->value.integer.value[i] = ice->spec.phase28.master[i] & ~WM_VOL_MUTE; 315 ucontrol->value.integer.value[i] = ice->spec.phase28.master[i] & ~WM_VOL_MUTE;
316 return 0; 316 return 0;
317} 317}
318 318
319static int wm_master_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 319static int wm_master_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
320{ 320{
321 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 321 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
322 int ch, change = 0; 322 int ch, change = 0;
323 323
324 snd_ice1712_save_gpio_status(ice); 324 snd_ice1712_save_gpio_status(ice);
@@ -338,7 +338,7 @@ static int wm_master_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
338 return change; 338 return change;
339} 339}
340 340
341static int __devinit phase28_init(ice1712_t *ice) 341static int __devinit phase28_init(struct snd_ice1712 *ice)
342{ 342{
343 static unsigned short wm_inits_phase28[] = { 343 static unsigned short wm_inits_phase28[] = {
344 /* These come first to reduce init pop noise */ 344 /* These come first to reduce init pop noise */
@@ -378,7 +378,7 @@ static int __devinit phase28_init(ice1712_t *ice)
378 }; 378 };
379 379
380 unsigned int tmp; 380 unsigned int tmp;
381 akm4xxx_t *ak; 381 struct snd_akm4xxx *ak;
382 unsigned short *p; 382 unsigned short *p;
383 int i; 383 int i;
384 384
@@ -386,7 +386,7 @@ static int __devinit phase28_init(ice1712_t *ice)
386 ice->num_total_adcs = 2; 386 ice->num_total_adcs = 2;
387 387
388 // Initialize analog chips 388 // Initialize analog chips
389 ak = ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL); 389 ak = ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
390 if (!ak) 390 if (!ak)
391 return -ENOMEM; 391 return -ENOMEM;
392 ice->akm_codecs = 1; 392 ice->akm_codecs = 1;
@@ -427,7 +427,7 @@ static int __devinit phase28_init(ice1712_t *ice)
427/* 427/*
428 * DAC volume attenuation mixer control 428 * DAC volume attenuation mixer control
429 */ 429 */
430static int wm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 430static int wm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
431{ 431{
432 int voices = kcontrol->private_value >> 8; 432 int voices = kcontrol->private_value >> 8;
433 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 433 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
@@ -437,9 +437,9 @@ static int wm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
437 return 0; 437 return 0;
438} 438}
439 439
440static int wm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 440static int wm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
441{ 441{
442 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 442 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
443 int i, ofs, voices; 443 int i, ofs, voices;
444 444
445 voices = kcontrol->private_value >> 8; 445 voices = kcontrol->private_value >> 8;
@@ -449,9 +449,9 @@ static int wm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
449 return 0; 449 return 0;
450} 450}
451 451
452static int wm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 452static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
453{ 453{
454 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 454 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
455 int i, idx, ofs, voices; 455 int i, idx, ofs, voices;
456 int change = 0; 456 int change = 0;
457 457
@@ -475,7 +475,7 @@ static int wm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
475/* 475/*
476 * WM8770 mute control 476 * WM8770 mute control
477 */ 477 */
478static int wm_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { 478static int wm_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {
479 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 479 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
480 uinfo->count = kcontrol->private_value >> 8; 480 uinfo->count = kcontrol->private_value >> 8;
481 uinfo->value.integer.min = 0; 481 uinfo->value.integer.min = 0;
@@ -483,9 +483,9 @@ static int wm_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) {
483 return 0; 483 return 0;
484} 484}
485 485
486static int wm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 486static int wm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
487{ 487{
488 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 488 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
489 int voices, ofs, i; 489 int voices, ofs, i;
490 490
491 voices = kcontrol->private_value >> 8; 491 voices = kcontrol->private_value >> 8;
@@ -496,9 +496,9 @@ static int wm_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol)
496 return 0; 496 return 0;
497} 497}
498 498
499static int wm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 499static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
500{ 500{
501 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 501 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
502 int change = 0, voices, ofs, i; 502 int change = 0, voices, ofs, i;
503 503
504 voices = kcontrol->private_value >> 8; 504 voices = kcontrol->private_value >> 8;
@@ -524,7 +524,7 @@ static int wm_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontro
524/* 524/*
525 * WM8770 master mute control 525 * WM8770 master mute control
526 */ 526 */
527static int wm_master_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) { 527static int wm_master_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {
528 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 528 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
529 uinfo->count = 2; 529 uinfo->count = 2;
530 uinfo->value.integer.min = 0; 530 uinfo->value.integer.min = 0;
@@ -532,18 +532,18 @@ static int wm_master_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
532 return 0; 532 return 0;
533} 533}
534 534
535static int wm_master_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 535static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
536{ 536{
537 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 537 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
538 538
539 ucontrol->value.integer.value[0] = (ice->spec.phase28.master[0] & WM_VOL_MUTE) ? 0 : 1; 539 ucontrol->value.integer.value[0] = (ice->spec.phase28.master[0] & WM_VOL_MUTE) ? 0 : 1;
540 ucontrol->value.integer.value[1] = (ice->spec.phase28.master[1] & WM_VOL_MUTE) ? 0 : 1; 540 ucontrol->value.integer.value[1] = (ice->spec.phase28.master[1] & WM_VOL_MUTE) ? 0 : 1;
541 return 0; 541 return 0;
542} 542}
543 543
544static int wm_master_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 544static int wm_master_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
545{ 545{
546 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 546 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
547 int change = 0, i; 547 int change = 0, i;
548 548
549 snd_ice1712_save_gpio_status(ice); 549 snd_ice1712_save_gpio_status(ice);
@@ -570,7 +570,7 @@ static int wm_master_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
570#define PCM_0dB 0xff 570#define PCM_0dB 0xff
571#define PCM_RES 128 /* -64dB */ 571#define PCM_RES 128 /* -64dB */
572#define PCM_MIN (PCM_0dB - PCM_RES) 572#define PCM_MIN (PCM_0dB - PCM_RES)
573static int wm_pcm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 573static int wm_pcm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
574{ 574{
575 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 575 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
576 uinfo->count = 1; 576 uinfo->count = 1;
@@ -579,9 +579,9 @@ static int wm_pcm_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
579 return 0; 579 return 0;
580} 580}
581 581
582static int wm_pcm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 582static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
583{ 583{
584 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 584 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
585 unsigned short val; 585 unsigned short val;
586 586
587 down(&ice->gpio_mutex); 587 down(&ice->gpio_mutex);
@@ -592,9 +592,9 @@ static int wm_pcm_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
592 return 0; 592 return 0;
593} 593}
594 594
595static int wm_pcm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 595static int wm_pcm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
596{ 596{
597 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 597 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
598 unsigned short ovol, nvol; 598 unsigned short ovol, nvol;
599 int change = 0; 599 int change = 0;
600 600
@@ -613,7 +613,7 @@ static int wm_pcm_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
613 613
614/* 614/*
615 */ 615 */
616static int phase28_mono_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) 616static int phase28_mono_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo)
617{ 617{
618 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 618 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
619 uinfo->count = 1; 619 uinfo->count = 1;
@@ -627,16 +627,16 @@ static int phase28_mono_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo)
627 */ 627 */
628#define phase28_deemp_info phase28_mono_bool_info 628#define phase28_deemp_info phase28_mono_bool_info
629 629
630static int phase28_deemp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 630static int phase28_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
631{ 631{
632 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 632 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
633 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf; 633 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf;
634 return 0; 634 return 0;
635} 635}
636 636
637static int phase28_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 637static int phase28_deemp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
638{ 638{
639 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 639 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
640 int temp, temp2; 640 int temp, temp2;
641 temp2 = temp = wm_get(ice, WM_DAC_CTRL2); 641 temp2 = temp = wm_get(ice, WM_DAC_CTRL2);
642 if (ucontrol->value.integer.value[0]) 642 if (ucontrol->value.integer.value[0])
@@ -653,7 +653,7 @@ static int phase28_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uco
653/* 653/*
654 * ADC Oversampling 654 * ADC Oversampling
655 */ 655 */
656static int phase28_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) 656static int phase28_oversampling_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo)
657{ 657{
658 static char *texts[2] = { "128x", "64x" }; 658 static char *texts[2] = { "128x", "64x" };
659 659
@@ -668,17 +668,17 @@ static int phase28_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uin
668 return 0; 668 return 0;
669} 669}
670 670
671static int phase28_oversampling_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 671static int phase28_oversampling_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
672{ 672{
673 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 673 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
674 ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8; 674 ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8;
675 return 0; 675 return 0;
676} 676}
677 677
678static int phase28_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 678static int phase28_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
679{ 679{
680 int temp, temp2; 680 int temp, temp2;
681 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 681 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
682 682
683 temp2 = temp = wm_get(ice, WM_MASTER); 683 temp2 = temp = wm_get(ice, WM_MASTER);
684 684
@@ -694,7 +694,7 @@ static int phase28_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value
694 return 0; 694 return 0;
695} 695}
696 696
697static snd_kcontrol_new_t phase28_dac_controls[] __devinitdata = { 697static struct snd_kcontrol_new phase28_dac_controls[] __devinitdata = {
698 { 698 {
699 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 699 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
700 .name = "Master Playback Switch", 700 .name = "Master Playback Switch",
@@ -791,7 +791,7 @@ static snd_kcontrol_new_t phase28_dac_controls[] __devinitdata = {
791 } 791 }
792}; 792};
793 793
794static snd_kcontrol_new_t wm_controls[] __devinitdata = { 794static struct snd_kcontrol_new wm_controls[] __devinitdata = {
795 { 795 {
796 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 796 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
797 .name = "PCM Playback Switch", 797 .name = "PCM Playback Switch",
@@ -822,7 +822,7 @@ static snd_kcontrol_new_t wm_controls[] __devinitdata = {
822 } 822 }
823}; 823};
824 824
825static int __devinit phase28_add_controls(ice1712_t *ice) 825static int __devinit phase28_add_controls(struct snd_ice1712 *ice)
826{ 826{
827 unsigned int i, counts; 827 unsigned int i, counts;
828 int err; 828 int err;
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
index 773a1ecb75ce..0dccd7707a4b 100644
--- a/sound/pci/ice1712/pontis.c
+++ b/sound/pci/ice1712/pontis.c
@@ -76,7 +76,7 @@
76/* 76/*
77 * get the current register value of WM codec 77 * get the current register value of WM codec
78 */ 78 */
79static unsigned short wm_get(ice1712_t *ice, int reg) 79static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
80{ 80{
81 reg <<= 1; 81 reg <<= 1;
82 return ((unsigned short)ice->akm[0].images[reg] << 8) | 82 return ((unsigned short)ice->akm[0].images[reg] << 8) |
@@ -86,14 +86,14 @@ static unsigned short wm_get(ice1712_t *ice, int reg)
86/* 86/*
87 * set the register value of WM codec and remember it 87 * set the register value of WM codec and remember it
88 */ 88 */
89static void wm_put_nocache(ice1712_t *ice, int reg, unsigned short val) 89static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
90{ 90{
91 unsigned short cval; 91 unsigned short cval;
92 cval = (reg << 9) | val; 92 cval = (reg << 9) | val;
93 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); 93 snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff);
94} 94}
95 95
96static void wm_put(ice1712_t *ice, int reg, unsigned short val) 96static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
97{ 97{
98 wm_put_nocache(ice, reg, val); 98 wm_put_nocache(ice, reg, val);
99 reg <<= 1; 99 reg <<= 1;
@@ -109,7 +109,7 @@ static void wm_put(ice1712_t *ice, int reg, unsigned short val)
109#define DAC_RES 128 109#define DAC_RES 128
110#define DAC_MIN (DAC_0dB - DAC_RES) 110#define DAC_MIN (DAC_0dB - DAC_RES)
111 111
112static int wm_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 112static int wm_dac_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
113{ 113{
114 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 114 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
115 uinfo->count = 2; 115 uinfo->count = 2;
@@ -118,9 +118,9 @@ static int wm_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
118 return 0; 118 return 0;
119} 119}
120 120
121static int wm_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 121static int wm_dac_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
122{ 122{
123 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 123 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
124 unsigned short val; 124 unsigned short val;
125 int i; 125 int i;
126 126
@@ -134,9 +134,9 @@ static int wm_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
134 return 0; 134 return 0;
135} 135}
136 136
137static int wm_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 137static int wm_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
138{ 138{
139 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 139 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
140 unsigned short oval, nval; 140 unsigned short oval, nval;
141 int i, idx, change = 0; 141 int i, idx, change = 0;
142 142
@@ -164,7 +164,7 @@ static int wm_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
164#define ADC_RES 128 164#define ADC_RES 128
165#define ADC_MIN (ADC_0dB - ADC_RES) 165#define ADC_MIN (ADC_0dB - ADC_RES)
166 166
167static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 167static int wm_adc_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
168{ 168{
169 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 169 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
170 uinfo->count = 2; 170 uinfo->count = 2;
@@ -173,9 +173,9 @@ static int wm_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
173 return 0; 173 return 0;
174} 174}
175 175
176static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 176static int wm_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
177{ 177{
178 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 178 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
179 unsigned short val; 179 unsigned short val;
180 int i; 180 int i;
181 181
@@ -189,9 +189,9 @@ static int wm_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
189 return 0; 189 return 0;
190} 190}
191 191
192static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 192static int wm_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
193{ 193{
194 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 194 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
195 unsigned short ovol, nvol; 195 unsigned short ovol, nvol;
196 int i, idx, change = 0; 196 int i, idx, change = 0;
197 197
@@ -213,7 +213,7 @@ static int wm_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontr
213/* 213/*
214 * ADC input mux mixer control 214 * ADC input mux mixer control
215 */ 215 */
216static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 216static int wm_adc_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
217{ 217{
218 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 218 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
219 uinfo->count = 1; 219 uinfo->count = 1;
@@ -222,9 +222,9 @@ static int wm_adc_mux_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
222 return 0; 222 return 0;
223} 223}
224 224
225static int wm_adc_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 225static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
226{ 226{
227 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 227 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
228 int bit = kcontrol->private_value; 228 int bit = kcontrol->private_value;
229 229
230 down(&ice->gpio_mutex); 230 down(&ice->gpio_mutex);
@@ -233,9 +233,9 @@ static int wm_adc_mux_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucont
233 return 0; 233 return 0;
234} 234}
235 235
236static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 236static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
237{ 237{
238 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 238 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
239 int bit = kcontrol->private_value; 239 int bit = kcontrol->private_value;
240 unsigned short oval, nval; 240 unsigned short oval, nval;
241 int change; 241 int change;
@@ -257,7 +257,7 @@ static int wm_adc_mux_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucont
257/* 257/*
258 * Analog bypass (In -> Out) 258 * Analog bypass (In -> Out)
259 */ 259 */
260static int wm_bypass_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 260static int wm_bypass_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
261{ 261{
262 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 262 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
263 uinfo->count = 1; 263 uinfo->count = 1;
@@ -266,9 +266,9 @@ static int wm_bypass_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
266 return 0; 266 return 0;
267} 267}
268 268
269static int wm_bypass_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 269static int wm_bypass_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
270{ 270{
271 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 271 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
272 272
273 down(&ice->gpio_mutex); 273 down(&ice->gpio_mutex);
274 ucontrol->value.integer.value[0] = (wm_get(ice, WM_OUT_MUX) & 0x04) ? 1 : 0; 274 ucontrol->value.integer.value[0] = (wm_get(ice, WM_OUT_MUX) & 0x04) ? 1 : 0;
@@ -276,9 +276,9 @@ static int wm_bypass_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontr
276 return 0; 276 return 0;
277} 277}
278 278
279static int wm_bypass_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 279static int wm_bypass_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
280{ 280{
281 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 281 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
282 unsigned short val, oval; 282 unsigned short val, oval;
283 int change = 0; 283 int change = 0;
284 284
@@ -299,7 +299,7 @@ static int wm_bypass_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontr
299/* 299/*
300 * Left/Right swap 300 * Left/Right swap
301 */ 301 */
302static int wm_chswap_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 302static int wm_chswap_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
303{ 303{
304 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 304 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
305 uinfo->count = 1; 305 uinfo->count = 1;
@@ -308,9 +308,9 @@ static int wm_chswap_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
308 return 0; 308 return 0;
309} 309}
310 310
311static int wm_chswap_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 311static int wm_chswap_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
312{ 312{
313 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 313 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
314 314
315 down(&ice->gpio_mutex); 315 down(&ice->gpio_mutex);
316 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90; 316 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90;
@@ -318,9 +318,9 @@ static int wm_chswap_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontr
318 return 0; 318 return 0;
319} 319}
320 320
321static int wm_chswap_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 321static int wm_chswap_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
322{ 322{
323 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 323 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
324 unsigned short val, oval; 324 unsigned short val, oval;
325 int change = 0; 325 int change = 0;
326 326
@@ -343,7 +343,7 @@ static int wm_chswap_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontr
343/* 343/*
344 * write data in the SPI mode 344 * write data in the SPI mode
345 */ 345 */
346static void set_gpio_bit(ice1712_t *ice, unsigned int bit, int val) 346static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val)
347{ 347{
348 unsigned int tmp = snd_ice1712_gpio_read(ice); 348 unsigned int tmp = snd_ice1712_gpio_read(ice);
349 if (val) 349 if (val)
@@ -353,7 +353,7 @@ static void set_gpio_bit(ice1712_t *ice, unsigned int bit, int val)
353 snd_ice1712_gpio_write(ice, tmp); 353 snd_ice1712_gpio_write(ice, tmp);
354} 354}
355 355
356static void spi_send_byte(ice1712_t *ice, unsigned char data) 356static void spi_send_byte(struct snd_ice1712 *ice, unsigned char data)
357{ 357{
358 int i; 358 int i;
359 for (i = 0; i < 8; i++) { 359 for (i = 0; i < 8; i++) {
@@ -367,7 +367,7 @@ static void spi_send_byte(ice1712_t *ice, unsigned char data)
367 } 367 }
368} 368}
369 369
370static unsigned int spi_read_byte(ice1712_t *ice) 370static unsigned int spi_read_byte(struct snd_ice1712 *ice)
371{ 371{
372 int i; 372 int i;
373 unsigned int val = 0; 373 unsigned int val = 0;
@@ -386,7 +386,7 @@ static unsigned int spi_read_byte(ice1712_t *ice)
386} 386}
387 387
388 388
389static void spi_write(ice1712_t *ice, unsigned int dev, unsigned int reg, unsigned int data) 389static void spi_write(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg, unsigned int data)
390{ 390{
391 snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK); 391 snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK);
392 snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK)); 392 snd_ice1712_gpio_set_mask(ice, ~(PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK));
@@ -402,7 +402,7 @@ static void spi_write(ice1712_t *ice, unsigned int dev, unsigned int reg, unsign
402 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); 402 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
403} 403}
404 404
405static unsigned int spi_read(ice1712_t *ice, unsigned int dev, unsigned int reg) 405static unsigned int spi_read(struct snd_ice1712 *ice, unsigned int dev, unsigned int reg)
406{ 406{
407 unsigned int val; 407 unsigned int val;
408 snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK); 408 snd_ice1712_gpio_set_dir(ice, PONTIS_CS_CS|PONTIS_CS_WDATA|PONTIS_CS_CLK);
@@ -429,7 +429,7 @@ static unsigned int spi_read(ice1712_t *ice, unsigned int dev, unsigned int reg)
429/* 429/*
430 * SPDIF input source 430 * SPDIF input source
431 */ 431 */
432static int cs_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 432static int cs_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
433{ 433{
434 static char *texts[] = { 434 static char *texts[] = {
435 "Coax", /* RXP0 */ 435 "Coax", /* RXP0 */
@@ -445,9 +445,9 @@ static int cs_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
445 return 0; 445 return 0;
446} 446}
447 447
448static int cs_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 448static int cs_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
449{ 449{
450 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 450 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
451 451
452 down(&ice->gpio_mutex); 452 down(&ice->gpio_mutex);
453 ucontrol->value.enumerated.item[0] = ice->gpio.saved[0]; 453 ucontrol->value.enumerated.item[0] = ice->gpio.saved[0];
@@ -455,9 +455,9 @@ static int cs_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
455 return 0; 455 return 0;
456} 456}
457 457
458static int cs_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 458static int cs_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
459{ 459{
460 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 460 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
461 unsigned char val; 461 unsigned char val;
462 int change = 0; 462 int change = 0;
463 463
@@ -476,7 +476,7 @@ static int cs_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontro
476/* 476/*
477 * GPIO controls 477 * GPIO controls
478 */ 478 */
479static int pontis_gpio_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 479static int pontis_gpio_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
480{ 480{
481 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 481 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
482 uinfo->count = 1; 482 uinfo->count = 1;
@@ -485,9 +485,9 @@ static int pontis_gpio_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
485 return 0; 485 return 0;
486} 486}
487 487
488static int pontis_gpio_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 488static int pontis_gpio_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
489{ 489{
490 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 490 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
491 down(&ice->gpio_mutex); 491 down(&ice->gpio_mutex);
492 /* 4-7 reserved */ 492 /* 4-7 reserved */
493 ucontrol->value.integer.value[0] = (~ice->gpio.write_mask & 0xffff) | 0x00f0; 493 ucontrol->value.integer.value[0] = (~ice->gpio.write_mask & 0xffff) | 0x00f0;
@@ -495,9 +495,9 @@ static int pontis_gpio_mask_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
495 return 0; 495 return 0;
496} 496}
497 497
498static int pontis_gpio_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 498static int pontis_gpio_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
499{ 499{
500 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 500 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
501 unsigned int val; 501 unsigned int val;
502 int changed; 502 int changed;
503 down(&ice->gpio_mutex); 503 down(&ice->gpio_mutex);
@@ -509,9 +509,9 @@ static int pontis_gpio_mask_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
509 return changed; 509 return changed;
510} 510}
511 511
512static int pontis_gpio_dir_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 512static int pontis_gpio_dir_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
513{ 513{
514 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 514 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
515 down(&ice->gpio_mutex); 515 down(&ice->gpio_mutex);
516 /* 4-7 reserved */ 516 /* 4-7 reserved */
517 ucontrol->value.integer.value[0] = ice->gpio.direction & 0xff0f; 517 ucontrol->value.integer.value[0] = ice->gpio.direction & 0xff0f;
@@ -519,9 +519,9 @@ static int pontis_gpio_dir_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
519 return 0; 519 return 0;
520} 520}
521 521
522static int pontis_gpio_dir_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *ucontrol) 522static int pontis_gpio_dir_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
523{ 523{
524 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 524 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
525 unsigned int val; 525 unsigned int val;
526 int changed; 526 int changed;
527 down(&ice->gpio_mutex); 527 down(&ice->gpio_mutex);
@@ -533,9 +533,9 @@ static int pontis_gpio_dir_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
533 return changed; 533 return changed;
534} 534}
535 535
536static int pontis_gpio_data_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 536static int pontis_gpio_data_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
537{ 537{
538 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 538 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
539 down(&ice->gpio_mutex); 539 down(&ice->gpio_mutex);
540 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); 540 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction);
541 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); 541 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask);
@@ -544,9 +544,9 @@ static int pontis_gpio_data_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
544 return 0; 544 return 0;
545} 545}
546 546
547static int pontis_gpio_data_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 547static int pontis_gpio_data_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
548{ 548{
549 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 549 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
550 unsigned int val, nval; 550 unsigned int val, nval;
551 int changed = 0; 551 int changed = 0;
552 down(&ice->gpio_mutex); 552 down(&ice->gpio_mutex);
@@ -566,7 +566,7 @@ static int pontis_gpio_data_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
566 * mixers 566 * mixers
567 */ 567 */
568 568
569static snd_kcontrol_new_t pontis_controls[] __devinitdata = { 569static struct snd_kcontrol_new pontis_controls[] __devinitdata = {
570 { 570 {
571 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 571 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
572 .name = "PCM Playback Volume", 572 .name = "PCM Playback Volume",
@@ -646,9 +646,9 @@ static snd_kcontrol_new_t pontis_controls[] __devinitdata = {
646/* 646/*
647 * WM codec registers 647 * WM codec registers
648 */ 648 */
649static void wm_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 649static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
650{ 650{
651 ice1712_t *ice = (ice1712_t *)entry->private_data; 651 struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
652 char line[64]; 652 char line[64];
653 unsigned int reg, val; 653 unsigned int reg, val;
654 down(&ice->gpio_mutex); 654 down(&ice->gpio_mutex);
@@ -661,9 +661,9 @@ static void wm_proc_regs_write(snd_info_entry_t *entry, snd_info_buffer_t *buffe
661 up(&ice->gpio_mutex); 661 up(&ice->gpio_mutex);
662} 662}
663 663
664static void wm_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 664static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
665{ 665{
666 ice1712_t *ice = (ice1712_t *)entry->private_data; 666 struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
667 int reg, val; 667 int reg, val;
668 668
669 down(&ice->gpio_mutex); 669 down(&ice->gpio_mutex);
@@ -674,9 +674,9 @@ static void wm_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer
674 up(&ice->gpio_mutex); 674 up(&ice->gpio_mutex);
675} 675}
676 676
677static void wm_proc_init(ice1712_t *ice) 677static void wm_proc_init(struct snd_ice1712 *ice)
678{ 678{
679 snd_info_entry_t *entry; 679 struct snd_info_entry *entry;
680 if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) { 680 if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) {
681 snd_info_set_text_ops(entry, ice, 1024, wm_proc_regs_read); 681 snd_info_set_text_ops(entry, ice, 1024, wm_proc_regs_read);
682 entry->mode |= S_IWUSR; 682 entry->mode |= S_IWUSR;
@@ -685,9 +685,9 @@ static void wm_proc_init(ice1712_t *ice)
685 } 685 }
686} 686}
687 687
688static void cs_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 688static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
689{ 689{
690 ice1712_t *ice = (ice1712_t *)entry->private_data; 690 struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
691 int reg, val; 691 int reg, val;
692 692
693 down(&ice->gpio_mutex); 693 down(&ice->gpio_mutex);
@@ -700,16 +700,16 @@ static void cs_proc_regs_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer
700 up(&ice->gpio_mutex); 700 up(&ice->gpio_mutex);
701} 701}
702 702
703static void cs_proc_init(ice1712_t *ice) 703static void cs_proc_init(struct snd_ice1712 *ice)
704{ 704{
705 snd_info_entry_t *entry; 705 struct snd_info_entry *entry;
706 if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) { 706 if (! snd_card_proc_new(ice->card, "cs_codec", &entry)) {
707 snd_info_set_text_ops(entry, ice, 1024, cs_proc_regs_read); 707 snd_info_set_text_ops(entry, ice, 1024, cs_proc_regs_read);
708 } 708 }
709} 709}
710 710
711 711
712static int __devinit pontis_add_controls(ice1712_t *ice) 712static int __devinit pontis_add_controls(struct snd_ice1712 *ice)
713{ 713{
714 unsigned int i; 714 unsigned int i;
715 int err; 715 int err;
@@ -730,7 +730,7 @@ static int __devinit pontis_add_controls(ice1712_t *ice)
730/* 730/*
731 * initialize the chip 731 * initialize the chip
732 */ 732 */
733static int __devinit pontis_init(ice1712_t *ice) 733static int __devinit pontis_init(struct snd_ice1712 *ice)
734{ 734{
735 static unsigned short wm_inits[] = { 735 static unsigned short wm_inits[] = {
736 /* These come first to reduce init pop noise */ 736 /* These come first to reduce init pop noise */
@@ -781,7 +781,7 @@ static int __devinit pontis_init(ice1712_t *ice)
781 ice->num_total_adcs = 2; 781 ice->num_total_adcs = 2;
782 782
783 /* to remeber the register values */ 783 /* to remeber the register values */
784 ice->akm = kzalloc(sizeof(akm4xxx_t), GFP_KERNEL); 784 ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL);
785 if (! ice->akm) 785 if (! ice->akm)
786 return -ENOMEM; 786 return -ENOMEM;
787 ice->akm_codecs = 1; 787 ice->akm_codecs = 1;
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c
index d2c5963795d7..fdb5cb8fac97 100644
--- a/sound/pci/ice1712/prodigy192.c
+++ b/sound/pci/ice1712/prodigy192.c
@@ -36,12 +36,12 @@
36#include "prodigy192.h" 36#include "prodigy192.h"
37#include "stac946x.h" 37#include "stac946x.h"
38 38
39static inline void stac9460_put(ice1712_t *ice, int reg, unsigned char val) 39static inline void stac9460_put(struct snd_ice1712 *ice, int reg, unsigned char val)
40{ 40{
41 snd_vt1724_write_i2c(ice, PRODIGY192_STAC9460_ADDR, reg, val); 41 snd_vt1724_write_i2c(ice, PRODIGY192_STAC9460_ADDR, reg, val);
42} 42}
43 43
44static inline unsigned char stac9460_get(ice1712_t *ice, int reg) 44static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg)
45{ 45{
46 return snd_vt1724_read_i2c(ice, PRODIGY192_STAC9460_ADDR, reg); 46 return snd_vt1724_read_i2c(ice, PRODIGY192_STAC9460_ADDR, reg);
47} 47}
@@ -49,7 +49,7 @@ static inline unsigned char stac9460_get(ice1712_t *ice, int reg)
49/* 49/*
50 * DAC mute control 50 * DAC mute control
51 */ 51 */
52static int stac9460_dac_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 52static int stac9460_dac_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
53{ 53{
54 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 54 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
55 uinfo->count = 1; 55 uinfo->count = 1;
@@ -58,9 +58,9 @@ static int stac9460_dac_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
58 return 0; 58 return 0;
59} 59}
60 60
61static int stac9460_dac_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 61static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
62{ 62{
63 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 63 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
64 unsigned char val; 64 unsigned char val;
65 int idx; 65 int idx;
66 66
@@ -73,9 +73,9 @@ static int stac9460_dac_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
73 return 0; 73 return 0;
74} 74}
75 75
76static int stac9460_dac_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 76static int stac9460_dac_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
77{ 77{
78 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 78 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
79 unsigned char new, old; 79 unsigned char new, old;
80 int idx; 80 int idx;
81 int change; 81 int change;
@@ -96,7 +96,7 @@ static int stac9460_dac_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
96/* 96/*
97 * DAC volume attenuation mixer control 97 * DAC volume attenuation mixer control
98 */ 98 */
99static int stac9460_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 99static int stac9460_dac_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
100{ 100{
101 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 101 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
102 uinfo->count = 1; 102 uinfo->count = 1;
@@ -105,9 +105,9 @@ static int stac9460_dac_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
105 return 0; 105 return 0;
106} 106}
107 107
108static int stac9460_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 108static int stac9460_dac_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
109{ 109{
110 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 110 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
111 int idx; 111 int idx;
112 unsigned char vol; 112 unsigned char vol;
113 113
@@ -121,9 +121,9 @@ static int stac9460_dac_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
121 return 0; 121 return 0;
122} 122}
123 123
124static int stac9460_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 124static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
125{ 125{
126 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 126 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
127 int idx; 127 int idx;
128 unsigned char tmp, ovol, nvol; 128 unsigned char tmp, ovol, nvol;
129 int change; 129 int change;
@@ -145,7 +145,7 @@ static int stac9460_dac_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
145/* 145/*
146 * ADC mute control 146 * ADC mute control
147 */ 147 */
148static int stac9460_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * uinfo) 148static int stac9460_adc_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
149{ 149{
150 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 150 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
151 uinfo->count = 2; 151 uinfo->count = 2;
@@ -154,9 +154,9 @@ static int stac9460_adc_mute_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
154 return 0; 154 return 0;
155} 155}
156 156
157static int stac9460_adc_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 157static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
158{ 158{
159 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 159 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
160 unsigned char val; 160 unsigned char val;
161 int i; 161 int i;
162 162
@@ -168,9 +168,9 @@ static int stac9460_adc_mute_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
168 return 0; 168 return 0;
169} 169}
170 170
171static int stac9460_adc_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 171static int stac9460_adc_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
172{ 172{
173 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 173 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
174 unsigned char new, old; 174 unsigned char new, old;
175 int i, reg; 175 int i, reg;
176 int change; 176 int change;
@@ -190,7 +190,7 @@ static int stac9460_adc_mute_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t
190/* 190/*
191 * ADC gain mixer control 191 * ADC gain mixer control
192 */ 192 */
193static int stac9460_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 193static int stac9460_adc_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
194{ 194{
195 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 195 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
196 uinfo->count = 2; 196 uinfo->count = 2;
@@ -199,9 +199,9 @@ static int stac9460_adc_vol_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
199 return 0; 199 return 0;
200} 200}
201 201
202static int stac9460_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 202static int stac9460_adc_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
203{ 203{
204 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 204 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
205 int i, reg; 205 int i, reg;
206 unsigned char vol; 206 unsigned char vol;
207 207
@@ -214,9 +214,9 @@ static int stac9460_adc_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
214 return 0; 214 return 0;
215} 215}
216 216
217static int stac9460_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 217static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
218{ 218{
219 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 219 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
220 int i, reg; 220 int i, reg;
221 unsigned char ovol, nvol; 221 unsigned char ovol, nvol;
222 int change; 222 int change;
@@ -237,7 +237,7 @@ static int stac9460_adc_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
237/* 237/*
238 * Headphone Amplifier 238 * Headphone Amplifier
239 */ 239 */
240static int aureon_set_headphone_amp(ice1712_t *ice, int enable) 240static int aureon_set_headphone_amp(struct snd_ice1712 *ice, int enable)
241{ 241{
242 unsigned int tmp, tmp2; 242 unsigned int tmp, tmp2;
243 243
@@ -253,14 +253,14 @@ static int aureon_set_headphone_amp(ice1712_t *ice, int enable)
253 return 0; 253 return 0;
254} 254}
255 255
256static int aureon_get_headphone_amp(ice1712_t *ice) 256static int aureon_get_headphone_amp(struct snd_ice1712 *ice)
257{ 257{
258 unsigned int tmp = snd_ice1712_gpio_read(ice); 258 unsigned int tmp = snd_ice1712_gpio_read(ice);
259 259
260 return ( tmp & AUREON_HP_SEL )!= 0; 260 return ( tmp & AUREON_HP_SEL )!= 0;
261} 261}
262 262
263static int aureon_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) 263static int aureon_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo)
264{ 264{
265 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 265 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
266 uinfo->count = 1; 266 uinfo->count = 1;
@@ -269,18 +269,18 @@ static int aureon_bool_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo)
269 return 0; 269 return 0;
270} 270}
271 271
272static int aureon_hpamp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 272static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
273{ 273{
274 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 274 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
275 275
276 ucontrol->value.integer.value[0] = aureon_get_headphone_amp(ice); 276 ucontrol->value.integer.value[0] = aureon_get_headphone_amp(ice);
277 return 0; 277 return 0;
278} 278}
279 279
280 280
281static int aureon_hpamp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 281static int aureon_hpamp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
282{ 282{
283 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 283 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
284 284
285 return aureon_set_headphone_amp(ice,ucontrol->value.integer.value[0]); 285 return aureon_set_headphone_amp(ice,ucontrol->value.integer.value[0]);
286} 286}
@@ -288,16 +288,16 @@ static int aureon_hpamp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
288/* 288/*
289 * Deemphasis 289 * Deemphasis
290 */ 290 */
291static int aureon_deemp_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 291static int aureon_deemp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
292{ 292{
293 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 293 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
294 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf; 294 ucontrol->value.integer.value[0] = (wm_get(ice, WM_DAC_CTRL2) & 0xf) == 0xf;
295 return 0; 295 return 0;
296} 296}
297 297
298static int aureon_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 298static int aureon_deemp_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
299{ 299{
300 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 300 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
301 int temp, temp2; 301 int temp, temp2;
302 temp2 = temp = wm_get(ice, WM_DAC_CTRL2); 302 temp2 = temp = wm_get(ice, WM_DAC_CTRL2);
303 if (ucontrol->value.integer.value[0]) 303 if (ucontrol->value.integer.value[0])
@@ -314,7 +314,7 @@ static int aureon_deemp_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
314/* 314/*
315 * ADC Oversampling 315 * ADC Oversampling
316 */ 316 */
317static int aureon_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinfo) 317static int aureon_oversampling_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo)
318{ 318{
319 static char *texts[2] = { "128x", "64x" }; 319 static char *texts[2] = { "128x", "64x" };
320 320
@@ -329,17 +329,17 @@ static int aureon_oversampling_info(snd_kcontrol_t *k, snd_ctl_elem_info_t *uinf
329 return 0; 329 return 0;
330} 330}
331 331
332static int aureon_oversampling_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 332static int aureon_oversampling_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
333{ 333{
334 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 334 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
335 ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8; 335 ucontrol->value.enumerated.item[0] = (wm_get(ice, WM_MASTER) & 0x8) == 0x8;
336 return 0; 336 return 0;
337} 337}
338 338
339static int aureon_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 339static int aureon_oversampling_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
340{ 340{
341 int temp, temp2; 341 int temp, temp2;
342 ice1712_t *ice = snd_kcontrol_chip(kcontrol); 342 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
343 343
344 temp2 = temp = wm_get(ice, WM_MASTER); 344 temp2 = temp = wm_get(ice, WM_MASTER);
345 345
@@ -360,7 +360,7 @@ static int aureon_oversampling_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
360 * mixers 360 * mixers
361 */ 361 */
362 362
363static snd_kcontrol_new_t stac_controls[] __devinitdata = { 363static struct snd_kcontrol_new stac_controls[] __devinitdata = {
364 { 364 {
365 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 365 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
366 .name = "Master Playback Switch", 366 .name = "Master Playback Switch",
@@ -442,7 +442,7 @@ static snd_kcontrol_new_t stac_controls[] __devinitdata = {
442#endif 442#endif
443}; 443};
444 444
445static int __devinit prodigy192_add_controls(ice1712_t *ice) 445static int __devinit prodigy192_add_controls(struct snd_ice1712 *ice)
446{ 446{
447 unsigned int i; 447 unsigned int i;
448 int err; 448 int err;
@@ -459,7 +459,7 @@ static int __devinit prodigy192_add_controls(ice1712_t *ice)
459/* 459/*
460 * initialize the chip 460 * initialize the chip
461 */ 461 */
462static int __devinit prodigy192_init(ice1712_t *ice) 462static int __devinit prodigy192_init(struct snd_ice1712 *ice)
463{ 463{
464 static unsigned short stac_inits_prodigy[] = { 464 static unsigned short stac_inits_prodigy[] = {
465 STAC946X_RESET, 0, 465 STAC946X_RESET, 0,
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c
index 1fe21009ca84..664b738bb647 100644
--- a/sound/pci/ice1712/revo.c
+++ b/sound/pci/ice1712/revo.c
@@ -33,7 +33,7 @@
33#include "envy24ht.h" 33#include "envy24ht.h"
34#include "revo.h" 34#include "revo.h"
35 35
36static void revo_i2s_mclk_changed(ice1712_t *ice) 36static void revo_i2s_mclk_changed(struct snd_ice1712 *ice)
37{ 37{
38 /* assert PRST# to converters; MT05 bit 7 */ 38 /* assert PRST# to converters; MT05 bit 7 */
39 outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD)); 39 outb(inb(ICEMT1724(ice, AC97_CMD)) | 0x80, ICEMT1724(ice, AC97_CMD));
@@ -45,7 +45,7 @@ static void revo_i2s_mclk_changed(ice1712_t *ice)
45/* 45/*
46 * change the rate of envy24HT, AK4355 and AK4381 46 * change the rate of envy24HT, AK4355 and AK4381
47 */ 47 */
48static void revo_set_rate_val(akm4xxx_t *ak, unsigned int rate) 48static void revo_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
49{ 49{
50 unsigned char old, tmp, dfs; 50 unsigned char old, tmp, dfs;
51 int reg, shift; 51 int reg, shift;
@@ -87,7 +87,7 @@ static void revo_set_rate_val(akm4xxx_t *ak, unsigned int rate)
87 * initialize the chips on M-Audio Revolution cards 87 * initialize the chips on M-Audio Revolution cards
88 */ 88 */
89 89
90static akm4xxx_t akm_revo_front __devinitdata = { 90static struct snd_akm4xxx akm_revo_front __devinitdata = {
91 .type = SND_AK4381, 91 .type = SND_AK4381,
92 .num_dacs = 2, 92 .num_dacs = 2,
93 .ops = { 93 .ops = {
@@ -107,7 +107,7 @@ static struct snd_ak4xxx_private akm_revo_front_priv __devinitdata = {
107 .mask_flags = 0, 107 .mask_flags = 0,
108}; 108};
109 109
110static akm4xxx_t akm_revo_surround __devinitdata = { 110static struct snd_akm4xxx akm_revo_surround __devinitdata = {
111 .type = SND_AK4355, 111 .type = SND_AK4355,
112 .idx_offset = 1, 112 .idx_offset = 1,
113 .num_dacs = 6, 113 .num_dacs = 6,
@@ -128,9 +128,9 @@ static struct snd_ak4xxx_private akm_revo_surround_priv __devinitdata = {
128 .mask_flags = 0, 128 .mask_flags = 0,
129}; 129};
130 130
131static int __devinit revo_init(ice1712_t *ice) 131static int __devinit revo_init(struct snd_ice1712 *ice)
132{ 132{
133 akm4xxx_t *ak; 133 struct snd_akm4xxx *ak;
134 int err; 134 int err;
135 135
136 /* determine I2C, DACs and ADCs */ 136 /* determine I2C, DACs and ADCs */
@@ -147,7 +147,7 @@ static int __devinit revo_init(ice1712_t *ice)
147 ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed; 147 ice->gpio.i2s_mclk_changed = revo_i2s_mclk_changed;
148 148
149 /* second stage of initialization, analog parts and others */ 149 /* second stage of initialization, analog parts and others */
150 ak = ice->akm = kcalloc(2, sizeof(akm4xxx_t), GFP_KERNEL); 150 ak = ice->akm = kcalloc(2, sizeof(struct snd_akm4xxx), GFP_KERNEL);
151 if (! ak) 151 if (! ak)
152 return -ENOMEM; 152 return -ENOMEM;
153 ice->akm_codecs = 2; 153 ice->akm_codecs = 2;
@@ -166,7 +166,7 @@ static int __devinit revo_init(ice1712_t *ice)
166} 166}
167 167
168 168
169static int __devinit revo_add_controls(ice1712_t *ice) 169static int __devinit revo_add_controls(struct snd_ice1712 *ice)
170{ 170{
171 int err; 171 int err;
172 172
diff --git a/sound/pci/ice1712/vt1720_mobo.c b/sound/pci/ice1712/vt1720_mobo.c
index 90c85cd95479..7ca263c13091 100644
--- a/sound/pci/ice1712/vt1720_mobo.c
+++ b/sound/pci/ice1712/vt1720_mobo.c
@@ -33,7 +33,7 @@
33#include "vt1720_mobo.h" 33#include "vt1720_mobo.h"
34 34
35 35
36static int __devinit k8x800_init(ice1712_t *ice) 36static int __devinit k8x800_init(struct snd_ice1712 *ice)
37{ 37{
38 ice->vt1720 = 1; 38 ice->vt1720 = 1;
39 39
@@ -47,7 +47,7 @@ static int __devinit k8x800_init(ice1712_t *ice)
47 return 0; 47 return 0;
48} 48}
49 49
50static int __devinit k8x800_add_controls(ice1712_t *ice) 50static int __devinit k8x800_add_controls(struct snd_ice1712 *ice)
51{ 51{
52 /* FIXME: needs some quirks for VT1616? */ 52 /* FIXME: needs some quirks for VT1616? */
53 return 0; 53 return 0;