aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/aureon.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-01-18 07:36:07 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:05 -0500
commit7cda8ba9f4e471dfba914ecf67fd14ebffb17c16 (patch)
tree5786b450d9099809b974929ea356b444c9f2bc07 /sound/pci/ice1712/aureon.c
parent797760ab14db4e82a50c06a9916dd5c6147b415b (diff)
[ALSA] ice1712, ice1724 - Code clean up
Clean up ice1712/ice1724 codes. The board-specific data is allocated locally in each code instead of having an ungly union in struct ice1712. Also, fix coding issues in prodigy_hifi.c. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/ice1712/aureon.c')
-rw-r--r--sound/pci/ice1712/aureon.c113
1 files changed, 74 insertions, 39 deletions
diff --git a/sound/pci/ice1712/aureon.c b/sound/pci/ice1712/aureon.c
index 337489187614..868ae291b960 100644
--- a/sound/pci/ice1712/aureon.c
+++ b/sound/pci/ice1712/aureon.c
@@ -61,6 +61,15 @@
61#include "aureon.h" 61#include "aureon.h"
62#include <sound/tlv.h> 62#include <sound/tlv.h>
63 63
64/* AC97 register cache for Aureon */
65struct aureon_spec {
66 unsigned short stac9744[64];
67 unsigned int cs8415_mux;
68 unsigned short master[2];
69 unsigned short vol[8];
70 unsigned char pca9554_out;
71};
72
64/* WM8770 registers */ 73/* WM8770 registers */
65#define WM_DAC_ATTEN 0x00 /* DAC1-8 analog attenuation */ 74#define WM_DAC_ATTEN 0x00 /* DAC1-8 analog attenuation */
66#define WM_DAC_MASTER_ATTEN 0x08 /* DAC master analog attenuation */ 75#define WM_DAC_MASTER_ATTEN 0x08 /* DAC master analog attenuation */
@@ -204,7 +213,8 @@ static int aureon_universe_inmux_get(struct snd_kcontrol *kcontrol,
204 struct snd_ctl_elem_value *ucontrol) 213 struct snd_ctl_elem_value *ucontrol)
205{ 214{
206 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 215 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
207 ucontrol->value.enumerated.item[0] = ice->spec.aureon.pca9554_out; 216 struct aureon_spec *spec = ice->spec;
217 ucontrol->value.enumerated.item[0] = spec->pca9554_out;
208 return 0; 218 return 0;
209} 219}
210 220
@@ -212,6 +222,7 @@ static int aureon_universe_inmux_put(struct snd_kcontrol *kcontrol,
212 struct snd_ctl_elem_value *ucontrol) 222 struct snd_ctl_elem_value *ucontrol)
213{ 223{
214 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 224 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
225 struct aureon_spec *spec = ice->spec;
215 unsigned char oval, nval; 226 unsigned char oval, nval;
216 int change; 227 int change;
217 228
@@ -219,10 +230,10 @@ static int aureon_universe_inmux_put(struct snd_kcontrol *kcontrol,
219 if (nval >= 3) 230 if (nval >= 3)
220 return -EINVAL; 231 return -EINVAL;
221 snd_ice1712_save_gpio_status(ice); 232 snd_ice1712_save_gpio_status(ice);
222 oval = ice->spec.aureon.pca9554_out; 233 oval = spec->pca9554_out;
223 if ((change = (oval != nval))) { 234 if ((change = (oval != nval))) {
224 aureon_pca9554_write(ice, PCA9554_OUT, nval); 235 aureon_pca9554_write(ice, PCA9554_OUT, nval);
225 ice->spec.aureon.pca9554_out = nval; 236 spec->pca9554_out = nval;
226 } 237 }
227 snd_ice1712_restore_gpio_status(ice); 238 snd_ice1712_restore_gpio_status(ice);
228 239
@@ -233,6 +244,7 @@ static int aureon_universe_inmux_put(struct snd_kcontrol *kcontrol,
233static void aureon_ac97_write(struct snd_ice1712 *ice, unsigned short reg, 244static void aureon_ac97_write(struct snd_ice1712 *ice, unsigned short reg,
234 unsigned short val) 245 unsigned short val)
235{ 246{
247 struct aureon_spec *spec = ice->spec;
236 unsigned int tmp; 248 unsigned int tmp;
237 249
238 /* Send address to XILINX chip */ 250 /* Send address to XILINX chip */
@@ -280,12 +292,13 @@ static void aureon_ac97_write(struct snd_ice1712 *ice, unsigned short reg,
280 udelay(10); 292 udelay(10);
281 293
282 /* Store the data in out private buffer */ 294 /* Store the data in out private buffer */
283 ice->spec.aureon.stac9744[(reg & 0x7F) >> 1] = val; 295 spec->stac9744[(reg & 0x7F) >> 1] = val;
284} 296}
285 297
286static unsigned short aureon_ac97_read(struct snd_ice1712 *ice, unsigned short reg) 298static unsigned short aureon_ac97_read(struct snd_ice1712 *ice, unsigned short reg)
287{ 299{
288 return ice->spec.aureon.stac9744[(reg & 0x7F) >> 1]; 300 struct aureon_spec *spec = ice->spec;
301 return spec->stac9744[(reg & 0x7F) >> 1];
289} 302}
290 303
291/* 304/*
@@ -293,6 +306,7 @@ static unsigned short aureon_ac97_read(struct snd_ice1712 *ice, unsigned short r
293 */ 306 */
294static int aureon_ac97_init (struct snd_ice1712 *ice) 307static int aureon_ac97_init (struct snd_ice1712 *ice)
295{ 308{
309 struct aureon_spec *spec = ice->spec;
296 int i; 310 int i;
297 static const unsigned short ac97_defaults[] = { 311 static const unsigned short ac97_defaults[] = {
298 0x00, 0x9640, 312 0x00, 0x9640,
@@ -330,9 +344,9 @@ static int aureon_ac97_init (struct snd_ice1712 *ice)
330 snd_ice1712_gpio_write(ice, tmp); 344 snd_ice1712_gpio_write(ice, tmp);
331 udelay(3); 345 udelay(3);
332 346
333 memset(&ice->spec.aureon.stac9744, 0, sizeof(ice->spec.aureon.stac9744)); 347 memset(&spec->stac9744, 0, sizeof(spec->stac9744));
334 for (i=0; ac97_defaults[i] != (unsigned short)-1; i+=2) 348 for (i=0; ac97_defaults[i] != (unsigned short)-1; i+=2)
335 ice->spec.aureon.stac9744[(ac97_defaults[i]) >> 1] = ac97_defaults[i+1]; 349 spec->stac9744[(ac97_defaults[i]) >> 1] = ac97_defaults[i+1];
336 350
337 aureon_ac97_write(ice, AC97_MASTER, 0x0000); // Unmute AC'97 master volume permanently - muting is done by WM8770 351 aureon_ac97_write(ice, AC97_MASTER, 0x0000); // Unmute AC'97 master volume permanently - muting is done by WM8770
338 352
@@ -744,15 +758,18 @@ static int wm_master_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
744static int wm_master_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 758static int wm_master_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
745{ 759{
746 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 760 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
761 struct aureon_spec *spec = ice->spec;
747 int i; 762 int i;
748 for (i=0; i<2; i++) 763 for (i=0; i<2; i++)
749 ucontrol->value.integer.value[i] = ice->spec.aureon.master[i] & ~WM_VOL_MUTE; 764 ucontrol->value.integer.value[i] =
765 spec->master[i] & ~WM_VOL_MUTE;
750 return 0; 766 return 0;
751} 767}
752 768
753static int wm_master_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 769static int wm_master_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
754{ 770{
755 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 771 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
772 struct aureon_spec *spec = ice->spec;
756 int ch, change = 0; 773 int ch, change = 0;
757 774
758 snd_ice1712_save_gpio_status(ice); 775 snd_ice1712_save_gpio_status(ice);
@@ -760,14 +777,14 @@ static int wm_master_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
760 unsigned int vol = ucontrol->value.integer.value[ch]; 777 unsigned int vol = ucontrol->value.integer.value[ch];
761 if (vol > WM_VOL_MAX) 778 if (vol > WM_VOL_MAX)
762 continue; 779 continue;
763 vol |= ice->spec.aureon.master[ch] & WM_VOL_MUTE; 780 vol |= spec->master[ch] & WM_VOL_MUTE;
764 if (vol != ice->spec.aureon.master[ch]) { 781 if (vol != spec->master[ch]) {
765 int dac; 782 int dac;
766 ice->spec.aureon.master[ch] = vol; 783 spec->master[ch] = vol;
767 for (dac = 0; dac < ice->num_total_dacs; dac += 2) 784 for (dac = 0; dac < ice->num_total_dacs; dac += 2)
768 wm_set_vol(ice, WM_DAC_ATTEN + dac + ch, 785 wm_set_vol(ice, WM_DAC_ATTEN + dac + ch,
769 ice->spec.aureon.vol[dac + ch], 786 spec->vol[dac + ch],
770 ice->spec.aureon.master[ch]); 787 spec->master[ch]);
771 change = 1; 788 change = 1;
772 } 789 }
773 } 790 }
@@ -791,18 +808,21 @@ static int wm_vol_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *
791static int wm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 808static int wm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
792{ 809{
793 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 810 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
811 struct aureon_spec *spec = ice->spec;
794 int i, ofs, voices; 812 int i, ofs, voices;
795 813
796 voices = kcontrol->private_value >> 8; 814 voices = kcontrol->private_value >> 8;
797 ofs = kcontrol->private_value & 0xff; 815 ofs = kcontrol->private_value & 0xff;
798 for (i = 0; i < voices; i++) 816 for (i = 0; i < voices; i++)
799 ucontrol->value.integer.value[i] = ice->spec.aureon.vol[ofs+i] & ~WM_VOL_MUTE; 817 ucontrol->value.integer.value[i] =
818 spec->vol[ofs+i] & ~WM_VOL_MUTE;
800 return 0; 819 return 0;
801} 820}
802 821
803static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 822static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
804{ 823{
805 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 824 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
825 struct aureon_spec *spec = ice->spec;
806 int i, idx, ofs, voices; 826 int i, idx, ofs, voices;
807 int change = 0; 827 int change = 0;
808 828
@@ -813,12 +833,12 @@ static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *
813 unsigned int vol = ucontrol->value.integer.value[i]; 833 unsigned int vol = ucontrol->value.integer.value[i];
814 if (vol > 0x7f) 834 if (vol > 0x7f)
815 continue; 835 continue;
816 vol |= ice->spec.aureon.vol[ofs+i]; 836 vol |= spec->vol[ofs+i];
817 if (vol != ice->spec.aureon.vol[ofs+i]) { 837 if (vol != spec->vol[ofs+i]) {
818 ice->spec.aureon.vol[ofs+i] = vol; 838 spec->vol[ofs+i] = vol;
819 idx = WM_DAC_ATTEN + ofs + i; 839 idx = WM_DAC_ATTEN + ofs + i;
820 wm_set_vol(ice, idx, ice->spec.aureon.vol[ofs+i], 840 wm_set_vol(ice, idx, spec->vol[ofs + i],
821 ice->spec.aureon.master[i]); 841 spec->master[i]);
822 change = 1; 842 change = 1;
823 } 843 }
824 } 844 }
@@ -840,19 +860,22 @@ static int wm_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info
840static int wm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 860static int wm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
841{ 861{
842 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 862 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
863 struct aureon_spec *spec = ice->spec;
843 int voices, ofs, i; 864 int voices, ofs, i;
844 865
845 voices = kcontrol->private_value >> 8; 866 voices = kcontrol->private_value >> 8;
846 ofs = kcontrol->private_value & 0xFF; 867 ofs = kcontrol->private_value & 0xFF;
847 868
848 for (i = 0; i < voices; i++) 869 for (i = 0; i < voices; i++)
849 ucontrol->value.integer.value[i] = (ice->spec.aureon.vol[ofs+i] & WM_VOL_MUTE) ? 0 : 1; 870 ucontrol->value.integer.value[i] =
871 (spec->vol[ofs + i] & WM_VOL_MUTE) ? 0 : 1;
850 return 0; 872 return 0;
851} 873}
852 874
853static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 875static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
854{ 876{
855 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 877 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
878 struct aureon_spec *spec = ice->spec;
856 int change = 0, voices, ofs, i; 879 int change = 0, voices, ofs, i;
857 880
858 voices = kcontrol->private_value >> 8; 881 voices = kcontrol->private_value >> 8;
@@ -860,13 +883,13 @@ static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value
860 883
861 snd_ice1712_save_gpio_status(ice); 884 snd_ice1712_save_gpio_status(ice);
862 for (i = 0; i < voices; i++) { 885 for (i = 0; i < voices; i++) {
863 int val = (ice->spec.aureon.vol[ofs + i] & WM_VOL_MUTE) ? 0 : 1; 886 int val = (spec->vol[ofs + i] & WM_VOL_MUTE) ? 0 : 1;
864 if (ucontrol->value.integer.value[i] != val) { 887 if (ucontrol->value.integer.value[i] != val) {
865 ice->spec.aureon.vol[ofs + i] &= ~WM_VOL_MUTE; 888 spec->vol[ofs + i] &= ~WM_VOL_MUTE;
866 ice->spec.aureon.vol[ofs + i] |= 889 spec->vol[ofs + i] |=
867 ucontrol->value.integer.value[i] ? 0 : WM_VOL_MUTE; 890 ucontrol->value.integer.value[i] ? 0 : WM_VOL_MUTE;
868 wm_set_vol(ice, ofs + i, ice->spec.aureon.vol[ofs + i], 891 wm_set_vol(ice, ofs + i, spec->vol[ofs + i],
869 ice->spec.aureon.master[i]); 892 spec->master[i]);
870 change = 1; 893 change = 1;
871 } 894 }
872 } 895 }
@@ -883,29 +906,33 @@ static int wm_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value
883static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 906static int wm_master_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
884{ 907{
885 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 908 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
909 struct aureon_spec *spec = ice->spec;
886 910
887 ucontrol->value.integer.value[0] = (ice->spec.aureon.master[0] & WM_VOL_MUTE) ? 0 : 1; 911 ucontrol->value.integer.value[0] =
888 ucontrol->value.integer.value[1] = (ice->spec.aureon.master[1] & WM_VOL_MUTE) ? 0 : 1; 912 (spec->master[0] & WM_VOL_MUTE) ? 0 : 1;
913 ucontrol->value.integer.value[1] =
914 (spec->master[1] & WM_VOL_MUTE) ? 0 : 1;
889 return 0; 915 return 0;
890} 916}
891 917
892static int wm_master_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 918static int wm_master_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
893{ 919{
894 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 920 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
921 struct aureon_spec *spec = ice->spec;
895 int change = 0, i; 922 int change = 0, i;
896 923
897 snd_ice1712_save_gpio_status(ice); 924 snd_ice1712_save_gpio_status(ice);
898 for (i = 0; i < 2; i++) { 925 for (i = 0; i < 2; i++) {
899 int val = (ice->spec.aureon.master[i] & WM_VOL_MUTE) ? 0 : 1; 926 int val = (spec->master[i] & WM_VOL_MUTE) ? 0 : 1;
900 if (ucontrol->value.integer.value[i] != val) { 927 if (ucontrol->value.integer.value[i] != val) {
901 int dac; 928 int dac;
902 ice->spec.aureon.master[i] &= ~WM_VOL_MUTE; 929 spec->master[i] &= ~WM_VOL_MUTE;
903 ice->spec.aureon.master[i] |= 930 spec->master[i] |=
904 ucontrol->value.integer.value[i] ? 0 : WM_VOL_MUTE; 931 ucontrol->value.integer.value[i] ? 0 : WM_VOL_MUTE;
905 for (dac = 0; dac < ice->num_total_dacs; dac += 2) 932 for (dac = 0; dac < ice->num_total_dacs; dac += 2)
906 wm_set_vol(ice, WM_DAC_ATTEN + dac + i, 933 wm_set_vol(ice, WM_DAC_ATTEN + dac + i,
907 ice->spec.aureon.vol[dac + i], 934 spec->vol[dac + i],
908 ice->spec.aureon.master[i]); 935 spec->master[i]);
909 change = 1; 936 change = 1;
910 } 937 }
911 } 938 }
@@ -1151,10 +1178,11 @@ static int aureon_cs8415_mux_info(struct snd_kcontrol *kcontrol, struct snd_ctl_
1151static int aureon_cs8415_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1178static int aureon_cs8415_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1152{ 1179{
1153 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 1180 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1181 struct aureon_spec *spec = ice->spec;
1154 1182
1155 //snd_ice1712_save_gpio_status(ice); 1183 //snd_ice1712_save_gpio_status(ice);
1156 //val = aureon_cs8415_get(ice, CS8415_CTRL2); 1184 //val = aureon_cs8415_get(ice, CS8415_CTRL2);
1157 ucontrol->value.enumerated.item[0] = ice->spec.aureon.cs8415_mux; 1185 ucontrol->value.enumerated.item[0] = spec->cs8415_mux;
1158 //snd_ice1712_restore_gpio_status(ice); 1186 //snd_ice1712_restore_gpio_status(ice);
1159 return 0; 1187 return 0;
1160} 1188}
@@ -1162,6 +1190,7 @@ static int aureon_cs8415_mux_get(struct snd_kcontrol *kcontrol, struct snd_ctl_e
1162static int aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 1190static int aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1163{ 1191{
1164 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 1192 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
1193 struct aureon_spec *spec = ice->spec;
1165 unsigned short oval, nval; 1194 unsigned short oval, nval;
1166 int change; 1195 int change;
1167 1196
@@ -1173,7 +1202,7 @@ static int aureon_cs8415_mux_put(struct snd_kcontrol *kcontrol, struct snd_ctl_e
1173 if (change) 1202 if (change)
1174 aureon_cs8415_put(ice, CS8415_CTRL2, nval); 1203 aureon_cs8415_put(ice, CS8415_CTRL2, nval);
1175 snd_ice1712_restore_gpio_status(ice); 1204 snd_ice1712_restore_gpio_status(ice);
1176 ice->spec.aureon.cs8415_mux = ucontrol->value.enumerated.item[0]; 1205 spec->cs8415_mux = ucontrol->value.enumerated.item[0];
1177 return change; 1206 return change;
1178} 1207}
1179 1208
@@ -2009,10 +2038,16 @@ static int __devinit aureon_init(struct snd_ice1712 *ice)
2009 0x0605, /* slave, 24bit, MSB on second OSCLK, SDOUT for right channel when OLRCK is high */ 2038 0x0605, /* slave, 24bit, MSB on second OSCLK, SDOUT for right channel when OLRCK is high */
2010 (unsigned short)-1 2039 (unsigned short)-1
2011 }; 2040 };
2041 struct aureon_spec *spec;
2012 unsigned int tmp; 2042 unsigned int tmp;
2013 const unsigned short *p; 2043 const unsigned short *p;
2014 int err, i; 2044 int err, i;
2015 2045
2046 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
2047 if (!spec)
2048 return -ENOMEM;
2049 ice->spec = spec;
2050
2016 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) { 2051 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) {
2017 ice->num_total_dacs = 6; 2052 ice->num_total_dacs = 6;
2018 ice->num_total_adcs = 2; 2053 ice->num_total_adcs = 2;
@@ -2063,7 +2098,7 @@ static int __devinit aureon_init(struct snd_ice1712 *ice)
2063 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) { 2098 ice->eeprom.subvendor != VT1724_SUBDEVICE_PRODIGY71XT) {
2064 for (p = cs_inits; *p != (unsigned short)-1; p++) 2099 for (p = cs_inits; *p != (unsigned short)-1; p++)
2065 aureon_spi_write(ice, AUREON_CS8415_CS, *p | 0x200000, 24); 2100 aureon_spi_write(ice, AUREON_CS8415_CS, *p | 0x200000, 24);
2066 ice->spec.aureon.cs8415_mux = 1; 2101 spec->cs8415_mux = 1;
2067 2102
2068 aureon_set_headphone_amp(ice, 1); 2103 aureon_set_headphone_amp(ice, 1);
2069 } 2104 }
@@ -2074,11 +2109,11 @@ static int __devinit aureon_init(struct snd_ice1712 *ice)
2074 aureon_pca9554_write(ice, PCA9554_DIR, 0x00); 2109 aureon_pca9554_write(ice, PCA9554_DIR, 0x00);
2075 aureon_pca9554_write(ice, PCA9554_OUT, 0x00); /* internal AUX */ 2110 aureon_pca9554_write(ice, PCA9554_OUT, 0x00); /* internal AUX */
2076 2111
2077 ice->spec.aureon.master[0] = WM_VOL_MUTE; 2112 spec->master[0] = WM_VOL_MUTE;
2078 ice->spec.aureon.master[1] = WM_VOL_MUTE; 2113 spec->master[1] = WM_VOL_MUTE;
2079 for (i = 0; i < ice->num_total_dacs; i++) { 2114 for (i = 0; i < ice->num_total_dacs; i++) {
2080 ice->spec.aureon.vol[i] = WM_VOL_MUTE; 2115 spec->vol[i] = WM_VOL_MUTE;
2081 wm_set_vol(ice, i, ice->spec.aureon.vol[i], ice->spec.aureon.master[i % 2]); 2116 wm_set_vol(ice, i, spec->vol[i], spec->master[i % 2]);
2082 } 2117 }
2083 2118
2084 return 0; 2119 return 0;