53 #include <linux/slab.h>
68 unsigned short vol[8];
73 #define WM_DAC_ATTEN 0x00
74 #define WM_DAC_MASTER_ATTEN 0x08
75 #define WM_DAC_DIG_ATTEN 0x09
76 #define WM_DAC_DIG_MASTER_ATTEN 0x11
77 #define WM_PHASE_SWAP 0x12
78 #define WM_DAC_CTRL1 0x13
80 #define WM_DAC_CTRL2 0x15
81 #define WM_INT_CTRL 0x16
82 #define WM_MASTER 0x17
83 #define WM_POWERDOWN 0x18
84 #define WM_ADC_GAIN 0x19
85 #define WM_ADC_MUX 0x1b
86 #define WM_OUT_MUX1 0x1c
87 #define WM_OUT_MUX2 0x1e
91 #define CS8415_CTRL1 0x01
92 #define CS8415_CTRL2 0x02
93 #define CS8415_QSUB 0x14
94 #define CS8415_RATIO 0x1E
95 #define CS8415_C_BUFFER 0x20
96 #define CS8415_ID 0x7F
99 #define PCA9554_DEV 0x40
100 #define PCA9554_IN 0x00
101 #define PCA9554_OUT 0x01
102 #define PCA9554_INVERT 0x02
103 #define PCA9554_DIR 0x03
112 static void aureon_pca9554_write(
struct snd_ice1712 *ice,
unsigned char reg,
118 unsigned char val = 0;
120 tmp = snd_ice1712_gpio_read(ice);
130 snd_ice1712_gpio_write(ice, tmp);
138 snd_ice1712_gpio_write(ice, tmp);
141 snd_ice1712_gpio_write(ice, tmp);
144 snd_ice1712_gpio_write(ice, tmp);
147 snd_ice1712_gpio_write(ice, tmp);
153 for (j = 0; j < 3; j++) {
165 for (i = 7; i >= 0; i--) {
167 snd_ice1712_gpio_write(ice, tmp);
173 snd_ice1712_gpio_write(ice, tmp);
176 snd_ice1712_gpio_write(ice, tmp);
180 snd_ice1712_gpio_write(ice, tmp);
183 snd_ice1712_gpio_write(ice, tmp);
186 snd_ice1712_gpio_write(ice, tmp);
190 snd_ice1712_gpio_write(ice, tmp);
193 snd_ice1712_gpio_write(ice, tmp);
196 snd_ice1712_gpio_write(ice, tmp);
199 snd_ice1712_gpio_write(ice, tmp);
203 static int aureon_universe_inmux_info(
struct snd_kcontrol *kcontrol,
206 char *texts[3] = {
"Internal Aux",
"Wavetable",
"Rear Line-In"};
217 static int aureon_universe_inmux_get(
struct snd_kcontrol *kcontrol,
226 static int aureon_universe_inmux_put(
struct snd_kcontrol *kcontrol,
231 unsigned char oval, nval;
234 nval = ucontrol->
value.enumerated.item[0];
237 snd_ice1712_save_gpio_status(ice);
239 change = (oval != nval);
244 snd_ice1712_restore_gpio_status(ice);
249 static void aureon_ac97_write(
struct snd_ice1712 *ice,
unsigned short reg,
256 tmp = (snd_ice1712_gpio_read(ice) & ~0xFF) | (reg & 0x7F);
257 snd_ice1712_gpio_write(ice, tmp);
260 snd_ice1712_gpio_write(ice, tmp);
263 snd_ice1712_gpio_write(ice, tmp);
269 snd_ice1712_gpio_write(ice, tmp);
272 snd_ice1712_gpio_write(ice, tmp);
275 snd_ice1712_gpio_write(ice, tmp);
279 tmp &= ~AUREON_AC97_DATA_MASK;
280 tmp |= (val >> 8) & AUREON_AC97_DATA_MASK;
282 snd_ice1712_gpio_write(ice, tmp);
285 snd_ice1712_gpio_write(ice, tmp);
288 snd_ice1712_gpio_write(ice, tmp);
293 snd_ice1712_gpio_write(ice, tmp);
296 snd_ice1712_gpio_write(ice, tmp);
300 spec->
stac9744[(reg & 0x7F) >> 1] = val;
303 static unsigned short aureon_ac97_read(
struct snd_ice1712 *ice,
unsigned short reg)
306 return spec->
stac9744[(reg & 0x7F) >> 1];
312 static int aureon_ac97_init(
struct snd_ice1712 *ice)
316 static const unsigned short ac97_defaults[] = {
341 snd_ice1712_gpio_write(ice, tmp);
345 snd_ice1712_gpio_write(ice, tmp);
349 snd_ice1712_gpio_write(ice, tmp);
353 for (i = 0; ac97_defaults[
i] != (
unsigned short)-1; i += 2)
354 spec->
stac9744[(ac97_defaults[i]) >> 1] = ac97_defaults[i+1];
362 #define AUREON_AC97_STEREO 0x80
384 ucontrol->
value.integer.value[0] = 0x1F - (vol & 0x1F);
386 ucontrol->
value.integer.value[1] = 0x1F - ((vol >> 8) & 0x1F);
395 unsigned short ovol, nvol;
398 snd_ice1712_save_gpio_status(ice);
400 ovol = aureon_ac97_read(ice, kcontrol->
private_value & 0x7F);
401 nvol = (0x1F - ucontrol->
value.integer.value[0]) & 0x001F;
403 nvol |= ((0x1F - ucontrol->
value.integer.value[1]) << 8) & 0x1F00;
404 nvol |= ovol & ~0x1F1F;
406 change = (ovol != nvol);
408 aureon_ac97_write(ice, kcontrol->
private_value & 0x7F, nvol);
410 snd_ice1712_restore_gpio_status(ice);
418 #define aureon_ac97_mute_info snd_ctl_boolean_mono_info
426 ucontrol->
value.integer.value[0] = aureon_ac97_read(ice,
436 unsigned short ovol, nvol;
439 snd_ice1712_save_gpio_status(ice);
441 ovol = aureon_ac97_read(ice, kcontrol->
private_value & 0x7F);
442 nvol = (ucontrol->
value.integer.value[0] ? 0x0000 : 0x8000) | (ovol & ~0x8000);
444 change = (ovol != nvol);
446 aureon_ac97_write(ice, kcontrol->
private_value & 0x7F, nvol);
448 snd_ice1712_restore_gpio_status(ice);
456 #define aureon_ac97_micboost_info snd_ctl_boolean_mono_info
464 ucontrol->
value.integer.value[0] = aureon_ac97_read(ice,
AC97_MIC) & 0x0020 ? 0 : 1;
473 unsigned short ovol, nvol;
476 snd_ice1712_save_gpio_status(ice);
478 ovol = aureon_ac97_read(ice,
AC97_MIC);
479 nvol = (ucontrol->
value.integer.value[0] ? 0x0000 : 0x0020) | (ovol & ~0x0020);
481 change = (ovol != nvol);
483 aureon_ac97_write(ice,
AC97_MIC, nvol);
485 snd_ice1712_restore_gpio_status(ice);
497 unsigned int mosi,
clk;
499 tmp = snd_ice1712_gpio_read(ice);
516 snd_ice1712_gpio_write(ice, tmp);
519 for (i = bits - 1; i >= 0; i--) {
521 snd_ice1712_gpio_write(ice, tmp);
527 snd_ice1712_gpio_write(ice, tmp);
530 snd_ice1712_gpio_write(ice, tmp);
536 snd_ice1712_gpio_write(ice, tmp);
539 snd_ice1712_gpio_write(ice, tmp);
546 static void aureon_spi_read(
struct snd_ice1712 *ice,
unsigned int cs,
547 unsigned int data,
int bits,
unsigned char *
buffer,
int size)
553 snd_ice1712_gpio_write(ice, tmp);
555 snd_ice1712_gpio_write(ice, tmp);
558 for (i = bits-1; i >= 0; i--) {
563 snd_ice1712_gpio_write(ice, tmp);
567 snd_ice1712_gpio_write(ice, tmp);
571 snd_ice1712_gpio_write(ice, tmp);
575 for (j = 0; j <
size; j++) {
576 unsigned char outdata = 0;
577 for (i = 7; i >= 0; i--) {
578 tmp = snd_ice1712_gpio_read(ice);
584 snd_ice1712_gpio_write(ice, tmp);
588 snd_ice1712_gpio_write(ice, tmp);
595 snd_ice1712_gpio_write(ice, tmp);
598 static unsigned char aureon_cs8415_get(
struct snd_ice1712 *ice,
int reg)
606 static void aureon_cs8415_read(
struct snd_ice1712 *ice,
int reg,
607 unsigned char *buffer,
int size)
613 static void aureon_cs8415_put(
struct snd_ice1712 *ice,
int reg,
622 static unsigned short wm_get(
struct snd_ice1712 *ice,
int reg)
625 return ((
unsigned short)ice->
akm[0].images[reg] << 8) |
626 ice->
akm[0].images[reg + 1];
632 static void wm_put_nocache(
struct snd_ice1712 *ice,
int reg,
unsigned short val)
634 aureon_spi_write(ice,
638 (reg << 9) | (val & 0x1ff), 16);
644 static void wm_put(
struct snd_ice1712 *ice,
int reg,
unsigned short val)
646 wm_put_nocache(ice, reg, val);
648 ice->
akm[0].images[
reg] = val >> 8;
649 ice->
akm[0].images[reg + 1] =
val;
654 #define aureon_mono_bool_info snd_ctl_boolean_mono_info
659 #define aureon_ac97_mmute_info snd_ctl_boolean_mono_info
676 unsigned short ovol, nvol;
679 snd_ice1712_save_gpio_status(ice);
682 nvol = (ovol & ~0x02) | (ucontrol->
value.integer.value[0] ? 0x02 : 0x00);
683 change = (ovol != nvol);
687 snd_ice1712_restore_gpio_status(ice);
698 #define WM_VOL_MAX 100
699 #define WM_VOL_CNT 101
700 #define WM_VOL_MUTE 0x8000
702 static void wm_set_vol(
struct snd_ice1712 *ice,
unsigned int index,
unsigned short vol,
unsigned short master)
706 if ((master &
WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) {
714 wm_put(ice, index, nvol);
715 wm_put_nocache(ice, index, 0x180 | nvol);
721 #define wm_pcm_mute_info snd_ctl_boolean_mono_info
728 ucontrol->
value.integer.value[0] = (wm_get(ice,
WM_MUTE) & 0x10) ? 0 : 1;
736 unsigned short nval, oval;
739 snd_ice1712_save_gpio_status(ice);
741 nval = (oval & ~0x10) | (ucontrol->
value.integer.value[0] ? 0 : 0x10);
742 change = (oval != nval);
745 snd_ice1712_restore_gpio_status(ice);
767 for (i = 0; i < 2; i++)
768 ucontrol->
value.integer.value[i] =
779 snd_ice1712_save_gpio_status(ice);
780 for (ch = 0; ch < 2; ch++) {
781 unsigned int vol = ucontrol->
value.integer.value[ch];
785 if (vol != spec->
master[ch]) {
795 snd_ice1712_restore_gpio_status(ice);
806 uinfo->
count = voices;
820 for (i = 0; i < voices; i++)
821 ucontrol->
value.integer.value[i] =
830 int i,
idx, ofs, voices;
835 snd_ice1712_save_gpio_status(ice);
836 for (i = 0; i < voices; i++) {
837 unsigned int vol = ucontrol->
value.integer.value[
i];
841 if (vol != spec->
vol[ofs+i]) {
844 wm_set_vol(ice, idx, spec->
vol[ofs + i],
849 snd_ice1712_restore_gpio_status(ice);
874 for (i = 0; i < voices; i++)
875 ucontrol->
value.integer.value[i] =
884 int change = 0, voices, ofs,
i;
889 snd_ice1712_save_gpio_status(ice);
890 for (i = 0; i < voices; i++) {
892 if (ucontrol->
value.integer.value[i] != val) {
894 spec->
vol[ofs +
i] |=
896 wm_set_vol(ice, ofs + i, spec->
vol[ofs + i],
901 snd_ice1712_restore_gpio_status(ice);
909 #define wm_master_mute_info snd_ctl_boolean_stereo_info
916 ucontrol->
value.integer.value[0] =
918 ucontrol->
value.integer.value[1] =
929 snd_ice1712_save_gpio_status(ice);
930 for (i = 0; i < 2; i++) {
932 if (ucontrol->
value.integer.value[i] != val) {
944 snd_ice1712_restore_gpio_status(ice);
952 #define PCM_MIN (PCM_0dB - PCM_RES)
970 ucontrol->
value.integer.value[0] =
val;
978 unsigned short ovol, nvol;
981 nvol = ucontrol->
value.integer.value[0];
984 snd_ice1712_save_gpio_status(ice);
985 nvol = (nvol ? (nvol +
PCM_MIN) : 0) & 0xff;
992 snd_ice1712_restore_gpio_status(ice);
999 #define wm_adc_mute_info snd_ctl_boolean_stereo_info
1008 for (i = 0; i < 2; i++) {
1010 ucontrol->
value.integer.value[
i] = ~val>>5 & 0x1;
1019 unsigned short new, old;
1022 snd_ice1712_save_gpio_status(ice);
1023 for (i = 0; i < 2; i++) {
1025 new = (~ucontrol->
value.integer.value[
i]<<5&0x20) | (old&~0x20);
1031 snd_ice1712_restore_gpio_status(ice);
1055 for (i = 0; i < 2; i++) {
1057 vol = wm_get(ice, idx) & 0x1f;
1068 unsigned short ovol, nvol;
1071 snd_ice1712_save_gpio_status(ice);
1072 for (i = 0; i < 2; i++) {
1074 nvol = ucontrol->
value.integer.value[
i] & 0x1f;
1075 ovol = wm_get(ice, idx);
1076 if ((ovol & 0x1f) != nvol) {
1077 wm_put(ice, idx, nvol | (ovol & ~0x1f));
1081 snd_ice1712_restore_gpio_status(ice);
1090 static const char *
const texts[] = {
1097 static const char *
const universe_texts[] = {
1132 ucontrol->
value.enumerated.item[0] = val & 7;
1133 ucontrol->
value.enumerated.item[1] = (val >> 4) & 7;
1141 unsigned short oval, nval;
1144 snd_ice1712_save_gpio_status(ice);
1146 nval = oval & ~0x77;
1147 nval |= ucontrol->
value.enumerated.item[0] & 7;
1148 nval |= (ucontrol->
value.enumerated.item[1] & 7) << 4;
1149 change = (oval != nval);
1152 snd_ice1712_restore_gpio_status(ice);
1162 static const char *
const aureon_texts[] = {
1166 static const char *
const prodigy_texts[] = {
1198 unsigned short oval, nval;
1201 snd_ice1712_save_gpio_status(ice);
1203 nval = oval & ~0x07;
1204 nval |= ucontrol->
value.enumerated.item[0] & 7;
1205 change = (oval != nval);
1208 snd_ice1712_restore_gpio_status(ice);
1225 unsigned char ratio;
1227 ucontrol->
value.integer.value[0] = (
int)((
unsigned int)ratio * 750);
1234 #define aureon_cs8415_mute_info snd_ctl_boolean_mono_info
1239 snd_ice1712_save_gpio_status(ice);
1240 ucontrol->
value.integer.value[0] = (aureon_cs8415_get(ice,
CS8415_CTRL1) & 0x20) ? 0 : 1;
1241 snd_ice1712_restore_gpio_status(ice);
1248 unsigned char oval, nval;
1250 snd_ice1712_save_gpio_status(ice);
1252 if (ucontrol->
value.integer.value[0])
1253 nval = oval & ~0x20;
1256 change = (oval != nval);
1259 snd_ice1712_restore_gpio_status(ice);
1277 snd_ice1712_save_gpio_status(ice);
1279 snd_ice1712_restore_gpio_status(ice);
1301 snd_ice1712_save_gpio_status(ice);
1303 snd_ice1712_restore_gpio_status(ice);
1312 unsigned int tmp, tmp2;
1314 tmp2 = tmp = snd_ice1712_gpio_read(ice);
1328 snd_ice1712_gpio_write(ice, tmp);
1334 static int aureon_get_headphone_amp(
struct snd_ice1712 *ice)
1336 unsigned int tmp = snd_ice1712_gpio_read(ice);
1341 #define aureon_hpamp_info snd_ctl_boolean_mono_info
1347 ucontrol->
value.integer.value[0] = aureon_get_headphone_amp(ice);
1356 return aureon_set_headphone_amp(ice, ucontrol->
value.integer.value[0]);
1363 #define aureon_deemp_info snd_ctl_boolean_mono_info
1377 if (ucontrol->
value.integer.value[0])
1381 if (temp != temp2) {
1393 static const char *
const texts[2] = {
"128x",
"64x" };
1409 ucontrol->
value.enumerated.item[0] = (wm_get(ice,
WM_MASTER) & 0x8) == 0x8;
1420 if (ucontrol->
value.enumerated.item[0])
1425 if (temp != temp2) {
1439 .name =
"Master Playback Switch",
1441 .get = wm_master_mute_get,
1442 .put = wm_master_mute_put
1448 .
name =
"Master Playback Volume",
1449 .
info = wm_master_vol_info,
1450 .
get = wm_master_vol_get,
1451 .
put = wm_master_vol_put,
1452 .
tlv = { .p = db_scale_wm_dac }
1456 .name =
"Front Playback Switch",
1457 .info = wm_mute_info,
1460 .private_value = (2 << 8) | 0
1466 .
name =
"Front Playback Volume",
1467 .
info = wm_vol_info,
1471 .tlv = { .p = db_scale_wm_dac }
1475 .name =
"Rear Playback Switch",
1476 .info = wm_mute_info,
1479 .private_value = (2 << 8) | 2
1485 .
name =
"Rear Playback Volume",
1486 .
info = wm_vol_info,
1490 .tlv = { .p = db_scale_wm_dac }
1494 .name =
"Center Playback Switch",
1495 .info = wm_mute_info,
1498 .private_value = (1 << 8) | 4
1504 .
name =
"Center Playback Volume",
1505 .
info = wm_vol_info,
1509 .tlv = { .p = db_scale_wm_dac }
1513 .name =
"LFE Playback Switch",
1514 .info = wm_mute_info,
1517 .private_value = (1 << 8) | 5
1523 .
name =
"LFE Playback Volume",
1524 .
info = wm_vol_info,
1528 .tlv = { .p = db_scale_wm_dac }
1532 .name =
"Side Playback Switch",
1533 .info = wm_mute_info,
1536 .private_value = (2 << 8) | 6
1542 .
name =
"Side Playback Volume",
1543 .
info = wm_vol_info,
1547 .tlv = { .p = db_scale_wm_dac }
1554 .name =
"PCM Playback Switch",
1556 .get = wm_pcm_mute_get,
1557 .put = wm_pcm_mute_put
1563 .
name =
"PCM Playback Volume",
1564 .
info = wm_pcm_vol_info,
1565 .
get = wm_pcm_vol_get,
1566 .
put = wm_pcm_vol_put,
1567 .
tlv = { .p = db_scale_wm_pcm }
1571 .name =
"Capture Switch",
1573 .get = wm_adc_mute_get,
1574 .put = wm_adc_mute_put,
1580 .
name =
"Capture Volume",
1581 .
info = wm_adc_vol_info,
1582 .
get = wm_adc_vol_get,
1583 .
put = wm_adc_vol_put,
1584 .
tlv = { .p = db_scale_wm_adc }
1588 .name =
"Capture Source",
1590 .get = wm_adc_mux_get,
1591 .put = wm_adc_mux_put,
1596 .name =
"External Amplifier",
1598 .get = aureon_hpamp_get,
1599 .put = aureon_hpamp_put
1603 .name =
"DAC Deemphasis Switch",
1605 .get = aureon_deemp_get,
1606 .put = aureon_deemp_put
1610 .name =
"ADC Oversampling",
1611 .info = aureon_oversampling_info,
1612 .get = aureon_oversampling_get,
1613 .put = aureon_oversampling_put
1620 .name =
"AC97 Playback Switch",
1622 .get = aureon_ac97_mmute_get,
1623 .put = aureon_ac97_mmute_put,
1630 .
name =
"AC97 Playback Volume",
1631 .
info = aureon_ac97_vol_info,
1632 .
get = aureon_ac97_vol_get,
1633 .
put = aureon_ac97_vol_put,
1635 .
tlv = { .p = db_scale_ac97_master }
1639 .name =
"CD Playback Switch",
1641 .get = aureon_ac97_mute_get,
1642 .put = aureon_ac97_mute_put,
1649 .
name =
"CD Playback Volume",
1650 .
info = aureon_ac97_vol_info,
1651 .
get = aureon_ac97_vol_get,
1652 .
put = aureon_ac97_vol_put,
1654 .
tlv = { .p = db_scale_ac97_gain }
1658 .name =
"Aux Playback Switch",
1660 .get = aureon_ac97_mute_get,
1661 .put = aureon_ac97_mute_put,
1668 .
name =
"Aux Playback Volume",
1669 .
info = aureon_ac97_vol_info,
1670 .
get = aureon_ac97_vol_get,
1671 .
put = aureon_ac97_vol_put,
1673 .
tlv = { .p = db_scale_ac97_gain }
1677 .name =
"Line Playback Switch",
1679 .get = aureon_ac97_mute_get,
1680 .put = aureon_ac97_mute_put,
1687 .
name =
"Line Playback Volume",
1688 .
info = aureon_ac97_vol_info,
1689 .
get = aureon_ac97_vol_get,
1690 .
put = aureon_ac97_vol_put,
1692 .
tlv = { .p = db_scale_ac97_gain }
1696 .name =
"Mic Playback Switch",
1698 .get = aureon_ac97_mute_get,
1699 .put = aureon_ac97_mute_put,
1706 .
name =
"Mic Playback Volume",
1707 .
info = aureon_ac97_vol_info,
1708 .
get = aureon_ac97_vol_get,
1709 .
put = aureon_ac97_vol_put,
1711 .
tlv = { .p = db_scale_ac97_gain }
1715 .name =
"Mic Boost (+20dB)",
1717 .get = aureon_ac97_micboost_get,
1718 .put = aureon_ac97_micboost_put
1725 .name =
"AC97 Playback Switch",
1727 .get = aureon_ac97_mmute_get,
1728 .put = aureon_ac97_mmute_put,
1735 .
name =
"AC97 Playback Volume",
1736 .
info = aureon_ac97_vol_info,
1737 .
get = aureon_ac97_vol_get,
1738 .
put = aureon_ac97_vol_put,
1740 .
tlv = { .p = db_scale_ac97_master }
1744 .name =
"CD Playback Switch",
1746 .get = aureon_ac97_mute_get,
1747 .put = aureon_ac97_mute_put,
1754 .
name =
"CD Playback Volume",
1755 .
info = aureon_ac97_vol_info,
1756 .
get = aureon_ac97_vol_get,
1757 .
put = aureon_ac97_vol_put,
1759 .
tlv = { .p = db_scale_ac97_gain }
1763 .name =
"Phono Playback Switch",
1765 .get = aureon_ac97_mute_get,
1766 .put = aureon_ac97_mute_put,
1773 .
name =
"Phono Playback Volume",
1774 .
info = aureon_ac97_vol_info,
1775 .
get = aureon_ac97_vol_get,
1776 .
put = aureon_ac97_vol_put,
1778 .
tlv = { .p = db_scale_ac97_gain }
1782 .name =
"Line Playback Switch",
1784 .get = aureon_ac97_mute_get,
1785 .put = aureon_ac97_mute_put,
1792 .
name =
"Line Playback Volume",
1793 .
info = aureon_ac97_vol_info,
1794 .
get = aureon_ac97_vol_get,
1795 .
put = aureon_ac97_vol_put,
1797 .
tlv = { .p = db_scale_ac97_gain }
1801 .name =
"Mic Playback Switch",
1803 .get = aureon_ac97_mute_get,
1804 .put = aureon_ac97_mute_put,
1811 .
name =
"Mic Playback Volume",
1812 .
info = aureon_ac97_vol_info,
1813 .
get = aureon_ac97_vol_get,
1814 .
put = aureon_ac97_vol_put,
1816 .
tlv = { .p = db_scale_ac97_gain }
1820 .name =
"Mic Boost (+20dB)",
1822 .get = aureon_ac97_micboost_get,
1823 .put = aureon_ac97_micboost_put
1827 .name =
"Aux Playback Switch",
1829 .get = aureon_ac97_mute_get,
1830 .put = aureon_ac97_mute_put,
1837 .
name =
"Aux Playback Volume",
1838 .
info = aureon_ac97_vol_info,
1839 .
get = aureon_ac97_vol_get,
1840 .
put = aureon_ac97_vol_put,
1842 .
tlv = { .p = db_scale_ac97_gain }
1846 .name =
"Aux Source",
1847 .info = aureon_universe_inmux_info,
1848 .get = aureon_universe_inmux_get,
1849 .put = aureon_universe_inmux_put
1859 .get = aureon_cs8415_mute_get,
1860 .put = aureon_cs8415_mute_put
1865 .info = aureon_cs8415_mux_info,
1866 .get = aureon_cs8415_mux_get,
1867 .put = aureon_cs8415_mux_put,
1873 .info = aureon_cs8415_qsub_info,
1874 .get = aureon_cs8415_qsub_get,
1880 .info = aureon_cs8415_spdif_info,
1881 .get = aureon_cs8415_mask_get
1887 .info = aureon_cs8415_spdif_info,
1888 .get = aureon_cs8415_spdif_get
1894 .info = aureon_cs8415_rate_info,
1895 .get = aureon_cs8415_rate_get
1901 unsigned int i, counts;
1907 for (i = 0; i < counts; i++) {
1913 for (i = 0; i <
ARRAY_SIZE(wm_controls); i++) {
1920 for (i = 0; i <
ARRAY_SIZE(universe_ac97_controls); i++) {
1927 for (i = 0; i <
ARRAY_SIZE(ac97_controls); i++) {
1937 snd_ice1712_save_gpio_status(ice);
1941 else if ((
id & 0x0F) != 0x01)
1942 snd_printk(
KERN_INFO "Detected unsupported CS8415 rev. (%c)\n", (
char)((
id & 0x0F) +
'A' - 1));
1944 for (i = 0; i <
ARRAY_SIZE(cs8415_controls); i++) {
1950 kctl->
id.device = ice->
pcm->device;
1953 snd_ice1712_restore_gpio_status(ice);
1964 static const unsigned short wm_inits_aureon[] = {
2000 static const unsigned short wm_inits_prodigy[] = {
2042 static const unsigned short cs_inits[] = {
2050 const unsigned short *
p;
2054 err = aureon_ac97_init(ice);
2058 snd_ice1712_gpio_set_dir(ice, 0x5fffff);
2061 snd_ice1712_save_gpio_status(ice);
2064 tmp = snd_ice1712_gpio_read(ice);
2066 snd_ice1712_gpio_write(ice, tmp);
2069 snd_ice1712_gpio_write(ice, tmp);
2072 snd_ice1712_gpio_write(ice, tmp);
2079 p = wm_inits_prodigy;
2081 p = wm_inits_aureon;
2082 for (; *p != (
unsigned short)-1; p += 2)
2083 wm_put(ice, p[0], p[1]);
2088 for (p = cs_inits; *p != (
unsigned short)-1; p++)
2092 aureon_set_headphone_amp(ice, 1);
2095 snd_ice1712_restore_gpio_status(ice);
2106 #ifdef CONFIG_PM_SLEEP
2112 err = aureon_reset(ice);
2119 wm_set_vol(ice, i, spec->
vol[i], spec->
master[i % 2]);
2152 err = aureon_reset(ice);
2160 wm_set_vol(ice, i, spec->
vol[i], spec->
master[i % 2]);
2163 #ifdef CONFIG_PM_SLEEP
2164 ice->pm_resume = aureon_resume;
2165 ice->pm_suspend_enabled = 1;
2177 static unsigned char aureon51_eeprom[] __devinitdata = {
2193 static unsigned char aureon71_eeprom[] __devinitdata = {
2208 #define prodigy71_eeprom aureon71_eeprom
2210 static unsigned char aureon71_universe_eeprom[] __devinitdata = {
2228 static unsigned char prodigy71lt_eeprom[] __devinitdata = {
2243 #define prodigy71xt_eeprom prodigy71lt_eeprom
2249 .name =
"Terratec Aureon 5.1-Sky",
2250 .model =
"aureon51",
2251 .chip_init = aureon_init,
2252 .build_controls = aureon_add_controls,
2253 .eeprom_size =
sizeof(aureon51_eeprom),
2259 .name =
"Terratec Aureon 7.1-Space",
2260 .model =
"aureon71",
2261 .chip_init = aureon_init,
2262 .build_controls = aureon_add_controls,
2263 .eeprom_size =
sizeof(aureon71_eeprom),
2269 .name =
"Terratec Aureon 7.1-Universe",
2270 .model =
"universe",
2271 .chip_init = aureon_init,
2272 .build_controls = aureon_add_controls,
2273 .eeprom_size =
sizeof(aureon71_universe_eeprom),
2275 .
driver =
"Aureon71Univ",
2279 .name =
"Audiotrak Prodigy 7.1",
2280 .model =
"prodigy71",
2281 .chip_init = aureon_init,
2282 .build_controls = aureon_add_controls,
2289 .name =
"Audiotrak Prodigy 7.1 LT",
2290 .model =
"prodigy71lt",
2291 .chip_init = aureon_init,
2292 .build_controls = aureon_add_controls,
2293 .eeprom_size =
sizeof(prodigy71lt_eeprom),
2299 .name =
"Audiotrak Prodigy 7.1 XT",
2300 .model =
"prodigy71xt",
2301 .chip_init = aureon_init,
2302 .build_controls = aureon_add_controls,