aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/aureon.c
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 /sound/pci/ice1712/aureon.c
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>
Diffstat (limited to 'sound/pci/ice1712/aureon.c')
-rw-r--r--sound/pci/ice1712/aureon.c242
1 files changed, 121 insertions, 121 deletions
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;